@arcgis/common-components 5.2.0-next.104 → 5.2.0-next.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{d as r}from"./BOMP3AYJ.js";import"./TWW63D32.js";import{J as i,P as a}from"./WJZHHIWO.js";var s=class extends i{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=r()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.at(0)}step(t){if(!this.items||!this.currentValue)return;let e=this.items.indexOf(this.currentValue)+(t==="next"?1:-1);e>=this.items.length||e<0||(this.currentValue=this.items.at(e),this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(t){(t.has("currentValue")||t.has("items"))&&this.items?.length&&(this.currentValue??=this.items.at(0)),this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let t=this.items.indexOf(this.currentValue);this.canNext=t>=0&&t<this.items.length-1,this.canPrevious=t>0}};a("arcgis-value-picker-collection",s);export{s as ArcgisValuePickerCollection};
2
+ import{e as r}from"./VJDK62KV.js";import"./TWW63D32.js";import{J as i,P as a}from"./WJZHHIWO.js";var s=class extends i{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=r()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.at(0)}step(t){if(!this.items||!this.currentValue)return;let e=this.items.indexOf(this.currentValue)+(t==="next"?1:-1);e>=this.items.length||e<0||(this.currentValue=this.items.at(e),this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(t){(t.has("currentValue")||t.has("items"))&&this.items?.length&&(this.currentValue??=this.items.at(0)),this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let t=this.items.indexOf(this.currentValue);this.canNext=t>=0&&t<this.items.length-1,this.canPrevious=t>0}};a("arcgis-value-picker-collection",s);export{s as ArcgisValuePickerCollection};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as R}from"./VOBBBIYC.js";import{a as x}from"./SM5735TW.js";import{a as v,b as A,c as w}from"./27EUJ42B.js";import{a as h,c as _}from"./VCZLD7ZT.js";import"./BOMP3AYJ.js";import"./TWW63D32.js";import{I as f,J as y,K as s,M as d,P as C,j as c}from"./WJZHHIWO.js";var $=class extends y{constructor(){super(...arguments),this._elementReferenceController=new x(this),this._childrenObserver=new MutationObserver(()=>this._syncChildren()),this.priority=h.Medium,this.menuAppearance="dropdown",this.overflowActionLabel="More actions"}static{this.properties={_children:16,priority:9,menuAppearance:1,overflowActionLabel:1}}measure(e){let{priority:i,_children:r}=this,l=r?.length??0;if(!l)return[0];let o=v(e),n=l*o;if(!(i<h.NeverCollapse)||l<=1)return[n];let t=o+B(e);return i<=h.ForceCollapse?[t]:w([t,n])}proxiedRender(e,i){let r=this._children;if(!r)return;let{visible:l,hidden:o}=this._resolveActionsFromBudget(r,e,i,this.menuAppearance==="dropdown"),n=W(e),t=this.overflowActionLabel,m=e.tooltipAppearance,k=m!=="native",L=this._elementReferenceController.element,O=m==="calcite-dark"?"calcite-mode-dark":void 0,b="split-anchor",g=o.length?"split-menu":"",u=A(e),M=this.menuAppearance==="action-menu"?c`<calcite-action-menu .label=${t} overlay-positioning=fixed .placement=${u} class=${s(g)}><calcite-action .icon=${n} .scale=${e.scale} class=${s(b)} data-layout=${e.layout??d} slot=trigger title=${t??d} .label=${t} .text=${t} ${f(this._elementReferenceController.ref)}></calcite-action>${o.map(a=>a.proxiedRender(e,"expanded-action"))}</calcite-action-menu>`:c`<calcite-dropdown overlay-positioning=fixed .placement=${u} .scale=${e.scale} class=${s(g)}><calcite-action class=${s(b)} data-layout=${e.layout??d} .icon=${n} .label=${t} .scale=${e.scale} slot=trigger .text=${m==="native"?t:""} title=${t??d} ${f(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown-group selection-mode=single>${o.map(a=>a.proxiedRender(e,"dropdown-item",a===l.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;return c`<div class="split-host">${l.map(a=>a.proxiedRender(e,"collapsed-action"))}${o.length?M:void 0}${o.length&&k?c`<calcite-tooltip class=${s(O)} overlay-positioning=fixed .placement=${u} .referenceElement=${L}><span>${t}</span></calcite-tooltip>`:void 0}</div>`}connectedCallback(){super.connectedCallback(),this._childrenObserver.observe(this.el,{childList:!0}),this._syncChildren()}disconnectedCallback(){this._childrenObserver.disconnect(),super.disconnectedCallback()}_resolveActionsFromBudget(e,i,r,l){let o=e.find(t=>t.active)??e?.toSorted(R)?.at(0);if(Math.floor(r/v(i))>=e.length)return{visible:[...e],hidden:[]};if(l)return{visible:[o??e[0]],hidden:[...e]};let n=[...e];return{visible:n.splice(n.indexOf(o),1),hidden:n}}_syncChildren(){this._componentWaitAbortController?.abort();let e=Array.from(this.el.querySelectorAll("arcgis-toolbar-item")),i=new AbortController;this._componentWaitAbortController=i,Promise.all(e.map(r=>r.componentOnReady())).then(()=>{!this.isConnected||i.signal.aborted||(this._children=e)})}};function W({layout:p,relativePosition:e}){return p==="horizontal"?e.startsWith("top")?"chevron-down":"chevron-up":e.endsWith("left")?"chevron-right":"chevron-left"}function B({layout:p,scale:e}){return _.splitButtonPart[p][e]}C("arcgis-toolbar-split-button",$);export{$ as ArcgisToolbarSplitButton};
2
+ import{a as R}from"./VOBBBIYC.js";import{a as x}from"./SM5735TW.js";import{a as v,b as A,c as w}from"./27EUJ42B.js";import{a as h,c as _}from"./VCZLD7ZT.js";import"./VJDK62KV.js";import"./TWW63D32.js";import{I as f,J as y,K as s,M as d,P as C,j as c}from"./WJZHHIWO.js";var $=class extends y{constructor(){super(...arguments),this._elementReferenceController=new x(this),this._childrenObserver=new MutationObserver(()=>this._syncChildren()),this.priority=h.Medium,this.menuAppearance="dropdown",this.overflowActionLabel="More actions"}static{this.properties={_children:16,priority:9,menuAppearance:1,overflowActionLabel:1}}measure(e){let{priority:i,_children:r}=this,l=r?.length??0;if(!l)return[0];let o=v(e),n=l*o;if(!(i<h.NeverCollapse)||l<=1)return[n];let t=o+B(e);return i<=h.ForceCollapse?[t]:w([t,n])}proxiedRender(e,i){let r=this._children;if(!r)return;let{visible:l,hidden:o}=this._resolveActionsFromBudget(r,e,i,this.menuAppearance==="dropdown"),n=W(e),t=this.overflowActionLabel,m=e.tooltipAppearance,k=m!=="native",L=this._elementReferenceController.element,O=m==="calcite-dark"?"calcite-mode-dark":void 0,b="split-anchor",g=o.length?"split-menu":"",u=A(e),M=this.menuAppearance==="action-menu"?c`<calcite-action-menu .label=${t} overlay-positioning=fixed .placement=${u} class=${s(g)}><calcite-action .icon=${n} .scale=${e.scale} class=${s(b)} data-layout=${e.layout??d} slot=trigger title=${t??d} .label=${t} .text=${t} ${f(this._elementReferenceController.ref)}></calcite-action>${o.map(a=>a.proxiedRender(e,"expanded-action"))}</calcite-action-menu>`:c`<calcite-dropdown overlay-positioning=fixed .placement=${u} .scale=${e.scale} class=${s(g)}><calcite-action class=${s(b)} data-layout=${e.layout??d} .icon=${n} .label=${t} .scale=${e.scale} slot=trigger .text=${m==="native"?t:""} title=${t??d} ${f(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown-group selection-mode=single>${o.map(a=>a.proxiedRender(e,"dropdown-item",a===l.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;return c`<div class="split-host">${l.map(a=>a.proxiedRender(e,"collapsed-action"))}${o.length?M:void 0}${o.length&&k?c`<calcite-tooltip class=${s(O)} overlay-positioning=fixed .placement=${u} .referenceElement=${L}><span>${t}</span></calcite-tooltip>`:void 0}</div>`}connectedCallback(){super.connectedCallback(),this._childrenObserver.observe(this.el,{childList:!0}),this._syncChildren()}disconnectedCallback(){this._childrenObserver.disconnect(),super.disconnectedCallback()}_resolveActionsFromBudget(e,i,r,l){let o=e.find(t=>t.active)??e?.toSorted(R)?.at(0);if(Math.floor(r/v(i))>=e.length)return{visible:[...e],hidden:[]};if(l)return{visible:[o??e[0]],hidden:[...e]};let n=[...e];return{visible:n.splice(n.indexOf(o),1),hidden:n}}_syncChildren(){this._componentWaitAbortController?.abort();let e=Array.from(this.el.querySelectorAll("arcgis-toolbar-item")),i=new AbortController;this._componentWaitAbortController=i,Promise.all(e.map(r=>r.componentOnReady())).then(()=>{!this.isConnected||i.signal.aborted||(this._children=e)})}};function W({layout:p,relativePosition:e}){return p==="horizontal"?e.startsWith("top")?"chevron-down":"chevron-up":e.endsWith("left")?"chevron-right":"chevron-left"}function B({layout:p,scale:e}){return _.splitButtonPart[p][e]}C("arcgis-toolbar-split-button",$);export{$ as ArcgisToolbarSplitButton};