@arcgis/charts-components 5.2.0-next.109 → 5.2.0-next.110

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 (104) hide show
  1. package/dist/cdn/{ORVZWKA2.js → 2IWBCO6Z.js} +1 -1
  2. package/dist/cdn/{RPISOLCN.js → 3LVNK4EI.js} +1 -1
  3. package/dist/cdn/{FDA4CBO2.js → 3XY3OEMH.js} +1 -1
  4. package/dist/cdn/{3QFLCKDU.js → 3Z2C6NLH.js} +1 -1
  5. package/dist/cdn/{T5BVDE2S.js → 4DGRKLXO.js} +1 -1
  6. package/dist/cdn/{VOMAGIMB.js → 4G3OQ5FC.js} +1 -1
  7. package/dist/cdn/{JNGHRSU6.js → 4L4ZZUIW.js} +1 -1
  8. package/dist/cdn/{YHKUB4KO.js → 5AMXSBVD.js} +1 -1
  9. package/dist/cdn/{FNYGAGZP.js → 5HR252CM.js} +1 -1
  10. package/dist/cdn/{35CI5TO3.js → 5L2GOXND.js} +1 -1
  11. package/dist/cdn/{3NS6DXYP.js → 62M4DHW3.js} +1 -1
  12. package/dist/cdn/{MKLVRKKT.js → 66O67DDO.js} +1 -1
  13. package/dist/cdn/{ODZZ6IDF.js → 6KYYHQBS.js} +1 -1
  14. package/dist/cdn/{CPJ5QZVV.js → 7PAQCBZ7.js} +1 -1
  15. package/dist/cdn/{NLZVDWIX.js → 7RRUD4HM.js} +1 -1
  16. package/dist/cdn/{74BF6TFJ.js → AJDNZRJP.js} +1 -1
  17. package/dist/cdn/{2ATSQ4BK.js → AK34H2Z4.js} +1 -1
  18. package/dist/cdn/{IW2CVDZH.js → AYS37I6F.js} +1 -1
  19. package/dist/cdn/{S334WXA4.js → BGA3UX4U.js} +1 -1
  20. package/dist/cdn/{WYJPHPBV.js → BPYN2X7Q.js} +1 -1
  21. package/dist/cdn/{XS7S622U.js → C4OPIUNW.js} +1 -1
  22. package/dist/cdn/{S7D2TMBC.js → C7IT74BS.js} +1 -1
  23. package/dist/cdn/{DK7J3XAC.js → CHCM5ZNC.js} +1 -1
  24. package/dist/cdn/{K7QEIYH2.js → CKRMPTUO.js} +1 -1
  25. package/dist/cdn/{EOVSDZZR.js → D4EPE7SG.js} +1 -1
  26. package/dist/cdn/{OOMLQFRO.js → DGE5LAEC.js} +1 -1
  27. package/dist/cdn/{DZSVWM55.js → DMTY4NTC.js} +1 -1
  28. package/dist/cdn/{ILV3GIXF.js → EJCQJK4X.js} +1 -1
  29. package/dist/cdn/{FK3H5VZ5.js → EQLEA5AG.js} +1 -1
  30. package/dist/cdn/{JHZKHOF4.js → EQNW3D27.js} +1 -1
  31. package/dist/cdn/{6LOZOA7U.js → EUSDSRSD.js} +1 -1
  32. package/dist/cdn/{BLOSHWOX.js → EXQDBBLY.js} +1 -1
  33. package/dist/cdn/{KOXY2WGR.js → F5C2X2NS.js} +1 -1
  34. package/dist/cdn/{FB7SN7LD.js → FWVZY2DN.js} +1 -1
  35. package/dist/cdn/{KZGZNENS.js → FZ4P2E22.js} +1 -1
  36. package/dist/cdn/{T2X5Q7O4.js → GG7KDNXF.js} +1 -1
  37. package/dist/cdn/{66ZLFE4U.js → GQ6A5FQG.js} +1 -1
  38. package/dist/cdn/{CASRWMF2.js → GY72TEIZ.js} +1 -1
  39. package/dist/cdn/{KCQYNVST.js → H3GVLNRJ.js} +1 -1
  40. package/dist/cdn/{PCR5K4AW.js → IICYSP6T.js} +1 -1
  41. package/dist/cdn/{MUIUALIY.js → IOG2IVJN.js} +1 -1
  42. package/dist/cdn/{ZBBJNKUN.js → J22FARAC.js} +1 -1
  43. package/dist/cdn/{HQOWIODF.js → J5SIGRGU.js} +1 -1
  44. package/dist/cdn/{HQNI3Z6E.js → JCGY4PXV.js} +1 -1
  45. package/dist/cdn/{SJ7S5LDT.js → JDCNFE5C.js} +1 -1
  46. package/dist/cdn/{EH3JCN6Q.js → JFRRNZCG.js} +1 -1
  47. package/dist/cdn/{TUNGGTDZ.js → JJLZNOU5.js} +1 -1
  48. package/dist/cdn/{WSTW26MR.js → JKDSYFI5.js} +1 -1
  49. package/dist/cdn/{JBTMPE2E.js → K6PMOUYR.js} +1 -1
  50. package/dist/cdn/{NDAA3L2F.js → K7M3AA6L.js} +1 -1
  51. package/dist/cdn/{WCJVSSDM.js → KSDWPX5N.js} +1 -1
  52. package/dist/cdn/{7TDKNYL3.js → LBOJGYSL.js} +1 -1
  53. package/dist/cdn/{FVPRMLQF.js → LD7OU6HP.js} +1 -1
  54. package/dist/cdn/{2IB237XM.js → LJOG5J2V.js} +1 -1
  55. package/dist/cdn/{3AU4BVFA.js → LTZBWR5K.js} +1 -1
  56. package/dist/cdn/{JC3ZKK3U.js → NRKA3PVS.js} +1 -1
  57. package/dist/cdn/{R3U6WQA7.js → NVWHMHFJ.js} +1 -1
  58. package/dist/cdn/{3YD7USNZ.js → O3F4PKL5.js} +1 -1
  59. package/dist/cdn/{TMBR6OV4.js → O522WPHN.js} +1 -1
  60. package/dist/cdn/{2VMINED7.js → ORXX53NO.js} +1 -1
  61. package/dist/cdn/{UFL53XLD.js → P6HJNWKL.js} +1 -1
  62. package/dist/cdn/{WLXYQUY2.js → P7L3ARQ3.js} +1 -1
  63. package/dist/cdn/{KRQ7IT6R.js → POUXDWR6.js} +1 -1
  64. package/dist/cdn/{DUKCNEMR.js → PVNWEM36.js} +1 -1
  65. package/dist/cdn/{ZYXHU5KK.js → QBN2RUK7.js} +1 -1
  66. package/dist/cdn/{BBCKB2TP.js → QQE67EPU.js} +1 -1
  67. package/dist/cdn/{S6I4UC4D.js → QZCSTDPS.js} +1 -1
  68. package/dist/cdn/{K5YUTTEF.js → REC66TO6.js} +1 -1
  69. package/dist/cdn/{47UGKETT.js → RRFVH5KA.js} +1 -1
  70. package/dist/cdn/{IVGNLPIM.js → RT3RIRB5.js} +1 -1
  71. package/dist/cdn/{W5ELIMSY.js → RYSXQJEF.js} +1 -1
  72. package/dist/cdn/{YOTALJ7Z.js → SMLGQATL.js} +1 -1
  73. package/dist/cdn/{XN7VGJR3.js → SXOHCOAC.js} +1 -1
  74. package/dist/cdn/{T3VMBZ5E.js → U4LJEOCU.js} +1 -1
  75. package/dist/cdn/{D37MPENZ.js → UCS6KWEF.js} +1 -1
  76. package/dist/cdn/{B7JDEO3X.js → UOXDMZSI.js} +1 -1
  77. package/dist/cdn/{VG6AN56C.js → UZKSCM2S.js} +1 -1
  78. package/dist/cdn/{LBMVPM4L.js → VAWXK4TO.js} +1 -1
  79. package/dist/cdn/{2JJXZDHF.js → VKEJFHGG.js} +1 -1
  80. package/dist/cdn/{RUDWTSYY.js → VPWZC6PQ.js} +1 -1
  81. package/dist/cdn/{D72XCO7P.js → VUWVVCEB.js} +1 -1
  82. package/dist/cdn/{B4PH2UMY.js → WCG6VBHW.js} +1 -1
  83. package/dist/cdn/{V5RTTOZR.js → WZZIHATO.js} +1 -1
  84. package/dist/cdn/{J5DILLLF.js → X4P4OY6S.js} +1 -1
  85. package/dist/cdn/{RXINSABT.js → X6C44FPC.js} +1 -1
  86. package/dist/cdn/{LMQHLEJ2.js → XB5AI5AU.js} +1 -1
  87. package/dist/cdn/{B32VUZLU.js → XETRBEFO.js} +1 -1
  88. package/dist/cdn/{ZG4PSXRA.js → XHJGXDGC.js} +1 -1
  89. package/dist/cdn/{HSFAR36O.js → XJEWRYSH.js} +1 -1
  90. package/dist/cdn/{IEJW363N.js → XURXJVLT.js} +1 -1
  91. package/dist/cdn/{NYBCUG6C.js → Y3WE42BQ.js} +1 -1
  92. package/dist/cdn/{3GK5BZMV.js → YCM6O6HX.js} +1 -1
  93. package/dist/cdn/{7MH6J3X4.js → YKAA3D7I.js} +1 -1
  94. package/dist/cdn/{V5PFATKW.js → YRPBDTCB.js} +1 -1
  95. package/dist/cdn/{D6XSG2BV.js → Z2MRSW74.js} +1 -1
  96. package/dist/cdn/{7U6KVTEI.js → ZE4S6J2S.js} +1 -1
  97. package/dist/cdn/{XCAJJFB7.js → ZJIYZYVK.js} +1 -1
  98. package/dist/cdn/{74XZ3LJI.js → ZN7K5ISR.js} +1 -1
  99. package/dist/cdn/index.js +1 -1
  100. package/dist/cdn/model/shared/setup-utils.js +1 -1
  101. package/dist/chunks/runtime.js +3 -3
  102. package/dist/docs/api.json +1 -1
  103. package/dist/docs/docs.json +1 -1
  104. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{a as u}from"./2IB237XM.js";import{a as f}from"./KZGZNENS.js";import{a as o}from"./3DIZRBOJ.js";import d from"./3QFLCKDU.js";import"./VTGIHCBG.js";import{a as S}from"./FVPRMLQF.js";import b from"./XCAJJFB7.js";import a from"./TUNGGTDZ.js";import{d as p}from"./UPENS2HR.js";import"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{B as c,D as m,F as g,H as C,g as h,i as r}from"./74BF6TFJ.js";import"./QIST2E6D.js";import"./GFIZPXVK.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([,,{p:v}])=>{var O=h`:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin)}`,l=class extends c{constructor(){super(...arguments),this._messages=S(),this.seriesPopover=null,this.open=!1,this.seriesNameChange=e=>{if(e.detail!==null||e.detail!==void 0){let s=e.detail?.name;this.model.setSeriesName(s,this.selectedSeriesIndex??-1)}},this.seriesColorChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{color:s}=e.detail;this.model.colorMatch=!1,s!==void 0&&(this.model.setSeriesColor(s,this.selectedSeriesIndex??-1),this.model.setSeriesMarkerColor(s,this.selectedSeriesIndex??-1))}},this.seriesLineStyleChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{lineStyle:s}=e.detail;s!==void 0&&this.model.setSeriesLineStyle(s,this.selectedSeriesIndex??-1)}},this.seriesLineWidthChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{lineWidth:s}=e.detail;s!==void 0&&(this.model.setSeriesLineWidth(s,this.selectedSeriesIndex??-1),this.model.setSeriesMarkerSize(s*2,this.selectedSeriesIndex??-1))}},this.seriesPopoverClose=e=>{let{selectedSeriesIndex:s}=e.detail;this.selectedSeriesIndex===s&&(this.seriesPopover=o(this.seriesPopover),this.selectedSeriesIndex=void 0)},this.onModelConfigChange=()=>{this.requestUpdate()},this.seriesOrderResetCounter=0,this.activeColorMatch=!1,this.popoverPlacement="leading"}static{this.properties={selectedSeriesIndex:16,seriesOrderResetCounter:16,messageOverrides:0,model:0,activeColorMatch:5,popoverPlacement:1}}static{this.styles=O}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("selectedSeriesIndex")&&this.selectedSeriesIndexChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeSeriesPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,s){s?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}selectedSeriesIndexChange(){this.selectedSeriesIndex!==void 0&&(this.seriesPopover=g(r`<arcgis-charts-config-line-chart-series-popover .referenceElement=${this.el} .selectedName=${this.model.getSeriesName(this.selectedSeriesIndex)} .selectedColor=${this.model.getSeriesColor(this.selectedSeriesIndex)} .selectedLineStyle=${this.model.getSeriesLineStyle(this.selectedSeriesIndex)} .selectedLineWidth=${this.model.getSeriesLineWidth(this.selectedSeriesIndex)} .placement=${this.popoverPlacement} .open=${this.open} .selectedSeriesIndex=${this.selectedSeriesIndex} @arcgisChartsConfigSeriesPopoverNameChange=${this.seriesNameChange} @arcgisChartsConfigSeriesPopoverColorChange=${this.seriesColorChange} @arcgisChartsConfigSeriesPopoverLineStyleChange=${this.seriesLineStyleChange} @arcgisChartsConfigSeriesPopoverLineWidthChange=${this.seriesLineWidthChange} @arcgisChartsConfigPopoverClose=${this.seriesPopoverClose}></arcgis-charts-config-line-chart-series-popover>`),this.seriesPopover&&!document.body.contains(this.seriesPopover)&&document.body.appendChild(this.seriesPopover))}removeSeriesPopover(){this.seriesPopover!==void 0&&this.seriesPopover!==null&&(this.seriesPopover.open=!1,this.seriesPopover=o(this.seriesPopover))}buildSeriesListItems(){let e=this.model.seriesLength,s=Array.from({length:e},(i,t)=>t);return u(s,i=>this.model.getSeriesId(i),i=>{let t=this.model.getSeriesId(i),n=this.model.getSeriesColor(i),I=this.model.getSeriesName(i),x=this.model.chartSubType===p.BarAndLineFromFields?this._messages.series:t,$=this.model.getSeriesLineStyle(i),P=v($),a="#CCCCCC",d="minus-circle";if((e>1||!this.activeColorMatch)&&n!==void 0){d=`line-${P}`;let[L,b,y,M]=[...n];a=`rgba(${L},${b},${y},${M/255})`}return r`<calcite-list-item .label=${I??t??""} .description=${x} .value=${t} .selected=${this.selectedSeriesIndex===i} @click=${this.openSeriesPopOver}><calcite-icon slot=content-end .icon=${d} style=${m({color:a})}></calcite-icon></calcite-list-item>`})}buildSeriesList(){return f(this.seriesOrderResetCounter,r`<calcite-list label drag-enabled selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildSeriesListItems()}</calcite-list>`)}resetSeriesOriginal(){this.selectedSeriesIndex=void 0,this.model.resetSeriesStyling(),this.seriesOrderResetCounter+=1}onCalciteListOrderChange(e){if(e.detail!==null&&e.detail!==void 0){let{newIndex:s,oldIndex:i}=e.detail;this.model.moveSeries(i??0,s??i??0),this.seriesOrderResetCounter+=1}}openSeriesPopOver(e){e.stopImmediatePropagation(),this.removeSeriesPopover();let s=e.target,i=s.localName==="calcite-list-item"?s:s.parentNode,t=this.model.getSeriesIndex(i.value);this.open=this.selectedSeriesIndex!==t,this.selectedSeriesIndex=this.selectedSeriesIndex!==t?t:void 0}render(){return r`<calcite-panel .heading=${this._messages.series}><calcite-button slot=header-actions-end @click=${this.resetSeriesOriginal} .disabled=${!this.model.resetAvailable()} appearance=transparent scale=s icon-end=reset>${this._messages.reset}</calcite-button>${this.buildSeriesList()}</calcite-panel>`}};C("arcgis-charts-config-line-chart-series",l);return l},a,b,d)
