@arcgis/common-components 6.0.0-next.3 → 6.0.0-next.30

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.
Files changed (115) hide show
  1. package/dist/cdn/2S4SSY4K.js +2 -0
  2. package/dist/cdn/{YEFEVEP6.js → 3UAY23XT.js} +1 -1
  3. package/dist/cdn/{OTWADB4M.js → 3ZTHRAIZ.js} +1 -1
  4. package/dist/cdn/{TXQKK4DJ.js → 4D35RDOE.js} +1 -1
  5. package/dist/cdn/4IMLX5B4.js +4 -0
  6. package/dist/cdn/5GVJKVEV.js +2 -0
  7. package/dist/cdn/6LZNNXUL.js +2 -0
  8. package/dist/cdn/74TVQE6W.js +2 -0
  9. package/dist/cdn/7WN227WZ.js +8207 -0
  10. package/dist/cdn/ANK7TFWV.js +2 -0
  11. package/dist/cdn/{X6DNIKWY.js → BAALW3SQ.js} +1 -1
  12. package/dist/cdn/{LNXO5YIS.js → BDIGRQ2U.js} +1 -1
  13. package/dist/cdn/BMR5AH6W.js +2 -0
  14. package/dist/cdn/DAAON2UO.js +3 -0
  15. package/dist/cdn/{IECXEZNI.js → EOGA62GK.js} +1 -1
  16. package/dist/cdn/{OMROUY3L.js → FESNPMRM.js} +1 -1
  17. package/dist/cdn/FGG3L42U.js +2 -0
  18. package/dist/cdn/{OIGA7XBZ.js → FVFYAK24.js} +1 -1
  19. package/dist/cdn/GZVXOCN5.js +2 -0
  20. package/dist/cdn/{D4UHHQ35.js → IOAVVVNO.js} +1 -1
  21. package/dist/cdn/{B33S3YBM.js → IZD4AM2W.js} +1 -1
  22. package/dist/cdn/{MFGUTQRR.js → J4AV4EAC.js} +1 -1
  23. package/dist/cdn/JYWWX277.js +2 -0
  24. package/dist/cdn/KEQPWVA6.js +2 -0
  25. package/dist/cdn/{TO3YFXVJ.js → LLLQXE2U.js} +1 -1
  26. package/dist/cdn/{KDCSDIUQ.js → M7F7EBFY.js} +1 -1
  27. package/dist/cdn/NZDJ3HVF.js +2 -0
  28. package/dist/cdn/OUPGMHLD.js +2 -0
  29. package/dist/cdn/{JTQN5KMG.js → PIXY2HTI.js} +1 -1
  30. package/dist/cdn/{BZFAYVKR.js → PJGWH4LW.js} +1 -1
  31. package/dist/cdn/SRO2CZ77.js +2 -0
  32. package/dist/cdn/T57JKNGO.js +2 -0
  33. package/dist/cdn/{EB5MDEWF.js → TE77L77R.js} +1 -1
  34. package/dist/cdn/TWPYXZ2O.js +2 -0
  35. package/dist/cdn/{735FTIBP.js → U6OGOB7D.js} +1 -1
  36. package/dist/cdn/V5FMQXMU.js +2 -0
  37. package/dist/cdn/{HYFFUYAU.js → VNC7X43V.js} +1 -1
  38. package/dist/cdn/W2W34T5K.js +2 -0
  39. package/dist/cdn/W7CWMG2O.js +2 -0
  40. package/dist/cdn/XMMFL5H3.js +2 -0
  41. package/dist/cdn/XQ65BGER.js +2 -0
  42. package/dist/cdn/ZJMMAZFG.js +2 -0
  43. package/dist/cdn/ZLVMV6TP.js +2 -0
  44. package/dist/cdn/{34AP2EEB.js → ZMYTELNC.js} +1 -1
  45. package/dist/cdn/assets/layer-replace/t9n/messages.en.json +1 -0
  46. package/dist/cdn/index.js +1 -1
  47. package/dist/cdn/main.css +1 -1
  48. package/dist/chunks/sharedCacheDirective.js +74 -0
  49. package/dist/chunks/toolbar.js +3 -3
  50. package/dist/components/arcgis-ckeditor5/customElement.js +144 -147
  51. package/dist/components/arcgis-color-input/customElement.js +29 -29
  52. package/dist/components/arcgis-color-input/index.js +2 -1
  53. package/dist/components/arcgis-field-pick-list/customElement.js +8 -8
  54. package/dist/components/arcgis-field-pick-list/index.js +1 -1
  55. package/dist/components/arcgis-html-content/customElement.d.ts +42 -0
  56. package/dist/components/arcgis-html-content/customElement.js +71 -0
  57. package/dist/components/arcgis-html-content/index.d.ts +1 -0
  58. package/dist/components/arcgis-html-content/index.js +1 -0
  59. package/dist/components/arcgis-label-input/customElement.js +1 -1
  60. package/dist/components/arcgis-layer-replace/customElement.d.ts +437 -0
  61. package/dist/components/arcgis-layer-replace/customElement.js +376 -0
  62. package/dist/components/arcgis-layer-replace/index.d.ts +1 -0
  63. package/dist/components/arcgis-layer-replace/index.js +7 -0
  64. package/dist/components/arcgis-slider/customElement.js +543 -455
  65. package/dist/components/arcgis-slider-field/customElement.d.ts +43 -41
  66. package/dist/components/arcgis-slider-field/customElement.js +45 -39
  67. package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +21 -19
  68. package/dist/components/arcgis-slider-histogram-range/customElement.js +28 -22
  69. package/dist/components/arcgis-ticks/customElement.js +8 -8
  70. package/dist/components/arcgis-toolbar/customElement.d.ts +6 -3
  71. package/dist/components/arcgis-toolbar/customElement.js +30 -29
  72. package/dist/components/arcgis-toolbar/types.d.ts +1 -0
  73. package/dist/components/arcgis-toolbar-group/customElement.js +7 -7
  74. package/dist/components/arcgis-toolbar-item/customElement.js +1 -1
  75. package/dist/components/arcgis-toolbar-stack/customElement.js +51 -116
  76. package/dist/components/arcgis-unique-values-list/customElement.js +11 -11
  77. package/dist/components/arcgis-unique-values-list/index.js +1 -1
  78. package/dist/components/arcgis-value-picker/customElement.js +14 -14
  79. package/dist/components/arcgis-value-picker-combobox/customElement.js +4 -4
  80. package/dist/components/arcgis-value-picker-label/customElement.js +5 -5
  81. package/dist/components/arcgis-value-picker-slider/customElement.js +17 -17
  82. package/dist/docs/api.json +1 -1
  83. package/dist/docs/docs.json +1 -1
  84. package/dist/docs/vscode.css-custom-data.json +1 -1
  85. package/dist/docs/vscode.html-custom-data.json +1 -1
  86. package/dist/docs/web-types.json +1 -1
  87. package/dist/index.d.ts +15 -0
  88. package/dist/index.js +8 -5
  89. package/dist/loader.js +6 -4
  90. package/dist/types/lumina.d.ts +13 -2
  91. package/dist/types/preact.d.ts +15 -2
  92. package/dist/types/react.d.ts +17 -2
  93. package/dist/types/stencil.d.ts +13 -2
  94. package/dist/utils/sharedCacheDirective.d.ts +68 -0
  95. package/package.json +6 -6
  96. package/dist/cdn/3AFEXHZ5.js +0 -2
  97. package/dist/cdn/5EA7SGHX.js +0 -2
  98. package/dist/cdn/5XRYXPOX.js +0 -2
  99. package/dist/cdn/ATLXGXTH.js +0 -2
  100. package/dist/cdn/BCN6LPOG.js +0 -4
  101. package/dist/cdn/CKGWDI7B.js +0 -2
  102. package/dist/cdn/DR2THZQU.js +0 -8208
  103. package/dist/cdn/EM4OQXFS.js +0 -2
  104. package/dist/cdn/GDRW3MIZ.js +0 -2
  105. package/dist/cdn/HJ3EJZFF.js +0 -2
  106. package/dist/cdn/LLATF73T.js +0 -2
  107. package/dist/cdn/M2J3GPM4.js +0 -2
  108. package/dist/cdn/M3SFEFPX.js +0 -2
  109. package/dist/cdn/QCUF7B3I.js +0 -2
  110. package/dist/cdn/S4XOD4YS.js +0 -2
  111. package/dist/cdn/UIBTY5FF.js +0 -2
  112. package/dist/cdn/XUPA27AW.js +0 -2
  113. package/dist/cdn/XX2ZCFWI.js +0 -2
  114. package/dist/cdn/ZCVP2N2O.js +0 -2
  115. package/dist/cdn/ZGYD3GAS.js +0 -2
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as h}from"./SANPZYEG.js";import"./5KBPWYPL.js";import{a as d}from"./TO3YFXVJ.js";import"./LLATF73T.js";import"./XX2ZCFWI.js";import{J as u,K as p,L as c,R as v,h as m,j as g,t as r}from"./BCN6LPOG.js";var y=m`:host{display:block;width:100%;height:100%}`,b="double",o=class extends c{constructor(){super(...arguments),this.#s=u(),this.#t=void 0,this.messages=d({}),this._strategy=h(b),this.disabled=!1,this.fieldType=b,this.fillPlacement="start",this.layout="horizontal",this.max="",this.min="",this.mirrored=!1,this.popoverLabel="",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.values="",this.valueLabelsEditingEnabled=!1,this.valueLabelsDisplay="always",this.valueLabelsPlacement="start",this.arcgisActiveValueChange=r({cancelable:!1}),this.arcgisChange=r({cancelable:!1}),this.arcgisInput=r({cancelable:!1}),this.arcgisRangeChange=r({cancelable:!1})}static{this.properties={_strategy:16,activeValue:32,disabled:5,fieldType:1,fillPlacement:1,label:1,labelFormatter:0,layout:1,max:1,messageOverrides:0,min:1,mirrored:5,popoverLabel:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,values:1,valueLabelsEditingEnabled:5,valueLabelsDisplay:1,valueLabelsPlacement:1,valuesAsNumbers:32,valuesAsDateOnly:32,valuesAsTimeOnly:32,valuesAsTimestampOffset:32,valuesAsFieldType:32}}static{this.styles=y}#s;#t;get activeValue(){let e=this.#s.value?.activeValue;return typeof e=="number"?this._strategy.serialize(e):e}get valuesAsNumbers(){return this.#e(this.values).map(e=>e??NaN)}get valuesAsDateOnly(){return this.#e(this.values).map(e=>e===void 0?null:this._strategy.toDateOnly(e))}get valuesAsTimeOnly(){return this.#e(this.values).map(e=>e===void 0?null:this._strategy.toTimeOnly(e))}get valuesAsTimestampOffset(){return this.#e(this.values).map(e=>e===void 0?null:this._strategy.toTimestampOffset(e))}get valuesAsFieldType(){return this.#e(this.values).map(e=>e===void 0?NaN:this._strategy.toFieldType(e))}willUpdate(e){super.willUpdate(e),e.has("fieldType")&&(this._strategy=h(this.fieldType)),(e.has("messages")||e.has("fieldType")||e.has("labelFormatter"))&&(this.#t=this.#m(this.messages._lang)),(e.has("values")||e.has("min")||e.has("max")||e.has("fieldType"))&&this.#u()}#r(e){e.stopPropagation(),this.#a(e.currentTarget.values),this.arcgisInput.emit()}#n(e){e.stopPropagation(),this.#a(e.currentTarget.values),this.arcgisChange.emit()}#h(e){e.stopPropagation(),this.arcgisActiveValueChange.emit()}#o(e){e.stopPropagation();let s=e.currentTarget;this.min=this._strategy.serialize(s.min),this.max=this._strategy.serialize(s.max),this.#a(s.values),this.arcgisRangeChange.emit()}#m(e){return(s,a,t)=>{let i=l=>this._strategy.format(e,l,a,t)??t(l);return this.labelFormatter?.(s,a,i)??i(s)}}#a(e){this.values=e.map(s=>this._strategy.serialize(s)).join(",")}#e(e){return e.split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>this._strategy.parse(s))}#i(e){return this.#e(e).filter(s=>Number.isFinite(s))}#l(e){let s=this._strategy,a=s.parse(this.min),t=s.parse(this.max),i=Number.isFinite(a)?a:void 0,l=Number.isFinite(t)?t:void 0;i!=null&&l!=null&&i>=l&&(i=void 0,l=void 0);let n=s.resolveRange(e,i,l);return n.min>=n.max?s.resolveRange(e,void 0,void 0):n}#g(e,s,a){return e.map(t=>Math.min(a,Math.max(s,t))).sort((t,i)=>t-i)}#u(){let e=this.#i(this.values),s=this.#l(e),a=this._strategy.serialize(s.min),t=this._strategy.serialize(s.max);a!==this.min&&(this.min=a),t!==this.max&&(this.max=t);let i=this.#g(e,s.min,s.max).map(l=>this._strategy.serialize(l)).join(",");i!==this.values&&(this.values=i)}render(){let e=this.#i(this.values),s=this.#l(e),a=this._strategy.editable,t=this._strategy.steps;return g`<arcgis-slider .ariaLabel=${this.label} .disabled=${this.disabled} .labelFormatter=${this.#t} .layout=${this.layout} .max=${s.max} .min=${s.min} .mirrored=${this.mirrored} .popoverLabel=${this.popoverLabel} .precision=${this._strategy.precision} .fillPlacement=${this.fillPlacement} .steps=${t} .rangeLabelsEditingEnabled=${a&&this.rangeLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .showRangeLabels=${this.showRangeLabels} .valueLabelsDisplay=${this.valueLabelsDisplay} .valueLabelsEditingEnabled=${a&&this.valueLabelsEditingEnabled} .valueLabelsPlacement=${this.valueLabelsPlacement} .values=${e} @arcgisChange=${this.#n} @arcgisInput=${this.#r} @arcgisActiveValueChange=${this.#h} @arcgisRangeChange=${this.#o} ${p(this.#s)}><slot name=content-start slot=content-start></slot><slot name=content-end slot=content-end></slot><slot name=popover slot=popover></slot></arcgis-slider>`}};v("arcgis-slider-field",o);export{o as ArcgisSliderField};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as g}from"./KDCSDIUQ.js";import{b as v}from"./DPJGC3YQ.js";import{c as s}from"./32MHBJSZ.js";import"./LLATF73T.js";import"./XX2ZCFWI.js";import{K as h,L as m,M as p,O as o,R as $,j as a,t as d}from"./BCN6LPOG.js";var n=class extends m{constructor(){super(...arguments),this._active=!1,this._elementReferenceController=new g(this),this.icon="question-mark",this.tooltipText="",this.labelText="",this.disabled=!1,this.loading=!1,this.iconFlipRtl=!1,this.arcgisItemSelected=d()}static{this.properties={icon:3,lastActivated:0,active:7,tooltipText:1,labelText:3,disabled:7,loading:7,iconFlipRtl:7,actionElement:32}}get active(){return this._active}set active(e){e!==this._active&&(this._active=e,e&&(this.lastActivated=new Date))}get actionElement(){return this._elementReferenceController.element}measure({scale:e}){return[s.action[e]+s.actionPadding[e]]}proxiedRender(e,t,b){let l=e.tooltipAppearance,r=this._elementReferenceController.element,f=l!=="native"&&t==="collapsed-action",x=l==="native"&&t==="collapsed-action",u=l==="calcite-dark"?"calcite-mode-dark":void 0,_=v(e),i=this.tooltipText||this.labelText;return t==="dropdown-item"?a`<calcite-dropdown-item .disabled=${this.disabled} icon-start=${this.icon??o} .iconFlipRtl=${this.iconFlipRtl?"both":void 0} .label=${i} @click=${c=>this._handleDropdownItemClick(c)} .selected=${this.active||b}>${this.labelText}</calcite-dropdown-item>`:a`<calcite-action .active=${this.active} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .label=${i} .loading=${this.loading} @click=${c=>this._handleActionClick(c)} .scale=${e.scale} .text=${this.labelText} .textEnabled=${t==="expanded-action"} title=${(x?i:void 0)??o} ${h(this._elementReferenceController.ref)}></calcite-action>${f&&r?a`<calcite-tooltip class=${p(u)} close-on-click overlay-positioning=fixed .placement=${_} .referenceElement=${r}><span>${i}</span></calcite-tooltip>`:void 0}`}_handleActionClick(e){this.isConnected&&(this.lastActivated=new Date,this.arcgisItemSelected?.emit({element:e.currentTarget}))}_handleDropdownItemClick(e){this.isConnected&&(this.lastActivated=new Date,this.arcgisItemSelected?.emit({element:e.currentTarget}))}};$("arcgis-toolbar-item",n);export{n as ArcgisToolbarItem};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{c as b}from"./DPJGC3YQ.js";import{a as m,b as g,c as i,d as f}from"./32MHBJSZ.js";import{L as d,O as h,R as u,j as p}from"./BCN6LPOG.js";var l=class extends d{constructor(){super(...arguments),this.#r=new MutationObserver(()=>this.#e()),this.preferEndSlot=!1,this.priority=m.Default}static{this.properties={_children:16,preferEndSlot:5,priority:9}}#t;#r;measure(r){let t=this._children;if(!t?.length)return[0];let o=i.groupSeparator+i.groupPadding[r.scale],s=t.map(e=>e.measure(r)).reduce((e,a)=>e.flatMap(n=>a.map(c=>n+c)),[0]);return b(s.map(e=>o+e))}proxiedRender(r,t){let o=this._children;if(!o)return;let s=this.preferEndSlot?"actions-end":void 0,e=t-i.groupPadding[r.scale]-i.groupSeparator,a=f(o,r,e);return p`<calcite-action-group .scale=${r.scale} .layout=${r.layout} slot=${s??h}>${a.map(({group:n,budget:c})=>n.proxiedRender(r,c))}</calcite-action-group>`}connectedCallback(){super.connectedCallback(),this.#r.observe(this.el,{childList:!0}),this.#e()}disconnectedCallback(){this.#r.disconnect(),super.disconnectedCallback()}#e(){this.#t?.abort();let r=Array.from(this.el.children).filter(g),t=new AbortController;this.#t=t,Promise.all(r.map(o=>o.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._children=r)})}};u("arcgis-toolbar-group",l);export{l as ArcgisToolbarGroup};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{d as h,g as f}from"./XX2ZCFWI.js";import{a as O,b as w,c as $,d as g,e as v,f as A,g as N,o as b,r as E,s as _,u as y}from"./BCN6LPOG.js";var j=t=>(...s)=>{let e=v(),o=new t(...s),r=o.exports;g(e.at(-1));let n=o.component.manager;n.W(o,r),o.watchExports(n.W.bind(n,o)),A(o);let a=[o.component,...e].reverse();return E(a,i=>i===void 0?void 0:U(o,i,r),r)},U=(t,{host:s,key:e,isReactive:o},r)=>{let n=s,a=n[e]!==t.exports,i=n[e]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[e]=t.exports),s===t.component){if(o){let l=t.component.manager;i&&l.W(t,n[e]),t.onUpdate(u=>{if(u.has(e)){let P=n[e];P!==t.exports&&l.W(t,P)}})}t.O=o?void 0:e}let d=t.component.constructor.elementProperties.get(e)?.readOnly;t.watchExports(()=>{n[e]!==t.exports&&(d?N(()=>{n[e]=t.exports}):n[e]=t.exports)})};var x=t=>{let s=f(t,"lang",globalThis.navigator?.language||m);return{lang:s,t9nLocale:z(s)}},V=(t,s,e,o)=>{let r,n=()=>F(t,s(),o).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&e(a),r=a}).catch(a=>{b("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),h(t,["lang"],n)},F=async(t,s,e=t.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:r}=x(t),n=`${s}/${e}/t9n`,i=e===null?{}:await R(r,n,"messages.");return{lang:o,t9nLocale:r,t9nStrings:i}};var W="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),K=new Set(W),m="en",q={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},R=async(t,s,e="")=>{let o=`${s}/${e}`,r=`${o}${t}.json`;return D[r]??=k(t,o),await D[r]},D={},k=async(t,s)=>{let e=`${s}${t}.json`;try{let o=await fetch(e);if(o.ok)return await o.json()}catch(o){return b("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:o}}),{}}return t===m?{}:await k(m,s)},z=t=>{let[s,e]=t.split("-"),o=s.toLowerCase(),r=o;return e&&(r=`${o}-${e.toUpperCase()}`),r=q[r]??r,K.has(r)?r:e?z(o):m};var S=t=>B(void 0,t);var C=class extends y{constructor(s,e){super(s);let o=this.exports;try{w(this.component);let r=e(this.component,this),n=this.exports!==o;if(O(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},B=j(C),ct=(t,s)=>new L(t,s),L=class extends y{#t;#e;#o;constructor(s,e){super(),!!1&&(this.#e=s,this.#o=e,this.#t=new MutationObserver(o=>{o.forEach(r=>{s.includes(r.attributeName)&&e.call(this.component,this.component.el.getAttribute(r.attributeName),r.oldValue,r.attributeName)})}))}hostConnected(){this.#e.forEach(s=>{this.component.el.hasAttribute(s)&&this.#o.call(this.component,this.component.el.getAttribute(s),null,s)}),this.#t.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#e})}hostDisconnected(){this.#t.disconnect()}};var M="ltr",lt=()=>S((t,s)=>{s.exports=M,s.onLifecycle(()=>{let e=()=>{let o=f(t.el,"dir",M);s.exports=o==="rtl"?"rtl":"ltr"};return e(),h(t.el,["dir"],e)})}),pt=t=>(s={})=>S((e,o)=>{let r=x(e.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=e;o.onLifecycle(()=>V(e.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};o.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in e&&e.label==null&&(e.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=o.exports,d=p._original??p,l=T(d,c);c&&(l._original=d),o.exports=l};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(o.setProvisionalExports(n,!1),o.ready):n}),T=(t,s)=>{if(!s)return t;let e={...t};return Object.entries(s).forEach(([o,r])=>{t[o]!==void 0&&(typeof r=="object"?e[o]=T(t[o],r):e[o]=r??t[o])}),e},dt=t=>H,G="arcgisPropertyChange",H=(...t)=>{let s=$(),e=_(G,void 0,s),o=!0;return s.manager.onUpdated(r=>{if(o||!s.el.isConnected){o=!1;return}for(let n of t)r.has(n)&&e.emit({name:n})}),e};export{j as a,ct as b,lt as c,pt as d,dt as e};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as N}from"./CFEMTMZX.js";import{a as K,b as Q}from"./LNXO5YIS.js";import{a as X}from"./TO3YFXVJ.js";import"./LLATF73T.js";import"./XX2ZCFWI.js";import{a as _}from"./EB5MDEWF.js";import{A as V,B as z,C as S,D as $,E as U,F as j,G as I,J as w,K as u,L as q,M as E,N as k,O as v,P,R as J,h as H,j as a,l as R,o as b,p as G,t as F,z as W}from"./BCN6LPOG.js";var Y=(l,e,t)=>{let s=new Map;for(let i=e;i<=t;i++)s.set(l[i],i);return s},D=V(class extends z{constructor(l){if(super(l),l.type!==W.CHILD)throw Error("repeat() can only be used in text expressions")}dt(l,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);let i=[],o=[],n=0;for(let r of l)i[n]=s?s(r,n):n,o[n]=t(r,n),n++;return{values:o,keys:i}}render(l,e,t){return this.dt(l,e,t).values}update(l,[e,t,s]){let i=j(l),{values:o,keys:n}=this.dt(e,t,s);if(!Array.isArray(i))return this.ut=n,o;let r=this.ut??=[],f=[],x,A,d=0,p=i.length-1,c=0,m=o.length-1;for(;d<=p&&c<=m;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(r[d]===n[c])f[c]=$(i[d],o[c]),d++,c++;else if(r[p]===n[m])f[m]=$(i[p],o[m]),p--,m--;else if(r[d]===n[m])f[m]=$(i[d],o[m]),S(l,f[m+1],i[d]),d++,m--;else if(r[p]===n[c])f[c]=$(i[p],o[c]),S(l,i[d],i[p]),p--,c++;else if(x===void 0&&(x=Y(n,c,m),A=Y(r,d,p)),x.has(r[d]))if(x.has(r[p])){let g=A.get(n[c]),T=g!==void 0?i[g]:null;if(T===null){let M=S(l,i[d]);$(M,o[c]),f[c]=M}else f[c]=$(T,o[c]),S(l,i[d],T),i[g]=null;c++}else I(i[p]),p--;else I(i[d]),d++;for(;c<=m;){let g=S(l,f[m+1]);$(g,o[c]),f[c++]=g}for(;d<=p;){let g=i[d++];g!==null&&I(g)}return this.ut=n,U(l,f),R}});var h=new Map;h.set("oid","key");h.set("guid","key");h.set("global-id","key");h.set("blob","binary");h.set("integer","integer");h.set("small-integer","integer");h.set("big-integer","integer");h.set("single","number");h.set("double","number");h.set("long","number");h.set("number","number");h.set("date","date-time");h.set("date-only","calendar");h.set("time-only","clock");h.set("timestamp-offset","time-zone");h.set("string","string");var Z=({fieldType:l})=>a`<calcite-icon scale=s .icon=${h.get(l)}></calcite-icon>`;function ee(l){return!!l.length&&"fields"in l[0]}function y(l){return!!l.length&&"subFieldInfos"in l[0]}function te(l){return l.filter(e=>y(e.fields))}function ie(l){return l.flatMap(e=>e.fields)}function se(l){return l.flatMap(e=>y(e.fields)?[]:e.fields)}function C(l){return l.flatMap(e=>y(e.fields)?e.fields.flatMap(t=>t.subFieldInfos):e.fields)}function le(l,e){return l.flatMap(t=>y(t.fields)?t.fields.flatMap(s=>s.subFieldInfos.filter(i=>L(i,e,!0))):t.fields.filter(s=>B(s,e)))}function B(l,e){return e?"subFieldInfos"in l?L(l,e)||l.subFieldInfos.some(t=>L(t,e,!0)):L(l,e):!0}function L(l,e,t=!1){return[t?l.name.split("/").pop():l.name,l.alias,l.description].some(s=>s?.toLocaleLowerCase().includes(e.toLocaleLowerCase()))}var oe=H`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,O=class extends q{constructor(){super(...arguments),this._messages=X({blocking:!0}),this.popoverNode=w(),this.listWrapper=w(),this.listNode=w(),this.flowElement=w(),this.panelElement=w(),this.dropdownNode=w(),this.fieldInfoFlowItemEl=w(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this.initialized=!1,this._propWatcherTask=new K(this,{task:async([e])=>{if(!this.listOnly&&!Q(e?.refElement))throw b("error",this,G("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=F(),this.arcgisClose=F(),this.arcgisDeleteField=F(),this.arcgisEditField=F(),this.arcgisFieldPickListChange=F(),this.arcgisFieldPickListDismissed=F(),this.arcgisFieldPickListSortByChange=F(),this.arcgisSortByChange=F()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=oe}async reposition(){await this.popoverNode.value?.reposition()}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,b("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists(),this.initialized=!0}willUpdate(e){this.initialized&&(e.has("fields")||e.has("sortBy")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&(e.has("sortBy")&&(this.lastSortBy=this.sortBy??this.lastSortBy),this.updateGroupedLists())}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listWrapper.value?.getBoundingClientRect();t&&(this.listWrapper.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],s=t.filter(i=>i.type==="none");return t=t.filter(i=>i.type!=="none"),this.lastSortBy==="display"?t.sort((i,o)=>i.alias.localeCompare(o.alias)):this.lastSortBy==="field"?t.sort((i,o)=>i.name.localeCompare(o.name)):this.lastSortBy==="type"&&t.sort((i,o)=>i.type.localeCompare(o.type)),t=t.concat(s),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(N.expression)}canDeselectAll(){let e=C(this.allLists);return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(N.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],ee(this.fields))for(let e of this.fields){if(this.listOnly&&y(e.fields)){b("error",this,"subFieldInfos are not supported if listOnly is true.");continue}this.allLists.push({title:e.title,fields:this.getSortedGroupFields(e.fields)})}else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:this.getSortedList(this.fields)}]}getSortedGroupFields(e){return y(e)?this.getSortedList(e).map(t=>({...t,subFieldInfos:this.getSortedList(t.subFieldInfos).map(s=>({...s,name:`${t.name}/${s.name}`}))})):this.getSortedList(e)}addFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${o=>{o.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??v} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);s.appendChild(i),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl?.value.setFocus()},1)}addSubFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=e.subFieldInfos.filter(n=>L(n,this.filterText,!0)),o=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.description??void 0} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${n=>{n.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias??e.name} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${n=>{this.updateSelectedFieldsForList(n.currentTarget,e.subFieldInfos),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}}>${i.map(n=>this.renderCalciteListItem(n,!1))}</calcite-list>${this.filterText&&!i.length&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}</calcite-flow-item>`);s.appendChild(o),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl.value?.setFocus()},1)}shouldRenderSelectionButton(e){return this.multiple&&this.showSelectionAll&&(!e||!this.filterText||!!this.filterFields?.length)}handleListSelectionChange(e){this.updateSelectedFieldsForList(this.listNode.value,e),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}updateSelectedFieldsForList(e,t){let s=new Set(t.map(r=>r.name)),i=e.selectedItems.map(r=>r.value),o=this.selectedFields.filter(r=>!s.has(r)||i.includes(r)),n=i.filter(r=>!this.selectedFields.includes(r));this.selectedFields=this.multiple?[...new Set([...o,...n])]:i,this.reorderSelectedFieldsByCurrentListOrder()}setSortBy(e){this.lastSortBy=e,this.updateGroupedLists(),this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy),this.reorderSelectedFieldsByCurrentListOrder()&&(this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}))}reorderSelectedFieldsByCurrentListOrder(){if(!this.selectedFields.length)return!1;let e=C(this.allLists).map(o=>o.name),t=new Set(this.selectedFields),s=e.filter(o=>t.has(o)),i=s.length!==this.selectedFields.length||s.some((o,n)=>o!==this.selectedFields[n]);return i&&(this.selectedFields=[...s]),i}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),_(`${t.autoClose}`,a`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.popoverNode)}><calcite-flow style=${k({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${u(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&a`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?a`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:a`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`)},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=se(this.allLists),s=te(this.allLists),i=C(this.allLists).length>=this.showFilterLength;return t.length||s.length?s.length?this.renderSplitLists(t,s,i):this.renderTopLevelOnlyFieldList(e,t,i):a`<slot name=no-fields></slot>`}renderSplitLists(e,t,s){let i=C(this.allLists),o=ie(this.allLists).some(n=>B(n,this.filterText));return a`${s?a`<div class="list-controls"><calcite-filter .items=${i} .filterProps=${["name","alias","description"]} .placeholder=${this.filterPlaceholderText??this._messages.filter} @calciteFilterChange=${n=>{this.filterText=n.currentTarget.value,this.filterFields=this.filterText?le(this.allLists,this.filterText).map(r=>r.name):void 0}}></calcite-filter>${this.renderSortButton()}</div>`:null}<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}>${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}${this.renderSplitSubFieldLists(t)}${e.length?this.renderSplitTopLevelFieldList(e,!0):null}</div>${this.filterText&&!o&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSplitSubFieldLists(e){let t=e.map(s=>({...s,fields:s.fields.filter(i=>B(i,this.filterText))})).filter(s=>!!s.fields.length);return D(t,s=>s.title,s=>a`<calcite-list selection-mode=none .label=${s.title??this.heading??""}><calcite-list-item-group .heading=${s.title}>${D(s.fields,i=>i.name,i=>a`<calcite-list-item .label=${i.alias||i.name} .description=${this.multiple?this._messages.subFieldsSelected.replace("${count}",`${i.subFieldInfos.filter(o=>this.selectedFields.includes(o.name)).length}`):void 0} .value=${i.name} @click=${o=>this.addSubFieldInfoFlowItem(i,o.currentTarget)} @keydown=${o=>{o.key==="Enter"&&this.addSubFieldInfoFlowItem(i,o.currentTarget)}}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`)}renderSplitTopLevelFieldList(e,t){return a`<calcite-list .label=${this.heading||(this.multiple?this._messages.headerSelect:this._messages.header)} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${()=>this.handleListSelectionChange(e)} ${u(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`}renderTopLevelOnlyFieldList(e,t,s){return a`<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>this.handleListSelectionChange(t)} @calciteListFilter=${i=>{i.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(o=>o.value),this.filterText=this.listNode.value.filterText}} ${u(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`}renderSortButton(e){let t=C(this.allLists);if(!(t.length>=this.showFilterLength&&!this.hideSort))return"";let s=t.every(i=>!!i.type);return a`<calcite-dropdown slot=${e??v} placement=bottom-end overlay-positioning=fixed @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${u(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??v}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @calciteDropdownItemSelect=${()=>this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @calciteDropdownItemSelect=${()=>this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s&&a`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @calciteDropdownItemSelect=${()=>this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @calciteDropdownItemSelect=${()=>this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return a`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=C(this.allLists);this.selectedFields=e.map(t=>t.name)}this.reorderSelectedFieldsByCurrentListOrder(),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderGroupedListItems(e){let t=this.allLists.filter(s=>!!s.fields.length&&!y(s.fields)).map(s=>({...s,fields:e?s.fields.filter(i=>B(i,this.filterText)):s.fields})).filter(s=>!!s.fields.length);return t.length===1&&!t[0].title?this.renderListItems(t[0].fields):t.map(s=>a`<calcite-list-item-group .heading=${s.title}>${this.renderListItems(s.fields)}</calcite-list-item-group>`)}renderListItems(e){return e.map(t=>this.renderCalciteListItem(t))}renderCalciteListItem(e,t=!0){let s=t&&this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return _(e.name,a`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&a`<div slot=actions-end class="field-icons">${Z({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,s)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:s}=this;return t?a`<calcite-action slot=actions-end .text=${s.info} title=${s.info??v} scale=s icon=information @click=${i=>{i.stopPropagation();let o=i.currentTarget;this.addFieldInfoFlowItem(e,o)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?a`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??v} scale=s icon=pencil @click=${s=>{s.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?a`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??v} scale=s icon=trash @click=${s=>{s.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?a`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":a`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};J("arcgis-field-pick-list",O);export{O as ArcgisFieldPickList};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{e as n}from"./LLATF73T.js";import"./XX2ZCFWI.js";import{L as r,R as l,h as c,j as t}from"./BCN6LPOG.js";var h=c`:host{display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}arcgis-slider{flex:auto}arcgis-ticks{--arcgis-ticks-font-size: var(--calcite-font-size--3);--arcgis-ticks-gap: var(--calcite-space-base)}.content-end-stack{display:flex;flex-direction:column;flex:1}.ticks-stack{height:var(--calcite-space-sm);position:relative}.ticks-stack arcgis-ticks{inset:var(--calcite-space-none);position:absolute}.label-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs);--arcgis-ticks-tick-color: transparent}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs)}.major-ticks{--arcgis-ticks-tick-length: var(--calcite-space-sm)}:host([layout="vertical"]){padding-inline:var(--calcite-space-none);width:var(--calcite-size-xl);arcgis-ticks{--arcgis-ticks-gap: var(--calcite-space-sm)}.content-end-stack{position:relative}.ticks-stack{height:100%}.label-ticks{inset:var(--calcite-space-none);position:absolute}}`,a=class extends r{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.disabled=!1,this.layout="horizontal",this.mirrored=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,canNext:5,canPlay:5,canPrevious:5,currentValue:9,disabled:5,labelFormatter:0,labels:0,layout:3,max:9,min:9,mirrored:5,steps:0,majorTicks:0,minorTicks:0}}static{this.styles=h}get _ascending(){return!this.mirrored}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this._ascending?this.steps?.at(0):this.steps?.at(-1)}step(s){if(!this.steps||this.currentValue===void 0)return;let e=s==="next"===this._ascending?1:-1,i=this.steps.indexOf(this.currentValue)+e;i>=this.steps.length||i<0||(this.currentValue=this.steps[i],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(s){s.has("steps")&&this.steps?.length&&(this.min??=this.steps[0],this.max??=this.steps.at(-1)),(s.has("currentValue")||s.has("max"))&&this.max!==void 0&&(this.currentValue??=this.max),this.el.hidden=this.min===void 0||this.max===void 0||this.currentValue===void 0,this._checkState()}_checkState(){if(!this.steps?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let s=this.steps.findIndex(i=>i===this.currentValue),e=this.steps.length-1;this.canNext=this._ascending?s<e:s>0,this.canPrevious=this._ascending?s>0:s<e}_handleSliderChange(s){this.currentValue=s.currentTarget.values[0],this._checkState()}_handleSliderInput(s){this.currentValue=s.currentTarget.values[0],this._checkState()}render(){return this.currentValue===void 0?null:t`<arcgis-slider .disabled=${this.disabled} .layout=${this.layout} .min=${this.min} .max=${this.max} .steps=${this.steps} .mirrored=${this.mirrored} .values=${[this.currentValue]} @arcgisInput=${s=>this._handleSliderInput(s)} @arcgisChange=${s=>this._handleSliderChange(s)}>${(this.majorTicks?.length||this.minorTicks?.length||this.labels?.length)&&t`<div slot=content-end class="content-end-stack">${(this.majorTicks?.length||this.minorTicks?.length)&&t`<div class="ticks-stack">${this.majorTicks?.length&&t`<arcgis-ticks .layout=${this.layout} class="major-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.majorTicks} mode=value></arcgis-ticks>`||""}${this.minorTicks?.length&&t`<arcgis-ticks .layout=${this.layout} class="minor-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.minorTicks} mode=value></arcgis-ticks>`||""}</div>`||""}${this.labels?.length&&t`<arcgis-ticks .layout=${this.layout} class="label-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.labels} mode=value show-labels label-placement=end .labelFormatter=${this.labelFormatter}></arcgis-ticks>`||""}</div>`||""}</arcgis-slider>`}};l("arcgis-value-picker-slider",a);export{a as ArcgisValuePickerSlider};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as E}from"./GUL7EIJ4.js";import{a as k}from"./TO3YFXVJ.js";import"./LLATF73T.js";import{f}from"./XX2ZCFWI.js";import{a as n}from"./EB5MDEWF.js";import{J as g,K as l,L as w,R as v,h as C,j as i,k as u,n as m,t as r}from"./BCN6LPOG.js";function y(a,e,t){window.localStorage.setItem(a,JSON.stringify(e))}function S(a,e){let t=window.localStorage.getItem(a);return t&&e?JSON.parse(t):t}var R=C`:host,arcgis-picker-input{display:block}.color-picker-container{display:flex;flex-direction:column}.color-picker{--calcite-color-border-1: transparent;overflow-x:hidden}.preview-swatch{width:100%;height:24px}.recent-colors-container{align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-input);display:flex;gap:var(--calcite-space-sm);height:32px;padding:0 var(--calcite-space-xs);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.preview-recent-swatch{cursor:pointer}.recent-colors-container:focus,.preview-recent-swatch:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}.empty-swatch{cursor:default}.end-action{display:flex}`,h=class extends w{constructor(){super(),this._messages=k(),this.actionEl=g(),this.open=!1,this.setRecentColorElement=e=>t=>{switch(e){case 1:this.recentColor1El=t;break;case 2:this.recentColor2El=t;break;default:this.recentColor3El=t}},this.recentColors=[],this.clearable=!1,this.compact=!1,this.disabled=!1,this.placement="auto",this.storageId="arcgis-color-input-storage-colors",this.hideRecentColors=!1,this.showTransparency=!1,this.arcgisChange=r(),this.arcgisColorInputChange=r(),this.arcgisColorInputPopoverClose=r(),this.arcgisColorInputPopoverOpen=r(),this.arcgisColorInputSwatchUpdate=r(),this.arcgisInternalStoredColor=r(),this.arcgisPickerClose=r(),this.arcgisPickerOpen=r(),this.arcgisSwatchUpdate=r(),this.listenOn(document,"arcgisInternalStoredColor",this.handleUpdateRecentColors),this.listenOn(document,"arcgisRecentColorsUpdate",this.handleStoreNewRecentColor)}static{this.properties={recentColors:16,clearable:5,color:1,compact:5,disabled:5,messageOverrides:0,placement:1,popoverProps:0,storageId:1,hideRecentColors:5,showTransparency:5}}static{this.styles=R}async close(){await this.inlineInputEl?.close({focus:!1})}async setFocus(){await this.inlineInputEl?.setFocus()}isOpen(){return this.open}load(){this.setRecentColorsFromStorage()}disconnectedCallback(){super.disconnectedCallback(),this.removeTooltip()}async handleOpen(){await this.colorPickerEl?.setFocus(),this.open=!0,this.arcgisPickerOpen.emit(),this.arcgisColorInputPopoverOpen.emit()}setInlineInputRef(e){this.inlineInputEl=e}setColorPickerRef(e){e&&(this.colorPickerEl=e)}getRecentColorElement(e){switch(e){case 1:return this.recentColor1El;case 2:return this.recentColor2El;default:return this.recentColor3El}}setRecentColorsFromStorage(){let e=S(this.storageId,!0);e&&(this.recentColors=[...e])}handleSwatchClickOrKeyUp(e){if("key"in e&&e.key!=="Enter"&&e.key!=="Space")return;let t=e.currentTarget.color||void 0;this.updateColor(t),this.arcgisSwatchUpdate.emit(t),this.arcgisColorInputSwatchUpdate.emit(t),setTimeout(()=>this.recentColor1El?.focus(),200)}handleRecentColorsKeyDown(e){if(this.recentColors.length===1)return;let t=e.key,o;this.activeColorSwatchEl===this.recentColor1El?o=1:this.activeColorSwatchEl===this.recentColor2El?o=2:this.activeColorSwatchEl===this.recentColor3El&&(o=3),t==="ArrowLeft"&&(!o||o===1?this.getRecentColorElement(this.recentColors.length)?.focus():this.getRecentColorElement(o-1)?.focus()),t==="ArrowRight"&&(!o||o===this.recentColors.length?this.recentColor1El?.focus():this.getRecentColorElement(o+1)?.focus())}handleUpdateActiveSwatch(e){this.activeColorSwatchEl=e.currentTarget}handleStoreNewRecentColor(e){this.storeRecentColorToStorage(e.detail)}handleUpdateRecentColors(e){e.composedPath().includes(this.el)||this.setRecentColorsFromStorage()}handleClearColor(){this.updateColor(void 0)}updateColor(e,t=!0){e!==this.color&&(this.color=e,this.arcgisChange.emit(),this.arcgisColorInputChange.emit(),t&&this.storeRecentColorToStorage(e))}storeRecentColorToStorage(e){if(!e)return;e.length>7&&(e=e.slice(0,7));let t=[e,...this.recentColors.filter(o=>o!==e)].slice(0,3);y(this.storageId,t),this.recentColors=t,this.arcgisInternalStoredColor.emit()}handleClose(e){e.stopPropagation(),this.storeRecentColorToStorage(this.colorPickerEl?.value),this.open=!1,this.arcgisPickerClose.emit(this.colorPickerEl?.value),this.arcgisColorInputPopoverClose.emit(this.colorPickerEl?.value)}addTooltip(e){this.removeTooltip(),this.tooltipContainerEl=document.createElement("div"),m(i`<calcite-tooltip .placement=${e.placement??"auto"} .referenceElement=${e.referenceElement} overlay-positioning=fixed open>${e.innerHTML}</calcite-tooltip>`,this.tooltipContainerEl),document.body.append(this.tooltipContainerEl)}removeTooltip(){this.tooltipContainerEl?.parentNode&&(this.tooltipContainerEl.remove(),this.tooltipContainerEl=void 0)}render(){let{compact:e,disabled:t,recentColors:o,_messages:s}=this,p=[o[0],o[1]],$=f(this.el)==="rtl";return e||p.push(o[2]),i`<arcgis-picker-input .disabled=${t} .intlDone=${s.commitColor} .heading=${s.selectColor} .label=${s.selectColor} @arcgisPopoverOpen=${this.handleOpen} @arcgisPopoverClose=${this.handleClose} .popoverProps=${this.popoverProps} ${l(this.setInlineInputRef)}><div class="color-picker-container" slot=content>${n(`color-picker${e?"--compact":""}`,i`<calcite-color-picker .clearable=${this.clearable} class="color-picker" @calciteColorPickerInput=${E(c=>{c.stopPropagation(),this.updateColor(this.colorPickerEl.value,!1)},500)} .scale=${e?"s":"m"} .storageId=${this.storageId} .alphaChannel=${this.showTransparency} .value=${this.color} ${l(this.setColorPickerRef)}></calcite-color-picker>`)}</div><div slot=preview><calcite-color-picker-swatch class="preview-swatch" .color=${this.color} scale=s></calcite-color-picker-swatch></div>${!this.hideRecentColors&&i`<div slot=content-end class="recent-colors-container" @keydown=${this.handleRecentColorsKeyDown} tabindex=-1>${p.map((c,d)=>c?n(c,i`<calcite-color-picker-swatch class="preview-recent-swatch" role=button scale=s tabindex=0 .active=${c===this.color} .color=${c} @click=${this.handleSwatchClickOrKeyUp} @keyup=${this.handleSwatchClickOrKeyUp} @focus=${this.handleUpdateActiveSwatch} ${l(this.setRecentColorElement(d+1))}></calcite-color-picker-swatch>`):this.renderEmptySwatch(`empty-swatch-${d}`))}</div>`||""}${this.clearable&&i`<div slot=content-end class="end-action"><calcite-action icon=circle-disallowed scale=s .label=${s.clearColor} .text=${s.clearColor??""} @click=${this.handleClearColor} @mouseover=${()=>this.addTooltip({referenceElement:this.actionEl.value,placement:$?"right-start":"left-start",innerHTML:s.noColor??""})} @mouseout=${()=>this.removeTooltip()} ${l(this.actionEl)}></calcite-action></div>`||""}</arcgis-picker-input>`}renderEmptySwatch(e){return n(e,i`<svg class="empty-swatch" viewBox="0 0 20 20" xmlns=http://www.w3.org/2000/svg width=20>${u`<rect width=20 height=20 fill=#f8f8f8 stroke=#000 stroke-dasharray=2 />`}</svg>`)}};v("arcgis-color-input",h);export{h as ArcgisColorInput};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as o}from"./TO3YFXVJ.js";import{e as n}from"./LLATF73T.js";import"./XX2ZCFWI.js";import{L as r,R as l,h as c,j as i}from"./BCN6LPOG.js";var h=c`:host{align-items:center;display:flex;flex:auto;min-width:300px;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`,a=class extends r{constructor(){super(...arguments),this.messages=o({blocking:!0}),this.autoDestroyDisabled=!1,this.disabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,disabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=h}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(e){if(!this.items||!this.currentValue)return;let t=this.items.findIndex(({value:s})=>s===this.currentValue?.value)+(e==="next"?1:-1);t>=this.items.length||t<0||(this.currentValue=this.items[t],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(e){(e.has("currentValue")||e.has("items"))&&this.items?.length&&(this.currentValue??=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let e=this.items.findIndex(({value:t})=>t===this.currentValue?.value);this.canNext=e<this.items.length-1,this.canPrevious=e>0}render(){return i`<calcite-combobox .disabled=${this.disabled} selection-mode=single .label=${this.messages.comboboxLabel} @calciteComboboxChange=${({currentTarget:e})=>{let t=e.selectedItems[0]?.value;this.currentValue=this.items?.find(({value:s})=>s===t),this._checkState()}}>${this.items?.map(e=>i`<calcite-combobox-item .value=${e.value} .heading=${e.label} .selected=${e.value===this.currentValue?.value}></calcite-combobox-item>`)}</calcite-combobox>`}};l("arcgis-value-picker-combobox",a);export{a as ArcgisValuePickerCombobox};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as R,b as M,c as D,d as E}from"./3AFEXHZ5.js";import{c as $}from"./LLATF73T.js";import"./XX2ZCFWI.js";import{A as C,C as p,E as b,F as u,H as z,I as P,K as T,L as A,O as v,R as L,h as k,j as m,m as _,n as x,z as w}from"./BCN6LPOG.js";var O=k`:host{--calcite-internal-animation-timing-slow: 0}.toolbar-stack{align-items:stretch;display:flex;max-inline-size:min(100cqw,100vw);max-block-size:min(100cqh,100vh);min-inline-size:0;min-block-size:0;gap:8px}.stack{display:flex}.stack[data-horizontal-position=right]{justify-content:right}.stack[data-horizontal-position=left]{justify-content:left}.line{display:flex;flex:none;gap:8px}:host([layout="vertical"]) .line{flex-direction:column;max-height:min(100cqh - var(--arcgis-internal-attribution-space-top) - 2 * var(--calcite-space-lg),100vh - 2 * var(--calcite-space-lg))}:host([layout="horizontal"]) .line{flex-direction:row}.line[data-alignment=top]{justify-content:flex-start}.line[data-alignment=bottom]{justify-content:flex-end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{flex-direction:row}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%;calcite-action-bar{min-width:auto}}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%;calcite-action-bar{min-height:auto}}:host([toolbar-kind="floating"]) .toolbar-shadow-wrapper{box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));min-inline-size:0;min-block-size:0}`,g=class{constructor(t=new Map,e=new Set){this.cachedParts=t,this.directives=e}moveAllToCache(){for(let t of this.directives)t.moveToCache()}},f=class extends P{#e;#i;#t;constructor(t){if(super(t),t.type!==w.CHILD)throw new Error("sharedCache() can only be used in child expressions")}render(t,e,i){return[i]}update(t,[e,i,a]){this.#t!==e&&(this.#t&&this.#t.directives.delete(this),e.directives.add(this),this.#t=e),this.#e=t,this.#i=i;let o=e.cachedParts.get(i),r=o?u(o).pop():void 0;return r&&(z(t),p(t,void 0,r),b(t,[r])),this.render(e,i,a)}moveToCache(){let t=this.#e,e=this.#t;if(!t||!e)return;let i=u(t).pop();if(!i)return;let a=e.cachedParts.get(this.#i);if(!a){let o=document.createDocumentFragment();a=x(_,o),e.cachedParts.set(this.#i,a)}if(u(a).length>0)throw new Error("sharedCache() keys must be unique");b(a,[i]),p(a,void 0,i)}disconnected(){this.#t?.directives.delete(this)}reconnected(){this.#t?.directives.add(this)}},U=C(f),V=8,y=class extends A{constructor(){super(),this.#e=new ResizeObserver(t=>this._updateMeasurement(t)),this.#i=new MutationObserver(()=>this._syncToolbars()),this.#r=$(),this.#a=new g,this._layout="horizontal",this._availableLength=0,this.scale="m",this.tooltipAppearance="native",this.relativePosition="top-left",this.toolbarKind="floating",this.listen("arcgisInternalLayoutUpdate",()=>this.requestUpdate())}static{this.properties={_availableLength:16,_toolbars:16,effectiveRelativeDirection:16,layout:3,scale:3,tooltipAppearance:1,relativePosition:1,toolbarKind:3}}static{this.styles=[O,E,R,M,D]}#e;#i;#t;#r;#a;#o;get effectiveRelativeDirection(){let[t,e]=this.relativePosition.split("-"),i=this.#r;switch(e){case"left":case"right":return`${t}-${e}`;case"end":return`${t}-${i==="ltr"?"right":"left"}`;case"start":return`${t}-${i==="ltr"?"left":"right"}`}}get layout(){return this._layout}set layout(t){t!==this._layout&&(this._layout=t,this._updateMeasurement())}connectedCallback(){super.connectedCallback(),this._connectMeasurement(this.#o),this.#i.observe(this.el,{childList:!0}),this._syncToolbars()}disconnectedCallback(){this.#e.disconnect(),this.#i.disconnect(),super.disconnectedCallback()}_setRulerEl(t){this.#o!==t&&(this.#o=t,this.isConnected&&this._connectMeasurement(t))}_connectMeasurement(t){this.#e.disconnect(),t&&(this.#e.observe(t),this._updateMeasurement())}_updateMeasurement(t){let e=t?.at(0)?.contentRect??this.#o?.getBoundingClientRect();e&&(this._availableLength=this.layout==="horizontal"?e.width:e.height)}_syncToolbars(){this.#t?.abort();let t=Array.from(this.el.children).filter(I),e=new AbortController;this.#t=e,Promise.all(t.map(i=>i.componentOnReady())).then(()=>{!this.isConnected||e.signal.aborted||(this._toolbars=t)})}_arrangeToolbarLines(t,e){let i=t.map(s=>{let d=s.allocate(e,this._availableLength);return{toolbar:s,budget:d.reduce((q,j)=>q+j.budget,0)}}),a=[],o=[],r=0;for(let s of i){let d=r+(o.length===0?0:V)+s.budget;o.length>0&&d>this._availableLength?(a.push(o),o=[s],r=s.budget):(o.push(s),r=d)}o.length>0&&a.push(o);let[h,c]=e.relativePosition.split("-"),l=e.layout==="vertical";return(l?c==="right":h==="bottom")&&a.reverse(),(l?h==="bottom":c==="right")&&a.forEach(s=>s.reverse()),a}#s;render(){let t=this._toolbars;if(!t?.length){this.#s?.length&&(this.#a.moveAllToCache(),this.#s=[]);return}let e={layout:this.layout,relativePosition:this.effectiveRelativeDirection,scale:this.scale,tooltipAppearance:this.tooltipAppearance},i=this._arrangeToolbarLines(t,e);K(this.#s,i)||(this.#a.moveAllToCache(),this.#s=i.map(c=>c.map(({toolbar:l})=>l)));let[a,o]=e.relativePosition.split("-"),r=this.layout==="vertical"?a:o,h=this.#a;return m`<div class="stack" data-horizontal-position=${o??v}><div class="ruler" ${T(this._setRulerEl)}></div><div class="toolbar-stack">${i.map(c=>m`<div class="line" data-alignment=${r??v}>${c.map(({toolbar:l,budget:s})=>U(h,l,l.proxiedRender(e,s,this.toolbarKind)))}</div>`)}</div></div>`}};function I(n){return n.localName==="arcgis-toolbar"}function K(n,t){return n?.length===t.length&&t.every((e,i)=>e.length===n[i].length&&e.every(({toolbar:a},o)=>a===n[i][o]))}L("arcgis-toolbar-stack",y);export{y as ArcgisToolbarStack};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as m}from"./SANPZYEG.js";import"./5KBPWYPL.js";import{a as x}from"./TO3YFXVJ.js";import"./LLATF73T.js";import"./XX2ZCFWI.js";import{J as p,K as v,L as $,N as f,R as y,h as d,j as b,t as g}from"./BCN6LPOG.js";export default $arcgis.t(([{sqlName:E,sqlLiteral:L}])=>{var C=d`:host{display:block;height:100%;width:100%}arcgis-histogram{align-self:flex-end;height:var(--arcgis-slider-histogram-range-histogram-height, 100%);width:100%}`,c=class extends ${constructor(){super(...arguments),this.#a=p(),this.#e=(a,i,r)=>{let h=e=>m(this.fieldType).format(this.#t._lang,e,"value",r)??r(e);return this.labelFormatter?.(a,i,h)??h(a)},this.#t=x(),this.fieldType="double",this.fillPlacement="start",this.layout="horizontal",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.standardDeviationCount=1,this.valueLabelsDisplay="always",this.valueLabelsEditingEnabled=!1,this.arcgisActiveValueChange=g({cancelable:!1}),this.arcgisChange=g({cancelable:!1}),this.arcgisInput=g({cancelable:!1}),this.arcgisRangeChange=g({cancelable:!1})}static{this.properties={activeValue:32,average:9,bins:0,dataLines:0,excludedBarColor:0,fieldType:1,fillPlacement:1,includedBarColor:0,label:1,labelFormatter:0,layout:1,max:1,min:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,standardDeviation:9,standardDeviationCount:9,valueLabelsDisplay:1,valueLabelsEditingEnabled:5,values:1}}static{this.styles=C}#a;#e;#t;get activeValue(){return this.#a.value?.activeValue}async destroy(){await this.manager.destroy()}async generateWhereClause(a){let{fillPlacement:i,values:r}=this;if(!r?.length)return;let h=m(this.fieldType),e=r.split(",").map(u=>u.trim()).filter(u=>u.length>0),o=E(a),l=u=>{let s=h.parse(u);return typeof s=="number"?L(h.toFieldType(s),{type:this.fieldType}):void 0},t=e[0]?l(e[0]):void 0,n=e.length>1&&e.at(-1)?l(e.at(-1)):void 0;if(!(t==null||e.length>1&&n==null))switch(i){case"start":return e.length>1?`${o} BETWEEN ${t} AND ${n}`:`${o} <= ${t}`;case"end":return e.length>1?`${o} BETWEEN ${t} AND ${n}`:`${o} >= ${t}`;case"between":return e.length>1?`${o} BETWEEN ${t} AND ${n}`:`${o} <= ${t}`;case"not-between":return e.length>1?`${o} NOT BETWEEN ${t} AND ${n}`:`${o} <= ${t}`;case"none":return"1=0";default:return}}async updateFromHistogramResult(a,i){let r=m(this.fieldType);this.bins=a.bins,a.minValue!=null&&(this.min=r.serialize(a.minValue)),a.maxValue!=null&&(this.max=r.serialize(a.maxValue)),i&&(this.average=i.avg??void 0,this.standardDeviation=i.stddev??void 0)}willUpdate(a){(a.has("fieldType")||a.has("max")||a.has("min")||a.has("values"))&&this.#s()}#i(){let{bins:a,values:i,fillPlacement:r}=this,h=a?.[0],e=a?.at(-1);if(h==null||e==null||!i)return;let o=m(this.fieldType),l=i.split(",").map(u=>o.parse(u)).filter(u=>Number.isFinite(u)).sort((u,s)=>u-s),t=l.at(0),n=l.at(-1);if(!(t==null||n==null))switch(r){case"start":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:h.minValue,maxValue:t}];case"end":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:n,maxValue:e.maxValue}];case"between":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:h.minValue,maxValue:t}];case"not-between":return l.length>1?[{minValue:h.minValue,maxValue:t},{minValue:t,maxValue:n,color:"var(--arcgis-histogram-bar-color)"},{minValue:n,maxValue:e.maxValue}]:[{minValue:h.minValue,maxValue:t}];default:return}}#s(){let a=m(this.fieldType),i=(this.values??"").split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>a.parse(s)).filter(s=>Number.isFinite(s)),r=a.parse(this.min??""),h=a.parse(this.max??""),e=Number.isFinite(r)?r:void 0,o=Number.isFinite(h)?h:void 0;e!=null&&o!=null&&e>=o&&(e=void 0,o=void 0);let l=a.resolveRange(i,e,o);l.min>=l.max&&(l=a.resolveRange(i,void 0,void 0));let t=a.serialize(l.min),n=a.serialize(l.max),u=i.map(s=>Math.min(l.max,Math.max(l.min,s))).sort((s,V)=>s-V).map(s=>a.serialize(s)).join(",");t!==this.min&&(this.min=t),n!==this.max&&(this.max=n),u!==this.values&&(this.values=u)}#l(a){a.stopPropagation(),this.values=a.currentTarget.values,this.arcgisInput.emit()}#n(a){a.stopPropagation();let i=a.currentTarget;this.min=i.min,this.max=i.max,this.values=i.values,this.arcgisRangeChange.emit()}#r(a){a.stopPropagation(),this.values=a.currentTarget.values,this.arcgisChange.emit()}#o(a){a.stopPropagation(),this.arcgisActiveValueChange.emit()}render(){let a=m(this.fieldType),i=a.parse(this.min??""),r=a.parse(this.max??"");return b`<arcgis-slider-field .fieldType=${this.fieldType} .fillPlacement=${this.fillPlacement} .label=${this.label} .labelFormatter=${this.labelFormatter} .max=${this.max??""} .min=${this.min??""} .layout=${this.layout} @arcgisActiveValueChange=${this.#o} @arcgisChange=${this.#r} @arcgisInput=${this.#l} @arcgisRangeChange=${this.#n} .rangeLabelsEditingEnabled=${this.rangeLabelsEditingEnabled} .valueLabelsEditingEnabled=${this.valueLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .valueLabelsDisplay=${this.valueLabelsDisplay} .showRangeLabels=${this.showRangeLabels} .values=${this.values??""} .valueLabelsPlacement=${this.layout==="horizontal"?"end":"start"} ${v(this.#a)}><arcgis-histogram .slot=${this.layout==="horizontal"?"content-start":"content-end"} .average=${this.average} .bins=${this.bins} .dataLines=${this.dataLines} .max=${r} .min=${i} .label=${this.label} .layout=${this.layout} .standardDeviation=${this.standardDeviation} .standardDeviationCount=${this.standardDeviationCount} color-blending-enabled .colorStops=${this.#i()} style=${f({...this.includedBarColor&&{"--arcgis-histogram-stop-color":this.includedBarColor.toCss()},...this.excludedBarColor&&{"--arcgis-histogram-bar-color":this.excludedBarColor.toCss()}})} .labelFormatter=${this.#e}></arcgis-histogram></arcgis-slider-field>`}};y("arcgis-slider-histogram-range",c);return c},"core/sql")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- function p(s){return u(s).length>0}function u(s,t){return g(s.target,t)}function g(s,t){let e=s.assignedElements({flatten:!0});return t?e.filter(n=>n.matches(t)):e}var m=(...s)=>{let t=[];for(let n=0;n<s.length;++n){let o=s[n];if(typeof o=="string")t.push(o);else if(Array.isArray(o))t.push.apply(t,o);else if(typeof o=="object")for(let a in o)o[a]&&t.push(a)}let e=t.join(" ");return t.length=0,e},h=(s,t)=>{let e=s;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},f=(s,t,e)=>{let n=C(t).subscribe;return n(o=>{o.some(r=>h(s,r.target))&&e()})},i={},C=s=>{let t=s.join(","),e=i[t];if(e!==void 0)return e;let n=new Set,o=new MutationObserver(r=>n.forEach(d=>d(r)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:s,subtree:!0});let a={subscribe:r=>(n.add(r),()=>{n.delete(r),n.size===0&&(o.disconnect(),i[t]=void 0)})};return i[t]=a,a},l=(s,t)=>{let e=s;for(;e;){let n=e.closest?.(t);if(n)return n;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o?.host}};var E=s=>c(s,"dir","ltr"),c=(s,t,e)=>l(s,`[${t}]`)?.getAttribute(t)??e;export{p as a,g as b,m as c,f as d,l as e,E as f,c as g};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as p}from"./LLATF73T.js";import"./XX2ZCFWI.js";import{J as a,K as s,L as h,M as c,R as d,h as r,j as n,t as u}from"./BCN6LPOG.js";export default $arcgis.t(([{formatNumber:m}])=>{var _=r`:host{display:block}:host([hidden]){display:none}.content{display:flex;flex-direction:column}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:var(--calcite-font-line-height-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.content{align-items:start}.readOnlyLabel{text-align:start}}:host([alignment="end"]){.content{align-items:end}.readOnlyLabel{text-align:end}}:host([alignment="center"]){.content{align-items:center}.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`,o=class extends h{constructor(){super(),this._buttonRef=a(),this._inputRef=a(),this._labelRef=a(),this._formatOptions={style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:2},this._formatValue=t=>m(t,this._formatOptions),this._pointerDownPosition=null,this._displayedValue="",this._editing=!1,this.alignment="center",this.readOnly=!1,this.value=0,this.arcgisChange=u({cancelable:!1}),p(["hidden"],()=>this.requestUpdate())}static{this.properties={_displayedValue:16,_editing:16,alignment:3,editing:39,labelFormatter:0,readOnly:7,value:11}}static{this.styles=_}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get editing(){return this._editing}async edit(){this._enterEdit()}getLabelBoundingClientRect(){return this._labelRef.value?this._labelRef.value.getBoundingClientRect():this.el.getBoundingClientRect()}willUpdate(t){if(t.has("value")||t.has("labelFormatter")){let e=this.value;this._displayedValue=this._internalLabelFormatter(e)}}updated(t){this.#t()}#t(){let t=this._inputRef.value,e=this._buttonRef.value,i=this.renderRoot.querySelector(".readOnlyLabel");if(t&&e&&i){let l=i.getBoundingClientRect().width;l>0&&(e.style.width=`${l}px`,t.style.width=`${l}px`)}}_enterEdit(){this._editing||this.readOnly||(this._editing=!0,this.requestUpdate("editing",!1),this.updateComplete.then(async()=>{let t=this._inputRef.value;await t?.setFocus(),await t?.selectText()}))}_exitEdit(t,e=!1){this._editing&&(t&&this._commitValue(this._inputRef.value),this._displayedValue=this._internalLabelFormatter(this.value),this._inputRef.value&&(this._inputRef.value.value=`${this.value}`),this._editing=!1,this.requestUpdate("editing",!0),e||this.updateComplete.then(async()=>{await this._buttonRef.value?.setFocus()}))}_commitValue(t){let e=this._parseNumber(t?.value??"");e!==null&&this.value!==e&&(this.value=e,this.arcgisChange.emit())}_parseNumber(t){if(t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:this.value??null}_internalLabelFormatter(t){let e=this.labelFormatter;return e?e(t,this._formatValue)??this._formatValue(t):this._formatValue(t)}_onBlur(){this._exitEdit(!0,!0)}_onValueChange(t){this._commitValue(t.currentTarget)}_onKeyDown(t){t.key==="Enter"?(this._exitEdit(!0),t.stopPropagation(),t.preventDefault()):t.key==="Escape"&&(this._exitEdit(!1),t.stopPropagation(),t.preventDefault())}_onPointerDown(t){this._pointerDownPosition={x:t.clientX,y:t.clientY}}_onClick(t){if(this._pointerDownPosition){let e=t.clientX-this._pointerDownPosition.x,i=t.clientY-this._pointerDownPosition.y;if(Math.sqrt(e*e+i*i)>2)return}this._enterEdit(),this._pointerDownPosition=null}_onInput(t){let e=this._parseNumber(t.currentTarget.value??"");if(e===null){this._displayedValue="";return}this._displayedValue=this._internalLabelFormatter(e)}render(){let{alignment:t,_displayedValue:e}=this,i=[n`<span class="readOnlyLabel"><span ${s(this._labelRef)}>${e}</span></span>`];return this.readOnly||i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} kind=neutral @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${s(this._buttonRef)}>${e}</calcite-button>`,n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${s(this._inputRef)}></calcite-input-number>`),n`<div class=${c({content:!0})}>${i}</div>`}};d("arcgis-label-input",o);return o},"intl")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as g}from"./TO3YFXVJ.js";import{c as y,e as p}from"./LLATF73T.js";import{b as u}from"./XX2ZCFWI.js";import{L as c,M as d,O as l,R as m,h,j as s,t as i}from"./BCN6LPOG.js";var _=h`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]) slot{min-block-size:var(--calcite-size-xl)}:host([layout="vertical"]) slot{min-block-size:calc(2 * var(--calcite-size-2xl))}slot{display:flex;min-inline-size:300px}slot.empty{display:none}.container{display:flex;flex-direction:column;block-size:100%}.root{display:flex;flex-direction:row;align-items:stretch;flex:1;background-color:var(--calcite-color-foreground-1)}:host([floating]) .root{border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md));overflow:hidden}calcite-action{align-self:center}:host([layout="vertical"]) calcite-action{margin-block-start:auto}:host([layout="vertical"]) calcite-action:last-of-type{margin-block-end:auto}.separator{border-inline-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}`,o=class extends c{constructor(){super(),this._direction=y(),this.messages=g({blocking:!0}),this._isPlaying=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.floating=!1,this.hideNextButton=!1,this.hidePlayButton=!1,this.hidePreviousButton=!1,this.icon="list-rectangle",this.label="",this.layout="horizontal",this.loop=!1,this.playRate=1e3,this.arcgisAnimate=i(),this.arcgisNext=i(),this.arcgisPause=i(),this.arcgisPlay=i(),this.arcgisPrevious=i(),this.arcgisPropertyChange=p()("layout","loop","playRate","state"),this.arcgisSlottedElementChange=i(),this.listen("arcgisPropertyChange",()=>this.requestUpdate())}static{this.properties={_isPlaying:16,_slottedElement:16,autoDestroyDisabled:5,disabled:5,floating:7,hideNextButton:5,hidePlayButton:5,hidePreviousButton:5,icon:1,label:1,layout:3,loop:5,playRate:9,state:32}}static{this.styles=_}get state(){return this._isPlaying?"playing":"ready"}async destroy(){await this.manager.destroy()}next(){this.arcgisNext.emit(),this._slottedElement?.canNext&&this._slottedElement.step("next")}pause(){this._isPlaying=!1,this.arcgisPause.emit()}play(){this._isPlaying||(this._isPlaying=!0,this.arcgisPlay.emit(),this._startPlayRate(!0))}previous(){this.arcgisPrevious.emit(),this._slottedElement?.canPrevious&&this._slottedElement.step("previous")}willUpdate(t){t.has("layout")&&this._isElementWithLayout(this._slottedElement)&&(this._slottedElement.layout=this.layout),t.has("disabled")&&this._isElementWithDisabled(this._slottedElement)&&(this._slottedElement.disabled=this.disabled)}disconnectedCallback(){super.disconnectedCallback(),this._isPlaying&&this.pause()}_handleSlotChange(t){let[e]=u(t);this._slottedElement=e,this.arcgisSlottedElementChange.emit({slottedElement:e}),!e&&this._isPlaying&&this.pause(),this._isElementWithLayout(e)&&(e.layout=this.layout),this._isElementWithDisabled(e)&&(e.disabled=this.disabled),this._isElementWithComponentOnReady(e)&&e.componentOnReady().then(()=>{this._slottedElement===e&&this.requestUpdate()})}_isElementWithComponentOnReady(t){return!!t&&"componentOnReady"in t}_isElementWithLayout(t){return!!t&&"layout"in t}_isElementWithDisabled(t){return!!t&&"disabled"in t}_startPlayRate(t){setTimeout(()=>{if(this._isPlaying){if(!this._slottedElement?.canNext&&this.loop)this._slottedElement?.reset();else if(this._slottedElement?.step("next"),this._slottedElement&&!this._slottedElement?.canNext&&!this.loop){this.pause();return}this.arcgisAnimate.emit({first:t}),this._startPlayRate(!1)}},this.playRate)}_renderActions(){let t=this.state==="playing",e=this.layout==="vertical"&&this._slottedElement?.localName==="arcgis-value-picker-slider",a=!this.hidePlayButton&&s`<calcite-action alignment=center .disabled=${this.disabled||this._slottedElement&&!this._slottedElement.canPlay} .icon=${t?"pause":"play"} .text=${t?this.messages.pause:this.messages.play} title=${(t?this.messages.pause:this.messages.play)??l} @click=${()=>{if(this._slottedElement&&!this._slottedElement.canNext&&!this.loop){this._slottedElement.reset(),this.play();return}t?this.pause():this.play()}}></calcite-action>`||"",n=!this.hidePreviousButton&&s`<calcite-action alignment=center .disabled=${this.disabled||t||this._slottedElement&&!this._slottedElement.canPrevious} .icon=${this.layout==="horizontal"?"chevron-left":e?"chevron-down":"chevron-up"} .text=${this.messages.previous} title=${this.messages.previous??l} @click=${this.previous}></calcite-action>`||"",r=!this.hideNextButton&&s`<calcite-action alignment=center .disabled=${this.disabled||t||this._slottedElement&&!this._slottedElement.canNext} .icon=${this.layout==="horizontal"?"chevron-right":e?"chevron-up":"chevron-down"} .text=${this.messages.next} title=${this.messages.next??l} @click=${this.next}></calcite-action>`||"";return(this._direction==="rtl"&&this.layout==="horizontal"||e?[a,r,n]:[a,n,r]).filter(Boolean)}render(){let t=!!this._slottedElement&&!this._slottedElement.hidden,e=this._renderActions();return s`<div class="container"><div class="root"><calcite-action-bar expand-toggle-disabled .layout=${this.layout}>${e}</calcite-action-bar>${t&&s`<div class="separator"></div>`||""}<slot @slotchange=${({currentTarget:a})=>{this._handleSlotChange(a)}} class=${d(t?"component-slot":"empty")}></slot></div></div>`}};m("arcgis-value-picker",o);export{o as ArcgisValuePicker};