p-358263ac.system.js 2.3 KB

123456
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.82
  5. */
  6. System.register(["./p-a4729c51.system.js","./p-3de000e5.system.js","./p-8b0ea955.system.js","./p-cca09bde.system.js"],(function(e){"use strict";var t,n,r,o,i;return{setters:[function(e){t=e.f;n=e.h},function(e){r=e.a},function(e){o=e.S},function(e){i=e.S}],execute:function(){e("t",p);var c=e("o",150);var a=2;var u=function(e){var t=e.height,n=e.actionHeight,r=e.groupCount;return Math.floor((t-r*a)/n)};var l=e("g",(function(e){var t=e.actionCount,n=e.actionHeight,r=e.height,o=e.groupCount;return Math.max(t-u({height:r,actionHeight:n,groupCount:o}),0)}));var s=e("q",(function(e){return Array.from(e.querySelectorAll("calcite-action")).filter((function(e){return e.closest("calcite-action-menu")?e.slot===o.trigger:true}))}));var f=e("a",(function(e){var n=e.actionGroups,r=e.expanded,o=e.overflowCount;var c=o;n.reverse().forEach((function(e){var n=0;var o=s(e).reverse();o.forEach((function(e){if(e.slot===i.menuActions){e.removeAttribute("slot");e.textEnabled=r}}));if(c>0){o.some((function(e){var t=o.filter((function(e){return!e.slot}));if(t.length>1&&o.length>2&&!e.closest("calcite-action-menu")){e.textEnabled=true;e.setAttribute("slot",i.menuActions);n++;if(n>1){c--}}return c<1}))}t(e)}))}));var v={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function h(e,t){var n;return e||((n=t.closest("calcite-shell-panel"))===null||n===void 0?void 0:n.position)||"start"}function p(e){var t=e.parent,n=e.expanded;s(t).filter((function(e){return e.slot!==i.menuActions})).forEach((function(e){return e.textEnabled=n}));t.querySelectorAll("calcite-action-group").forEach((function(e){return e.expanded=n}))}var d=function(e){var t=e.tooltip,n=e.referenceElement,r=e.expanded,o=e.ref;if(t){t.referenceElement=!r&&n?n:null}if(o){o(n)}return n};var g=e("E",(function(e){var t=e.expanded,o=e.intlExpand,i=e.intlCollapse,c=e.toggle,a=e.el,u=e.position,l=e.tooltip,s=e.ref,f=e.scale;var p=r(a)==="rtl";var g=t?i:o;var m=[v.chevronsLeft,v.chevronsRight];if(p){m.reverse()}var x=h(u,a)==="end";var E=x?m[1]:m[0];var b=x?m[0]:m[1];var y=n("calcite-action",{icon:t?E:b,onClick:c,ref:function(e){return d({tooltip:l,referenceElement:e,expanded:t,ref:s})},scale:f,text:g,textEnabled:t});return y}))}}}));