2
+ import{a as u}from"./LJOG5J2V.js";import{a as f}from"./FZ4P2E22.js";import{a as o}from"./3DIZRBOJ.js";import d from"./3Z2C6NLH.js";import"./VTGIHCBG.js";import{a as S}from"./LD7OU6HP.js";import b from"./ZJIYZYVK.js";import a from"./JJLZNOU5.js";import{d as p}from"./UPENS2HR.js";import"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{B as c,D as m,F as g,H as C,g as h,i as r}from"./AJDNZRJP.js";import"./QIST2E6D.js";import"./GFIZPXVK.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([,,{p:v}])=>{var O=h`:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin)}`,l=class extends c{constructor(){super(...arguments),this._messages=S(),this.seriesPopover=null,this.open=!1,this.seriesNameChange=e=>{if(e.detail!==null||e.detail!==void 0){let s=e.detail?.name;this.model.setSeriesName(s,this.selectedSeriesIndex??-1)}},this.seriesColorChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{color:s}=e.detail;this.model.colorMatch=!1,s!==void 0&&(this.model.setSeriesColor(s,this.selectedSeriesIndex??-1),this.model.setSeriesMarkerColor(s,this.selectedSeriesIndex??-1))}},this.seriesLineStyleChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{lineStyle:s}=e.detail;s!==void 0&&this.model.setSeriesLineStyle(s,this.selectedSeriesIndex??-1)}},this.seriesLineWidthChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{lineWidth:s}=e.detail;s!==void 0&&(this.model.setSeriesLineWidth(s,this.selectedSeriesIndex??-1),this.model.setSeriesMarkerSize(s*2,this.selectedSeriesIndex??-1))}},this.seriesPopoverClose=e=>{let{selectedSeriesIndex:s}=e.detail;this.selectedSeriesIndex===s&&(this.seriesPopover=o(this.seriesPopover),this.selectedSeriesIndex=void 0)},this.onModelConfigChange=()=>{this.requestUpdate()},this.seriesOrderResetCounter=0,this.activeColorMatch=!1,this.popoverPlacement="leading"}static{this.properties={selectedSeriesIndex:16,seriesOrderResetCounter:16,messageOverrides:0,model:0,activeColorMatch:5,popoverPlacement:1}}static{this.styles=O}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("selectedSeriesIndex")&&this.selectedSeriesIndexChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeSeriesPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,s){s?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}selectedSeriesIndexChange(){this.selectedSeriesIndex!==void 0&&(this.seriesPopover=g(r`<arcgis-charts-config-line-chart-series-popover .referenceElement=${this.el} .selectedName=${this.model.getSeriesName(this.selectedSeriesIndex)} .selectedColor=${this.model.getSeriesColor(this.selectedSeriesIndex)} .selectedLineStyle=${this.model.getSeriesLineStyle(this.selectedSeriesIndex)} .selectedLineWidth=${this.model.getSeriesLineWidth(this.selectedSeriesIndex)} .placement=${this.popoverPlacement} .open=${this.open} .selectedSeriesIndex=${this.selectedSeriesIndex} @arcgisChartsConfigSeriesPopoverNameChange=${this.seriesNameChange} @arcgisChartsConfigSeriesPopoverColorChange=${this.seriesColorChange} @arcgisChartsConfigSeriesPopoverLineStyleChange=${this.seriesLineStyleChange} @arcgisChartsConfigSeriesPopoverLineWidthChange=${this.seriesLineWidthChange} @arcgisChartsConfigPopoverClose=${this.seriesPopoverClose}></arcgis-charts-config-line-chart-series-popover>`),this.seriesPopover&&!document.body.contains(this.seriesPopover)&&document.body.appendChild(this.seriesPopover))}removeSeriesPopover(){this.seriesPopover!==void 0&&this.seriesPopover!==null&&(this.seriesPopover.open=!1,this.seriesPopover=o(this.seriesPopover))}buildSeriesListItems(){let e=this.model.seriesLength,s=Array.from({length:e},(i,t)=>t);return u(s,i=>this.model.getSeriesId(i),i=>{let t=this.model.getSeriesId(i),n=this.model.getSeriesColor(i),I=this.model.getSeriesName(i),x=this.model.chartSubType===p.BarAndLineFromFields?this._messages.series:t,$=this.model.getSeriesLineStyle(i),P=v($),a="#CCCCCC",d="minus-circle";if((e>1||!this.activeColorMatch)&&n!==void 0){d=`line-${P}`;let[L,b,y,M]=[...n];a=`rgba(${L},${b},${y},${M/255})`}return r`<calcite-list-item .label=${I??t??""} .description=${x} .value=${t} .selected=${this.selectedSeriesIndex===i} @click=${this.openSeriesPopOver}><calcite-icon slot=content-end .icon=${d} style=${m({color:a})}></calcite-icon></calcite-list-item>`})}buildSeriesList(){return f(this.seriesOrderResetCounter,r`<calcite-list label drag-enabled selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildSeriesListItems()}</calcite-list>`)}resetSeriesOriginal(){this.selectedSeriesIndex=void 0,this.model.resetSeriesStyling(),this.seriesOrderResetCounter+=1}onCalciteListOrderChange(e){if(e.detail!==null&&e.detail!==void 0){let{newIndex:s,oldIndex:i}=e.detail;this.model.moveSeries(i??0,s??i??0),this.seriesOrderResetCounter+=1}}openSeriesPopOver(e){e.stopImmediatePropagation(),this.removeSeriesPopover();let s=e.target,i=s.localName==="calcite-list-item"?s:s.parentNode,t=this.model.getSeriesIndex(i.value);this.open=this.selectedSeriesIndex!==t,this.selectedSeriesIndex=this.selectedSeriesIndex!==t?t:void 0}render(){return r`<calcite-panel .heading=${this._messages.series}><calcite-button slot=header-actions-end @click=${this.resetSeriesOriginal} .disabled=${!this.model.resetAvailable()} appearance=transparent scale=s icon-end=reset>${this._messages.reset}</calcite-button>${this.buildSeriesList()}</calcite-panel>`}};C("arcgis-charts-config-line-chart-series",l);return l},a,b,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as u}from"./3DIZRBOJ.js";import{a as f}from"./FVPRMLQF.js";import a from"./TUNGGTDZ.js";import"./UPENS2HR.js";import"./U4LGTOAJ.js";import{i as C}from"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as m,B as d,C as i,H as g,g as c,i as p,n as s,z as h}from"./74BF6TFJ.js";import"./GFIZPXVK.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{Tc:v}])=>{var x={panelChildrenContainer:"panel-children-container"},y=c`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{overflow-y:auto;width:min-content}.panel-children-container{display:flex}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.panel-children-container{padding:0 1rem;margin-top:1rem}`,o=class extends d{constructor(){super(...arguments),this._messages=f(),this.popoverElement=h(),this.open=!1,this.arcgisChartsConfigPopoverClose=s(),this.arcgisChartsConfigSeriesPopoverColorChange=s(),this.arcgisChartsConfigSeriesPopoverNameChange=s()}static{this.properties={messageOverrides:0,referenceElement:0,selectedName:1,selectedColor:0,selectedSeriesIndex:9,placement:1,open:5,nullCategory:0}}static{this.styles=y}async reposition(){await this.popoverElement.value?.reposition()}updated(){u(this.popoverElement.value,this.open)}seriesNameChange(e){let t=e.target.value;this.selectedName!==t&&(this.selectedName=t,this.arcgisChartsConfigSeriesPopoverNameChange.emit({name:t}))}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit({selectedSeriesIndex:this.selectedSeriesIndex??-1})}colorChange(e){let t=e instanceof CustomEvent?e.detail:e,[a,r,n]=t,l=C*255;this.selectedColor=[a,r,n,l],this.arcgisChartsConfigSeriesPopoverColorChange.emit({color:[a,r,n,l]})}render(){let e=v(this.nullCategory)?.color??this.selectedColor,t=this.nullCategory?.text??this.selectedName;return p`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${this.open} @calcitePopoverClose=${this.closePopover} label auto-close ${m(this.popoverElement)}><calcite-panel .heading=${this._messages.seriesElement} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div class=${i(x.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${t} @calciteInputInput=${this.seriesNameChange}></calcite-input></calcite-label></div><div class=${i(x.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></calcite-panel></calcite-popover></div>`}};g("arcgis-charts-config-bar-chart-series-popover",o);return o},a)
2
+ import{b as u}from"./3DIZRBOJ.js";import{a as f}from"./LD7OU6HP.js";import a from"./JJLZNOU5.js";import"./UPENS2HR.js";import"./U4LGTOAJ.js";import{i as C}from"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as m,B as d,C as i,H as g,g as c,i as p,n as s,z as h}from"./AJDNZRJP.js";import"./GFIZPXVK.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{Tc:v}])=>{var x={panelChildrenContainer:"panel-children-container"},y=c`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{overflow-y:auto;width:min-content}.panel-children-container{display:flex}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.panel-children-container{padding:0 1rem;margin-top:1rem}`,o=class extends d{constructor(){super(...arguments),this._messages=f(),this.popoverElement=h(),this.open=!1,this.arcgisChartsConfigPopoverClose=s(),this.arcgisChartsConfigSeriesPopoverColorChange=s(),this.arcgisChartsConfigSeriesPopoverNameChange=s()}static{this.properties={messageOverrides:0,referenceElement:0,selectedName:1,selectedColor:0,selectedSeriesIndex:9,placement:1,open:5,nullCategory:0}}static{this.styles=y}async reposition(){await this.popoverElement.value?.reposition()}updated(){u(this.popoverElement.value,this.open)}seriesNameChange(e){let t=e.target.value;this.selectedName!==t&&(this.selectedName=t,this.arcgisChartsConfigSeriesPopoverNameChange.emit({name:t}))}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit({selectedSeriesIndex:this.selectedSeriesIndex??-1})}colorChange(e){let t=e instanceof CustomEvent?e.detail:e,[a,r,n]=t,l=C*255;this.selectedColor=[a,r,n,l],this.arcgisChartsConfigSeriesPopoverColorChange.emit({color:[a,r,n,l]})}render(){let e=v(this.nullCategory)?.color??this.selectedColor,t=this.nullCategory?.text??this.selectedName;return p`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${this.open} @calcitePopoverClose=${this.closePopover} label auto-close ${m(this.popoverElement)}><calcite-panel .heading=${this._messages.seriesElement} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div class=${i(x.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${t} @calciteInputInput=${this.seriesNameChange}></calcite-input></calcite-label></div><div class=${i(x.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></calcite-panel></calcite-popover></div>`}};g("arcgis-charts-config-bar-chart-series-popover",o);return o},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import c from"./DZSVWM55.js";import a from"./3AU4BVFA.js";import{F as p,H as b,O as g,c as r}from"./JGDOGMER.js";import{e as u}from"./C4LXB6MK.js";export default $arcgis.t(([{d:v,e:l},y])=>{var m=t=>{let e=!1;return t.legend!==void 0&&(e=t.legend.visible??!0),e},L=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.visible=t},V=t=>t.legend?.title?.content,M=(t,e)=>{e.legend===void 0&&(e.legend=g()),(e.legend.title===void 0||t===void 0)&&(e.legend.title=b({text:"",visible:!0,font:p(r.LegendTitle),type:r.LegendTitle})),t!==void 0&&(e.legend.title.content=t)},D=t=>t.legend?.body,O=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.body=t??b({text:"",visible:!0,font:p(r.LegendText),type:r.LegendText}).content},h=t=>t.legend?.title?.content.text??"",P=(t,e)=>{if(e.legend?.title!==void 0)e.legend.title.content.text=t;else if(e.legend===void 0&&t!==void 0){let i=g();i.title!==void 0&&(i.title.content.text=t,i.title.visible=!0,e.legend=i)}},R=t=>t.legend?.title?.visible??!1,j=(t,e)=>{if(e.legend?.title!==void 0)e.legend.title.visible=t;else if(e.legend!==void 0&&e.legend?.title===void 0&&t)e.legend.title=b({text:h(e),visible:t,font:p(r.LegendTitle),type:r.LegendTitle});else if(e.legend===void 0){let i=g();i.title=b({text:h(e),visible:t,font:p(r.LegendTitle),type:r.LegendTitle}),e.legend=i}},C=t=>t.legend?.position??u.Right,S=(t,e)=>{if(e.legend!==void 0)e.legend.position=t;else if(e.legend===void 0){let i=g();i.position=t,e.legend=i}},k=t=>t.legend?.roundMarkers??!1,H=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.roundMarkers=t},w=t=>t.legend?.maxHeight??void 0,E=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.maxHeight=t},W=Object.defineProperty,q=Object.getOwnPropertyDescriptor,a=(t,e,i,c)=>{for(var o=q(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&W(e,i,o),o},d=class extends y{get legendVisibility(){return m(this._config)}set legendVisibility(e){L(e,this._config)}get legendTitleText(){return h(this._config)}set legendTitleText(e){P(e,this._config)}get legendTitleVisibility(){return R(this._config)}set legendTitleVisibility(e){j(e,this._config)}get legendPosition(){return C(this._config)}set legendPosition(e){S(e,this._config)}get legendTitleSymbol(){return V(this._config)}set legendTitleSymbol(e){M(e,this._config)}get legendTextSymbol(){return D(this._config)}set legendTextSymbol(e){O(e,this._config)}get legendMaxHeight(){return w(this._config)}set legendMaxHeight(e){e!==void 0&&E(e,this._config)}get legendRoundMarker(){return k(this._config)}set legendRoundMarker(e){H(e,this._config)}};a([l],d.prototype,"legendVisibility");a([l],d.prototype,"legendTitleText");a([l],d.prototype,"legendTitleVisibility");a([l],d.prototype,"legendPosition");a([l],d.prototype,"legendTitleSymbol");a([l],d.prototype,"legendTextSymbol");a([l],d.prototype,"legendMaxHeight");a([l],d.prototype,"legendRoundMarker");var z=(t,e)=>t.series?.[e??0]?.dataTooltipVisible??!0,A=(t,e,i)=>{i&&t.series?.[i]?t.series[i].dataTooltipVisible=e:t.series&&t.series.forEach(c=>{c.dataTooltipVisible=e})},B=(t,e)=>t.series?.[e??0]?.dataTooltipReverseColor??!1,F=(t,e,i)=>{i&&t.series?.[i]?t.series[i].dataTooltipReverseColor=e:t.series&&t.series.forEach(c=>{c.dataTooltipReverseColor=e})},G=Object.defineProperty,I=Object.getOwnPropertyDescriptor,_=(t,e,i,c)=>{for(var o=I(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&G(e,i,o),o},f=class extends y{getDataTooltipVisibility(e){return z(this._config,e)}setDataTooltipVisibility(e,i){A(this._config,e,i)}getDataTooltipReverseColor(e){return B(this._config,e)}setDataTooltipReverseColor(e,i){F(this._config,e,i)}};_([l],f.prototype,"setDataTooltipVisibility");_([l],f.prototype,"setDataTooltipReverseColor");var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,N=(t,e,i,c)=>{for(var o=K(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&J(e,i,o),o},U=t=>t.colorMatch??!0,X=(t,e)=>{e.colorMatch=t},T=class extends v{get colorMatch(){return U(this._config)}set colorMatch(e){X(e,this._config)}};N([l],T.prototype,"colorMatch");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,$=(t,e,i,c)=>{for(var o=Z(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&Y(e,i,o),o},Q=t=>t.series[0]?.dataLabels?.visible??!1,ee=(t,e)=>{e.series.forEach(i=>{i.dataLabels!==void 0?i.dataLabels.visible=t:i.dataLabels=b({text:"",visible:t,font:p(r.DataLabels),type:r.DataLabels})})},x=class extends v{get dataLabelsVisibility(){return Q(this._config)}set dataLabelsVisibility(e){ee(e,this._config)}};$([l],x.prototype,"dataLabelsVisibility");return{a:d,b:f,c:T,d:x}},a,c)
2
+ import c from"./DMTY4NTC.js";import a from"./LTZBWR5K.js";import{F as p,H as b,O as g,c as r}from"./JGDOGMER.js";import{e as u}from"./C4LXB6MK.js";export default $arcgis.t(([{d:v,e:l},y])=>{var m=t=>{let e=!1;return t.legend!==void 0&&(e=t.legend.visible??!0),e},L=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.visible=t},V=t=>t.legend?.title?.content,M=(t,e)=>{e.legend===void 0&&(e.legend=g()),(e.legend.title===void 0||t===void 0)&&(e.legend.title=b({text:"",visible:!0,font:p(r.LegendTitle),type:r.LegendTitle})),t!==void 0&&(e.legend.title.content=t)},D=t=>t.legend?.body,O=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.body=t??b({text:"",visible:!0,font:p(r.LegendText),type:r.LegendText}).content},h=t=>t.legend?.title?.content.text??"",P=(t,e)=>{if(e.legend?.title!==void 0)e.legend.title.content.text=t;else if(e.legend===void 0&&t!==void 0){let i=g();i.title!==void 0&&(i.title.content.text=t,i.title.visible=!0,e.legend=i)}},R=t=>t.legend?.title?.visible??!1,j=(t,e)=>{if(e.legend?.title!==void 0)e.legend.title.visible=t;else if(e.legend!==void 0&&e.legend?.title===void 0&&t)e.legend.title=b({text:h(e),visible:t,font:p(r.LegendTitle),type:r.LegendTitle});else if(e.legend===void 0){let i=g();i.title=b({text:h(e),visible:t,font:p(r.LegendTitle),type:r.LegendTitle}),e.legend=i}},C=t=>t.legend?.position??u.Right,S=(t,e)=>{if(e.legend!==void 0)e.legend.position=t;else if(e.legend===void 0){let i=g();i.position=t,e.legend=i}},k=t=>t.legend?.roundMarkers??!1,H=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.roundMarkers=t},w=t=>t.legend?.maxHeight??void 0,E=(t,e)=>{e.legend===void 0&&(e.legend=g()),e.legend.maxHeight=t},W=Object.defineProperty,q=Object.getOwnPropertyDescriptor,a=(t,e,i,c)=>{for(var o=q(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&W(e,i,o),o},d=class extends y{get legendVisibility(){return m(this._config)}set legendVisibility(e){L(e,this._config)}get legendTitleText(){return h(this._config)}set legendTitleText(e){P(e,this._config)}get legendTitleVisibility(){return R(this._config)}set legendTitleVisibility(e){j(e,this._config)}get legendPosition(){return C(this._config)}set legendPosition(e){S(e,this._config)}get legendTitleSymbol(){return V(this._config)}set legendTitleSymbol(e){M(e,this._config)}get legendTextSymbol(){return D(this._config)}set legendTextSymbol(e){O(e,this._config)}get legendMaxHeight(){return w(this._config)}set legendMaxHeight(e){e!==void 0&&E(e,this._config)}get legendRoundMarker(){return k(this._config)}set legendRoundMarker(e){H(e,this._config)}};a([l],d.prototype,"legendVisibility");a([l],d.prototype,"legendTitleText");a([l],d.prototype,"legendTitleVisibility");a([l],d.prototype,"legendPosition");a([l],d.prototype,"legendTitleSymbol");a([l],d.prototype,"legendTextSymbol");a([l],d.prototype,"legendMaxHeight");a([l],d.prototype,"legendRoundMarker");var z=(t,e)=>t.series?.[e??0]?.dataTooltipVisible??!0,A=(t,e,i)=>{i&&t.series?.[i]?t.series[i].dataTooltipVisible=e:t.series&&t.series.forEach(c=>{c.dataTooltipVisible=e})},B=(t,e)=>t.series?.[e??0]?.dataTooltipReverseColor??!1,F=(t,e,i)=>{i&&t.series?.[i]?t.series[i].dataTooltipReverseColor=e:t.series&&t.series.forEach(c=>{c.dataTooltipReverseColor=e})},G=Object.defineProperty,I=Object.getOwnPropertyDescriptor,_=(t,e,i,c)=>{for(var o=I(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&G(e,i,o),o},f=class extends y{getDataTooltipVisibility(e){return z(this._config,e)}setDataTooltipVisibility(e,i){A(this._config,e,i)}getDataTooltipReverseColor(e){return B(this._config,e)}setDataTooltipReverseColor(e,i){F(this._config,e,i)}};_([l],f.prototype,"setDataTooltipVisibility");_([l],f.prototype,"setDataTooltipReverseColor");var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,N=(t,e,i,c)=>{for(var o=K(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&J(e,i,o),o},U=t=>t.colorMatch??!0,X=(t,e)=>{e.colorMatch=t},T=class extends v{get colorMatch(){return U(this._config)}set colorMatch(e){X(e,this._config)}};N([l],T.prototype,"colorMatch");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,$=(t,e,i,c)=>{for(var o=Z(e,i),n=t.length-1,s;n>=0;n--)(s=t[n])&&(o=s(e,i,o)||o);return o&&Y(e,i,o),o},Q=t=>t.series[0]?.dataLabels?.visible??!1,ee=(t,e)=>{e.series.forEach(i=>{i.dataLabels!==void 0?i.dataLabels.visible=t:i.dataLabels=b({text:"",visible:t,font:p(r.DataLabels),type:r.DataLabels})})},x=class extends v{get dataLabelsVisibility(){return Q(this._config)}set dataLabelsVisibility(e){ee(e,this._config)}};$([l],x.prototype,"dataLabelsVisibility");return{a:d,b:f,c:T,d:x}},a,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{d as t}from"./VTGIHCBG.js";import a from"./TUNGGTDZ.js";import"./UPENS2HR.js";import"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import{l as n}from"./GUQ44MLO.js";import"./DK7J3XAC.js";import{B as p,H as f,g,i,n as m}from"./74BF6TFJ.js";import"./GFIZPXVK.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{Ib:C,Kb:v,Ob:F,Tc:y,_b:b,ja:c,na:u}])=>{var M=g`:host{margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,h=class extends p{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let o=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(o)},this.activeColorMatch=!1,this.popoverPlacement="leading",this.usePopupTemplateFieldsInfo=!1,this.arcgisChartsConfigNoSeriesUpdate=m()}static{this.properties={layerFieldsInfo:16,activeColorMatch:16,model:0,timeZone:1,popoverPlacement:1,seriesColor:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5}}static{this.styles=M}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let o=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!n(e.get("layer"),this.layer)&&(o=!0),(e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==void 0&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")||e.has("popupTemplateFieldInfosEnabled")&&this.popupTemplateFieldInfosEnabled!==void 0&&this.popupTemplateFieldInfosEnabled!==e.get("popupTemplateFieldInfosEnabled"))&&(o=!0),e.has("seriesColor")&&this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(o=!0),o&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,o){o?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){let o=e.get(0);if(this.activeColorMatch=o===void 0,this.model.colorMatch){let s=c(o)?o.color:void 0,a=this.model.nullCategory,r=y(a);s!==void 0&&a!==void 0&&r!==void 0&&(this.model.nullCategory={...a,fillSymbol:{...r,color:s,outline:r.outline&&{...r.outline,color:s}}}),e.forEach((l,d)=>{c(l)&&o!==void 0&&l?.color!==void 0&&!n(this.model.getSeriesColor(d),l?.color)&&this.model.setSeriesColor(l?.color,d)})}}async updateFetchLayerFieldsInfo(e){let o=e??this.model.config,s=this.layer;if(!s){let a=u(o)?o.iLayer:void 0;a&&(s=await C(a))}s&&(await b(s),this.layerFieldsInfo=v(s,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled))}render(){let e=this.layerFieldsInfo?.find(a=>a.name===this.model.xAxisField),o=e!==void 0&&F(e),s;switch(this.page){case t.Data:s=i`<arcgis-charts-config-bar-chart-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-bar-chart-data>`;break;case t.Series:s=i`<arcgis-charts-config-bar-chart-series .model=${this.model} .activeColorMatch=${this.activeColorMatch} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-bar-chart-series>`;break;case t.Axes:s=i`<arcgis-charts-config-axes .model=${this.model} show-max-y-bound-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-axes>`;break;case t.Guides:s=i`<arcgis-charts-config-guides .model=${this.model} .timeZone=${this.timeZone} .enableXAxisGuide=${o} enable-y-axis-guide .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-guides>`;break;case t.Format:s=i`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case t.General:s=i`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:s="";break}return s}};f("arcgis-charts-config-bar-chart",h);return h},a)
2
+ import{d as t}from"./VTGIHCBG.js";import a from"./JJLZNOU5.js";import"./UPENS2HR.js";import"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import{l as n}from"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{B as p,H as f,g,i,n as m}from"./AJDNZRJP.js";import"./GFIZPXVK.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{Ib:C,Kb:v,Ob:F,Tc:y,_b:b,ja:c,na:u}])=>{var M=g`:host{margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,h=class extends p{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let o=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(o)},this.activeColorMatch=!1,this.popoverPlacement="leading",this.usePopupTemplateFieldsInfo=!1,this.arcgisChartsConfigNoSeriesUpdate=m()}static{this.properties={layerFieldsInfo:16,activeColorMatch:16,model:0,timeZone:1,popoverPlacement:1,seriesColor:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5}}static{this.styles=M}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let o=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!n(e.get("layer"),this.layer)&&(o=!0),(e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==void 0&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")||e.has("popupTemplateFieldInfosEnabled")&&this.popupTemplateFieldInfosEnabled!==void 0&&this.popupTemplateFieldInfosEnabled!==e.get("popupTemplateFieldInfosEnabled"))&&(o=!0),e.has("seriesColor")&&this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(o=!0),o&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,o){o?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){let o=e.get(0);if(this.activeColorMatch=o===void 0,this.model.colorMatch){let s=c(o)?o.color:void 0,a=this.model.nullCategory,r=y(a);s!==void 0&&a!==void 0&&r!==void 0&&(this.model.nullCategory={...a,fillSymbol:{...r,color:s,outline:r.outline&&{...r.outline,color:s}}}),e.forEach((l,d)=>{c(l)&&o!==void 0&&l?.color!==void 0&&!n(this.model.getSeriesColor(d),l?.color)&&this.model.setSeriesColor(l?.color,d)})}}async updateFetchLayerFieldsInfo(e){let o=e??this.model.config,s=this.layer;if(!s){let a=u(o)?o.iLayer:void 0;a&&(s=await C(a))}s&&(await b(s),this.layerFieldsInfo=v(s,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled))}render(){let e=this.layerFieldsInfo?.find(a=>a.name===this.model.xAxisField),o=e!==void 0&&F(e),s;switch(this.page){case t.Data:s=i`<arcgis-charts-config-bar-chart-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-bar-chart-data>`;break;case t.Series:s=i`<arcgis-charts-config-bar-chart-series .model=${this.model} .activeColorMatch=${this.activeColorMatch} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-bar-chart-series>`;break;case t.Axes:s=i`<arcgis-charts-config-axes .model=${this.model} show-max-y-bound-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-axes>`;break;case t.Guides:s=i`<arcgis-charts-config-guides .model=${this.model} .timeZone=${this.timeZone} .enableXAxisGuide=${o} enable-y-axis-guide .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-guides>`;break;case t.Format:s=i`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case t.General:s=i`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:s="";break}return s}};f("arcgis-charts-config-bar-chart",h);return h},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as d}from"./3DIZRBOJ.js";import{a as m}from"./FVPRMLQF.js";import{d as p}from"./U4LGTOAJ.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as r,B as n,C as s,H as h,g as l,i as a,n as i,z as o}from"./74BF6TFJ.js";import{k as e}from"./QIST2E6D.js";import"./K4PGZCDZ.js";var g={selectChartComponent:"select-chart-component",panel:"panel"},C=l`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.select-chart-component{width:var(--arcgis-charts-config-panel-width);height:var(--arcgis-charts-config-panel-height)}calcite-block{width:var(--arcgis-charts-config-calcite-block-default-width);height:var(--arcgis-charts-config-calcite-block-default-height);margin:var(--arcgis-charts-config-calcite-block-default-margin)}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.header{margin:0}.panel{max-height:60vh}`,c=class extends n{constructor(){super(...arguments),this._messages=m(),this.selectChartTypePopover=o(),this.open=!1,this.arcgisChartsConfigPopoverClose=i(),this.arcgisChartsConfigSelectChartTypeChange=i()}static{this.properties={messageOverrides:0,headerTitle:1,layerId:1,layerType:1,isRasterBarChartSupported:5,open:5,referenceElement:0,popoverPlacement:1,selectedModelType:1}}static{this.styles=C}async reposition(){await this.selectChartTypePopover.value?.reposition()}updated(){d(this.selectChartTypePopover.value,this.open)}buildRasterChartTypesList(){let t=this.isRasterBarChartSupported===!0;return a`<calcite-list label @click=${this.onChartTypeClick}>${t?a`<calcite-list-item .label=${this._messages.barChart} .value=${e.BarChart} .selected=${this.selectedModelType===e.BarChart}><calcite-icon slot=content-start icon=graph-bar></calcite-icon></calcite-list-item>`:null}<calcite-list-item .label=${this._messages.histogram} .value=${e.Histogram} .selected=${this.selectedModelType===e.Histogram}><calcite-icon slot=content-start icon=graph-histogram></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.scatterplot} .value=${e.Scatterplot} .selected=${this.selectedModelType===e.Scatterplot}><calcite-icon slot=content-start icon=graph-scatter-plot></calcite-icon></calcite-list-item></calcite-list>`}buildChartTypesList(){let t;return p(this.layerType)?t=this.buildRasterChartTypesList():t=a`<calcite-list label @click=${this.onChartTypeClick}><calcite-list-item .label=${this._messages.barChart} .value=${e.BarChart} .selected=${this.selectedModelType===e.BarChart}><calcite-icon slot=content-start icon=graph-bar></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.lineChart} .value=${e.LineChart} .selected=${this.selectedModelType===e.LineChart}><calcite-icon slot=content-start icon=graph-time-series></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.pieChart} .value=${e.PieChart} .selected=${this.selectedModelType===e.PieChart}><calcite-icon slot=content-start icon=pie-chart></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.histogram} .value=${e.Histogram} .selected=${this.selectedModelType===e.Histogram}><calcite-icon slot=content-start icon=graph-histogram></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.scatterplot} .value=${e.Scatterplot} .selected=${this.selectedModelType===e.Scatterplot}><calcite-icon slot=content-start icon=graph-scatter-plot></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.boxPlot} .value=${e.BoxPlot} .selected=${this.selectedModelType===e.BoxPlot}><calcite-icon slot=content-start icon=box-chart></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.calendarHeatChart} .value=${e.HeatChart} .selected=${this.selectedModelType===e.HeatChart}><calcite-icon slot=content-start icon=calendar-heat-chart></calcite-icon></calcite-list-item></calcite-list>`,t}onChartTypeClick(t){t.target?.localName==="calcite-list-item"?this.selectedModelType=t.target?.value:this.selectedModelType=t.target?.parentNode?.value,this.arcgisChartsConfigSelectChartTypeChange.emit()}popoverOpen(){setTimeout(()=>{this.selectChartTypePopover.value?.setFocus()},250)}popoverClose(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit(),setTimeout(()=>{this.referenceElement?.setFocus()},250)}render(){return a`<div class=${s({[g.selectChartComponent]:!0})}><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.popoverPlacement} .flipPlacements=${["top","bottom"]} @calcitePopoverOpen=${this.popoverOpen} @calcitePopoverClose=${this.popoverClose} .open=${this.open} auto-close label ${r(this.selectChartTypePopover)}><calcite-panel class=${s(g.panel)} .heading=${this.headerTitle??this._messages.chooseChartType} closable @calcitePanelClose=${this.popoverClose} .closed=${!this.open}>${this.buildChartTypesList()}</calcite-panel></calcite-popover></div>`}};h("arcgis-charts-config-select-chart-type-popover",c);export{c as ArcgisChartsConfigSelectChartTypePopover};
2
+ import{b as d}from"./3DIZRBOJ.js";import{a as m}from"./LD7OU6HP.js";import{d as p}from"./U4LGTOAJ.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as r,B as n,C as s,H as h,g as l,i as a,n as i,z as o}from"./AJDNZRJP.js";import{k as e}from"./QIST2E6D.js";import"./K4PGZCDZ.js";var g={selectChartComponent:"select-chart-component",panel:"panel"},C=l`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.select-chart-component{width:var(--arcgis-charts-config-panel-width);height:var(--arcgis-charts-config-panel-height)}calcite-block{width:var(--arcgis-charts-config-calcite-block-default-width);height:var(--arcgis-charts-config-calcite-block-default-height);margin:var(--arcgis-charts-config-calcite-block-default-margin)}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.header{margin:0}.panel{max-height:60vh}`,c=class extends n{constructor(){super(...arguments),this._messages=m(),this.selectChartTypePopover=o(),this.open=!1,this.arcgisChartsConfigPopoverClose=i(),this.arcgisChartsConfigSelectChartTypeChange=i()}static{this.properties={messageOverrides:0,headerTitle:1,layerId:1,layerType:1,isRasterBarChartSupported:5,open:5,referenceElement:0,popoverPlacement:1,selectedModelType:1}}static{this.styles=C}async reposition(){await this.selectChartTypePopover.value?.reposition()}updated(){d(this.selectChartTypePopover.value,this.open)}buildRasterChartTypesList(){let t=this.isRasterBarChartSupported===!0;return a`<calcite-list label @click=${this.onChartTypeClick}>${t?a`<calcite-list-item .label=${this._messages.barChart} .value=${e.BarChart} .selected=${this.selectedModelType===e.BarChart}><calcite-icon slot=content-start icon=graph-bar></calcite-icon></calcite-list-item>`:null}<calcite-list-item .label=${this._messages.histogram} .value=${e.Histogram} .selected=${this.selectedModelType===e.Histogram}><calcite-icon slot=content-start icon=graph-histogram></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.scatterplot} .value=${e.Scatterplot} .selected=${this.selectedModelType===e.Scatterplot}><calcite-icon slot=content-start icon=graph-scatter-plot></calcite-icon></calcite-list-item></calcite-list>`}buildChartTypesList(){let t;return p(this.layerType)?t=this.buildRasterChartTypesList():t=a`<calcite-list label @click=${this.onChartTypeClick}><calcite-list-item .label=${this._messages.barChart} .value=${e.BarChart} .selected=${this.selectedModelType===e.BarChart}><calcite-icon slot=content-start icon=graph-bar></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.lineChart} .value=${e.LineChart} .selected=${this.selectedModelType===e.LineChart}><calcite-icon slot=content-start icon=graph-time-series></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.pieChart} .value=${e.PieChart} .selected=${this.selectedModelType===e.PieChart}><calcite-icon slot=content-start icon=pie-chart></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.histogram} .value=${e.Histogram} .selected=${this.selectedModelType===e.Histogram}><calcite-icon slot=content-start icon=graph-histogram></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.scatterplot} .value=${e.Scatterplot} .selected=${this.selectedModelType===e.Scatterplot}><calcite-icon slot=content-start icon=graph-scatter-plot></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.boxPlot} .value=${e.BoxPlot} .selected=${this.selectedModelType===e.BoxPlot}><calcite-icon slot=content-start icon=box-chart></calcite-icon></calcite-list-item><calcite-list-item .label=${this._messages.calendarHeatChart} .value=${e.HeatChart} .selected=${this.selectedModelType===e.HeatChart}><calcite-icon slot=content-start icon=calendar-heat-chart></calcite-icon></calcite-list-item></calcite-list>`,t}onChartTypeClick(t){t.target?.localName==="calcite-list-item"?this.selectedModelType=t.target?.value:this.selectedModelType=t.target?.parentNode?.value,this.arcgisChartsConfigSelectChartTypeChange.emit()}popoverOpen(){setTimeout(()=>{this.selectChartTypePopover.value?.setFocus()},250)}popoverClose(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit(),setTimeout(()=>{this.referenceElement?.setFocus()},250)}render(){return a`<div class=${s({[g.selectChartComponent]:!0})}><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.popoverPlacement} .flipPlacements=${["top","bottom"]} @calcitePopoverOpen=${this.popoverOpen} @calcitePopoverClose=${this.popoverClose} .open=${this.open} auto-close label ${r(this.selectChartTypePopover)}><calcite-panel class=${s(g.panel)} .heading=${this.headerTitle??this._messages.chooseChartType} closable @calcitePanelClose=${this.popoverClose} .closed=${!this.open}>${this.buildChartTypesList()}</calcite-panel></calcite-popover></div>`}};h("arcgis-charts-config-select-chart-type-popover",c);export{c as ArcgisChartsConfigSelectChartTypePopover};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as g}from"./3DIZRBOJ.js";import{a as i}from"./5GZBRQP2.js";import{a as h}from"./FVPRMLQF.js";import{f as p}from"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as a,B as n,H as c,i as t,n as s,z as l}from"./74BF6TFJ.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";var r=class extends n{constructor(){super(...arguments),this._messages=h(),this.popoverElement=l(),this.placement="leading",this.open=!1,this.arcgisChartsConfigGuidePopoverColorChange=s(),this.arcgisChartsConfigGuidePopoverSymbolChange=s(),this.arcgisChartsConfigPopoverClose=s()}static{this.properties={messageOverrides:0,selectedElement:0,referenceElement:0,placement:1,open:5}}async reposition(){await this.popoverElement.value?.reposition()}updated(){g(this.popoverElement.value,this.open)}guidePopoverClose(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}updateColorProperties(o){let e=o.detail;e!==void 0&&(e[3]=i),this.selectedElement=e,this.arcgisChartsConfigGuidePopoverColorChange.emit(this.selectedElement)}updateSymbolProperties(o){let{lineStyle:e}=o.target;e?.color!==void 0&&(e.color[3]=i),this.selectedElement=e,this.arcgisChartsConfigGuidePopoverSymbolChange.emit(o.detail)}render(){let o=this.selectedElement,e=this.selectedElement;return t`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${this.open} offset-distance=20 offset-skidding=60 label pointer-disabled @calcitePopoverClose=${this.guidePopoverClose} auto-close ${a(this.popoverElement)}>${Array.isArray(o)?t`<arcgis-charts-config-color-style .header=${this._messages.fillStyle} enable-close .open=${this.open} .selectedColor=${o} @arcgisChartsConfigColorStyleClose=${this.guidePopoverClose} @arcgisChartsConfigColorStyleChange=${this.updateColorProperties}></arcgis-charts-config-color-style>`:null}${e?.type===p.SLS?t`<arcgis-charts-config-line-style .header=${this._messages.lineStyle} .open=${this.open} enable-close use-panel .lineStyle=${e} @arcgisChartsConfigLineStyleClose=${this.guidePopoverClose} @arcgisChartsConfigLineStyleChange=${this.updateSymbolProperties}></arcgis-charts-config-line-style>`:null}</calcite-popover></div>`}};c("arcgis-charts-config-guide-popover",r);export{r as ArcgisChartsConfigGuidePopover};
2
+ import{b as g}from"./3DIZRBOJ.js";import{a as i}from"./5GZBRQP2.js";import{a as h}from"./LD7OU6HP.js";import{f as p}from"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as a,B as n,H as c,i as t,n as s,z as l}from"./AJDNZRJP.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";var r=class extends n{constructor(){super(...arguments),this._messages=h(),this.popoverElement=l(),this.placement="leading",this.open=!1,this.arcgisChartsConfigGuidePopoverColorChange=s(),this.arcgisChartsConfigGuidePopoverSymbolChange=s(),this.arcgisChartsConfigPopoverClose=s()}static{this.properties={messageOverrides:0,selectedElement:0,referenceElement:0,placement:1,open:5}}async reposition(){await this.popoverElement.value?.reposition()}updated(){g(this.popoverElement.value,this.open)}guidePopoverClose(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}updateColorProperties(o){let e=o.detail;e!==void 0&&(e[3]=i),this.selectedElement=e,this.arcgisChartsConfigGuidePopoverColorChange.emit(this.selectedElement)}updateSymbolProperties(o){let{lineStyle:e}=o.target;e?.color!==void 0&&(e.color[3]=i),this.selectedElement=e,this.arcgisChartsConfigGuidePopoverSymbolChange.emit(o.detail)}render(){let o=this.selectedElement,e=this.selectedElement;return t`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${this.open} offset-distance=20 offset-skidding=60 label pointer-disabled @calcitePopoverClose=${this.guidePopoverClose} auto-close ${a(this.popoverElement)}>${Array.isArray(o)?t`<arcgis-charts-config-color-style .header=${this._messages.fillStyle} enable-close .open=${this.open} .selectedColor=${o} @arcgisChartsConfigColorStyleClose=${this.guidePopoverClose} @arcgisChartsConfigColorStyleChange=${this.updateColorProperties}></arcgis-charts-config-color-style>`:null}${e?.type===p.SLS?t`<arcgis-charts-config-line-style .header=${this._messages.lineStyle} .open=${this.open} enable-close use-panel .lineStyle=${e} @arcgisChartsConfigLineStyleClose=${this.guidePopoverClose} @arcgisChartsConfigLineStyleChange=${this.updateSymbolProperties}></arcgis-charts-config-line-style>`:null}</calcite-popover></div>`}};c("arcgis-charts-config-guide-popover",r);export{r as ArcgisChartsConfigGuidePopover};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import g from"./JHZKHOF4.js";import f from"./D72XCO7P.js";import e from"./YHKUB4KO.js";import c from"./K7QEIYH2.js";import b from"./XCAJJFB7.js";import a from"./TUNGGTDZ.js";import{n as x}from"./UPENS2HR.js";import{O as k,ia as _,za as H}from"./JGDOGMER.js";import{g as V,k as $,o as j}from"./GUQ44MLO.js";import{d as y,e as d}from"./QIST2E6D.js";import{b as m,h as S,v as u}from"./C4LXB6MK.js";export default $arcgis.t(([{substitute:b},{G:T,H:L,Mb:O},{c:A,d:q},{c:K},{a:M},{d:w},{g:U}])=>{function E(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,n=e!==void 0?v({config:o,layerInfo:e,commonStrings:r,mode:t}):"",c=M(o),g=w(o);return n===c||g}function P(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,n=e!==void 0?q({config:o,layerInfo:e,commonStrings:r,numericFields:p(o),aggregationType:F(o,t)}):"",c=K(1,o),g=w(o);return n===c||g}var B=i=>i.series?.[0]?.x??"";function Q(i,o){let e=i.series?.[0];return[`${o===d.Category?e.y:L} ${S.Descending}`]}var Y=(i,o)=>{let e=y.valueDesc,t=i.orderOptions?.data?.orderType??Q(i,o),r=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy:S.Descending;return t===u.Category&&Array.isArray(r)?e=y.customSort:t===u.Category?r===S.Ascending?e=y.labelAsc:e=y.labelDesc:r===S.Ascending?e=y.valueAsc:e=y.valueDesc,e},p=i=>{let o=[];return o=i.series?.[0]?.query?.outStatistics?.map(e=>e.onStatisticField)??[i.series?.[0]?.y??""],o.filter(e=>e!=="")},F=(i,o)=>{let e=p(i),t;return o===d.Fields&&e.length===0?t=m.Sum:t=i.series?.[0]?.query?.outStatistics?.[0]?.statisticType??m.NoAggregation,t};function z(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,n=O(e?.layer).idField,c=o.series[0]??_(r,n),g=B(o),l={...c,x:t===d.Category?g:T},s=F(o,t);if(s!==m.NoAggregation&&n!==void 0){let a=`${s}_${n}_0`.toUpperCase();l.y=t===d.Category?a:L,l.query={outStatistics:t===d.Category?[{statisticType:s,onStatisticField:n,outStatisticFieldName:a}]:[]}}return t===d.Category&&l.query!==void 0?l.query.groupByFieldsForStatistics=[g]:delete l.query?.groupByFieldsForStatistics,V(l)}function v(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,{layerFieldsInfo:n}=e,{idField:c,isTraditionalTypeOID:g}=O(e.layer),l=B(o),s=p(o),a=F(o,t),f=g&&(s.length===0||s.includes(c)),h=H(a,r),D=f?"":s.map(J=>x(n??[],J)).join(", "),I=x(n??[],l),C="",N;return t===d.Fields?N=s.length===0:N=l==="",N?C=r.utilsStrings.chartType.pieChart:a===m.NoAggregation?C=b(r.titleLabels.aggrFieldsByCategory,{aggregationFields:f?c:D,category:I}):a===m.Count?C=b(r.titleLabels.aggrTypeCategory,{aggregationType:h,category:I}):s.length>0&&(I===T||$(I)||j(I)?C=b(r.titleLabels.aggrTypeOfAggrFields,{aggregationType:h,aggregationFields:D}):C=b(r.titleLabels.aggrTypeOfAggrFieldsByCategory,{aggregationType:h,aggregationFields:D,category:I})),C}var ce=i=>{let{newSortOrderKind:o,config:e,orderByList:t}=i;e.orderOptions??={},o===y.customSort&&t!==void 0?e.orderOptions.data={orderType:u.Category,orderBy:[...t]}:e.orderOptions.data={orderType:o===y.labelAsc||o===y.labelDesc?u.Category:u.YValue,orderBy:o===y.labelAsc||o===y.valueAsc?S.Ascending:S.Descending}},le=i=>{let{newCategory:o,config:e,layerInfo:t,mode:r,commonStrings:n}=i,c=e.series?.length??0,g=E({config:e,layerInfo:t,commonStrings:n,mode:r}),l=P({config:e,layerInfo:t,commonStrings:n,mode:r});if(e.series.forEach(s=>{s.x=r===d.Category?o:T,s.query!==void 0&&o!==T?s.query.groupByFieldsForStatistics=[o]:delete s.query?.groupByFieldsForStatistics}),c===0){let s=[z({config:e,layerInfo:t,mode:r,commonStrings:n})];e.series=s}if(t!==void 0){if(l){let a=q({config:e,layerInfo:t,numericFields:p(e),aggregationType:F(e,r),commonStrings:n});A(e,1,a)}e.title&&g&&(e.title.content.text=v({config:e,layerInfo:t,commonStrings:n,mode:r}));let s=r===d.Fields?p(e).filter(a=>a!==O(t.layer).idField):p(e);W({newNumericFields:s,config:e,layerInfo:t,mode:r,commonStrings:n})}};function G(i){let{numericFields:o,aggregationType:e,config:t,layerInfo:r,mode:n,commonStrings:c}=i,{layerFieldsInfo:g}=r,l=[],s=z({config:t,layerInfo:r,mode:n,commonStrings:c});s.query||(s.query={}),o.length>1&&delete s.query?.where;let a=U({config:t,xAxisField:B(t),numericFields:o,aggregationType:e,mode:n,layer:r.layer,fieldList:g}).name;if(e!==m.NoAggregation)if(n===d.Category){if(o.length>0){let f=o[0];s.query.outStatistics=[{...s.query?.outStatistics?.[0]??{},onStatisticField:f,outStatisticFieldName:a,statisticType:e}],s.query.groupByFieldsForStatistics=[B(t)]}}else{s.query.outStatistics=[];for(let f of o)s.query.outStatistics?.push({onStatisticField:f,outStatisticFieldName:f,statisticType:e});delete s.query.groupByFieldsForStatistics}else s.query={};s.y=a,l.push(s),t.series=l}var de=i=>{let{newAggregationType:o,config:e,layerInfo:t,mode:r,commonStrings:n}=i,c=p(e),g=E({config:e,layerInfo:t,commonStrings:n,mode:r}),l=P({config:e,layerInfo:t,commonStrings:n,mode:r});if(G({config:e,layerInfo:t,numericFields:c,aggregationType:o,commonStrings:n,mode:r}),l){let h=q({config:e,layerInfo:t,commonStrings:n,numericFields:p(e),aggregationType:F(e,r)});A(e,1,h)}e.title&&g&&(e.title.content.text=v({config:e,layerInfo:t,commonStrings:n,mode:r}));let s=e.series?.[0]?.displayCategoryOnDataLabel,a=e.series?.[0]?.displayNumericValueOnDataLabel,f=e.series?.[0]?.displayPercentageOnDataLabel;e.legend={...e.legend??k(),displayNumericValue:a,displayPercentage:f,displayCategory:s}},W=i=>{let{newNumericFields:o}=i,{config:e,layerInfo:t,mode:r,commonStrings:n}=i,c=O(t?.layer).idField,g=F(e,r),l=E({config:e,layerInfo:t,commonStrings:n,mode:r}),s=P({config:e,layerInfo:t,commonStrings:n,mode:r});if(o=o===""?[]:o,o=typeof o=="string"?[o]:o,c!==void 0&&(o.length===0&&r===d.Category?(o=[c],g=m.Count):g===m.Count&&o.length>=1&&!o.includes(c)&&(g=m.Sum)),t!==void 0){if(G({config:e,layerInfo:t,commonStrings:n,numericFields:o,aggregationType:g,mode:r}),s){let a=q({config:e,layerInfo:t,commonStrings:n,numericFields:p(e),aggregationType:F(e,r)});A(e,1,a)}e.title&&l&&(e.title.content.text=v({config:e,layerInfo:t,commonStrings:n,mode:r}))}else e.series.forEach(a=>{delete a.query,a.y=o[0]})},ye=(i,o)=>{let e=[],t=i.orderOptions?.data?.orderType,r=Y(i,o),n=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy:void 0;return r===y.customSort&&t===u.Category&&Array.isArray(n)&&(e=n),e},me=i=>{let{values:o,config:e,mode:t}=i;e.orderOptions??={};let r=e.orderOptions?.data?.orderType;Y(e,t)===y.customSort&&r===u.Category&&(e.orderOptions.data={orderType:u.Category,orderBy:[...o]})};function fe(i){let{category:o="",numericFields:e=[],fallbackMode:t=d.Category}=i,r=o.trim()!==""&&o!==T,n=t;return e.length>1||!r&&e.length>0?n=d.Fields:r&&e.length<=1&&(n=d.Category),n}return{a:B,b:Y,c:p,d:F,e:v,f:ce,g:le,h:de,i:W,j:ye,k:me,l:fe}},"intl",a,b,c,e,f,g)
2
+ import g from"./EQNW3D27.js";import f from"./VUWVVCEB.js";import e from"./5AMXSBVD.js";import c from"./CKRMPTUO.js";import b from"./ZJIYZYVK.js";import a from"./JJLZNOU5.js";import{n as x}from"./UPENS2HR.js";import{O as k,ia as _,za as H}from"./JGDOGMER.js";import{g as V,k as $,o as j}from"./GUQ44MLO.js";import{d as y,e as d}from"./QIST2E6D.js";import{b as m,h as S,v as u}from"./C4LXB6MK.js";export default $arcgis.t(([{substitute:b},{G:T,H:L,Mb:O},{c:A,d:q},{c:K},{a:M},{d:w},{g:U}])=>{function E(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,n=e!==void 0?v({config:o,layerInfo:e,commonStrings:r,mode:t}):"",c=M(o),g=w(o);return n===c||g}function P(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,n=e!==void 0?q({config:o,layerInfo:e,commonStrings:r,numericFields:p(o),aggregationType:F(o,t)}):"",c=K(1,o),g=w(o);return n===c||g}var B=i=>i.series?.[0]?.x??"";function Q(i,o){let e=i.series?.[0];return[`${o===d.Category?e.y:L} ${S.Descending}`]}var Y=(i,o)=>{let e=y.valueDesc,t=i.orderOptions?.data?.orderType??Q(i,o),r=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy:S.Descending;return t===u.Category&&Array.isArray(r)?e=y.customSort:t===u.Category?r===S.Ascending?e=y.labelAsc:e=y.labelDesc:r===S.Ascending?e=y.valueAsc:e=y.valueDesc,e},p=i=>{let o=[];return o=i.series?.[0]?.query?.outStatistics?.map(e=>e.onStatisticField)??[i.series?.[0]?.y??""],o.filter(e=>e!=="")},F=(i,o)=>{let e=p(i),t;return o===d.Fields&&e.length===0?t=m.Sum:t=i.series?.[0]?.query?.outStatistics?.[0]?.statisticType??m.NoAggregation,t};function z(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,n=O(e?.layer).idField,c=o.series[0]??_(r,n),g=B(o),l={...c,x:t===d.Category?g:T},s=F(o,t);if(s!==m.NoAggregation&&n!==void 0){let a=`${s}_${n}_0`.toUpperCase();l.y=t===d.Category?a:L,l.query={outStatistics:t===d.Category?[{statisticType:s,onStatisticField:n,outStatisticFieldName:a}]:[]}}return t===d.Category&&l.query!==void 0?l.query.groupByFieldsForStatistics=[g]:delete l.query?.groupByFieldsForStatistics,V(l)}function v(i){let{config:o,layerInfo:e,mode:t,commonStrings:r}=i,{layerFieldsInfo:n}=e,{idField:c,isTraditionalTypeOID:g}=O(e.layer),l=B(o),s=p(o),a=F(o,t),f=g&&(s.length===0||s.includes(c)),h=H(a,r),D=f?"":s.map(J=>x(n??[],J)).join(", "),I=x(n??[],l),C="",N;return t===d.Fields?N=s.length===0:N=l==="",N?C=r.utilsStrings.chartType.pieChart:a===m.NoAggregation?C=b(r.titleLabels.aggrFieldsByCategory,{aggregationFields:f?c:D,category:I}):a===m.Count?C=b(r.titleLabels.aggrTypeCategory,{aggregationType:h,category:I}):s.length>0&&(I===T||$(I)||j(I)?C=b(r.titleLabels.aggrTypeOfAggrFields,{aggregationType:h,aggregationFields:D}):C=b(r.titleLabels.aggrTypeOfAggrFieldsByCategory,{aggregationType:h,aggregationFields:D,category:I})),C}var ce=i=>{let{newSortOrderKind:o,config:e,orderByList:t}=i;e.orderOptions??={},o===y.customSort&&t!==void 0?e.orderOptions.data={orderType:u.Category,orderBy:[...t]}:e.orderOptions.data={orderType:o===y.labelAsc||o===y.labelDesc?u.Category:u.YValue,orderBy:o===y.labelAsc||o===y.valueAsc?S.Ascending:S.Descending}},le=i=>{let{newCategory:o,config:e,layerInfo:t,mode:r,commonStrings:n}=i,c=e.series?.length??0,g=E({config:e,layerInfo:t,commonStrings:n,mode:r}),l=P({config:e,layerInfo:t,commonStrings:n,mode:r});if(e.series.forEach(s=>{s.x=r===d.Category?o:T,s.query!==void 0&&o!==T?s.query.groupByFieldsForStatistics=[o]:delete s.query?.groupByFieldsForStatistics}),c===0){let s=[z({config:e,layerInfo:t,mode:r,commonStrings:n})];e.series=s}if(t!==void 0){if(l){let a=q({config:e,layerInfo:t,numericFields:p(e),aggregationType:F(e,r),commonStrings:n});A(e,1,a)}e.title&&g&&(e.title.content.text=v({config:e,layerInfo:t,commonStrings:n,mode:r}));let s=r===d.Fields?p(e).filter(a=>a!==O(t.layer).idField):p(e);W({newNumericFields:s,config:e,layerInfo:t,mode:r,commonStrings:n})}};function G(i){let{numericFields:o,aggregationType:e,config:t,layerInfo:r,mode:n,commonStrings:c}=i,{layerFieldsInfo:g}=r,l=[],s=z({config:t,layerInfo:r,mode:n,commonStrings:c});s.query||(s.query={}),o.length>1&&delete s.query?.where;let a=U({config:t,xAxisField:B(t),numericFields:o,aggregationType:e,mode:n,layer:r.layer,fieldList:g}).name;if(e!==m.NoAggregation)if(n===d.Category){if(o.length>0){let f=o[0];s.query.outStatistics=[{...s.query?.outStatistics?.[0]??{},onStatisticField:f,outStatisticFieldName:a,statisticType:e}],s.query.groupByFieldsForStatistics=[B(t)]}}else{s.query.outStatistics=[];for(let f of o)s.query.outStatistics?.push({onStatisticField:f,outStatisticFieldName:f,statisticType:e});delete s.query.groupByFieldsForStatistics}else s.query={};s.y=a,l.push(s),t.series=l}var de=i=>{let{newAggregationType:o,config:e,layerInfo:t,mode:r,commonStrings:n}=i,c=p(e),g=E({config:e,layerInfo:t,commonStrings:n,mode:r}),l=P({config:e,layerInfo:t,commonStrings:n,mode:r});if(G({config:e,layerInfo:t,numericFields:c,aggregationType:o,commonStrings:n,mode:r}),l){let h=q({config:e,layerInfo:t,commonStrings:n,numericFields:p(e),aggregationType:F(e,r)});A(e,1,h)}e.title&&g&&(e.title.content.text=v({config:e,layerInfo:t,commonStrings:n,mode:r}));let s=e.series?.[0]?.displayCategoryOnDataLabel,a=e.series?.[0]?.displayNumericValueOnDataLabel,f=e.series?.[0]?.displayPercentageOnDataLabel;e.legend={...e.legend??k(),displayNumericValue:a,displayPercentage:f,displayCategory:s}},W=i=>{let{newNumericFields:o}=i,{config:e,layerInfo:t,mode:r,commonStrings:n}=i,c=O(t?.layer).idField,g=F(e,r),l=E({config:e,layerInfo:t,commonStrings:n,mode:r}),s=P({config:e,layerInfo:t,commonStrings:n,mode:r});if(o=o===""?[]:o,o=typeof o=="string"?[o]:o,c!==void 0&&(o.length===0&&r===d.Category?(o=[c],g=m.Count):g===m.Count&&o.length>=1&&!o.includes(c)&&(g=m.Sum)),t!==void 0){if(G({config:e,layerInfo:t,commonStrings:n,numericFields:o,aggregationType:g,mode:r}),s){let a=q({config:e,layerInfo:t,commonStrings:n,numericFields:p(e),aggregationType:F(e,r)});A(e,1,a)}e.title&&l&&(e.title.content.text=v({config:e,layerInfo:t,commonStrings:n,mode:r}))}else e.series.forEach(a=>{delete a.query,a.y=o[0]})},ye=(i,o)=>{let e=[],t=i.orderOptions?.data?.orderType,r=Y(i,o),n=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy:void 0;return r===y.customSort&&t===u.Category&&Array.isArray(n)&&(e=n),e},me=i=>{let{values:o,config:e,mode:t}=i;e.orderOptions??={};let r=e.orderOptions?.data?.orderType;Y(e,t)===y.customSort&&r===u.Category&&(e.orderOptions.data={orderType:u.Category,orderBy:[...o]})};function fe(i){let{category:o="",numericFields:e=[],fallbackMode:t=d.Category}=i,r=o.trim()!==""&&o!==T,n=t;return e.length>1||!r&&e.length>0?n=d.Fields:r&&e.length<=1&&(n=d.Category),n}return{a:B,b:Y,c:p,d:F,e:v,f:ce,g:le,h:de,i:W,j:ye,k:me,l:fe}},"intl",a,b,c,e,f,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as ce,d as de}from"./PQCKQMUH.js";import f from"./JHZKHOF4.js";import e from"./D72XCO7P.js";import d from"./YHKUB4KO.js";import c from"./K7QEIYH2.js";import b from"./XCAJJFB7.js";import a from"./TUNGGTDZ.js";import{n as I}from"./UPENS2HR.js";import{Ga as V,I as K,J as Q,K as R,S as z,T as Z,ba as ee,fa as E,n as H,p as h}from"./JGDOGMER.js";import{a as _}from"./BIXQAUTT.js";import{d as P,g as N,k as X,l as Y}from"./GUQ44MLO.js";import{b as y}from"./QIST2E6D.js";import{a as g,h as x,v as u}from"./C4LXB6MK.js";export default $arcgis.t(([{substitute:D},{Sb:re,Ub:$,cb:ie,jc:C,nc:ne,oa:A,pa:se,wa:oe},{c:O,f:j,g:J,h:te,t:ae},{c:k},{a:le},{d:M},{i:q}])=>{var ye=s=>{let{config:e,seriesIndex:o,callback:i}=s;[o!==void 0?e.series?.[o]:e.series].flat().forEach(r=>{se(r)&&i(r)})},es=s=>{let{style:e,seriesIndex:o,config:i}=s;ye({config:i,seriesIndex:o,callback:r=>{ce(e,r)}})},ss=s=>{let{width:e,seriesIndex:o,config:i}=s;ye({config:i,seriesIndex:o,callback:r=>{de(e,r)}})},os=(s,e)=>e?.series?.[s]?.name,is=(s,e,o)=>{let i=o;i?.series?.[e]!==void 0&&(i.series[e].name=s)},rs=(s,e)=>{let o,i=e.series?.[s];return i?.type===g.BoxPlotSeries?o=i.fillSymbol?.color:i?.type===g.LineSeries&&(o=i.lineSymbol?.color),o},Be=s=>{let e=s.series[0];return s.showMean===!0&&A(e)?e.fillSymbol?.color:void 0},ve=(s,e)=>{let o=e.series[0];e.showMean===!0&&A(o)&&(o.fillSymbol!==void 0?o.fillSymbol.color=s:o.fillSymbol={...z(),color:s})},ns=(s,e,o)=>{let i=o?.series?.[e];i?.type===g.BoxPlotSeries&&i.fillSymbol!==void 0?i.fillSymbol.color=s:i?.type===g.LineSeries&&i.lineSymbol!==void 0&&(i.lineSymbol.color=s,i.markerSymbol!==void 0&&(i.markerSymbol.color=s))},Ae=s=>s.series.map(e=>e.id),Oe=(s,e)=>{e?.series?.sort((o,i)=>s.findIndex(r=>o.id===r)-s.findIndex(r=>i.id===r))},ts=(s,e,o)=>{let i=Ae(o),[r]=i.splice(s,1);i.splice(e,0,r),Oe(i,o)},as=s=>G(s)?s.series.findIndex(e=>e.type===g.BoxPlotSeries):-1;function Me(s,e,o){let i=xe(s,e,o),r=le(s),n=M(s);return i===r||n}function me(s,e,o){let i=L(s,e,o),r=k(1,s),n=M(s);return i===r||n}function Le(s){let{config:e,layerInfo:o,newCategory:i}=s,{layerFieldsInfo:r}=o,n=B(e),a=i!==h?I(r,n):"",t=k(0,e),l=M(e);return a===t||l||t.trim()===""}var B=s=>C(s)?.x??h,Ce=P(s=>{let e=C(s),o=e?.query?.where?.split("=")[0].trim()??"";return ne(e?.query?.where)?"":o},s=>C(s)?.query?.where),fe=P(s=>ie(s?.series).filter(e=>e!==""),s=>s?.series),T=s=>{let{category:e,seriesIndex:o,y:i,commonStrings:r}=s,n={...E(r,o),x:e===void 0||e===""?h:e,y:i,query:{}};return N(n)},ke=s=>{let{category:e,seriesIndex:o,y:i,commonStrings:r}=s,n={...ee({commonStrings:r,seriesIndex:o}),x:e===void 0||e===""?h:e,y:i,query:{}};return N(n)};function ge(s){let{x:e,y:o,seriesTemplate:i,commonStrings:r}=s,{id:n,fillSymbol:a}=i??{},t=E(r),l=n??`series_${Date.now()}`;return t.id=l,t.name=l,t.x=e,t.y=o,a?t.fillSymbol=a:t.fillSymbol&&(t.fillSymbol.color=V,t.fillSymbol?.outline&&(t.fillSymbol.outline.color=V)),t}function ue(s){let{numericFields:e,config:o,layerInfo:i,category:r,commonStrings:n}=s,{layerFieldsInfo:a}=i,t=[],l=r??B(o),m=q({fieldName:l,numericFields:e,fieldList:a});if(e.length===0){let c=T({y:"",seriesIndex:0,category:l,commonStrings:n});t.push(c)}else if(m){let c=e.length>1?e:e[0],f=T({y:c,seriesIndex:0,category:l,commonStrings:n}),w=o.series.find(F=>Y(c,F.y)&&F.query?.where===void 0),d=A(w)?w:void 0,p=d?.id??e[0],S=e.length>1?n.axisLabels.values:I(i.layerFieldsInfo,e[0]),b=d?.name??S,v={...d??f,id:p,name:b,x:m?h:l};t.push(v)}else for(let c=0;c<e.length;c+=1){let f=e[c],w=T({y:f,seriesIndex:c,category:l,commonStrings:n}),d=o.series.find(F=>f===F.y),p=A(d)?d:void 0,S=p?.id??f,b=p?.name??I(a,f),v={...p??w,id:S,name:b,x:l};t.push(v)}return o.series.length===1&&t.length===1&&"fillSymbol"in o.series[0]&&(t[0].fillSymbol=o.series[0].fillSymbol),t}var pe=s=>s?.query?.where?.split("=")[1].trim().replace(/'/gu,"")??"",qe=s=>s.series.some(e=>e.type===g.LineSeries)&&s.series.some(e=>e.type===g.BoxPlotSeries);function De(s,e,o){let i=[];return s.forEach(r=>{if(r.type===g.BoxPlotSeries){let{type:n,fillSymbol:a,...t}=r;i.push({...t,type:g.LineSeries,lineSymbol:{...K({width:H}),...a!==void 0?{color:a.color}:{}},markerSymbol:{...Z(),...a!==void 0?{color:a.color}:{}}})}}),i.unshift(ge({x:s[0].x,y:s[0].y,seriesTemplate:o,commonStrings:e})),i}function Te(s){let e=s.slice(1),o=[];return e.forEach(i=>{if(i.type===g.LineSeries){let{type:r,lineSymbol:n,markerSymbol:a,...t}=i,l=z();o.push({...t,type:g.BoxPlotSeries,fillSymbol:{...l,color:n?.color}})}}),o}function Se(s){let{formerSeries:e,newSeries:o,showMean:i}=s,r=o,n=l=>l.type===(i?g.LineSeries:g.BoxPlotSeries),a=e.filter(n).map(l=>l.id),t=o.filter(n).map(l=>l.id);return a.length===t.length&&JSON.stringify(a)!==JSON.stringify(t)&&(r=r.sort((l,m)=>a.findIndex(c=>c===l.id)-a.findIndex(c=>c===m.id))),r}function Pe(s){let{config:e,layerInfo:o,commonStrings:i,splitByField:r,numericFields:n,category:a,splitByFieldInfos:t}=s,l=a??B(e),{categoriesArray:m,splitByFieldType:c}=t,f=[],w=qe(e);if(m.length===0){f=ue({numericFields:n,category:l,config:e,layerInfo:o,commonStrings:i});for(let d of f)d.query&&(d.query.where=`${r}=''`)}else for(let d=0;d<m.length;d+=1){let p=m[d],S={y:n,seriesIndex:d,category:l,commonStrings:i},b=w?ke(S):T(S),v=$({queryObject:o.layer,fieldName:r,fieldValue:p??""}),F=`${p}`,U=e.series.find(Fe=>pe(Fe)===F),Ie=U?.name??v??F,W=U??b,we={...W,id:F,name:Ie,x:l===void 0||l===""?h:l,y:b.y,query:{...W.query,where:`${r}=${c===_.String&&p!==null?`'${p}'`:p}`}};f.push(we)}if(f=Se({formerSeries:e.series,newSeries:f,showMean:G(e)}),G(e)){let d=e.series.find(S=>S.type===g.BoxPlotSeries),p=ge({x:l,y:n,seriesTemplate:d,commonStrings:i});f.unshift(p)}return f}var ls=s=>{let{splitByField:e,numericFields:o,category:i,config:r,layerInfo:n,commonStrings:a,splitByFieldInfos:t}=s,{layerFieldsInfo:l}=n,m=Ve(i,o,e),c=re(l),f=B(r),w=Me(r,n,a),d=me(r,n,a),p=Le({config:r,layerInfo:n,newCategory:i}),S=J(r);if(!c.includes(f)&&c.includes(i)?S=R():c.includes(f)&&!c.includes(i)&&(S=Q()),S!==void 0&&te(r,a,S),ze(m?{newShowMeanLines:r.showMean,config:r,commonStrings:a}:{newShowMeanLines:!1,config:r,commonStrings:a}),r.series=m&&t?Pe({config:r,layerInfo:n,splitByField:e,numericFields:o,category:i,commonStrings:a,splitByFieldInfos:t}):ue({numericFields:o,config:r,layerInfo:n,category:i,commonStrings:a}),p){let b=q({fieldName:i,numericFields:o,fieldList:l})?"":I(l,i);O(r,0,b)}if(d){let b=L(r,n,a);O(r,1,b)}r?.title!==void 0&&w&&(r.title.content.text=xe(r,n,a)),j({config:r,value:null,axisIndex:1,isMax:!1}),j({config:r,value:null,axisIndex:1,isMax:!0})},Ne=s=>s?.standardizeValues??!1;function L(s,e,o){let{layerFieldsInfo:i}=e,r=Ne(s)?o.axisLabels.standardizedValues:o.axisLabels.values,n=s?.series?.map(a=>a.y).flat();return n=[...new Set(n)],n.length===1&&(r=I(i,n[0])),r}function xe(s,e,o){let{layerFieldsInfo:i}=e,r=B(s),n=fe(s),a=Ce(s),t=n.map(c=>I(i??[],c)).join(", "),l=I(i??[],r),m="";return n.length>0&&(r!==h&&a!==""?m=D(o.titleLabels.distributionOfFieldsByCategoryAndSplitBy,{valueFields:t,category:l,splitByField:a}):r!==h?m=D(o.titleLabels.distributionOfFieldsByCategory,{valueFields:t,category:l}):a!==""?m=D(o.titleLabels.distributionOfFieldsByCategory,{valueFields:t,category:a}):m=D(o.titleLabels.distributionOfField,{valueField:t})),m}var cs=s=>{let{series:e,splitByField:o,layerInfo:i,commonStrings:r}=s,n=typeof e.y=="string"?I(i.layerFieldsInfo,e.y):r.axisLabels.values;return X(o)||(n=pe(e)),n=$({queryObject:i.layer,fieldName:o,fieldValue:n??""})??n,n??e.id},ds=s=>s?.showOutliers??!1,ys=s=>{let{newShowOutliers:e,config:o,layerInfo:i,commonStrings:r}=s;if(o.showOutliers=e,me(o,i,r)){let n=L(o,i,r);O(o,1,n)}},ms=s=>{let{newStandardizeValues:e,config:o,layerInfo:i,commonStrings:r}=s,n=k(1,o),a=L(o,i,r),t=M(o);if(o.standardizeValues=e,n===a||t){let l=L(o,i,r);O(o,1,l)}},be=s=>{let e=y.xAxisAsc,o=s.orderOptions?.data?.orderType??u.Category,i=s.orderOptions?.data&&"orderBy"in s.orderOptions.data?s.orderOptions.data.orderBy:x.Ascending;switch(o){case u.Category:e=Array.isArray(i)?y.customSort:i===x.Ascending?y.xAxisAsc:y.xAxisDesc;break;case u.Mean:e=i===x.Ascending?y.meanAsc:y.meanDesc;break;case u.Median:e=i===x.Ascending?y.medianAsc:y.medianDesc;break}return e},fs=(s,e,o)=>{let i=u.Category,r=x.Ascending;if(e.orderOptions=e.orderOptions??{},s===y.customSort&&o!==void 0)e.orderOptions.data={orderType:u.Category,orderBy:o};else{switch(s){case y.xAxisAsc:{i=u.Category,r=x.Ascending;break}case y.xAxisDesc:{i=u.Category,r=x.Descending;break}case y.meanAsc:{i=u.Mean,r=x.Ascending;break}case y.meanDesc:{i=u.Mean,r=x.Descending;break}case y.medianAsc:{i=u.Median,r=x.Ascending;break}case y.medianDesc:{i=u.Median,r=x.Descending;break}}e.orderOptions.data={orderType:i,orderBy:r}}},G=s=>s.showMean??!1,ze=s=>{let{newShowMeanLines:e=!1,config:o,commonStrings:i,previousMeanLinesBoxColor:r}=s,n=e?r:Be(o),a=(e??!1)!==(o.showMean??!1);if(o.showMean=e,a){let t;e?t=oe(o.series)?De(o.series,i):o.series:t=Te(o.series),t&&(t=Se({formerSeries:o.series,newSeries:t,showMean:e}),o.series=t)}return e&&r!==void 0&&ve(r,o),{previousMeanLinesBoxColor:n}},gs=s=>{let e=[],o=s.orderOptions?.data?.orderType;return be(s)===y.customSort&&o===u.Category&&(e=s.orderOptions?.data?.orderBy),e},us=(s,e)=>{e.orderOptions??={};let o=e.orderOptions?.data?.orderType;be(e)===y.customSort&&o===u.Category&&(e.orderOptions.data={orderType:u.Category,orderBy:s})},ps=async s=>{let{config:e,layerInfo:o,errorStrings:i}=s,r=B(e),n=J(e)?.type,a=fe(e),t=[];return n===g.CategoryAxisFormat&&(q({fieldName:r,numericFields:a,fieldList:o.layerFieldsInfo})?t=a:he(r)||(t=await ae({layerInfo:o,config:e,category:r,errorStrings:i}))),t},he=s=>s.trim()===""||s===h,Ee=(s,e)=>e.length>1&&!he(s),Ve=(s,e,o)=>!Ee(s,e)&&o!=="";return{a:es,b:ss,c:os,d:is,e:rs,f:Be,g:ve,h:ns,i:Ae,j:Oe,k:ts,l:as,m:B,n:Ce,o:fe,p:ls,q:Ne,r:L,s:xe,t:cs,u:ds,v:ys,w:ms,x:be,y:fs,z:G,A:ze,B:gs,C:us,D:ps,E:he,F:Ee,G:Ve}},"intl",a,b,c,d,e,f)
2
+ import{b as ce,d as de}from"./PQCKQMUH.js";import f from"./EQNW3D27.js";import e from"./VUWVVCEB.js";import d from"./5AMXSBVD.js";import c from"./CKRMPTUO.js";import b from"./ZJIYZYVK.js";import a from"./JJLZNOU5.js";import{n as I}from"./UPENS2HR.js";import{Ga as V,I as K,J as Q,K as R,S as z,T as Z,ba as ee,fa as E,n as H,p as h}from"./JGDOGMER.js";import{a as _}from"./BIXQAUTT.js";import{d as P,g as N,k as X,l as Y}from"./GUQ44MLO.js";import{b as y}from"./QIST2E6D.js";import{a as g,h as x,v as u}from"./C4LXB6MK.js";export default $arcgis.t(([{substitute:D},{Sb:re,Ub:$,cb:ie,jc:C,nc:ne,oa:A,pa:se,wa:oe},{c:O,f:j,g:J,h:te,t:ae},{c:k},{a:le},{d:M},{i:q}])=>{var ye=s=>{let{config:e,seriesIndex:o,callback:i}=s;[o!==void 0?e.series?.[o]:e.series].flat().forEach(r=>{se(r)&&i(r)})},es=s=>{let{style:e,seriesIndex:o,config:i}=s;ye({config:i,seriesIndex:o,callback:r=>{ce(e,r)}})},ss=s=>{let{width:e,seriesIndex:o,config:i}=s;ye({config:i,seriesIndex:o,callback:r=>{de(e,r)}})},os=(s,e)=>e?.series?.[s]?.name,is=(s,e,o)=>{let i=o;i?.series?.[e]!==void 0&&(i.series[e].name=s)},rs=(s,e)=>{let o,i=e.series?.[s];return i?.type===g.BoxPlotSeries?o=i.fillSymbol?.color:i?.type===g.LineSeries&&(o=i.lineSymbol?.color),o},Be=s=>{let e=s.series[0];return s.showMean===!0&&A(e)?e.fillSymbol?.color:void 0},ve=(s,e)=>{let o=e.series[0];e.showMean===!0&&A(o)&&(o.fillSymbol!==void 0?o.fillSymbol.color=s:o.fillSymbol={...z(),color:s})},ns=(s,e,o)=>{let i=o?.series?.[e];i?.type===g.BoxPlotSeries&&i.fillSymbol!==void 0?i.fillSymbol.color=s:i?.type===g.LineSeries&&i.lineSymbol!==void 0&&(i.lineSymbol.color=s,i.markerSymbol!==void 0&&(i.markerSymbol.color=s))},Ae=s=>s.series.map(e=>e.id),Oe=(s,e)=>{e?.series?.sort((o,i)=>s.findIndex(r=>o.id===r)-s.findIndex(r=>i.id===r))},ts=(s,e,o)=>{let i=Ae(o),[r]=i.splice(s,1);i.splice(e,0,r),Oe(i,o)},as=s=>G(s)?s.series.findIndex(e=>e.type===g.BoxPlotSeries):-1;function Me(s,e,o){let i=xe(s,e,o),r=le(s),n=M(s);return i===r||n}function me(s,e,o){let i=L(s,e,o),r=k(1,s),n=M(s);return i===r||n}function Le(s){let{config:e,layerInfo:o,newCategory:i}=s,{layerFieldsInfo:r}=o,n=B(e),a=i!==h?I(r,n):"",t=k(0,e),l=M(e);return a===t||l||t.trim()===""}var B=s=>C(s)?.x??h,Ce=P(s=>{let e=C(s),o=e?.query?.where?.split("=")[0].trim()??"";return ne(e?.query?.where)?"":o},s=>C(s)?.query?.where),fe=P(s=>ie(s?.series).filter(e=>e!==""),s=>s?.series),T=s=>{let{category:e,seriesIndex:o,y:i,commonStrings:r}=s,n={...E(r,o),x:e===void 0||e===""?h:e,y:i,query:{}};return N(n)},ke=s=>{let{category:e,seriesIndex:o,y:i,commonStrings:r}=s,n={...ee({commonStrings:r,seriesIndex:o}),x:e===void 0||e===""?h:e,y:i,query:{}};return N(n)};function ge(s){let{x:e,y:o,seriesTemplate:i,commonStrings:r}=s,{id:n,fillSymbol:a}=i??{},t=E(r),l=n??`series_${Date.now()}`;return t.id=l,t.name=l,t.x=e,t.y=o,a?t.fillSymbol=a:t.fillSymbol&&(t.fillSymbol.color=V,t.fillSymbol?.outline&&(t.fillSymbol.outline.color=V)),t}function ue(s){let{numericFields:e,config:o,layerInfo:i,category:r,commonStrings:n}=s,{layerFieldsInfo:a}=i,t=[],l=r??B(o),m=q({fieldName:l,numericFields:e,fieldList:a});if(e.length===0){let c=T({y:"",seriesIndex:0,category:l,commonStrings:n});t.push(c)}else if(m){let c=e.length>1?e:e[0],f=T({y:c,seriesIndex:0,category:l,commonStrings:n}),w=o.series.find(F=>Y(c,F.y)&&F.query?.where===void 0),d=A(w)?w:void 0,p=d?.id??e[0],S=e.length>1?n.axisLabels.values:I(i.layerFieldsInfo,e[0]),b=d?.name??S,v={...d??f,id:p,name:b,x:m?h:l};t.push(v)}else for(let c=0;c<e.length;c+=1){let f=e[c],w=T({y:f,seriesIndex:c,category:l,commonStrings:n}),d=o.series.find(F=>f===F.y),p=A(d)?d:void 0,S=p?.id??f,b=p?.name??I(a,f),v={...p??w,id:S,name:b,x:l};t.push(v)}return o.series.length===1&&t.length===1&&"fillSymbol"in o.series[0]&&(t[0].fillSymbol=o.series[0].fillSymbol),t}var pe=s=>s?.query?.where?.split("=")[1].trim().replace(/'/gu,"")??"",qe=s=>s.series.some(e=>e.type===g.LineSeries)&&s.series.some(e=>e.type===g.BoxPlotSeries);function De(s,e,o){let i=[];return s.forEach(r=>{if(r.type===g.BoxPlotSeries){let{type:n,fillSymbol:a,...t}=r;i.push({...t,type:g.LineSeries,lineSymbol:{...K({width:H}),...a!==void 0?{color:a.color}:{}},markerSymbol:{...Z(),...a!==void 0?{color:a.color}:{}}})}}),i.unshift(ge({x:s[0].x,y:s[0].y,seriesTemplate:o,commonStrings:e})),i}function Te(s){let e=s.slice(1),o=[];return e.forEach(i=>{if(i.type===g.LineSeries){let{type:r,lineSymbol:n,markerSymbol:a,...t}=i,l=z();o.push({...t,type:g.BoxPlotSeries,fillSymbol:{...l,color:n?.color}})}}),o}function Se(s){let{formerSeries:e,newSeries:o,showMean:i}=s,r=o,n=l=>l.type===(i?g.LineSeries:g.BoxPlotSeries),a=e.filter(n).map(l=>l.id),t=o.filter(n).map(l=>l.id);return a.length===t.length&&JSON.stringify(a)!==JSON.stringify(t)&&(r=r.sort((l,m)=>a.findIndex(c=>c===l.id)-a.findIndex(c=>c===m.id))),r}function Pe(s){let{config:e,layerInfo:o,commonStrings:i,splitByField:r,numericFields:n,category:a,splitByFieldInfos:t}=s,l=a??B(e),{categoriesArray:m,splitByFieldType:c}=t,f=[],w=qe(e);if(m.length===0){f=ue({numericFields:n,category:l,config:e,layerInfo:o,commonStrings:i});for(let d of f)d.query&&(d.query.where=`${r}=''`)}else for(let d=0;d<m.length;d+=1){let p=m[d],S={y:n,seriesIndex:d,category:l,commonStrings:i},b=w?ke(S):T(S),v=$({queryObject:o.layer,fieldName:r,fieldValue:p??""}),F=`${p}`,U=e.series.find(Fe=>pe(Fe)===F),Ie=U?.name??v??F,W=U??b,we={...W,id:F,name:Ie,x:l===void 0||l===""?h:l,y:b.y,query:{...W.query,where:`${r}=${c===_.String&&p!==null?`'${p}'`:p}`}};f.push(we)}if(f=Se({formerSeries:e.series,newSeries:f,showMean:G(e)}),G(e)){let d=e.series.find(S=>S.type===g.BoxPlotSeries),p=ge({x:l,y:n,seriesTemplate:d,commonStrings:i});f.unshift(p)}return f}var ls=s=>{let{splitByField:e,numericFields:o,category:i,config:r,layerInfo:n,commonStrings:a,splitByFieldInfos:t}=s,{layerFieldsInfo:l}=n,m=Ve(i,o,e),c=re(l),f=B(r),w=Me(r,n,a),d=me(r,n,a),p=Le({config:r,layerInfo:n,newCategory:i}),S=J(r);if(!c.includes(f)&&c.includes(i)?S=R():c.includes(f)&&!c.includes(i)&&(S=Q()),S!==void 0&&te(r,a,S),ze(m?{newShowMeanLines:r.showMean,config:r,commonStrings:a}:{newShowMeanLines:!1,config:r,commonStrings:a}),r.series=m&&t?Pe({config:r,layerInfo:n,splitByField:e,numericFields:o,category:i,commonStrings:a,splitByFieldInfos:t}):ue({numericFields:o,config:r,layerInfo:n,category:i,commonStrings:a}),p){let b=q({fieldName:i,numericFields:o,fieldList:l})?"":I(l,i);O(r,0,b)}if(d){let b=L(r,n,a);O(r,1,b)}r?.title!==void 0&&w&&(r.title.content.text=xe(r,n,a)),j({config:r,value:null,axisIndex:1,isMax:!1}),j({config:r,value:null,axisIndex:1,isMax:!0})},Ne=s=>s?.standardizeValues??!1;function L(s,e,o){let{layerFieldsInfo:i}=e,r=Ne(s)?o.axisLabels.standardizedValues:o.axisLabels.values,n=s?.series?.map(a=>a.y).flat();return n=[...new Set(n)],n.length===1&&(r=I(i,n[0])),r}function xe(s,e,o){let{layerFieldsInfo:i}=e,r=B(s),n=fe(s),a=Ce(s),t=n.map(c=>I(i??[],c)).join(", "),l=I(i??[],r),m="";return n.length>0&&(r!==h&&a!==""?m=D(o.titleLabels.distributionOfFieldsByCategoryAndSplitBy,{valueFields:t,category:l,splitByField:a}):r!==h?m=D(o.titleLabels.distributionOfFieldsByCategory,{valueFields:t,category:l}):a!==""?m=D(o.titleLabels.distributionOfFieldsByCategory,{valueFields:t,category:a}):m=D(o.titleLabels.distributionOfField,{valueField:t})),m}var cs=s=>{let{series:e,splitByField:o,layerInfo:i,commonStrings:r}=s,n=typeof e.y=="string"?I(i.layerFieldsInfo,e.y):r.axisLabels.values;return X(o)||(n=pe(e)),n=$({queryObject:i.layer,fieldName:o,fieldValue:n??""})??n,n??e.id},ds=s=>s?.showOutliers??!1,ys=s=>{let{newShowOutliers:e,config:o,layerInfo:i,commonStrings:r}=s;if(o.showOutliers=e,me(o,i,r)){let n=L(o,i,r);O(o,1,n)}},ms=s=>{let{newStandardizeValues:e,config:o,layerInfo:i,commonStrings:r}=s,n=k(1,o),a=L(o,i,r),t=M(o);if(o.standardizeValues=e,n===a||t){let l=L(o,i,r);O(o,1,l)}},be=s=>{let e=y.xAxisAsc,o=s.orderOptions?.data?.orderType??u.Category,i=s.orderOptions?.data&&"orderBy"in s.orderOptions.data?s.orderOptions.data.orderBy:x.Ascending;switch(o){case u.Category:e=Array.isArray(i)?y.customSort:i===x.Ascending?y.xAxisAsc:y.xAxisDesc;break;case u.Mean:e=i===x.Ascending?y.meanAsc:y.meanDesc;break;case u.Median:e=i===x.Ascending?y.medianAsc:y.medianDesc;break}return e},fs=(s,e,o)=>{let i=u.Category,r=x.Ascending;if(e.orderOptions=e.orderOptions??{},s===y.customSort&&o!==void 0)e.orderOptions.data={orderType:u.Category,orderBy:o};else{switch(s){case y.xAxisAsc:{i=u.Category,r=x.Ascending;break}case y.xAxisDesc:{i=u.Category,r=x.Descending;break}case y.meanAsc:{i=u.Mean,r=x.Ascending;break}case y.meanDesc:{i=u.Mean,r=x.Descending;break}case y.medianAsc:{i=u.Median,r=x.Ascending;break}case y.medianDesc:{i=u.Median,r=x.Descending;break}}e.orderOptions.data={orderType:i,orderBy:r}}},G=s=>s.showMean??!1,ze=s=>{let{newShowMeanLines:e=!1,config:o,commonStrings:i,previousMeanLinesBoxColor:r}=s,n=e?r:Be(o),a=(e??!1)!==(o.showMean??!1);if(o.showMean=e,a){let t;e?t=oe(o.series)?De(o.series,i):o.series:t=Te(o.series),t&&(t=Se({formerSeries:o.series,newSeries:t,showMean:e}),o.series=t)}return e&&r!==void 0&&ve(r,o),{previousMeanLinesBoxColor:n}},gs=s=>{let e=[],o=s.orderOptions?.data?.orderType;return be(s)===y.customSort&&o===u.Category&&(e=s.orderOptions?.data?.orderBy),e},us=(s,e)=>{e.orderOptions??={};let o=e.orderOptions?.data?.orderType;be(e)===y.customSort&&o===u.Category&&(e.orderOptions.data={orderType:u.Category,orderBy:s})},ps=async s=>{let{config:e,layerInfo:o,errorStrings:i}=s,r=B(e),n=J(e)?.type,a=fe(e),t=[];return n===g.CategoryAxisFormat&&(q({fieldName:r,numericFields:a,fieldList:o.layerFieldsInfo})?t=a:he(r)||(t=await ae({layerInfo:o,config:e,category:r,errorStrings:i}))),t},he=s=>s.trim()===""||s===h,Ee=(s,e)=>e.length>1&&!he(s),Ve=(s,e,o)=>!Ee(s,e)&&o!=="";return{a:es,b:ss,c:os,d:is,e:rs,f:Be,g:ve,h:ns,i:Ae,j:Oe,k:ts,l:as,m:B,n:Ce,o:fe,p:ls,q:Ne,r:L,s:xe,t:cs,u:ds,v:ys,w:ms,x:be,y:fs,z:G,A:ze,B:gs,C:us,D:ps,E:he,F:Ee,G:Ve}},"intl",a,b,c,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as h}from"./3DIZRBOJ.js";import{a as p}from"./FVPRMLQF.js";import{f as r}from"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as l,B as n,H as c,i as t,n as o,z as a}from"./74BF6TFJ.js";import"./K4PGZCDZ.js";var i=class extends n{constructor(){super(...arguments),this._messages=p(),this.popoverElement=a(),this.placement="leading",this.open=!1,this.arcgisChartsConfigFormatPopoverColorChange=o(),this.arcgisChartsConfigFormatPopoverSymbolChange=o(),this.arcgisChartsConfigFormatPopoverTextChange=o(),this.arcgisChartsConfigPopoverClose=o()}static{this.properties={messageOverrides:0,selectedElement:0,referenceElement:0,placement:1,open:5}}async reposition(){await this.popoverElement.value?.reposition()}updated(){h(this.popoverElement.value,this.open)}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}updateSymbolProperties(e){this.selectedElement=e.target.lineStyle,this.arcgisChartsConfigFormatPopoverSymbolChange.emit(e.detail)}updateTextProperties(e){this.selectedElement=e.target.fontStyle,this.arcgisChartsConfigFormatPopoverTextChange.emit(e.detail)}updateColorProperties(e){this.selectedElement=e.detail,this.arcgisChartsConfigFormatPopoverColorChange.emit(e.detail)}render(){let e=this.selectedElement,s=this.selectedElement;return t`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${!this.open} label @calcitePopoverClose=${this.closePopover} pointer-disabled auto-close ${l(this.popoverElement)}>${Array.isArray(e)?t`<arcgis-charts-config-color-style .header=${this._messages.backgroundElement} enable-close .open=${this.open} .selectedColor=${e} @arcgisChartsConfigColorStyleClose=${this.closePopover} @arcgisChartsConfigColorStyleChange=${this.updateColorProperties}></arcgis-charts-config-color-style>`:null}${s?.type===r.SLS?t`<arcgis-charts-config-line-style .header=${this._messages.lineStyle} .open=${this.open} enable-close use-panel .lineStyle=${s} @arcgisChartsConfigLineStyleClose=${this.closePopover} @arcgisChartsConfigLineStyleChange=${this.updateSymbolProperties}></arcgis-charts-config-line-style>`:null}${s?.type===r.TS?t`<arcgis-charts-config-font-style .header=${this._messages.textStyle} .open=${this.open} enable-close .fontStyle=${s} @arcgisChartsConfigFontStyleClose=${this.closePopover} @arcgisChartsConfigFontStyleChange=${this.updateTextProperties}></arcgis-charts-config-font-style>`:null}</calcite-popover></div>`}};c("arcgis-charts-config-format-popover",i);export{i as ArcgisChartsConfigFormatPopover};
2
+ import{b as h}from"./3DIZRBOJ.js";import{a as p}from"./LD7OU6HP.js";import{f as r}from"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as l,B as n,H as c,i as t,n as o,z as a}from"./AJDNZRJP.js";import"./K4PGZCDZ.js";var i=class extends n{constructor(){super(...arguments),this._messages=p(),this.popoverElement=a(),this.placement="leading",this.open=!1,this.arcgisChartsConfigFormatPopoverColorChange=o(),this.arcgisChartsConfigFormatPopoverSymbolChange=o(),this.arcgisChartsConfigFormatPopoverTextChange=o(),this.arcgisChartsConfigPopoverClose=o()}static{this.properties={messageOverrides:0,selectedElement:0,referenceElement:0,placement:1,open:5}}async reposition(){await this.popoverElement.value?.reposition()}updated(){h(this.popoverElement.value,this.open)}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}updateSymbolProperties(e){this.selectedElement=e.target.lineStyle,this.arcgisChartsConfigFormatPopoverSymbolChange.emit(e.detail)}updateTextProperties(e){this.selectedElement=e.target.fontStyle,this.arcgisChartsConfigFormatPopoverTextChange.emit(e.detail)}updateColorProperties(e){this.selectedElement=e.detail,this.arcgisChartsConfigFormatPopoverColorChange.emit(e.detail)}render(){let e=this.selectedElement,s=this.selectedElement;return t`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${!this.open} label @calcitePopoverClose=${this.closePopover} pointer-disabled auto-close ${l(this.popoverElement)}>${Array.isArray(e)?t`<arcgis-charts-config-color-style .header=${this._messages.backgroundElement} enable-close .open=${this.open} .selectedColor=${e} @arcgisChartsConfigColorStyleClose=${this.closePopover} @arcgisChartsConfigColorStyleChange=${this.updateColorProperties}></arcgis-charts-config-color-style>`:null}${s?.type===r.SLS?t`<arcgis-charts-config-line-style .header=${this._messages.lineStyle} .open=${this.open} enable-close use-panel .lineStyle=${s} @arcgisChartsConfigLineStyleClose=${this.closePopover} @arcgisChartsConfigLineStyleChange=${this.updateSymbolProperties}></arcgis-charts-config-line-style>`:null}${s?.type===r.TS?t`<arcgis-charts-config-font-style .header=${this._messages.textStyle} .open=${this.open} enable-close .fontStyle=${s} @arcgisChartsConfigFontStyleClose=${this.closePopover} @arcgisChartsConfigFontStyleChange=${this.updateTextProperties}></arcgis-charts-config-font-style>`:null}</calcite-popover></div>`}};c("arcgis-charts-config-format-popover",i);export{i as ArcgisChartsConfigFormatPopover};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import y from"./K5YUTTEF.js";import{a as R,b as z,c as U,d as j}from"./PQCKQMUH.js";import w from"./OOMLQFRO.js";import v from"./JHZKHOF4.js";import u from"./PCR5K4AW.js";import t from"./KRQ7IT6R.js";import s from"./T2X5Q7O4.js";import r from"./D72XCO7P.js";import q from"./J5DILLLF.js";import o from"./HSFAR36O.js";import n from"./RXINSABT.js";import"./G5NLV2CS.js";import l from"./DZSVWM55.js";import k from"./YHKUB4KO.js";import i from"./K7QEIYH2.js";import h from"./3AU4BVFA.js";import e from"./ILV3GIXF.js";import c from"./XCAJJFB7.js";import a from"./TUNGGTDZ.js";import"./UPENS2HR.js";import"./U4LGTOAJ.js";import{B as b,Ga as m,fa as O,i as x,m as f,ma as D,n as p,p as d}from"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{l as g}from"./74BF6TFJ.js";import"./BYSF3WH4.js";import{b as W}from"./QIST2E6D.js";import"./GFIZPXVK.js";import{a as M}from"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{jc:P,pa:l},{p:E,q:N,r:V,s:A},,{e:t},,,ge,{b:we,d:Ie,f:Ce},{b:Fe,d:Be,f:Le},{d:ye,e:ue},,{b:ve},{a:fe,b:pe,c:de,d:me},{a:Se,b:_e},,{b:Me},{A:ae,B:w,C:I,D:C,E:he,F:le,G:ce,a:k,b:T,c:q,d:y,e:G,f:Y,g:u,h:S,i:H,j:J,k:K,l:Q,m:X,n:Z,o:$,p:_,q:ee,r:se,s:ie,t:F,u:te,v:oe,w:re,x:B,y:L,z:ne}])=>{var De=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,r=(c,e,s,a)=>{for(var o=Pe(e,s),n=c.length-1,h;n>=0;n--)(h=c[n])&&(o=h(e,s,o)||o);return o&&De(e,s,o),o},i=class extends ge{constructor(){super(...arguments),this._chartType=M.BoxPlotSeries,this._category=d,this._splitByField="",this._numericFields=[]}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&await this.rebuildSeries(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get category(){return this._category}set category(e){let s=e.trim()==="";this._category=s?d:e,this.processSeriesRebuild("category")}get numericFields(){return this._numericFields}set numericFields(e){let{layerFieldsInfo:s}=this.layerInfo;typeof e=="string"&&(e=[e]),V(s,e)?(this._numericFields=e,le(this._category,this._numericFields)&&(this._splitByField=""),this.processSeriesRebuild("numericFields")):g("error","box-plot-model","Invalid `numericFields`")}get splitByField(){return this._splitByField}set splitByField(e){N(this.layerInfo.layerFieldsInfo,e)?(this._splitByField=e,this.processSeriesRebuild("splitByField")):g("error","box-plot-model","Invalid `splitByField`")}get showOutliers(){return te(this._config)}set showOutliers(e){oe({newShowOutliers:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get standardizeValues(){return ee(this._config)}set standardizeValues(e){re({newStandardizeValues:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}getSortOrder(){return B(this._config)}setSortOrder(e,s){L(e,this._config,s)}async getCustomSortValues(){return await C({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings.errorStrings})}async setDataFilters(e){super.setDataFilters(e);let s=B(this._config);if(s===W.customSort){this.startAsyncUpdate();let a=await C({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings.errorStrings});L(s,this._config,a),this.finishAsyncUpdate()}this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get orderByList(){return w(this._config)}set orderByList(e){I(e,this._config)}async updateSeriesFromLayerFilter(){await this.processSeriesRebuild("updateSeriesFromLayerFilter")}async rebuildSeries(){await this.processSeriesRebuild("rebuildSeries")}get showMeanLines(){return ne(this._config)}set showMeanLines(e){let{previousMeanLinesBoxColor:s}=ae({newShowMeanLines:e,config:this._config,commonStrings:this.commonStrings,previousMeanLinesBoxColor:this.previousMeanLinesBoxColor});this.previousMeanLinesBoxColor=s}get meanLinesBoxColor(){return Y(this._config)}set meanLinesBoxColor(e){u(e,this._config)}setupLocalProps(){this._category=X(this._config),this._splitByField=Z(this._config),this._numericFields=$(this._config)}generateDefaultConfig(){let e=D(this.commonStrings);return e.series=[O(this.commonStrings)],e}resetConfig(){let e=this._config.id;this._config=this.generateDefaultConfig(),this._config.id=e,this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}usingSplitBy(){return ce(this.category,this.numericFields,this.splitByField)}async processSeriesRebuild(e){this.usingSplitBy()?(this.startAsyncUpdate(),await this.fetchSplitByFieldInfos(),_(this.getBuildNewSeriesProps()),this.finishAsyncUpdate()):_(this.getBuildNewSeriesProps()),this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange")),this.emitConfigUpdate(e)}async fetchSplitByFieldInfos(){let{fetchNullValues:e}=P(this._config)?.query??{};return this.splitByFieldInfos=await E({config:this._config,layer:this.layerInfo.layer,layerFieldsInfo:this.layerInfo.layerFieldsInfo,xAxisField:he(this._category)?void 0:this._category,aggregationFields:this.numericFields,splitByField:this._splitByField,fetchNullValues:e,errorStrings:this.commonStrings?.errorStrings}),this.splitByFieldInfos}getBuildNewSeriesProps(){return{category:this.category,splitByField:this.splitByField,numericFields:this.numericFields,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,splitByFieldInfos:this.splitByFieldInfos}}getSeriesName(e){return q(e,this._config)}setSeriesName(e,s){y(e,s,this._config)}getSeriesColor(e){return G(e,this._config)}setSeriesColor(e,s){S(e,s,this._config)}getSeriesLineStyle(e){let s=this._config.series[e];if(this.showMeanLines===!0&&l(s))return R(s)}setSeriesLineStyle(e,s){this.showMeanLines===!0&&k({style:e,seriesIndex:s,config:this._config})}getSeriesLineWidth(e){let s=this._config.series[e];if(this.showMeanLines===!0&&l(s))return U(s)}setSeriesLineWidth(e,s){this.showMeanLines===!0&&T({width:e,seriesIndex:s,config:this._config})}get orderOfSeries(){return H(this._config)}set orderOfSeries(e){J(e,this._config)}moveSeries(e,s){K(e,s,this._config)}get boxPlotSeriesIndexWhenMeanLinesShown(){return Q(this._config)}moveCustomSortValuesInOrderByList(e,s){let a=w(this._config),[o]=a.splice(e,1);a.splice(s,0,o),I(a,this._config)}generateChartTitle(){return ie(this._config,this.layerInfo,this.commonStrings)}generateYAxisTitle(){return se(this._config,this.layerInfo,this.commonStrings)}resetSeriesStyling(){for(let e=this.showMeanLines===!0?1:0;e<this.seriesLength;e+=1){let s=this.getSeriesId(e),a=b({colorIndex:e,opacity:x}),o=this._config.series[e];S(a,e,this._config);let n=F({series:o,splitByField:this._splitByField,layerInfo:this.layerInfo,commonStrings:this.commonStrings});y(n??s,e,this._config),this.showMeanLines===!0&&l(o)&&(z(f,o),j(p,o))}this.showMeanLines===!0&&u(m,this._config),this._config.colorMatch=!0}resetAvailable(){let e=!this.colorMatch,s=this.showMeanLines===!0&&this.meanLinesBoxColor!==m,a=!1,o=!1;if(!e)for(let n=this.showMeanLines===!0?1:0;n<this.seriesLength;n+=1){let h=this._config.series[n],v=F({series:h,splitByField:this._splitByField,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),xe=this.getSeriesName(n);if(v!==void 0&&v!==xe){a=!0;break}if(this.showMeanLines===!0&&l(h)){let be=this.getSeriesLineStyle(n),Oe=this.getSeriesLineWidth(n);if(be!==f||Oe!==p){o=!0;break}}}return e||s||a||o}};r([t],i.prototype,"showOutliers");r([t],i.prototype,"standardizeValues");r([t],i.prototype,"setSortOrder");r([t],i.prototype,"setDataFilters");r([t],i.prototype,"orderByList");r([t],i.prototype,"showMeanLines");r([t],i.prototype,"meanLinesBoxColor");r([t],i.prototype,"resetConfig");r([t],i.prototype,"setSeriesName");r([t],i.prototype,"setSeriesColor");r([t],i.prototype,"setSeriesLineStyle");r([t],i.prototype,"setSeriesLineWidth");r([t],i.prototype,"orderOfSeries");r([t],i.prototype,"moveSeries");r([t],i.prototype,"moveCustomSortValuesInOrderByList");r([t],i.prototype,"resetSeriesStyling");var We=[Se,fe,pe,de,Me,me,ve,_e,we,ye,Ie,ue,Fe,Be,Le,Ce];A(i,We);return i},a,c,e,h,i,k,l,n,o,q,r,s,t,u,v,w,y)
2
+ import y from"./REC66TO6.js";import{a as R,b as z,c as U,d as j}from"./PQCKQMUH.js";import w from"./DGE5LAEC.js";import v from"./EQNW3D27.js";import u from"./IICYSP6T.js";import t from"./POUXDWR6.js";import s from"./GG7KDNXF.js";import r from"./VUWVVCEB.js";import q from"./X4P4OY6S.js";import o from"./XJEWRYSH.js";import n from"./X6C44FPC.js";import"./G5NLV2CS.js";import l from"./DMTY4NTC.js";import k from"./5AMXSBVD.js";import i from"./CKRMPTUO.js";import h from"./LTZBWR5K.js";import e from"./EJCQJK4X.js";import c from"./ZJIYZYVK.js";import a from"./JJLZNOU5.js";import"./UPENS2HR.js";import"./U4LGTOAJ.js";import{B as b,Ga as m,fa as O,i as x,m as f,ma as D,n as p,p as d}from"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{l as g}from"./AJDNZRJP.js";import"./BYSF3WH4.js";import{b as W}from"./QIST2E6D.js";import"./GFIZPXVK.js";import{a as M}from"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{jc:P,pa:l},{p:E,q:N,r:V,s:A},,{e:t},,,ge,{b:we,d:Ie,f:Ce},{b:Fe,d:Be,f:Le},{d:ye,e:ue},,{b:ve},{a:fe,b:pe,c:de,d:me},{a:Se,b:_e},,{b:Me},{A:ae,B:w,C:I,D:C,E:he,F:le,G:ce,a:k,b:T,c:q,d:y,e:G,f:Y,g:u,h:S,i:H,j:J,k:K,l:Q,m:X,n:Z,o:$,p:_,q:ee,r:se,s:ie,t:F,u:te,v:oe,w:re,x:B,y:L,z:ne}])=>{var De=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,r=(c,e,s,a)=>{for(var o=Pe(e,s),n=c.length-1,h;n>=0;n--)(h=c[n])&&(o=h(e,s,o)||o);return o&&De(e,s,o),o},i=class extends ge{constructor(){super(...arguments),this._chartType=M.BoxPlotSeries,this._category=d,this._splitByField="",this._numericFields=[]}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&await this.rebuildSeries(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get category(){return this._category}set category(e){let s=e.trim()==="";this._category=s?d:e,this.processSeriesRebuild("category")}get numericFields(){return this._numericFields}set numericFields(e){let{layerFieldsInfo:s}=this.layerInfo;typeof e=="string"&&(e=[e]),V(s,e)?(this._numericFields=e,le(this._category,this._numericFields)&&(this._splitByField=""),this.processSeriesRebuild("numericFields")):g("error","box-plot-model","Invalid `numericFields`")}get splitByField(){return this._splitByField}set splitByField(e){N(this.layerInfo.layerFieldsInfo,e)?(this._splitByField=e,this.processSeriesRebuild("splitByField")):g("error","box-plot-model","Invalid `splitByField`")}get showOutliers(){return te(this._config)}set showOutliers(e){oe({newShowOutliers:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get standardizeValues(){return ee(this._config)}set standardizeValues(e){re({newStandardizeValues:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}getSortOrder(){return B(this._config)}setSortOrder(e,s){L(e,this._config,s)}async getCustomSortValues(){return await C({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings.errorStrings})}async setDataFilters(e){super.setDataFilters(e);let s=B(this._config);if(s===W.customSort){this.startAsyncUpdate();let a=await C({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings.errorStrings});L(s,this._config,a),this.finishAsyncUpdate()}this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get orderByList(){return w(this._config)}set orderByList(e){I(e,this._config)}async updateSeriesFromLayerFilter(){await this.processSeriesRebuild("updateSeriesFromLayerFilter")}async rebuildSeries(){await this.processSeriesRebuild("rebuildSeries")}get showMeanLines(){return ne(this._config)}set showMeanLines(e){let{previousMeanLinesBoxColor:s}=ae({newShowMeanLines:e,config:this._config,commonStrings:this.commonStrings,previousMeanLinesBoxColor:this.previousMeanLinesBoxColor});this.previousMeanLinesBoxColor=s}get meanLinesBoxColor(){return Y(this._config)}set meanLinesBoxColor(e){u(e,this._config)}setupLocalProps(){this._category=X(this._config),this._splitByField=Z(this._config),this._numericFields=$(this._config)}generateDefaultConfig(){let e=D(this.commonStrings);return e.series=[O(this.commonStrings)],e}resetConfig(){let e=this._config.id;this._config=this.generateDefaultConfig(),this._config.id=e,this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}usingSplitBy(){return ce(this.category,this.numericFields,this.splitByField)}async processSeriesRebuild(e){this.usingSplitBy()?(this.startAsyncUpdate(),await this.fetchSplitByFieldInfos(),_(this.getBuildNewSeriesProps()),this.finishAsyncUpdate()):_(this.getBuildNewSeriesProps()),this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange")),this.emitConfigUpdate(e)}async fetchSplitByFieldInfos(){let{fetchNullValues:e}=P(this._config)?.query??{};return this.splitByFieldInfos=await E({config:this._config,layer:this.layerInfo.layer,layerFieldsInfo:this.layerInfo.layerFieldsInfo,xAxisField:he(this._category)?void 0:this._category,aggregationFields:this.numericFields,splitByField:this._splitByField,fetchNullValues:e,errorStrings:this.commonStrings?.errorStrings}),this.splitByFieldInfos}getBuildNewSeriesProps(){return{category:this.category,splitByField:this.splitByField,numericFields:this.numericFields,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,splitByFieldInfos:this.splitByFieldInfos}}getSeriesName(e){return q(e,this._config)}setSeriesName(e,s){y(e,s,this._config)}getSeriesColor(e){return G(e,this._config)}setSeriesColor(e,s){S(e,s,this._config)}getSeriesLineStyle(e){let s=this._config.series[e];if(this.showMeanLines===!0&&l(s))return R(s)}setSeriesLineStyle(e,s){this.showMeanLines===!0&&k({style:e,seriesIndex:s,config:this._config})}getSeriesLineWidth(e){let s=this._config.series[e];if(this.showMeanLines===!0&&l(s))return U(s)}setSeriesLineWidth(e,s){this.showMeanLines===!0&&T({width:e,seriesIndex:s,config:this._config})}get orderOfSeries(){return H(this._config)}set orderOfSeries(e){J(e,this._config)}moveSeries(e,s){K(e,s,this._config)}get boxPlotSeriesIndexWhenMeanLinesShown(){return Q(this._config)}moveCustomSortValuesInOrderByList(e,s){let a=w(this._config),[o]=a.splice(e,1);a.splice(s,0,o),I(a,this._config)}generateChartTitle(){return ie(this._config,this.layerInfo,this.commonStrings)}generateYAxisTitle(){return se(this._config,this.layerInfo,this.commonStrings)}resetSeriesStyling(){for(let e=this.showMeanLines===!0?1:0;e<this.seriesLength;e+=1){let s=this.getSeriesId(e),a=b({colorIndex:e,opacity:x}),o=this._config.series[e];S(a,e,this._config);let n=F({series:o,splitByField:this._splitByField,layerInfo:this.layerInfo,commonStrings:this.commonStrings});y(n??s,e,this._config),this.showMeanLines===!0&&l(o)&&(z(f,o),j(p,o))}this.showMeanLines===!0&&u(m,this._config),this._config.colorMatch=!0}resetAvailable(){let e=!this.colorMatch,s=this.showMeanLines===!0&&this.meanLinesBoxColor!==m,a=!1,o=!1;if(!e)for(let n=this.showMeanLines===!0?1:0;n<this.seriesLength;n+=1){let h=this._config.series[n],v=F({series:h,splitByField:this._splitByField,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),xe=this.getSeriesName(n);if(v!==void 0&&v!==xe){a=!0;break}if(this.showMeanLines===!0&&l(h)){let be=this.getSeriesLineStyle(n),Oe=this.getSeriesLineWidth(n);if(be!==f||Oe!==p){o=!0;break}}}return e||s||a||o}};r([t],i.prototype,"showOutliers");r([t],i.prototype,"standardizeValues");r([t],i.prototype,"setSortOrder");r([t],i.prototype,"setDataFilters");r([t],i.prototype,"orderByList");r([t],i.prototype,"showMeanLines");r([t],i.prototype,"meanLinesBoxColor");r([t],i.prototype,"resetConfig");r([t],i.prototype,"setSeriesName");r([t],i.prototype,"setSeriesColor");r([t],i.prototype,"setSeriesLineStyle");r([t],i.prototype,"setSeriesLineWidth");r([t],i.prototype,"orderOfSeries");r([t],i.prototype,"moveSeries");r([t],i.prototype,"moveCustomSortValuesInOrderByList");r([t],i.prototype,"resetSeriesStyling");var We=[Se,fe,pe,de,Me,me,ve,_e,we,ye,Ie,ue,Fe,Be,Le,Ce];A(i,We);return i},a,c,e,h,i,k,l,n,o,q,r,s,t,u,v,w,y)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as f}from"./3DIZRBOJ.js";import{a as v}from"./FVPRMLQF.js";import{i as C}from"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as m,B as d,C as i,H as g,g as n,i as p,n as s,z as h}from"./74BF6TFJ.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";var u={panelChildrenContainer:"panel-children-container"},$=n`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{overflow-y:auto;width:min-content}.panel-children-container{display:flex}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.panel-children-container{padding:0 1rem;margin-top:1rem}`,o=class extends d{constructor(){super(...arguments),this._messages=v(),this.popoverElement=h(),this.selectedSliceId="",this.open=!1,this.arcgisChartsConfigPopoverClose=s(),this.arcgisChartsConfigSlicesPopoverColorChange=s(),this.arcgisChartsConfigSlicesPopoverNameChange=s()}static{this.properties={messageOverrides:0,referenceElement:0,selectedName:1,selectedColor:0,selectedSliceId:1,placement:1,open:5}}static{this.styles=$}async reposition(){await this.popoverElement.value?.reposition()}updated(){f(this.popoverElement.value,this.open)}sliceNameChange(e){let t=e.target.value;this.selectedName!==t&&(this.selectedName=t,this.arcgisChartsConfigSlicesPopoverNameChange.emit({name:t}))}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit({selectedSliceId:this.selectedSliceId})}colorChange(e){let t=e instanceof CustomEvent?e.detail:e,[a,l,r]=t,c=C*255;this.selectedColor=[a,l,r,c],this.arcgisChartsConfigSlicesPopoverColorChange.emit({color:[a,l,r,c]})}render(){let e=this.selectedColor!==void 0?[...this.selectedColor]:void 0;return p`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} @calcitePopoverClose=${this.closePopover} .open=${this.open} .label=${this._messages.sliceStyle??""} auto-close ${m(this.popoverElement)}><calcite-panel .heading=${this._messages.sliceStyle} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div class=${i(u.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${this.selectedName} @calciteInputInput=${this.sliceNameChange}></calcite-input></calcite-label></div><div class=${i(u.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></calcite-panel></calcite-popover></div>`}};g("arcgis-charts-config-pie-chart-slices-popover",o);export{o as ArcgisChartsConfigPieChartSlicesPopover};
2
+ import{b as f}from"./3DIZRBOJ.js";import{a as v}from"./LD7OU6HP.js";import{i as C}from"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as m,B as d,C as i,H as g,g as n,i as p,n as s,z as h}from"./AJDNZRJP.js";import"./C4LXB6MK.js";import"./K4PGZCDZ.js";var u={panelChildrenContainer:"panel-children-container"},$=n`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{overflow-y:auto;width:min-content}.panel-children-container{display:flex}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.panel-children-container{padding:0 1rem;margin-top:1rem}`,o=class extends d{constructor(){super(...arguments),this._messages=v(),this.popoverElement=h(),this.selectedSliceId="",this.open=!1,this.arcgisChartsConfigPopoverClose=s(),this.arcgisChartsConfigSlicesPopoverColorChange=s(),this.arcgisChartsConfigSlicesPopoverNameChange=s()}static{this.properties={messageOverrides:0,referenceElement:0,selectedName:1,selectedColor:0,selectedSliceId:1,placement:1,open:5}}static{this.styles=$}async reposition(){await this.popoverElement.value?.reposition()}updated(){f(this.popoverElement.value,this.open)}sliceNameChange(e){let t=e.target.value;this.selectedName!==t&&(this.selectedName=t,this.arcgisChartsConfigSlicesPopoverNameChange.emit({name:t}))}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit({selectedSliceId:this.selectedSliceId})}colorChange(e){let t=e instanceof CustomEvent?e.detail:e,[a,l,r]=t,c=C*255;this.selectedColor=[a,l,r,c],this.arcgisChartsConfigSlicesPopoverColorChange.emit({color:[a,l,r,c]})}render(){let e=this.selectedColor!==void 0?[...this.selectedColor]:void 0;return p`<div><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} @calcitePopoverClose=${this.closePopover} .open=${this.open} .label=${this._messages.sliceStyle??""} auto-close ${m(this.popoverElement)}><calcite-panel .heading=${this._messages.sliceStyle} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div class=${i(u.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${this.selectedName} @calciteInputInput=${this.sliceNameChange}></calcite-input></calcite-label></div><div class=${i(u.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></calcite-panel></calcite-popover></div>`}};g("arcgis-charts-config-pie-chart-slices-popover",o);export{o as ArcgisChartsConfigPieChartSlicesPopover};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import D from"./SJ7S5LDT.js";import{a as se}from"./UZFD4QWD.js";import{a as oe}from"./2IB237XM.js";import{a as k}from"./KZGZNENS.js";import{a as re}from"./3DIZRBOJ.js";import y from"./6LOZOA7U.js";import{a as b,b as te,e as ae}from"./3WARDHOQ.js";import{a as f}from"./BK4JKDTR.js";import u from"./3QFLCKDU.js";import{d as n}from"./VTGIHCBG.js";import{a as P}from"./FVPRMLQF.js";import t from"./S6I4UC4D.js";import s from"./ODZZ6IDF.js";import q from"./K5YUTTEF.js";import{a as ee}from"./NDAA3L2F.js";import"./PQCKQMUH.js";import p from"./T5BVDE2S.js";import o from"./OOMLQFRO.js";import m from"./JHZKHOF4.js";import l from"./D72XCO7P.js";import{b as Y,c as B,i as Q,l as L,p as w,r as J}from"./G5NLV2CS.js";import j from"./YHKUB4KO.js";import i from"./K7QEIYH2.js";import g from"./3AU4BVFA.js";import e from"./ILV3GIXF.js";import d from"./XCAJJFB7.js";import a from"./TUNGGTDZ.js";import{C as x,c as G,q as M}from"./UPENS2HR.js";import{d as T,e as v}from"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import{g as H,l as S}from"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as V,B as _,C as h,D as z,F as $,H as U,g as N,i as c,n as C,z as A}from"./74BF6TFJ.js";import"./BYSF3WH4.js";import"./QIST2E6D.js";import"./GFIZPXVK.js";import{a as r,k as R}from"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{substitute:ce},{Bb:j,Fb:q,Ha:X,ba:O,hb:Z},,,,,,{d:I},,{a:W},,,,,{r:ie},{e:y,f:K},{b:D}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function le(m,e){let t=new Set,a=e;return m?.forEach((i,s)=>{let o=i.chartId;(t.has(o)||o===void 0||o==="")&&(i.chartId=`Chart_${Date.now()}_${s}`,e===o&&(a=i.chartId)),t.add(o)}),a}function he(m,e,t){return m?.filter(a=>M(t,a.config)&&a.layer?.id===e)??[]}function de(m){let{modelList:e,layerList:t,activeLayerId:a,disableEditing:i}=m,s=new Map;return e?.forEach(o=>{let l=o.layer;l&&s.set(l.id,l)}),i||t.forEach(o=>s.set(o.id,o)),Array.from(s.values()).filter(o=>!a||o.id===a)}function me(m,e){m.forEach(t=>{e.forEach(a=>{t?.id===a.layer?.id&&ne(t,a)})})}function ne(m,e){let t=m;if(t){let a=[...t?.charts??[]],i=a?.findIndex(o=>o.id===e.chartId),s=!1;i!==void 0&&i>-1?(s=!S(a[i],e.config),a[i]=e.config):t&&!I(e.config)&&(s=!0,a.push(e.config)),s&&(t.charts=a)}}function pe(m,e){let t=m;if(t){let a=[...t.charts??[]],i=a.findIndex(s=>s.id===e);i>-1&&(a.splice(i,1),t.charts=a)}}function ge(m,e){let t=m;if(t){let a=[...t.charts??[]];a=x({arrayA:a,arrayB:e.map(i=>i.config),getKey:i=>i.id??i.title?.content.text??""}),t.charts=a}}var ue=N`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,E=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[r.BarSeries,r.BoxPlotSeries,r.LineSeries,r.PieSeries,r.HistogramSeries,r.ScatterSeries,r.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=async e=>{let t=e,{chartData:a,model:i}=t.detail,s=this.getModel(this.selectedChartId);if(i?.isSameChartAs(s))switch(s?.chartType){case r.HistogramSeries:if(this.chartData=a,i&&(i.dataStore.chartData=a,v(i.layer))){let o=i,l=a?.bins?.length;l!==void 0&&o.binCount!==l&&(o.binCount=l)}break;case r.PieSeries:{this.chartData=a,i&&(i.dataStore.chartData=a);break}case r.ScatterSeries:{let o=a,{dataItems:l,r2:u,aggregated:g}=o,p=u;Number.isFinite(u)||(p=void 0),this.r2=p,Q(i)&&(i.dataStore.r2=p,i.dataStore.aggregated=g,g&&(i.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case r.LineSeries:case r.BarSeries:{let{dataItems:o,timeIntervalInfo:l}=a;(B(s)||Y(s)&&s.binTemporalData)&&(l?.size!==void 0&&s.temporalBinningSize!==l?.size&&(s.temporalBinningSize=l?.size),l?.unit!==void 0&&s.temporalBinningUnit!==l?.unit&&l?.unit!==R.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ae(b,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(o),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}}},this.chartAxesMinMaxChange=e=>{let t=e,{bounds:a,model:i}=t.detail,s=this.getModel(this.selectedChartId),o=i?.isSameChartAs(s),l=s?.chartType;if(o)switch(l){case r.BarSeries:case r.BoxPlotSeries:case r.LineSeries:case r.HistogramSeries:case r.ScatterSeries:this.calculatedMinMaxBounds=a,i&&(i.dataStore.calculatedMinMaxBounds=a),this.updateAxesBoundsInAppState(a);break}},this.chartSeriesColorChange=e=>{let t=e,{colorMatchApplied:a,data:i,model:s}=t.detail,o=this.getModel(this.selectedChartId);if(s?.isSameChartAs(o))switch(o?.chartType){case r.BarSeries:case r.BoxPlotSeries:case r.LineSeries:case r.HistogramSeries:this.seriesColor=i,s&&(s.dataStore.seriesColor=i),this.applyNullCategorySeriesColor({colorMatchApplied:a,data:i,model:o});break;case r.PieSeries:{let l=new Map([[0,i]]);this.seriesColor=l,s&&(s.dataStore.seriesColor=l);break}case r.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let t=e,{propName:a,value:i,model:s}=t.detail,o=this.modelList.find(l=>s?.isSameChartAs(l));if(o)switch(a){case"rotation":typeof i=="boolean"&&W(o)&&(o.rotated=i);break;case"legendPosition":typeof i=="string"&&w(o)&&(o.legendPosition=i);break;case"legendVisibility":typeof i=="boolean"&&w(o)&&(o.legendVisibility=i);break}},this.chartLegendItemVisibilityChange=e=>{let t=e,{legendItemVisibility:a,model:i}=t.detail,s=this.modelList.find(o=>i?.isSameChartAs(o));s?.setSeriesVisibility(a),L(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),B(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:t,layerId:a}=e.target;t!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:t,layerId:a}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let t=e.target;ne(t?.layer,t)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.close=!1,this.usePopupTemplateFieldsInfo=!1,this.panelNumber=0,this.filterBySelection=!1,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,close:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:K}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=ue}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}applyNullCategorySeriesColor(e){let{colorMatchApplied:t,data:a,model:i}=e;J(i)&&i.nullCategory===void 0&&(i.nullCategory=this.getDefaultNullCategory(t?this.getSeriesColor(a):void 0))}getSeriesColor(e){let t=e.get(0),a;return t&&"color"in t?a=t.color:t&&"lineSymbol"in t&&(a=t.markerSymbol?.color??t.lineSymbol.color),a}getDefaultNullCategory(e){let t=H(G.nullCategory);return e!==void 0&&(t.fillSymbol&&(t.fillSymbol.color=e,t.fillSymbol.outline&&(t.fillSymbol.outline.color=e)),t.markerSymbol&&(t.markerSymbol.color=e,t.markerSymbol.outline&&(t.markerSymbol.outline.color=e))),t}modelListReorderChangeListener(e){let{modelList:t}=e.detail;if(this.modelList=x({arrayA:this.modelList,arrayB:t,getKey:a=>a.chartId??a.titleText??""}),this.syncChartsToLayers){let a=t.find(i=>i.layer?.id!==void 0)?.layer?.id;if(a){let i=this.layerList.find(s=>s.id.toString()===a);i&&ge(i,t)}}}async layerListChange(){let e=[],t=this.layerList.map(i=>i.id.toString()),a=[...this.modelList.filter(i=>t.includes(i.layer?.id??""))];for(let i of this.layerList??[]){if(i.type==="sublayer"){let o=await i.createFeatureLayer();if(!o)continue;i=o}let s=i.charts;for(let o of s??[]){let l=await ee({layer:i,config:o,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}le(e),e.forEach(i=>{a.find(s=>s.isSameChartAs(i))===void 0&&a.push(i)}),a=a.filter(i=>!X(i.config)),this.modelList=a}modelListChange(e,t){this.selectedChartId=le(e,this.selectedChartId),t?.forEach(i=>{i.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(i=>{i.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let a=this.getModel(this.selectedChartId);this.currentChartTypeText=a?.chartType!==void 0?D({chartType:a.chartType,commonStrings:this.commonStrings,config:a.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&me(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=n.Data;let t=this.getModel(e);this.setEventBasedPropsFromModelData(t),this.currentChartTypeText=t?.chartType!==void 0?D({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",e!==void 0&&e!==b.selectedChartId&&(b.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:t})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let t=this.getModel(this.selectedChartId)?.config,a=[];if(t!==void 0&&e!==void 0){let i=Z({chartConfig:t,chartData:e}),{minY:s,maxY:o,minX:l,maxX:u}=i;a=[{isXAxis:!0,minimum:l,maximum:u},{isXAxis:!1,minimum:s,maximum:o}]}return a}updateAxesBoundsInAppState(e){e?.forEach(t=>{let{isXAxis:a,maximum:i,minimum:s}=t,o=this.getModel(this.selectedChartId);if(o!==void 0&&L(o)&&this.selectedChartId!==void 0){let l=new se(o,a),u=te({chartId:this.selectedChartId,isXAxis:a,isLogarithmic:l.getLogarithmic()}),g=b.chartAxesBoundDataMap;g[this.selectedChartId]===void 0&&(g[this.selectedChartId]={});let p=g[this.selectedChartId]?.[u],F={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?i:p?.defaultMaxBound,currMaxBound:i};!S(p,F)&&this.selectedChartId!==void 0&&g?.[this.selectedChartId]!==void 0&&(g[this.selectedChartId][u]=F)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(t=>M(O,t.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:t,layerId:a,layerType:i}=e.detail,s=!0;if(T(i)&&a){let o=this.layerList.find(l=>l.id===a);v(o)&&(s=!!(await q(o))?.attributeTable)}this.setupSelectChartTypePopover(t,a,i,s)}setupSelectChartTypePopover(e,t,a,i=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=$(c`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${t} .layerType=${a} .isRasterBarChartSupported=${i} .popoverPlacement=${s} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(t=>t.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=re(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:t}=e.detail;if(t!==void 0){let a=this.modelList.find(s=>s.chartId===t),i=this.layerList.find(s=>s.id===a?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==t)],i&&this.syncChartsToLayers&&this.allowChartSyncing&&pe(i,t)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.close=!0,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let t=e.target,a="";switch(t.icon){case"configure":a=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":a=this._messages.series??"";break;case"graph-pie-slice":a=this._messages.slices??"";break;case"graph-axis":a=this._messages.axes??"";break;case"graph-guides":a=this._messages.guides??"";break;case"palette":a=this._messages.format??"";break;case"text":a=this._messages.general??"";break;default:a="";break}this.tooltip=$(c`<calcite-tooltip style=${z({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${t} open placement=top>${a}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){ie(this.tooltip)}renderViewCharts(){let e=de({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return oe(e,t=>t.id,t=>c`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${he(this.modelList,t.id.toString(),T(t.type)?j:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${t} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.close?null:c`<calcite-flow>${k("charts-list",c`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${V(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.panelNumber>=1&&!this.disableEditing?this.renderTabs():null}</calcite-flow>`}renderTabs(){let e=this.getModel(this.selectedChartId);return k("chart-edit",c`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??n.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?ce(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?c`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===n.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=n.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===r.BarSeries?c`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.series??""}></calcite-action>`:null}${e?.chartType===r.LineSeries?c`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.series??""}></calcite-action>`:null}${e?.chartType===r.BoxPlotSeries?c`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.series??""}></calcite-action>`:null}${e?.chartType===r.PieSeries?c`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===n.Slices} @click=${()=>{this.selectedPanel=n.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.slices??""}></calcite-action>`:null}${e?.chartType!==r.PieSeries&&e?.chartType!==r.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===n.Axes} @click=${()=>{this.selectedPanel=n.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.axes??""}></calcite-action>`:null}${e?.chartType!==r.PieSeries&&e?.chartType!==r.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===n.Guides} @click=${()=>{this.selectedPanel=n.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.guides??""}></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===n.Format} @click=${()=>{this.selectedPanel=n.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.format??""}></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===n.General} @click=${()=>{this.selectedPanel=n.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.general??""}></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),t=e?.layer,a=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case r.BarSeries:a=c`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case r.LineSeries:a=c`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case r.PieSeries:a=c`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .chartData=${this.chartData} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case r.HistogramSeries:a=c`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case r.ScatterSeries:a=c`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case r.BoxPlotSeries:a=c`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case r.HeatSeries:a=c`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data}></arcgis-charts-config-heat-chart>`;break}return a}};U("arcgis-charts-config-create-flow",E);return E},"intl",a,d,e,g,i,j,l,m,o,p,q,s,t,u,y,D)
2
+ import D from"./JDCNFE5C.js";import{a as se}from"./UZFD4QWD.js";import{a as oe}from"./LJOG5J2V.js";import{a as k}from"./FZ4P2E22.js";import{a as re}from"./3DIZRBOJ.js";import y from"./EUSDSRSD.js";import{a as b,b as te,e as ae}from"./3WARDHOQ.js";import{a as f}from"./BK4JKDTR.js";import u from"./3Z2C6NLH.js";import{d as n}from"./VTGIHCBG.js";import{a as P}from"./LD7OU6HP.js";import t from"./QZCSTDPS.js";import s from"./6KYYHQBS.js";import q from"./REC66TO6.js";import{a as ee}from"./K7M3AA6L.js";import"./PQCKQMUH.js";import p from"./4DGRKLXO.js";import o from"./DGE5LAEC.js";import m from"./EQNW3D27.js";import l from"./VUWVVCEB.js";import{b as Y,c as B,i as Q,l as L,p as w,r as J}from"./G5NLV2CS.js";import j from"./5AMXSBVD.js";import i from"./CKRMPTUO.js";import g from"./LTZBWR5K.js";import e from"./EJCQJK4X.js";import d from"./ZJIYZYVK.js";import a from"./JJLZNOU5.js";import{C as x,c as G,q as M}from"./UPENS2HR.js";import{d as T,e as v}from"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import{g as H,l as S}from"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as V,B as _,C as h,D as z,F as $,H as U,g as N,i as c,n as C,z as A}from"./AJDNZRJP.js";import"./BYSF3WH4.js";import"./QIST2E6D.js";import"./GFIZPXVK.js";import{a as r,k as R}from"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([{substitute:ce},{Bb:j,Fb:q,Ha:X,ba:O,hb:Z},,,,,,{d:I},,{a:W},,,,,{r:ie},{e:y,f:K},{b:D}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function le(m,e){let t=new Set,a=e;return m?.forEach((i,s)=>{let o=i.chartId;(t.has(o)||o===void 0||o==="")&&(i.chartId=`Chart_${Date.now()}_${s}`,e===o&&(a=i.chartId)),t.add(o)}),a}function he(m,e,t){return m?.filter(a=>M(t,a.config)&&a.layer?.id===e)??[]}function de(m){let{modelList:e,layerList:t,activeLayerId:a,disableEditing:i}=m,s=new Map;return e?.forEach(o=>{let l=o.layer;l&&s.set(l.id,l)}),i||t.forEach(o=>s.set(o.id,o)),Array.from(s.values()).filter(o=>!a||o.id===a)}function me(m,e){m.forEach(t=>{e.forEach(a=>{t?.id===a.layer?.id&&ne(t,a)})})}function ne(m,e){let t=m;if(t){let a=[...t?.charts??[]],i=a?.findIndex(o=>o.id===e.chartId),s=!1;i!==void 0&&i>-1?(s=!S(a[i],e.config),a[i]=e.config):t&&!I(e.config)&&(s=!0,a.push(e.config)),s&&(t.charts=a)}}function pe(m,e){let t=m;if(t){let a=[...t.charts??[]],i=a.findIndex(s=>s.id===e);i>-1&&(a.splice(i,1),t.charts=a)}}function ge(m,e){let t=m;if(t){let a=[...t.charts??[]];a=x({arrayA:a,arrayB:e.map(i=>i.config),getKey:i=>i.id??i.title?.content.text??""}),t.charts=a}}var ue=N`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,E=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[r.BarSeries,r.BoxPlotSeries,r.LineSeries,r.PieSeries,r.HistogramSeries,r.ScatterSeries,r.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=async e=>{let t=e,{chartData:a,model:i}=t.detail,s=this.getModel(this.selectedChartId);if(i?.isSameChartAs(s))switch(s?.chartType){case r.HistogramSeries:if(this.chartData=a,i&&(i.dataStore.chartData=a,v(i.layer))){let o=i,l=a?.bins?.length;l!==void 0&&o.binCount!==l&&(o.binCount=l)}break;case r.PieSeries:{this.chartData=a,i&&(i.dataStore.chartData=a);break}case r.ScatterSeries:{let o=a,{dataItems:l,r2:u,aggregated:g}=o,p=u;Number.isFinite(u)||(p=void 0),this.r2=p,Q(i)&&(i.dataStore.r2=p,i.dataStore.aggregated=g,g&&(i.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case r.LineSeries:case r.BarSeries:{let{dataItems:o,timeIntervalInfo:l}=a;(B(s)||Y(s)&&s.binTemporalData)&&(l?.size!==void 0&&s.temporalBinningSize!==l?.size&&(s.temporalBinningSize=l?.size),l?.unit!==void 0&&s.temporalBinningUnit!==l?.unit&&l?.unit!==R.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ae(b,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(o),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}}},this.chartAxesMinMaxChange=e=>{let t=e,{bounds:a,model:i}=t.detail,s=this.getModel(this.selectedChartId),o=i?.isSameChartAs(s),l=s?.chartType;if(o)switch(l){case r.BarSeries:case r.BoxPlotSeries:case r.LineSeries:case r.HistogramSeries:case r.ScatterSeries:this.calculatedMinMaxBounds=a,i&&(i.dataStore.calculatedMinMaxBounds=a),this.updateAxesBoundsInAppState(a);break}},this.chartSeriesColorChange=e=>{let t=e,{colorMatchApplied:a,data:i,model:s}=t.detail,o=this.getModel(this.selectedChartId);if(s?.isSameChartAs(o))switch(o?.chartType){case r.BarSeries:case r.BoxPlotSeries:case r.LineSeries:case r.HistogramSeries:this.seriesColor=i,s&&(s.dataStore.seriesColor=i),this.applyNullCategorySeriesColor({colorMatchApplied:a,data:i,model:o});break;case r.PieSeries:{let l=new Map([[0,i]]);this.seriesColor=l,s&&(s.dataStore.seriesColor=l);break}case r.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let t=e,{propName:a,value:i,model:s}=t.detail,o=this.modelList.find(l=>s?.isSameChartAs(l));if(o)switch(a){case"rotation":typeof i=="boolean"&&W(o)&&(o.rotated=i);break;case"legendPosition":typeof i=="string"&&w(o)&&(o.legendPosition=i);break;case"legendVisibility":typeof i=="boolean"&&w(o)&&(o.legendVisibility=i);break}},this.chartLegendItemVisibilityChange=e=>{let t=e,{legendItemVisibility:a,model:i}=t.detail,s=this.modelList.find(o=>i?.isSameChartAs(o));s?.setSeriesVisibility(a),L(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),B(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:t,layerId:a}=e.target;t!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:t,layerId:a}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let t=e.target;ne(t?.layer,t)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.close=!1,this.usePopupTemplateFieldsInfo=!1,this.panelNumber=0,this.filterBySelection=!1,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,close:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:K}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=ue}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}applyNullCategorySeriesColor(e){let{colorMatchApplied:t,data:a,model:i}=e;J(i)&&i.nullCategory===void 0&&(i.nullCategory=this.getDefaultNullCategory(t?this.getSeriesColor(a):void 0))}getSeriesColor(e){let t=e.get(0),a;return t&&"color"in t?a=t.color:t&&"lineSymbol"in t&&(a=t.markerSymbol?.color??t.lineSymbol.color),a}getDefaultNullCategory(e){let t=H(G.nullCategory);return e!==void 0&&(t.fillSymbol&&(t.fillSymbol.color=e,t.fillSymbol.outline&&(t.fillSymbol.outline.color=e)),t.markerSymbol&&(t.markerSymbol.color=e,t.markerSymbol.outline&&(t.markerSymbol.outline.color=e))),t}modelListReorderChangeListener(e){let{modelList:t}=e.detail;if(this.modelList=x({arrayA:this.modelList,arrayB:t,getKey:a=>a.chartId??a.titleText??""}),this.syncChartsToLayers){let a=t.find(i=>i.layer?.id!==void 0)?.layer?.id;if(a){let i=this.layerList.find(s=>s.id.toString()===a);i&&ge(i,t)}}}async layerListChange(){let e=[],t=this.layerList.map(i=>i.id.toString()),a=[...this.modelList.filter(i=>t.includes(i.layer?.id??""))];for(let i of this.layerList??[]){if(i.type==="sublayer"){let o=await i.createFeatureLayer();if(!o)continue;i=o}let s=i.charts;for(let o of s??[]){let l=await ee({layer:i,config:o,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}le(e),e.forEach(i=>{a.find(s=>s.isSameChartAs(i))===void 0&&a.push(i)}),a=a.filter(i=>!X(i.config)),this.modelList=a}modelListChange(e,t){this.selectedChartId=le(e,this.selectedChartId),t?.forEach(i=>{i.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(i=>{i.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let a=this.getModel(this.selectedChartId);this.currentChartTypeText=a?.chartType!==void 0?D({chartType:a.chartType,commonStrings:this.commonStrings,config:a.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&me(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=n.Data;let t=this.getModel(e);this.setEventBasedPropsFromModelData(t),this.currentChartTypeText=t?.chartType!==void 0?D({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",e!==void 0&&e!==b.selectedChartId&&(b.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:t})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let t=this.getModel(this.selectedChartId)?.config,a=[];if(t!==void 0&&e!==void 0){let i=Z({chartConfig:t,chartData:e}),{minY:s,maxY:o,minX:l,maxX:u}=i;a=[{isXAxis:!0,minimum:l,maximum:u},{isXAxis:!1,minimum:s,maximum:o}]}return a}updateAxesBoundsInAppState(e){e?.forEach(t=>{let{isXAxis:a,maximum:i,minimum:s}=t,o=this.getModel(this.selectedChartId);if(o!==void 0&&L(o)&&this.selectedChartId!==void 0){let l=new se(o,a),u=te({chartId:this.selectedChartId,isXAxis:a,isLogarithmic:l.getLogarithmic()}),g=b.chartAxesBoundDataMap;g[this.selectedChartId]===void 0&&(g[this.selectedChartId]={});let p=g[this.selectedChartId]?.[u],F={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?i:p?.defaultMaxBound,currMaxBound:i};!S(p,F)&&this.selectedChartId!==void 0&&g?.[this.selectedChartId]!==void 0&&(g[this.selectedChartId][u]=F)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(t=>M(O,t.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:t,layerId:a,layerType:i}=e.detail,s=!0;if(T(i)&&a){let o=this.layerList.find(l=>l.id===a);v(o)&&(s=!!(await q(o))?.attributeTable)}this.setupSelectChartTypePopover(t,a,i,s)}setupSelectChartTypePopover(e,t,a,i=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=$(c`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${t} .layerType=${a} .isRasterBarChartSupported=${i} .popoverPlacement=${s} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(t=>t.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=re(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:t}=e.detail;if(t!==void 0){let a=this.modelList.find(s=>s.chartId===t),i=this.layerList.find(s=>s.id===a?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==t)],i&&this.syncChartsToLayers&&this.allowChartSyncing&&pe(i,t)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.close=!0,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let t=e.target,a="";switch(t.icon){case"configure":a=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":a=this._messages.series??"";break;case"graph-pie-slice":a=this._messages.slices??"";break;case"graph-axis":a=this._messages.axes??"";break;case"graph-guides":a=this._messages.guides??"";break;case"palette":a=this._messages.format??"";break;case"text":a=this._messages.general??"";break;default:a="";break}this.tooltip=$(c`<calcite-tooltip style=${z({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${t} open placement=top>${a}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){ie(this.tooltip)}renderViewCharts(){let e=de({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return oe(e,t=>t.id,t=>c`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${he(this.modelList,t.id.toString(),T(t.type)?j:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${t} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.close?null:c`<calcite-flow>${k("charts-list",c`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${V(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.panelNumber>=1&&!this.disableEditing?this.renderTabs():null}</calcite-flow>`}renderTabs(){let e=this.getModel(this.selectedChartId);return k("chart-edit",c`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??n.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?ce(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?c`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===n.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=n.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===r.BarSeries?c`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.series??""}></calcite-action>`:null}${e?.chartType===r.LineSeries?c`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.series??""}></calcite-action>`:null}${e?.chartType===r.BoxPlotSeries?c`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.series??""}></calcite-action>`:null}${e?.chartType===r.PieSeries?c`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===n.Slices} @click=${()=>{this.selectedPanel=n.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.slices??""}></calcite-action>`:null}${e?.chartType!==r.PieSeries&&e?.chartType!==r.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===n.Axes} @click=${()=>{this.selectedPanel=n.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.axes??""}></calcite-action>`:null}${e?.chartType!==r.PieSeries&&e?.chartType!==r.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===n.Guides} @click=${()=>{this.selectedPanel=n.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.guides??""}></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===n.Format} @click=${()=>{this.selectedPanel=n.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.format??""}></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===n.General} @click=${()=>{this.selectedPanel=n.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} .text=${this._messages.general??""}></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),t=e?.layer,a=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case r.BarSeries:a=c`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case r.LineSeries:a=c`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case r.PieSeries:a=c`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .chartData=${this.chartData} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case r.HistogramSeries:a=c`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case r.ScatterSeries:a=c`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case r.BoxPlotSeries:a=c`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case r.HeatSeries:a=c`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??n.Data}></arcgis-charts-config-heat-chart>`;break}return a}};U("arcgis-charts-config-create-flow",E);return E},"intl",a,d,e,g,i,j,l,m,o,p,q,s,t,u,y,D)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import n from"./3GK5BZMV.js";import{b as e,c as t,d as a}from"./BK4JKDTR.js";import l from"./3QFLCKDU.js";import{a as u}from"./VTGIHCBG.js";import{a as A}from"./FVPRMLQF.js";import k from"./OOMLQFRO.js";import j from"./D72XCO7P.js";import{a as h,p as E}from"./G5NLV2CS.js";import i from"./3AU4BVFA.js";import f from"./ILV3GIXF.js";import c from"./XCAJJFB7.js";import b from"./TUNGGTDZ.js";import{a as x}from"./UPENS2HR.js";import"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./DK7J3XAC.js";import{A as g,B as _,C as z,D as m,E as s,F as p,H as V,g as O,i as o,n as r,z as d}from"./74BF6TFJ.js";import"./BYSF3WH4.js";import"./QIST2E6D.js";import"./GFIZPXVK.js";import{a as v}from"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([,,,,,{a:L},{r:n},{a:F}])=>{function R(S){return S?.tagName.toLowerCase()==="arcgis-chart"}var Z={actionBar:"action-bar"},q=O`.action-bar{display:flex;flex-direction:column;height:100%;border-right:1px solid var(--calcite-color-border-2);width:fit-content}:host{z-index:1001}`,T=class extends _{constructor(){super(...arguments),this.calciteActionBar=d(),this.exportCalciteActionBar=d(),this.expandAction=null,this._messages=A(),this.commonStrings=A({name:"common",blocking:!0}),this.handleMouseOver=l=>{if(this.calciteActionBar.value&&!this.calciteActionBar.value?.expanded){let c=l.target;this.actionTooltip!==void 0&&(this.actionTooltip=n(this.actionTooltip));let i;c?.tagName==="CALCITE-ACTION"?i=c:(c?.tagName==="CALCITE-ACTION-MENU"||c?.tagName==="DIV")&&(i=c.firstChild),i!==void 0&&(this.actionTooltip=p(o`<calcite-tooltip style=${m({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=trailing-end>${i.text}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}else this.actionTooltip=n(this.actionTooltip)},this._csvExportExclusionList=[v.ScatterSeries,v.BoxPlotSeries],this.actionTooltip=null,this.forceDisableActions=!1,this.editChartToggle=t.Inactive,this.editChartState=a.Disabled,this.legendToggle=t.Inactive,this.legendState=a.Enabled,this.rotateChartToggle=t.Inactive,this.rotateChartState=a.Enabled,this.filterBySelectionToggle=t.Inactive,this.filterBySelectionState=a.Enabled,this.filterByExtentToggle=t.Inactive,this.filterByExtentState=a.Enabled,this.actionBarSelectionMode=x.MultiSelectionWithCtrlKey,this.selectionToggle=t.Inactive,this.selectionState=a.Enabled,this.zoomToggle=t.Inactive,this.zoomState=a.Enabled,this.fullExtentToggle=t.Inactive,this.fullExtentState=a.Enabled,this.clearSelectionToggle=t.Inactive,this.clearSelectionState=a.Enabled,this.switchSelectionToggle=t.Inactive,this.switchSelectionState=a.Enabled,this.exportAsImageState=a.Enabled,this.exportAsCSVState=a.Enabled,this.disableCSVExportForChartTypes=this._csvExportExclusionList,this.csvExportExclusionList=this._csvExportExclusionList,this.exportActionState=a.Enabled,this.expanded=!1,this.hiddenActions=[e.EditChart],this.arcgisActionBarToggle=r(),this.arcgisDefaultActionSelect=r()}static{this.properties={actionTooltip:16,messageOverrides:0,chartType:1,chartElement:0,forceDisableActions:5,editChartToggle:1,editChartState:1,editChartTitle:1,legendToggle:1,legendState:1,legendTitle:1,rotateChartToggle:1,rotateChartState:1,rotateChartTitle:1,filterBySelectionToggle:1,filterBySelectionState:1,filterBySelectionTitle:1,filterByExtentToggle:1,filterByExtentState:1,filterByExtentTitle:1,actionBarSelectionMode:1,selectionToggle:1,selectionState:1,selectionTitle:1,zoomToggle:1,zoomState:1,zoomTitle:1,fullExtentToggle:1,fullExtentState:1,fullExtentTitle:1,clearSelectionToggle:1,clearSelectionState:1,clearSelectionTitle:1,switchSelectionToggle:1,switchSelectionState:1,switchSelectionTitle:1,exportAsImageState:1,exportAsImageTitle:1,exportAsCSVState:1,exportAsCSVTitle:1,disableCSVExportForChartTypes:0,csvExportExclusionList:0,exportActionState:1,expanded:5,hiddenActions:0}}static{this.styles=q}load(){this.chartElement=R(this.el.parentElement)?this.el.parentElement:void 0}updated(){this.handleExpandTooltip()}disconnectedCallback(){super.disconnectedCallback(),this.actionTooltip?.remove()}async onDefaultActionClick(l){let c=l.currentTarget,i={actionId:c.id,actionActive:!1};switch(c.id){case e.EditChart:this.editChartToggle=this.editChartToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.editChartToggle===t.Active;break;case e.Legend:this.legendToggle=this.legendToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.legendToggle===t.Active,h(this.chartElement?.model)&&E(this.chartElement?.model)&&(this.chartElement.model.legendVisibility=i.actionActive),this.chartElement?.model&&(h(this.chartElement.model)?E(this.chartElement.model)&&(this.chartElement.model.legendVisibility=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break;case e.RotateChart:this.rotateChartToggle=this.rotateChartToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.rotateChartToggle===t.Active,this.chartElement?.model&&(h(this.chartElement.model)?L(this.chartElement.model)&&(this.chartElement.model.rotated=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break;case e.FilterBySelection:this.filterBySelectionToggle=this.filterBySelectionToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.filterBySelectionToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.filterBySelection=i.actionActive);break;case e.FilterByExtent:this.filterByExtentToggle=this.filterByExtentToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.filterByExtentToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.filterByViewExtent=i.actionActive);break;case e.Selection:this.selectionToggle=t.Active,this.zoomToggle=t.Inactive,i.actionActive=this.selectionToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.actionMode=this.actionBarSelectionMode);break;case e.Zoom:this.zoomToggle=t.Active,this.selectionToggle=t.Inactive,i.actionActive=this.zoomToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.actionMode=x.Zoom);break;case e.ClearSelection:i.actionActive=this.clearSelectionToggle===t.Active,this.chartElement?.clearSelection();break;case e.FullExtent:i.actionActive=this.fullExtentToggle===t.Active,this.chartElement?.resetZoom();break;case e.SwitchSelection:i.actionActive=this.switchSelectionToggle===t.Active,this.chartElement?.switchSelection();break;case e.ExportAsImage:i.actionActive=!0,await this.chartElement?.exportAsImage();break;case e.ExportAsCSV:i.actionActive=!0,await this.chartElement?.exportAsCSV();break}this.arcgisDefaultActionSelect.emit(i)}handleCalciteActionBarToggle(){this.expanded=this.calciteActionBar.value?.expanded??!1,this.setCustomActionsExpanded(),this.arcgisActionBarToggle.emit(this.expanded)}handleMouseOut(){this.actionTooltip!==null&&(this.actionTooltip=n(this.actionTooltip))}handleSlotChange(l){let c=l.currentTarget.assignedElements();for(let i of c)i.onmouseover=this.handleMouseOver}setCustomActionsExpanded(){this.el.querySelectorAll("calcite-action").forEach(l=>{let c=l;c.textEnabled=this.expanded})}handleExpandTooltip(){this.expandAction===null&&(this.expandAction=this.calciteActionBar.value?.shadowRoot?.querySelector("calcite-action")??null,this.expandAction!==null&&(this.listenOn(this.expandAction,"mouseenter",()=>{!this.calciteActionBar.value?.expanded&&this.expandAction!==null&&!document.body.contains(this.actionTooltip)&&(this.actionTooltip=p(o`<calcite-tooltip style=${m({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${this.expandAction} open placement=trailing-end>${this._messages.expand??""}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}),this.listenOn(this.expandAction,"mouseleave",()=>{!this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=n(this.actionTooltip))}),this.listenOn(this.expandAction,"click",()=>{this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=n(this.actionTooltip))})))}renderDefaultActions(){let l=F(this.chartType).filter(N=>!this.hiddenActions?.includes(N)),c=this.chartElement?.layer&&"isTable"in this.chartElement.layer?this.chartElement.layer.isTable:!1,i=l.includes(e.EditChart),$=l.includes(e.Legend),f=l.includes(e.RotateChart),b=l.includes(e.FilterBySelection),C=l.includes(e.FilterByExtent)&&!c,y=l.includes(e.Zoom),B=l.includes(e.Selection),D=l.includes(e.ClearSelection),k=l.includes(e.FullExtent),I=l.includes(e.SwitchSelection),M=l.includes(e.ExportAsImage),w=l.includes(e.ExportAsCSV);return[$||f?o`<calcite-action-group>${i?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.EditChart??s} icon=gear .text=${this.commonStrings?.utilsStrings.actions?.editChart??""} .textEnabled=${this.expanded} .active=${this.editChartToggle===t.Active} .disabled=${this.editChartState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${$?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Legend??s} .text=${this.legendTitle??this._messages?.legend??""} .textEnabled=${this.expanded} .active=${this.legendToggle===t.Active} .disabled=${this.legendState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}><calcite-icon icon=legend scale=s flip-rtl></calcite-icon></calcite-action></div>`:null}${f?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.RotateChart??s} icon=rotate .text=${this.rotateChartTitle??this._messages?.rotateChart??""} .textEnabled=${this.expanded} .active=${this.rotateChartToggle===t.Active} .disabled=${this.rotateChartState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,b||C?o`<calcite-action-group>${b?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterBySelection??s} icon=selection-filter .text=${this.filterBySelectionTitle??this._messages?.filterBySelection??""} .textEnabled=${this.expanded} .active=${this.filterBySelectionToggle===t.Active} .disabled=${this.filterBySelectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${C?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterByExtent??s} icon=extent-filter .text=${this.filterByExtentTitle??this._messages?.filterByExtent??""} .textEnabled=${this.expanded} .active=${this.filterByExtentToggle===t.Active} .disabled=${this.filterByExtentState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,B||y||k||D||I?o`<calcite-action-group>${y?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Zoom??s} icon=magnifying-glass .text=${this.zoomTitle??this._messages?.zoom??""} .textEnabled=${this.expanded} .active=${this.zoomToggle===t.Active} .disabled=${this.zoomState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${B?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Selection??s} icon=cursor-selection .text=${this.selectionTitle??this._messages?.selection??""} .textEnabled=${this.expanded} .active=${this.selectionToggle===t.Active} .disabled=${this.selectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${D?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.ClearSelection??s} icon=erase .text=${this.clearSelectionTitle??this._messages?.clearSelection??""} .textEnabled=${this.expanded} .active=${this.clearSelectionToggle===t.Active} .disabled=${this.clearSelectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${k?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FullExtent??s} icon=zoom-out-fixed .text=${this.fullExtentTitle??this._messages?.fullExtent??""} .textEnabled=${this.expanded} .active=${this.fullExtentToggle===t.Active} .disabled=${this.fullExtentState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${I?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.SwitchSelection??s} icon=arrow-right-left .text=${this.switchSelectionTitle??this._messages?.switchSelection??""} .textEnabled=${this.expanded} .active=${this.switchSelectionToggle===t.Active} .disabled=${this.switchSelectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,M||w?o`<calcite-action-menu .label=${this._messages?.export??""} ${g(this.exportCalciteActionBar)}><calcite-action id=export icon=export .text=${this._messages?.export??""} .textEnabled=${this.expanded} .disabled=${this.exportActionState===a.Disabled||this.forceDisableActions} @mouseover=${this.handleMouseOver} slot=trigger></calcite-action>${M?o`<div><calcite-action id=${e.ExportAsImage??s} icon=graph-bar .text=${this.exportAsImageTitle??this._messages?.exportAsImage??""} .disabled=${this.exportAsImageState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}${w?o`<div><calcite-action id=${e.ExportAsCSV??s} icon=table .text=${this.exportAsCSVTitle??this._messages?.exportAsTable??""} .disabled=${this.exportAsCSVState===a.Disabled||this.forceDisableActions||this.chartType&&(this.disableCSVExportForChartTypes.includes(this.chartType)||this.csvExportExclusionList.includes(this.chartType))} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}</calcite-action-menu>`:null]}render(){return o`<calcite-action-bar class=${z(Z.actionBar)} @calciteActionBarToggle=${this.handleCalciteActionBarToggle} @mouseout=${this.handleMouseOut} .expanded=${this.expanded} .messageOverrides=${{expand:this._messages.expand,collapse:this._messages.collapse}} overflow-actions-disabled ${g(this.calciteActionBar)}><slot name=${u.customActionTop} @slotchange=${this.handleSlotChange}></slot>${this.renderDefaultActions()}<slot name=${u.customActionBelow} @slotchange=${this.handleSlotChange}></slot></calcite-action-bar>`}};V("arcgis-charts-action-bar",T);return T},b,c,f,i,j,k,l,n)
2
+ import n from"./YCM6O6HX.js";import{b as e,c as t,d as a}from"./BK4JKDTR.js";import l from"./3Z2C6NLH.js";import{a as u}from"./VTGIHCBG.js";import{a as A}from"./LD7OU6HP.js";import k from"./DGE5LAEC.js";import j from"./VUWVVCEB.js";import{a as h,p as E}from"./G5NLV2CS.js";import i from"./LTZBWR5K.js";import f from"./EJCQJK4X.js";import c from"./ZJIYZYVK.js";import b from"./JJLZNOU5.js";import{a as x}from"./UPENS2HR.js";import"./U4LGTOAJ.js";import"./JGDOGMER.js";import"./BIXQAUTT.js";import"./GUQ44MLO.js";import"./CHCM5ZNC.js";import{A as g,B as _,C as z,D as m,E as s,F as p,H as V,g as O,i as o,n as r,z as d}from"./AJDNZRJP.js";import"./BYSF3WH4.js";import"./QIST2E6D.js";import"./GFIZPXVK.js";import{a as v}from"./C4LXB6MK.js";import"./K4PGZCDZ.js";export default $arcgis.t(([,,,,,{a:L},{r:n},{a:F}])=>{function R(S){return S?.tagName.toLowerCase()==="arcgis-chart"}var Z={actionBar:"action-bar"},q=O`.action-bar{display:flex;flex-direction:column;height:100%;border-right:1px solid var(--calcite-color-border-2);width:fit-content}:host{z-index:1001}`,T=class extends _{constructor(){super(...arguments),this.calciteActionBar=d(),this.exportCalciteActionBar=d(),this.expandAction=null,this._messages=A(),this.commonStrings=A({name:"common",blocking:!0}),this.handleMouseOver=l=>{if(this.calciteActionBar.value&&!this.calciteActionBar.value?.expanded){let c=l.target;this.actionTooltip!==void 0&&(this.actionTooltip=n(this.actionTooltip));let i;c?.tagName==="CALCITE-ACTION"?i=c:(c?.tagName==="CALCITE-ACTION-MENU"||c?.tagName==="DIV")&&(i=c.firstChild),i!==void 0&&(this.actionTooltip=p(o`<calcite-tooltip style=${m({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=trailing-end>${i.text}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}else this.actionTooltip=n(this.actionTooltip)},this._csvExportExclusionList=[v.ScatterSeries,v.BoxPlotSeries],this.actionTooltip=null,this.forceDisableActions=!1,this.editChartToggle=t.Inactive,this.editChartState=a.Disabled,this.legendToggle=t.Inactive,this.legendState=a.Enabled,this.rotateChartToggle=t.Inactive,this.rotateChartState=a.Enabled,this.filterBySelectionToggle=t.Inactive,this.filterBySelectionState=a.Enabled,this.filterByExtentToggle=t.Inactive,this.filterByExtentState=a.Enabled,this.actionBarSelectionMode=x.MultiSelectionWithCtrlKey,this.selectionToggle=t.Inactive,this.selectionState=a.Enabled,this.zoomToggle=t.Inactive,this.zoomState=a.Enabled,this.fullExtentToggle=t.Inactive,this.fullExtentState=a.Enabled,this.clearSelectionToggle=t.Inactive,this.clearSelectionState=a.Enabled,this.switchSelectionToggle=t.Inactive,this.switchSelectionState=a.Enabled,this.exportAsImageState=a.Enabled,this.exportAsCSVState=a.Enabled,this.disableCSVExportForChartTypes=this._csvExportExclusionList,this.csvExportExclusionList=this._csvExportExclusionList,this.exportActionState=a.Enabled,this.expanded=!1,this.hiddenActions=[e.EditChart],this.arcgisActionBarToggle=r(),this.arcgisDefaultActionSelect=r()}static{this.properties={actionTooltip:16,messageOverrides:0,chartType:1,chartElement:0,forceDisableActions:5,editChartToggle:1,editChartState:1,editChartTitle:1,legendToggle:1,legendState:1,legendTitle:1,rotateChartToggle:1,rotateChartState:1,rotateChartTitle:1,filterBySelectionToggle:1,filterBySelectionState:1,filterBySelectionTitle:1,filterByExtentToggle:1,filterByExtentState:1,filterByExtentTitle:1,actionBarSelectionMode:1,selectionToggle:1,selectionState:1,selectionTitle:1,zoomToggle:1,zoomState:1,zoomTitle:1,fullExtentToggle:1,fullExtentState:1,fullExtentTitle:1,clearSelectionToggle:1,clearSelectionState:1,clearSelectionTitle:1,switchSelectionToggle:1,switchSelectionState:1,switchSelectionTitle:1,exportAsImageState:1,exportAsImageTitle:1,exportAsCSVState:1,exportAsCSVTitle:1,disableCSVExportForChartTypes:0,csvExportExclusionList:0,exportActionState:1,expanded:5,hiddenActions:0}}static{this.styles=q}load(){this.chartElement=R(this.el.parentElement)?this.el.parentElement:void 0}updated(){this.handleExpandTooltip()}disconnectedCallback(){super.disconnectedCallback(),this.actionTooltip?.remove()}async onDefaultActionClick(l){let c=l.currentTarget,i={actionId:c.id,actionActive:!1};switch(c.id){case e.EditChart:this.editChartToggle=this.editChartToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.editChartToggle===t.Active;break;case e.Legend:this.legendToggle=this.legendToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.legendToggle===t.Active,h(this.chartElement?.model)&&E(this.chartElement?.model)&&(this.chartElement.model.legendVisibility=i.actionActive),this.chartElement?.model&&(h(this.chartElement.model)?E(this.chartElement.model)&&(this.chartElement.model.legendVisibility=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break;case e.RotateChart:this.rotateChartToggle=this.rotateChartToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.rotateChartToggle===t.Active,this.chartElement?.model&&(h(this.chartElement.model)?L(this.chartElement.model)&&(this.chartElement.model.rotated=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break;case e.FilterBySelection:this.filterBySelectionToggle=this.filterBySelectionToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.filterBySelectionToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.filterBySelection=i.actionActive);break;case e.FilterByExtent:this.filterByExtentToggle=this.filterByExtentToggle===t.Active?t.Inactive:t.Active,i.actionActive=this.filterByExtentToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.filterByViewExtent=i.actionActive);break;case e.Selection:this.selectionToggle=t.Active,this.zoomToggle=t.Inactive,i.actionActive=this.selectionToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.actionMode=this.actionBarSelectionMode);break;case e.Zoom:this.zoomToggle=t.Active,this.selectionToggle=t.Inactive,i.actionActive=this.zoomToggle===t.Active,this.chartElement!==void 0&&(this.chartElement.actionMode=x.Zoom);break;case e.ClearSelection:i.actionActive=this.clearSelectionToggle===t.Active,this.chartElement?.clearSelection();break;case e.FullExtent:i.actionActive=this.fullExtentToggle===t.Active,this.chartElement?.resetZoom();break;case e.SwitchSelection:i.actionActive=this.switchSelectionToggle===t.Active,this.chartElement?.switchSelection();break;case e.ExportAsImage:i.actionActive=!0,await this.chartElement?.exportAsImage();break;case e.ExportAsCSV:i.actionActive=!0,await this.chartElement?.exportAsCSV();break}this.arcgisDefaultActionSelect.emit(i)}handleCalciteActionBarToggle(){this.expanded=this.calciteActionBar.value?.expanded??!1,this.setCustomActionsExpanded(),this.arcgisActionBarToggle.emit(this.expanded)}handleMouseOut(){this.actionTooltip!==null&&(this.actionTooltip=n(this.actionTooltip))}handleSlotChange(l){let c=l.currentTarget.assignedElements();for(let i of c)i.onmouseover=this.handleMouseOver}setCustomActionsExpanded(){this.el.querySelectorAll("calcite-action").forEach(l=>{let c=l;c.textEnabled=this.expanded})}handleExpandTooltip(){this.expandAction===null&&(this.expandAction=this.calciteActionBar.value?.shadowRoot?.querySelector("calcite-action")??null,this.expandAction!==null&&(this.listenOn(this.expandAction,"mouseenter",()=>{!this.calciteActionBar.value?.expanded&&this.expandAction!==null&&!document.body.contains(this.actionTooltip)&&(this.actionTooltip=p(o`<calcite-tooltip style=${m({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${this.expandAction} open placement=trailing-end>${this._messages.expand??""}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}),this.listenOn(this.expandAction,"mouseleave",()=>{!this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=n(this.actionTooltip))}),this.listenOn(this.expandAction,"click",()=>{this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=n(this.actionTooltip))})))}renderDefaultActions(){let l=F(this.chartType).filter(N=>!this.hiddenActions?.includes(N)),c=this.chartElement?.layer&&"isTable"in this.chartElement.layer?this.chartElement.layer.isTable:!1,i=l.includes(e.EditChart),$=l.includes(e.Legend),f=l.includes(e.RotateChart),b=l.includes(e.FilterBySelection),C=l.includes(e.FilterByExtent)&&!c,y=l.includes(e.Zoom),B=l.includes(e.Selection),D=l.includes(e.ClearSelection),k=l.includes(e.FullExtent),I=l.includes(e.SwitchSelection),M=l.includes(e.ExportAsImage),w=l.includes(e.ExportAsCSV);return[$||f?o`<calcite-action-group>${i?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.EditChart??s} icon=gear .text=${this.commonStrings?.utilsStrings.actions?.editChart??""} .textEnabled=${this.expanded} .active=${this.editChartToggle===t.Active} .disabled=${this.editChartState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${$?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Legend??s} .text=${this.legendTitle??this._messages?.legend??""} .textEnabled=${this.expanded} .active=${this.legendToggle===t.Active} .disabled=${this.legendState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}><calcite-icon icon=legend scale=s flip-rtl></calcite-icon></calcite-action></div>`:null}${f?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.RotateChart??s} icon=rotate .text=${this.rotateChartTitle??this._messages?.rotateChart??""} .textEnabled=${this.expanded} .active=${this.rotateChartToggle===t.Active} .disabled=${this.rotateChartState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,b||C?o`<calcite-action-group>${b?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterBySelection??s} icon=selection-filter .text=${this.filterBySelectionTitle??this._messages?.filterBySelection??""} .textEnabled=${this.expanded} .active=${this.filterBySelectionToggle===t.Active} .disabled=${this.filterBySelectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${C?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterByExtent??s} icon=extent-filter .text=${this.filterByExtentTitle??this._messages?.filterByExtent??""} .textEnabled=${this.expanded} .active=${this.filterByExtentToggle===t.Active} .disabled=${this.filterByExtentState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,B||y||k||D||I?o`<calcite-action-group>${y?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Zoom??s} icon=magnifying-glass .text=${this.zoomTitle??this._messages?.zoom??""} .textEnabled=${this.expanded} .active=${this.zoomToggle===t.Active} .disabled=${this.zoomState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${B?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Selection??s} icon=cursor-selection .text=${this.selectionTitle??this._messages?.selection??""} .textEnabled=${this.expanded} .active=${this.selectionToggle===t.Active} .disabled=${this.selectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${D?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.ClearSelection??s} icon=erase .text=${this.clearSelectionTitle??this._messages?.clearSelection??""} .textEnabled=${this.expanded} .active=${this.clearSelectionToggle===t.Active} .disabled=${this.clearSelectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${k?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FullExtent??s} icon=zoom-out-fixed .text=${this.fullExtentTitle??this._messages?.fullExtent??""} .textEnabled=${this.expanded} .active=${this.fullExtentToggle===t.Active} .disabled=${this.fullExtentState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${I?o`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.SwitchSelection??s} icon=arrow-right-left .text=${this.switchSelectionTitle??this._messages?.switchSelection??""} .textEnabled=${this.expanded} .active=${this.switchSelectionToggle===t.Active} .disabled=${this.switchSelectionState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,M||w?o`<calcite-action-menu .label=${this._messages?.export??""} ${g(this.exportCalciteActionBar)}><calcite-action id=export icon=export .text=${this._messages?.export??""} .textEnabled=${this.expanded} .disabled=${this.exportActionState===a.Disabled||this.forceDisableActions} @mouseover=${this.handleMouseOver} slot=trigger></calcite-action>${M?o`<div><calcite-action id=${e.ExportAsImage??s} icon=graph-bar .text=${this.exportAsImageTitle??this._messages?.exportAsImage??""} .disabled=${this.exportAsImageState===a.Disabled||this.forceDisableActions} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}${w?o`<div><calcite-action id=${e.ExportAsCSV??s} icon=table .text=${this.exportAsCSVTitle??this._messages?.exportAsTable??""} .disabled=${this.exportAsCSVState===a.Disabled||this.forceDisableActions||this.chartType&&(this.disableCSVExportForChartTypes.includes(this.chartType)||this.csvExportExclusionList.includes(this.chartType))} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}</calcite-action-menu>`:null]}render(){return o`<calcite-action-bar class=${z(Z.actionBar)} @calciteActionBarToggle=${this.handleCalciteActionBarToggle} @mouseout=${this.handleMouseOut} .expanded=${this.expanded} .messageOverrides=${{expand:this._messages.expand,collapse:this._messages.collapse}} overflow-actions-disabled ${g(this.calciteActionBar)}><slot name=${u.customActionTop} @slotchange=${this.handleSlotChange}></slot>${this.renderDefaultActions()}<slot name=${u.customActionBelow} @slotchange=${this.handleSlotChange}></slot></calcite-action-bar>`}};V("arcgis-charts-action-bar",T);return T},b,c,f,i,j,k,l,n)