@arcgis/charts-components 5.1.0-next.126 → 5.1.0-next.127

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 (38) hide show
  1. package/dist/cdn/{VAZONUFI.js → 2M3QK7HM.js} +1 -1
  2. package/dist/cdn/{E7JPSOT7.js → 33ZEJKDM.js} +1 -1
  3. package/dist/cdn/{3NNXZCZH.js → 5IBIYPY3.js} +1 -1
  4. package/dist/cdn/{AKRY2VSS.js → BFSMQPZZ.js} +1 -1
  5. package/dist/cdn/{UPIQAIT2.js → C7IZOQVW.js} +23 -23
  6. package/dist/cdn/{VWMONCYV.js → D57ATDAE.js} +1 -1
  7. package/dist/cdn/{6G2TDGE3.js → DBFAUJW3.js} +1 -1
  8. package/dist/cdn/{XIEAAQO5.js → EUPTPW3X.js} +1 -1
  9. package/dist/cdn/{BLSPWCIV.js → FGV2DUKN.js} +1 -1
  10. package/dist/cdn/{F7Z4ZGJN.js → IHWIL5FR.js} +1 -1
  11. package/dist/cdn/{LVHK3PBQ.js → KBXBWAFZ.js} +1 -1
  12. package/dist/cdn/{KTQFT4ZP.js → LTV6F3YM.js} +1 -1
  13. package/dist/cdn/{WH2P5YHJ.js → MBBBCZE6.js} +1 -1
  14. package/dist/cdn/{3K4LARTY.js → MNCGB46W.js} +1 -1
  15. package/dist/cdn/{KX2RKT62.js → NXWIFXFR.js} +1 -1
  16. package/dist/cdn/{O6G2VVBM.js → PHVMODYR.js} +1 -1
  17. package/dist/cdn/{EYHZACXE.js → POLN44VP.js} +1 -1
  18. package/dist/cdn/{7UIPFB3W.js → R2WRGYNZ.js} +1 -1
  19. package/dist/cdn/{GW7RSMIU.js → RCDZ3NQW.js} +1 -1
  20. package/dist/cdn/{PZQTS544.js → TN5S7N2F.js} +1 -1
  21. package/dist/cdn/{AD63IGDU.js → V6H545UH.js} +1 -1
  22. package/dist/cdn/{5U7JSG6A.js → WCQXIRBG.js} +1 -1
  23. package/dist/cdn/{J2U26A2S.js → XCPK7A5X.js} +1 -1
  24. package/dist/cdn/{T3ET323E.js → Z56VSGIJ.js} +1 -1
  25. package/dist/cdn/index.js +1 -1
  26. package/dist/cdn/model/shared/setup-utils.js +1 -1
  27. package/dist/chart-rendering/common/interfaces.d.ts +5 -5
  28. package/dist/chunks/index2.js +16 -16
  29. package/dist/chunks/index4.js +1 -1
  30. package/dist/chunks/rotated-state.js +1 -1
  31. package/dist/components/arcgis-chart/customElement.js +5364 -5489
  32. package/dist/docs/api.json +1 -1
  33. package/dist/docs/docs.json +1 -1
  34. package/dist/docs/web-types.json +1 -1
  35. package/dist/index.d.ts +1 -6
  36. package/dist/model/properties/rotated-state.d.ts +1 -1
  37. package/dist/spec/rest-js-object-literals.d.ts +2 -2
  38. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import u from"./NELXSCCO.js";import t from"./GW7RSMIU.js";import{a as f}from"./PDWS67CW.js";import{a as ae}from"./3TPTF5I7.js";import{a as $,b as W,e as ee}from"./7BDNLABD.js";import{a as ie}from"./NBJBPYA2.js";import{a as k}from"./B7XYDLAU.js";import{a as se}from"./TJQGGNGV.js";import s from"./GVPXMODT.js";import{a as P}from"./5STC2DYW.js";import{d as c}from"./MZ2UZAFW.js";import r from"./LVHK3PBQ.js";import q from"./7UIPFB3W.js";import p from"./AKRY2VSS.js";import m from"./3NNXZCZH.js";import l from"./KV7BT5Q5.js";import j from"./UH7JWVSL.js";import i from"./EYHZACXE.js";import{b as B,c as L,i as Y,l as w,p as D}from"./7MKAC33Z.js";import g from"./S5OMB4EV.js";import"./NQAPPISU.js";import e from"./7JH66QJ6.js";import d from"./7RX2IUGA.js";import b from"./PLV3Y5I7.js";import"./KGNYAMFB.js";import a from"./QIG6EIK3.js";import{d as M,e as X}from"./777EBGS5.js";import{C as v,c as R,q as x}from"./4XN3YXIY.js";import"./6JI4NDJ6.js";import"./75Y43JLP.js";import{l as T}from"./FIMXZMTB.js";import"./SEXKEROR.js";import{A as _,B as h,C as U,E as S,G as z,g as N,i as n,n as C,y as A,z as V}from"./OC4AGIFL.js";import{a as J}from"./KTQFT4ZP.js";import"./TOO3T62Y.js";import"./EZM4ZDQI.js";import"./43P4WOC4.js";import{a as o,k as H}from"./XOB365BI.js";import"./QPIMTXPL.js";export default $arcgis.t(([{substitute:le},{Ga:O,Jb:K,eb:G,hb:Z,jc:j},,,,,{b:I},,{a:Q},,,,,{r:te},{e:y,f:q},{b:E}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function re(m,e){let i=new Set,t=e;return m?.forEach((a,s)=>{let r=a.chartId;(i.has(r)||r===void 0||r==="")&&(a.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=a.chartId)),i.add(r)}),t}function ce(m,e,i){return m?.filter(t=>x(i,t.config)&&t.layer?.id===e)??[]}function ne(m){let{modelList:e,layerList:i,activeLayerId:t,disableEditing:a}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),a||i.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function he(m,e){m.forEach(i=>{e.forEach(t=>{i?.id===t.layer?.id&&oe(i,t)})})}function oe(m,e){let i=m;if(i){let t=[...i?.charts??[]],a=t?.findIndex(r=>r.id===e.chartId),s=!1;a!==void 0&&a>-1?(s=!T(t[a],e.config),t[a]=e.config):i&&!I(e.config)&&(s=!0,t.push(e.config)),s&&(i.charts=t)}}function de(m,e){let i=m;if(i){let t=[...i.charts??[]],a=t.findIndex(s=>s.id===e);a>-1&&(t.splice(a,1),i.charts=t)}}function me(m,e){let i=m;if(i){let t=[...i.charts??[]];t=v({arrayA:t,arrayB:e.map(a=>a.config),getKey:a=>a.id??a.title?.content.text??""}),i.charts=t}}var pe=N`: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}`,F=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let i=e,{chartData:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:if(this.chartData=t,a&&(a.dataStore.chartData=t,X(a.layer))){let r=a,l=t?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=t,a&&(a.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:l,r2:g,aggregated:u}=r,p=g;Number.isFinite(g)||(p=void 0),this.r2=p,Y(a)&&(a.dataStore.r2=p,a.dataStore.aggregated=u,u&&(a.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=t;if((L(s)||B(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!==H.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ee($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),B(s)){let g=s.xAxisField,u=r.some(b=>b[g]===null),p=s.nullCategory;u&&p===void 0&&(s.nullCategory=R.nullCategory)}break}}},this.chartAxesMinMaxChange=e=>{let i=e,{bounds:t,model:a}=i.detail,s=this.getModel(this.selectedChartId),r=a?.isSameChartAs(s),l=s?.chartType;if(r)switch(l){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,a&&(a.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let i=e,{data:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,a&&(a.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,a&&(a.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let i=e,{propName:t,value:a,model:s}=i.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(t){case"rotation":typeof a=="boolean"&&Q(r)&&(r.rotated=a);break;case"legendPosition":typeof a=="string"&&D(r)&&(r.legendPosition=a);break;case"legendVisibility":typeof a=="boolean"&&D(r)&&(r.legendVisibility=a);break}},this.chartLegendItemVisibilityChange=e=>{let i=e,{legendItemVisibility:t,model:a}=i.detail,s=this.modelList.find(r=>a?.isSameChartAs(r));s?.setSeriesVisibility(t),w(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),L(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:i,layerId:t}=e.target;i!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:i,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let i=e.target;oe(i?.layer,i)}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:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=pe}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()}modelListReorderChangeListener(e){let{modelList:i}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:i,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=i.find(a=>a.layer?.id!==void 0)?.layer?.id;if(t){let a=this.layerList.find(s=>s.id.toString()===t);a&&me(a,i)}}}async layerListChange(){let e=[],i=this.layerList.map(a=>a.id.toString()),t=[...this.modelList.filter(a=>i.includes(a.layer?.id??""))];for(let a of this.layerList??[]){if(a.type==="sublayer"){let r=await a.createFeatureLayer();if(!r)continue;a=r}let s=a.charts;for(let r of s??[]){let l=await J({layer:a,config:r,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}re(e),e.forEach(a=>{t.find(s=>s.isSameChartAs(a))===void 0&&t.push(a)}),t=t.filter(a=>!K(a.config)),this.modelList=t}modelListChange(e,i){this.selectedChartId=re(e,this.selectedChartId),i?.forEach(a=>{a.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(a=>{a.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?E({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&he(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=c.Data;let i=this.getModel(e);this.setEventBasedPropsFromModelData(i),this.currentChartTypeText=i?.chartType!==void 0?E({chartType:i.chartType,commonStrings:this.commonStrings,config:i.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:i})}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 i=this.getModel(this.selectedChartId)?.config,t=[];if(i!==void 0&&e!==void 0){let a=j({chartConfig:i,chartData:e}),{minY:s,maxY:r,minX:l,maxX:g}=a;t=[{isXAxis:!0,minimum:l,maximum:g},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(i=>{let{isXAxis:t,maximum:a,minimum:s}=i,r=this.getModel(this.selectedChartId);if(r!==void 0&&w(r)&&this.selectedChartId!==void 0){let l=new ae(r,t),g=W({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:l.getLogarithmic()}),u=$.chartAxesBoundDataMap;u[this.selectedChartId]===void 0&&(u[this.selectedChartId]={});let p=u[this.selectedChartId]?.[g],b={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?a:p?.defaultMaxBound,currMaxBound:a};!T(p,b)&&this.selectedChartId!==void 0&&u?.[this.selectedChartId]!==void 0&&(u[this.selectedChartId][g]=b)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(i=>x(O,i.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:i,layerId:t,layerType:a}=e.detail,s=!0;if(M(a)&&t){let r=this.layerList.find(l=>l.id===t);M(r?.type)&&(s=!!(await Z(r))?.attributeTable)}this.setupSelectChartTypePopover(i,t,a,s)}setupSelectChartTypePopover(e,i,t,a=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=S(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${i} .layerType=${t} .isRasterBarChartSupported=${a} .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(i=>i.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=se(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:i}=e.detail;if(i!==void 0){let t=this.modelList.find(s=>s.chartId===i),a=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==i)],a&&this.syncChartsToLayers&&this.allowChartSyncing&&de(a,i)}}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 i=e.target,t="";switch(i.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=S(n`<calcite-tooltip style=${U({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){te(this.tooltip)}renderViewCharts(){let e=ne({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ie(e,i=>i.id,i=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${ce(this.modelList,i.id.toString(),M(i.type)?G:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${i} .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:n`<calcite-flow>${k("charts-list",n`<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",n`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??c.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?le(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?n`<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===c.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=c.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?n`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?n`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?n`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?n`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===c.Slices} @click=${()=>{this.selectedPanel=c.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===c.Axes} @click=${()=>{this.selectedPanel=c.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===c.Guides} @click=${()=>{this.selectedPanel=c.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===c.Format} @click=${()=>{this.selectedPanel=c.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===c.General} @click=${()=>{this.selectedPanel=c.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),i=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .chartData=${this.chartData} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data}></arcgis-charts-config-heat-chart>`;break}return t}};z("arcgis-charts-config-create-flow",F);return F},"intl",a,b,d,e,g,i,j,l,m,p,q,r,s,t,u)
2
+ import u from"./NELXSCCO.js";import t from"./RCDZ3NQW.js";import{a as f}from"./PDWS67CW.js";import{a as ae}from"./3TPTF5I7.js";import{a as $,b as W,e as ee}from"./7BDNLABD.js";import{a as ie}from"./NBJBPYA2.js";import{a as k}from"./B7XYDLAU.js";import{a as se}from"./TJQGGNGV.js";import s from"./GVPXMODT.js";import{a as P}from"./5STC2DYW.js";import{d as c}from"./MZ2UZAFW.js";import r from"./KBXBWAFZ.js";import q from"./R2WRGYNZ.js";import p from"./BFSMQPZZ.js";import m from"./5IBIYPY3.js";import l from"./KV7BT5Q5.js";import j from"./UH7JWVSL.js";import i from"./POLN44VP.js";import{b as B,c as L,i as Y,l as w,p as D}from"./7MKAC33Z.js";import g from"./S5OMB4EV.js";import"./NQAPPISU.js";import e from"./7JH66QJ6.js";import d from"./7RX2IUGA.js";import b from"./PLV3Y5I7.js";import"./KGNYAMFB.js";import a from"./QIG6EIK3.js";import{d as M,e as X}from"./777EBGS5.js";import{C as v,c as R,q as x}from"./4XN3YXIY.js";import"./6JI4NDJ6.js";import"./75Y43JLP.js";import{l as T}from"./FIMXZMTB.js";import"./SEXKEROR.js";import{A as _,B as h,C as U,E as S,G as z,g as N,i as n,n as C,y as A,z as V}from"./OC4AGIFL.js";import{a as J}from"./LTV6F3YM.js";import"./TOO3T62Y.js";import"./EZM4ZDQI.js";import"./43P4WOC4.js";import{a as o,k as H}from"./XOB365BI.js";import"./QPIMTXPL.js";export default $arcgis.t(([{substitute:le},{Ga:O,Jb:K,eb:G,hb:Z,jc:j},,,,,{b:I},,{a:Q},,,,,{r:te},{e:y,f:q},{b:E}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function re(m,e){let i=new Set,t=e;return m?.forEach((a,s)=>{let r=a.chartId;(i.has(r)||r===void 0||r==="")&&(a.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=a.chartId)),i.add(r)}),t}function ce(m,e,i){return m?.filter(t=>x(i,t.config)&&t.layer?.id===e)??[]}function ne(m){let{modelList:e,layerList:i,activeLayerId:t,disableEditing:a}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),a||i.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function he(m,e){m.forEach(i=>{e.forEach(t=>{i?.id===t.layer?.id&&oe(i,t)})})}function oe(m,e){let i=m;if(i){let t=[...i?.charts??[]],a=t?.findIndex(r=>r.id===e.chartId),s=!1;a!==void 0&&a>-1?(s=!T(t[a],e.config),t[a]=e.config):i&&!I(e.config)&&(s=!0,t.push(e.config)),s&&(i.charts=t)}}function de(m,e){let i=m;if(i){let t=[...i.charts??[]],a=t.findIndex(s=>s.id===e);a>-1&&(t.splice(a,1),i.charts=t)}}function me(m,e){let i=m;if(i){let t=[...i.charts??[]];t=v({arrayA:t,arrayB:e.map(a=>a.config),getKey:a=>a.id??a.title?.content.text??""}),i.charts=t}}var pe=N`: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}`,F=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let i=e,{chartData:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:if(this.chartData=t,a&&(a.dataStore.chartData=t,X(a.layer))){let r=a,l=t?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=t,a&&(a.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:l,r2:g,aggregated:u}=r,p=g;Number.isFinite(g)||(p=void 0),this.r2=p,Y(a)&&(a.dataStore.r2=p,a.dataStore.aggregated=u,u&&(a.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=t;if((L(s)||B(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!==H.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ee($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),B(s)){let g=s.xAxisField,u=r.some(b=>b[g]===null),p=s.nullCategory;u&&p===void 0&&(s.nullCategory=R.nullCategory)}break}}},this.chartAxesMinMaxChange=e=>{let i=e,{bounds:t,model:a}=i.detail,s=this.getModel(this.selectedChartId),r=a?.isSameChartAs(s),l=s?.chartType;if(r)switch(l){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,a&&(a.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let i=e,{data:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,a&&(a.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,a&&(a.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let i=e,{propName:t,value:a,model:s}=i.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(t){case"rotation":typeof a=="boolean"&&Q(r)&&(r.rotated=a);break;case"legendPosition":typeof a=="string"&&D(r)&&(r.legendPosition=a);break;case"legendVisibility":typeof a=="boolean"&&D(r)&&(r.legendVisibility=a);break}},this.chartLegendItemVisibilityChange=e=>{let i=e,{legendItemVisibility:t,model:a}=i.detail,s=this.modelList.find(r=>a?.isSameChartAs(r));s?.setSeriesVisibility(t),w(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),L(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:i,layerId:t}=e.target;i!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:i,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let i=e.target;oe(i?.layer,i)}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:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=pe}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()}modelListReorderChangeListener(e){let{modelList:i}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:i,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=i.find(a=>a.layer?.id!==void 0)?.layer?.id;if(t){let a=this.layerList.find(s=>s.id.toString()===t);a&&me(a,i)}}}async layerListChange(){let e=[],i=this.layerList.map(a=>a.id.toString()),t=[...this.modelList.filter(a=>i.includes(a.layer?.id??""))];for(let a of this.layerList??[]){if(a.type==="sublayer"){let r=await a.createFeatureLayer();if(!r)continue;a=r}let s=a.charts;for(let r of s??[]){let l=await J({layer:a,config:r,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}re(e),e.forEach(a=>{t.find(s=>s.isSameChartAs(a))===void 0&&t.push(a)}),t=t.filter(a=>!K(a.config)),this.modelList=t}modelListChange(e,i){this.selectedChartId=re(e,this.selectedChartId),i?.forEach(a=>{a.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(a=>{a.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?E({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&he(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=c.Data;let i=this.getModel(e);this.setEventBasedPropsFromModelData(i),this.currentChartTypeText=i?.chartType!==void 0?E({chartType:i.chartType,commonStrings:this.commonStrings,config:i.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:i})}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 i=this.getModel(this.selectedChartId)?.config,t=[];if(i!==void 0&&e!==void 0){let a=j({chartConfig:i,chartData:e}),{minY:s,maxY:r,minX:l,maxX:g}=a;t=[{isXAxis:!0,minimum:l,maximum:g},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(i=>{let{isXAxis:t,maximum:a,minimum:s}=i,r=this.getModel(this.selectedChartId);if(r!==void 0&&w(r)&&this.selectedChartId!==void 0){let l=new ae(r,t),g=W({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:l.getLogarithmic()}),u=$.chartAxesBoundDataMap;u[this.selectedChartId]===void 0&&(u[this.selectedChartId]={});let p=u[this.selectedChartId]?.[g],b={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?a:p?.defaultMaxBound,currMaxBound:a};!T(p,b)&&this.selectedChartId!==void 0&&u?.[this.selectedChartId]!==void 0&&(u[this.selectedChartId][g]=b)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(i=>x(O,i.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:i,layerId:t,layerType:a}=e.detail,s=!0;if(M(a)&&t){let r=this.layerList.find(l=>l.id===t);M(r?.type)&&(s=!!(await Z(r))?.attributeTable)}this.setupSelectChartTypePopover(i,t,a,s)}setupSelectChartTypePopover(e,i,t,a=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=S(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${i} .layerType=${t} .isRasterBarChartSupported=${a} .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(i=>i.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=se(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:i}=e.detail;if(i!==void 0){let t=this.modelList.find(s=>s.chartId===i),a=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==i)],a&&this.syncChartsToLayers&&this.allowChartSyncing&&de(a,i)}}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 i=e.target,t="";switch(i.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=S(n`<calcite-tooltip style=${U({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){te(this.tooltip)}renderViewCharts(){let e=ne({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ie(e,i=>i.id,i=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${ce(this.modelList,i.id.toString(),M(i.type)?G:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${i} .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:n`<calcite-flow>${k("charts-list",n`<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",n`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??c.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?le(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?n`<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===c.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=c.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?n`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?n`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?n`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?n`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===c.Slices} @click=${()=>{this.selectedPanel=c.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===c.Axes} @click=${()=>{this.selectedPanel=c.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===c.Guides} @click=${()=>{this.selectedPanel=c.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===c.Format} @click=${()=>{this.selectedPanel=c.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===c.General} @click=${()=>{this.selectedPanel=c.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),i=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .chartData=${this.chartData} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data}></arcgis-charts-config-heat-chart>`;break}return t}};z("arcgis-charts-config-create-flow",F);return F},"intl",a,b,d,e,g,i,j,l,m,p,q,r,s,t,u)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import v from"./O6G2VVBM.js";import t from"./RH6TR4NX.js";import s from"./LVHK3PBQ.js";import q from"./KV7BT5Q5.js";import p from"./UH7JWVSL.js";import o from"./V7UNYUIM.js";import n from"./LOZVIHHI.js";import m from"./NIOWVY63.js";import l from"./EYHZACXE.js";import k from"./ZG2DVTNT.js";import j from"./DUZEOOZN.js";import i from"./74SBLQE6.js";import h from"./FAYER3SK.js";import"./7MKAC33Z.js";import g from"./ZCGR6IQQ.js";import f from"./S5OMB4EV.js";import"./NQAPPISU.js";import e from"./7JH66QJ6.js";import d from"./7RX2IUGA.js";import b from"./PLV3Y5I7.js";import"./KGNYAMFB.js";import a from"./QIG6EIK3.js";import"./777EBGS5.js";import{r as S}from"./4XN3YXIY.js";import{pa as _}from"./6JI4NDJ6.js";import"./75Y43JLP.js";import"./FIMXZMTB.js";import"./SEXKEROR.js";import"./OC4AGIFL.js";import"./TOO3T62Y.js";import{c as r}from"./EZM4ZDQI.js";import"./43P4WOC4.js";import{a as u,b as c}from"./XOB365BI.js";import"./QPIMTXPL.js";export default $arcgis.t(([{ob:l},,,{c:i},,,,,,,,,,,{e:y},,{$:$,A:L,B:b,C:R,D:w,E:D,F:I,G:P,H:k,I:B,J:N,K:U,L:W,M:E,N:h,O:f,P:M,Q:Y,R:G,S:H,T:V,U:X,V:j,W:Z,X:q,Y:J,Z:K,_:Q,aa:z,ba:tt,ca:et,da:it,ea:st,fa:ot,ga:rt,ha:nt,ia:at,ja:gt,na:m,t:C,u:T,v:A,w:F,x:O,y:x,z:v},,{a:pt,b:ct,d:lt}])=>{var yt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,s=(p,t,o,a)=>{for(var n=ht(t,o),g=p.length-1,d;g>=0;g--)(d=p[g])&&(n=d(t,o,n)||n);return n&&yt(t,o,n),n},e=class extends lt{constructor(){super(...arguments),this._chartType=u.HeatSeries}generateChartTitle(){return this.layerInfo!==void 0?gt(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){let t=this.yTemporalBinning?.unit;return t!==void 0?this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[t]:""}get layer(){return super.layer}async setup(t){await this.loadConfigFromLayer(t),this.setupLocalProps(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get yAxisField(){return L(this._config)}set yAxisField(t){v({yField:t,config:this._config,layerInfo:this.layerInfo})}get viewType(){return K(this._config)}set viewType(t){this.guardSetterFromAsyncOverwrite(()=>{Q(t,this._config),this.emitConfigUpdate("heatChartViewType")})}get xTemporalBinning(){return R(this._config)}set xTemporalBinning(t){b({commonStrings:this.commonStrings,binning:t,config:this._config})}get yTemporalBinning(){return D(this._config)}set yTemporalBinning(t){w({commonStrings:this.commonStrings,binning:t,config:this._config})}get breaksCount(){return $(this._config)}set breaksCount(t){this.guardSetterFromAsyncOverwrite(()=>{z(t,this._config),this.emitConfigUpdate("breaksCount")})}get classificationMethod(){return tt(this._config)}set classificationMethod(t){this.guardSetterFromAsyncOverwrite(()=>{t&&(et(t,this._config),this.emitConfigUpdate("classificationMethod"))})}get colorRampName(){return ot(this._config)}set colorRampName(t){rt(t,this._config)}get isColorRampFlipped(){return nt(this._config)}set isColorRampFlipped(t){at(t,this._config)}get hideEmptyRowsAndColumns(){return C(this._config)}set hideEmptyRowsAndColumns(t){T(this._config,t)}get gridLineWidth(){return P(this._config)}set gridLineWidth(t){I(t,this._config)}get gridLineColor(){return B(this._config)}set gridLineColor(t){k(t,this._config)}get seriesName(){return pt(0,this._config)}set seriesName(t){typeof t=="string"&&ct(t,0,this._config)}get heatRulesType(){return F(this._config)}set heatRulesType(t){A(this._config,t)}get gradientRules(){return x(this._config)}set gradientRules(t){O(this._config,t)}getGridLinesSymbol(){return this._config.series?.[0]?.gridLine}setGridLinesSymbol(t){this._config.series?.[0]&&(this._config.series[0].gridLine=t)}get numericFields(){let t=W(this._config);return t!==void 0?[t]:[]}set numericFields(t){let{idField:o}=l(this.layerInfo.layer),a=S(t[0]),n=a?o:t[0];E({field:n,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings});let g=h(this._config);a&&g!==c.Count&&f({aggregationType:c.Count,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get aggregationType(){return h(this._config)}set aggregationType(t){f({aggregationType:t,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return""}set splitByField(t){}get legendPosition(){return U(this._config)}set legendPosition(t){N(t,this._config)}get nullPolicy(){return M(this._config)}set nullPolicy(t){Y(t,this._config)}get emptyCell(){return G(this._config)}set emptyCell(t){this.guardSetterFromAsyncOverwrite(()=>{H(t,this._config),this.emitConfigUpdate("emptyCell")})}getSortOrder(){return r.Asc}setSortOrder(t,o){}getXAxisSortOrder(){let t=m(this._config)[0];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setXAxisSortOrder(t,o){y(t,this._config,o)}getYAxisSortOrder(){let t=m(this._config)[1];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setYAxisSortOrder(t,o){y(t,this._config,o,!0)}get emptyCellText(){return V(this._config)}set emptyCellText(t){X(t,this._config)}get includeLeapDay(){return j(this._config)}set includeLeapDay(t){this.guardSetterFromAsyncOverwrite(()=>{Z(t,this._config),this.emitConfigUpdate("includeLeapDay")})}get firstDayOfWeek(){return st(this._config)}set firstDayOfWeek(t){this.guardSetterFromAsyncOverwrite(()=>{it(t,this._config),this.emitConfigUpdate("firstDayOfWeek")})}get emptyCellSymbol(){return q(this._config)}set emptyCellSymbol(t){J(t,this._config)}get rotated(){return!1}set rotated(t){}setAssignToSecondValueAxis(t,o){}set stackedType(t){}set binTemporalData(t){}set nullCategory(t){}generateDefaultConfig(){let t=_(this.commonStrings,l(this.layerInfo.layer).idField);return t.axes?.forEach((o,a)=>{o&&(o.valueFormat={intlOptions:{timeZone:void 0,dateStyle:a>0?"long":"medium"},type:"date"})}),t}};s([i],e.prototype,"yAxisField");s([i],e.prototype,"xTemporalBinning");s([i],e.prototype,"yTemporalBinning");s([i],e.prototype,"colorRampName");s([i],e.prototype,"isColorRampFlipped");s([i],e.prototype,"hideEmptyRowsAndColumns");s([i],e.prototype,"gridLineWidth");s([i],e.prototype,"gridLineColor");s([i],e.prototype,"seriesName");s([i],e.prototype,"heatRulesType");s([i],e.prototype,"gradientRules");s([i],e.prototype,"setGridLinesSymbol");s([i],e.prototype,"numericFields");s([i],e.prototype,"aggregationType");s([i],e.prototype,"splitByField");s([i],e.prototype,"legendPosition");s([i],e.prototype,"nullPolicy");s([i],e.prototype,"setSortOrder");s([i],e.prototype,"setXAxisSortOrder");s([i],e.prototype,"setYAxisSortOrder");s([i],e.prototype,"emptyCellText");s([i],e.prototype,"firstDayOfWeek");s([i],e.prototype,"emptyCellSymbol");s([i],e.prototype,"rotated");s([i],e.prototype,"setAssignToSecondValueAxis");s([i],e.prototype,"stackedType");s([i],e.prototype,"binTemporalData");s([i],e.prototype,"nullCategory");return e},a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,v)
2
+ import v from"./PHVMODYR.js";import t from"./RH6TR4NX.js";import s from"./KBXBWAFZ.js";import q from"./KV7BT5Q5.js";import p from"./UH7JWVSL.js";import o from"./V7UNYUIM.js";import n from"./LOZVIHHI.js";import m from"./NIOWVY63.js";import l from"./POLN44VP.js";import k from"./ZG2DVTNT.js";import j from"./DUZEOOZN.js";import i from"./74SBLQE6.js";import h from"./FAYER3SK.js";import"./7MKAC33Z.js";import g from"./ZCGR6IQQ.js";import f from"./S5OMB4EV.js";import"./NQAPPISU.js";import e from"./7JH66QJ6.js";import d from"./7RX2IUGA.js";import b from"./PLV3Y5I7.js";import"./KGNYAMFB.js";import a from"./QIG6EIK3.js";import"./777EBGS5.js";import{r as S}from"./4XN3YXIY.js";import{pa as _}from"./6JI4NDJ6.js";import"./75Y43JLP.js";import"./FIMXZMTB.js";import"./SEXKEROR.js";import"./OC4AGIFL.js";import"./TOO3T62Y.js";import{c as r}from"./EZM4ZDQI.js";import"./43P4WOC4.js";import{a as u,b as c}from"./XOB365BI.js";import"./QPIMTXPL.js";export default $arcgis.t(([{ob:l},,,{c:i},,,,,,,,,,,{e:y},,{$:$,A:L,B:b,C:R,D:w,E:D,F:I,G:P,H:k,I:B,J:N,K:U,L:W,M:E,N:h,O:f,P:M,Q:Y,R:G,S:H,T:V,U:X,V:j,W:Z,X:q,Y:J,Z:K,_:Q,aa:z,ba:tt,ca:et,da:it,ea:st,fa:ot,ga:rt,ha:nt,ia:at,ja:gt,na:m,t:C,u:T,v:A,w:F,x:O,y:x,z:v},,{a:pt,b:ct,d:lt}])=>{var yt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,s=(p,t,o,a)=>{for(var n=ht(t,o),g=p.length-1,d;g>=0;g--)(d=p[g])&&(n=d(t,o,n)||n);return n&&yt(t,o,n),n},e=class extends lt{constructor(){super(...arguments),this._chartType=u.HeatSeries}generateChartTitle(){return this.layerInfo!==void 0?gt(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){let t=this.yTemporalBinning?.unit;return t!==void 0?this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[t]:""}get layer(){return super.layer}async setup(t){await this.loadConfigFromLayer(t),this.setupLocalProps(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get yAxisField(){return L(this._config)}set yAxisField(t){v({yField:t,config:this._config,layerInfo:this.layerInfo})}get viewType(){return K(this._config)}set viewType(t){this.guardSetterFromAsyncOverwrite(()=>{Q(t,this._config),this.emitConfigUpdate("heatChartViewType")})}get xTemporalBinning(){return R(this._config)}set xTemporalBinning(t){b({commonStrings:this.commonStrings,binning:t,config:this._config})}get yTemporalBinning(){return D(this._config)}set yTemporalBinning(t){w({commonStrings:this.commonStrings,binning:t,config:this._config})}get breaksCount(){return $(this._config)}set breaksCount(t){this.guardSetterFromAsyncOverwrite(()=>{z(t,this._config),this.emitConfigUpdate("breaksCount")})}get classificationMethod(){return tt(this._config)}set classificationMethod(t){this.guardSetterFromAsyncOverwrite(()=>{t&&(et(t,this._config),this.emitConfigUpdate("classificationMethod"))})}get colorRampName(){return ot(this._config)}set colorRampName(t){rt(t,this._config)}get isColorRampFlipped(){return nt(this._config)}set isColorRampFlipped(t){at(t,this._config)}get hideEmptyRowsAndColumns(){return C(this._config)}set hideEmptyRowsAndColumns(t){T(this._config,t)}get gridLineWidth(){return P(this._config)}set gridLineWidth(t){I(t,this._config)}get gridLineColor(){return B(this._config)}set gridLineColor(t){k(t,this._config)}get seriesName(){return pt(0,this._config)}set seriesName(t){typeof t=="string"&&ct(t,0,this._config)}get heatRulesType(){return F(this._config)}set heatRulesType(t){A(this._config,t)}get gradientRules(){return x(this._config)}set gradientRules(t){O(this._config,t)}getGridLinesSymbol(){return this._config.series?.[0]?.gridLine}setGridLinesSymbol(t){this._config.series?.[0]&&(this._config.series[0].gridLine=t)}get numericFields(){let t=W(this._config);return t!==void 0?[t]:[]}set numericFields(t){let{idField:o}=l(this.layerInfo.layer),a=S(t[0]),n=a?o:t[0];E({field:n,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings});let g=h(this._config);a&&g!==c.Count&&f({aggregationType:c.Count,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get aggregationType(){return h(this._config)}set aggregationType(t){f({aggregationType:t,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return""}set splitByField(t){}get legendPosition(){return U(this._config)}set legendPosition(t){N(t,this._config)}get nullPolicy(){return M(this._config)}set nullPolicy(t){Y(t,this._config)}get emptyCell(){return G(this._config)}set emptyCell(t){this.guardSetterFromAsyncOverwrite(()=>{H(t,this._config),this.emitConfigUpdate("emptyCell")})}getSortOrder(){return r.Asc}setSortOrder(t,o){}getXAxisSortOrder(){let t=m(this._config)[0];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setXAxisSortOrder(t,o){y(t,this._config,o)}getYAxisSortOrder(){let t=m(this._config)[1];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setYAxisSortOrder(t,o){y(t,this._config,o,!0)}get emptyCellText(){return V(this._config)}set emptyCellText(t){X(t,this._config)}get includeLeapDay(){return j(this._config)}set includeLeapDay(t){this.guardSetterFromAsyncOverwrite(()=>{Z(t,this._config),this.emitConfigUpdate("includeLeapDay")})}get firstDayOfWeek(){return st(this._config)}set firstDayOfWeek(t){this.guardSetterFromAsyncOverwrite(()=>{it(t,this._config),this.emitConfigUpdate("firstDayOfWeek")})}get emptyCellSymbol(){return q(this._config)}set emptyCellSymbol(t){J(t,this._config)}get rotated(){return!1}set rotated(t){}setAssignToSecondValueAxis(t,o){}set stackedType(t){}set binTemporalData(t){}set nullCategory(t){}generateDefaultConfig(){let t=_(this.commonStrings,l(this.layerInfo.layer).idField);return t.axes?.forEach((o,a)=>{o&&(o.valueFormat={intlOptions:{timeZone:void 0,dateStyle:a>0?"long":"medium"},type:"date"})}),t}};s([i],e.prototype,"yAxisField");s([i],e.prototype,"xTemporalBinning");s([i],e.prototype,"yTemporalBinning");s([i],e.prototype,"colorRampName");s([i],e.prototype,"isColorRampFlipped");s([i],e.prototype,"hideEmptyRowsAndColumns");s([i],e.prototype,"gridLineWidth");s([i],e.prototype,"gridLineColor");s([i],e.prototype,"seriesName");s([i],e.prototype,"heatRulesType");s([i],e.prototype,"gradientRules");s([i],e.prototype,"setGridLinesSymbol");s([i],e.prototype,"numericFields");s([i],e.prototype,"aggregationType");s([i],e.prototype,"splitByField");s([i],e.prototype,"legendPosition");s([i],e.prototype,"nullPolicy");s([i],e.prototype,"setSortOrder");s([i],e.prototype,"setXAxisSortOrder");s([i],e.prototype,"setYAxisSortOrder");s([i],e.prototype,"emptyCellText");s([i],e.prototype,"firstDayOfWeek");s([i],e.prototype,"emptyCellSymbol");s([i],e.prototype,"rotated");s([i],e.prototype,"setAssignToSecondValueAxis");s([i],e.prototype,"stackedType");s([i],e.prototype,"binTemporalData");s([i],e.prototype,"nullCategory");return e},a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,v)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import g from"./UH7JWVSL.js";import e from"./EYHZACXE.js";import c from"./S5OMB4EV.js";import{c as T}from"./NQAPPISU.js";import b from"./PLV3Y5I7.js";import{h as O,p as te}from"./KGNYAMFB.js";import a from"./QIG6EIK3.js";import{n as B}from"./4XN3YXIY.js";import{Da as K,F as J,G as oe,H as ie,P as D,Q as G,_ as re,ca as H,n as E,p as I}from"./6JI4NDJ6.js";import{a as ee}from"./75Y43JLP.js";import{d as $,g as j,k as U,l as W}from"./FIMXZMTB.js";import{b as d}from"./EZM4ZDQI.js";import{a as f,h,v as u}from"./XOB365BI.js";export default $arcgis.t(([{substitute:P},{O:M,S:se,ec:le,ub:ne,wb:R},{a:L,d:X,e:Y,f:ae,n:ce,r:ye},{a:me},{b:C},{i:N}])=>{var Ue=(o,e)=>e?.series?.[o]?.name,We=(o,e,i)=>{let r=i;r?.series?.[e]!==void 0&&(r.series[e].name=o)},eo=(o,e)=>{let i,r=e.series?.[o];return r?.type===f.BoxPlotSeries?i=r.fillSymbol?.color:r?.type===f.LineSeries&&(i=r.lineSymbol?.color),i},Fe=o=>{let e=o.series[0];return o.showMean===!0&&O(e)?e.fillSymbol?.color:void 0},Ie=(o,e)=>{let i=e.series[0];e.showMean===!0&&O(i)&&(i.fillSymbol!==void 0?i.fillSymbol.color=o:i.fillSymbol={...D(),color:o})},oo=(o,e,i)=>{let r=i?.series?.[e];r?.type===f.BoxPlotSeries&&r.fillSymbol!==void 0?r.fillSymbol.color=o:r?.type===f.LineSeries&&r.lineSymbol!==void 0&&(r.lineSymbol.color=o,r.markerSymbol!==void 0&&(r.markerSymbol.color=o))},ve=o=>o.series.map(e=>e.id),Be=(o,e)=>{e?.series?.sort((i,r)=>o.findIndex(s=>i.id===s)-o.findIndex(s=>r.id===s))},io=(o,e,i)=>{let r=ve(i),[s]=r.splice(o,1);r.splice(e,0,s),Be(r,i)},ro=o=>Z(o)?o.series.findIndex(e=>e.type===f.BoxPlotSeries):-1;function Ae(o,e,i){let r=be(o,e,i),s=me(o),n=C(o);return r===s||n}function de(o,e,i){let r=k(o,e,i),s=T(1,o),n=C(o);return r===s||n}function Me(o){let{config:e,layerInfo:i,newCategory:r}=o,{layerFieldsInfo:s}=i,n=A(e),t=r!==I?B(s,n):"",l=T(0,e),a=C(e);return t===l||a||l.trim()===""}var A=o=>M(o)?.x??I,Oe=$(o=>{let e=M(o),i=e?.query?.where?.split("=")[0].trim()??"";return se(e?.query?.where)?"":i},o=>M(o)?.query?.where),fe=$(o=>le(o?.series).filter(e=>e!==""),o=>o?.series),V=o=>{let{category:e,seriesIndex:i,y:r,commonStrings:s}=o,n={...H(s,i),x:e===void 0||e===""?I:e,y:r,query:{}};return j(n)},Le=o=>{let{category:e,seriesIndex:i,y:r,commonStrings:s}=o,n={...re({commonStrings:s,seriesIndex:i}),x:e===void 0||e===""?I:e,y:r,query:{}};return j(n)};function ge(o){let{x:e,y:i,seriesTemplate:r,commonStrings:s}=o,{id:n,fillSymbol:t}=r??{},l=H(s),a=n??`series_${Date.now()}`;return l.id=a,l.name=a,l.x=e,l.y=i,t?l.fillSymbol=t:l.fillSymbol&&(l.fillSymbol.color=K,l.fillSymbol?.outline&&(l.fillSymbol.outline.color=K)),l}function ue(o){let{numericFields:e,config:i,layerInfo:r,category:s,commonStrings:n}=o,{layerFieldsInfo:t}=r,l=[],a=s??A(i),y=!1,c=N({fieldName:a,numericFields:e,fieldList:t});if(e.length===0){let S=V({y:"",seriesIndex:0,category:a,commonStrings:n});l.push(S)}else if(c){let S=e.length>1?e:e[0],w=V({y:S,seriesIndex:0,category:a,commonStrings:n}),b=e.length>1?n.axisLabels.values:B(r.layerFieldsInfo,e[0]),p={...w,id:e[0],name:b,x:c?I:a},g=i.series.find(m=>W(S,m.y)&&m.query?.where===void 0);g!==void 0&&(!i.colorMatch&&"fillSymbol"in g&&(p.fillSymbol=g.fillSymbol,y=!0),p.id=g.id,p.name=g.name),l.push(p)}else for(let S=0;S<e.length;S+=1){let w=e[S],b=V({y:w,seriesIndex:S,category:a,commonStrings:n}),p=B(t,w),g={...b,id:w,name:p,x:a},m=i.series.find(v=>w===v.y);m!==void 0&&(!i.colorMatch&&"fillSymbol"in m&&(g.fillSymbol=m.fillSymbol,y=!0),g.id=m.id,g.name=m.name),l.push(g)}return i.series.length===1&&l.length===1&&!i.colorMatch&&"fillSymbol"in i.series[0]&&(l[0].fillSymbol=i.series[0].fillSymbol,y=!0),i.colorMatch=!y,l}var Se=o=>o?.query?.where?.split("=")[1].trim().replace(/'/gu,"")??"",Ce=o=>o.series.some(e=>e.type===f.LineSeries)&&o.series.some(e=>e.type===f.BoxPlotSeries);function ke(o,e,i){let r=[];return o.forEach(s=>{if(s.type===f.BoxPlotSeries){let{type:n,fillSymbol:t,...l}=s;r.push({...l,type:f.LineSeries,lineSymbol:{...J({width:E}),...t!==void 0?{color:t.color}:{}},markerSymbol:{...G(),...t!==void 0?{color:t.color}:{}}})}}),r.unshift(ge({x:o[0].x,y:o[0].y,seriesTemplate:i,commonStrings:e})),r}function qe(o){let e=o.slice(1),i=[];return e.forEach(r=>{if(r.type===f.LineSeries){let{type:s,lineSymbol:n,markerSymbol:t,...l}=r,a=D();i.push({...l,type:f.BoxPlotSeries,fillSymbol:{...a,color:n?.color}})}}),i}function pe(o){let{formerSeries:e,newSeries:i,showMean:r}=o,s=i,n=a=>a.type===(r?f.LineSeries:f.BoxPlotSeries),t=e.filter(n).map(a=>a.id),l=i.filter(n).map(a=>a.id);return t.length===l.length&&JSON.stringify(t)!==JSON.stringify(l)&&(s=s.sort((a,y)=>t.findIndex(c=>c===a.id)-t.findIndex(c=>c===y.id))),s}async function De(o){let{config:e,layerInfo:i,commonStrings:r,splitByField:s,numericFields:n,category:t}=o,{layer:l,layerFieldsInfo:a}=i,{fetchNullValues:y}=M(e)?.query??{},c=t??A(e),{categoriesArray:S,splitByFieldType:w}=await ce({config:e,layer:l,layerFieldsInfo:a,xAxisField:_(c)?void 0:c,aggregationFields:n,splitByField:s,fetchNullValues:y,errorStrings:r.errorStrings}),b=[],p=!1,g=Ce(e);if(S.length===0){b=ue({numericFields:n,category:c,config:e,layerInfo:i,commonStrings:r});for(let m of b)m.query&&(m.query.where=`${s}=''`)}else for(let m=0;m<S.length;m+=1){let v=S[m],q={y:n,seriesIndex:m,category:c,commonStrings:r},Q=g?Le(q):V(q),he=R({queryObject:i.layer,fieldName:s,fieldValue:v??""}),z=`${v}`,F={...Q,id:z,name:he??z,x:c===void 0||c===""?I:c,query:{...Q.query,where:`${s}=${w===ee.String&&v!==null?`'${v}'`:v}`}},x=e.series.find(we=>Se(we)===z);x!==void 0&&(e.colorMatch||(F.type===f.BoxPlotSeries?O(x)?F.fillSymbol=x.fillSymbol:F.fillSymbol={...D(),color:x.lineSymbol?.color}:O(x)?(F.lineSymbol={...J({width:E}),...x.fillSymbol!==void 0?{color:x.fillSymbol.color}:{}},F.markerSymbol={...G(),...x.fillSymbol!==void 0?{color:x.fillSymbol.color}:{}}):(F.lineSymbol=x.lineSymbol,F.markerSymbol=x.markerSymbol),p=!0),F.id=x.id,F.name=x.name),b.push(F)}if(b=pe({formerSeries:e.series,newSeries:b,showMean:Z(e)}),e.colorMatch=!p,Z(e)){let m=e.series.find(q=>q.type===f.BoxPlotSeries),v=ge({x:c,y:n,seriesTemplate:m,commonStrings:r});b.unshift(v)}return b}var so=async o=>{let{splitByField:e,numericFields:i,category:r,config:s,layerInfo:n,commonStrings:t}=o,{layerFieldsInfo:l}=n,a=Ve(r,i,e),y=ne(l),c=A(s),S=Ae(s,n,t),w=de(s,n,t),b=Me({config:s,layerInfo:n,newCategory:r}),p=Y(s);if(!y.includes(c)&&y.includes(r)?p=ie():y.includes(c)&&!y.includes(r)&&(p=oe()),p!==void 0&&ae(s,t,p),Ne(a?{newShowMeanLines:s.showMean,config:s,commonStrings:t}:{newShowMeanLines:!1,config:s,commonStrings:t}),s.series=a?await De({config:s,layerInfo:n,splitByField:e,numericFields:i,category:r,commonStrings:t}):ue({numericFields:i,config:s,layerInfo:n,category:r,commonStrings:t}),b){let g=N({fieldName:r,numericFields:i,fieldList:l})?"":B(l,r);L(s,0,g)}if(w){let g=k(s,n,t);L(s,1,g)}s?.title!==void 0&&S&&(s.title.content.text=be(s,n,t)),X({config:s,value:null,axisIndex:1,isMax:!1}),X({config:s,value:null,axisIndex:1,isMax:!0})},Te=o=>o?.standardizeValues??!1;function k(o,e,i){let{layerFieldsInfo:r}=e,s=Te(o)?i.axisLabels.standardizedValues:i.axisLabels.values,n=o?.series?.map(t=>t.y).flat();return n=[...new Set(n)],n.length===1&&(s=B(r,n[0])),s}function be(o,e,i){let{layerFieldsInfo:r}=e,s=A(o),n=fe(o),t=Oe(o),l=n.map(c=>B(r??[],c)).join(", "),a=B(r??[],s),y="";return n.length>0&&(s!==I&&t!==""?y=P(i.titleLabels.distributionOfFieldsByCategoryAndSplitBy,{valueFields:l,category:a,splitByField:t}):s!==I?y=P(i.titleLabels.distributionOfFieldsByCategory,{valueFields:l,category:a}):t!==""?y=P(i.titleLabels.distributionOfFieldsByCategory,{valueFields:l,category:t}):y=P(i.titleLabels.distributionOfField,{valueField:l})),y}var no=o=>{let{series:e,splitByField:i,layerInfo:r,commonStrings:s}=o,n=typeof e.y=="string"?B(r.layerFieldsInfo,e.y):s.axisLabels.values;return U(i)||(n=Se(e)),n=R({queryObject:r.layer,fieldName:i,fieldValue:n??""})??n,n??e.id},lo=o=>o?.showOutliers??!1,to=o=>{let{newShowOutliers:e,config:i,layerInfo:r,commonStrings:s}=o;if(i.showOutliers=e,de(i,r,s)){let n=k(i,r,s);L(i,1,n)}},ao=o=>{let{newStandardizeValues:e,config:i,layerInfo:r,commonStrings:s}=o,n=T(1,i),t=k(i,r,s),l=C(i);if(i.standardizeValues=e,n===t||l){let a=k(i,r,s);L(i,1,a)}},xe=o=>{let e=d.xAxisAsc,i=o.orderOptions?.data?.orderType??u.Category,r=o.orderOptions?.data&&"orderBy"in o.orderOptions.data?o.orderOptions.data.orderBy:h.Ascending;switch(i){case u.Category:e=Array.isArray(r)?d.customSort:r===h.Ascending?d.xAxisAsc:d.xAxisDesc;break;case u.Mean:e=r===h.Ascending?d.meanAsc:d.meanDesc;break;case u.Median:e=r===h.Ascending?d.medianAsc:d.medianDesc;break}return e},co=(o,e,i)=>{let r=u.Category,s=h.Ascending;if(e.orderOptions=e.orderOptions??{},o===d.customSort&&i!==void 0)e.orderOptions.data={orderType:u.Category,orderBy:i};else{switch(o){case d.xAxisAsc:{r=u.Category,s=h.Ascending;break}case d.xAxisDesc:{r=u.Category,s=h.Descending;break}case d.meanAsc:{r=u.Mean,s=h.Ascending;break}case d.meanDesc:{r=u.Mean,s=h.Descending;break}case d.medianAsc:{r=u.Median,s=h.Ascending;break}case d.medianDesc:{r=u.Median,s=h.Descending;break}}e.orderOptions.data={orderType:r,orderBy:s}}},Z=o=>o.showMean??!1,Ne=o=>{let{newShowMeanLines:e=!1,config:i,commonStrings:r,previousMeanLinesBoxColor:s}=o,n=e?s:Fe(i),t=(e??!1)!==(i.showMean??!1);if(i.showMean=e,t){let l;e?l=te(i.series)?ke(i.series,r):i.series:l=qe(i.series),l&&(l=pe({formerSeries:i.series,newSeries:l,showMean:e}),i.series=l)}return e&&s!==void 0&&Ie(s,i),{previousMeanLinesBoxColor:n}},yo=o=>{let e=[],i=o.orderOptions?.data?.orderType;return xe(o)===d.customSort&&i===u.Category&&(e=o.orderOptions?.data?.orderBy),e},mo=(o,e)=>{e.orderOptions??={};let i=e.orderOptions?.data?.orderType;xe(e)===d.customSort&&i===u.Category&&(e.orderOptions.data={orderType:u.Category,orderBy:o})},fo=async o=>{let{config:e,layerInfo:i,errorStrings:r}=o,s=A(e),n=Y(e)?.type,t=fe(e),l=[];return n===f.CategoryAxisFormat&&(N({fieldName:s,numericFields:t,fieldList:i.layerFieldsInfo})?l=t:_(s)||(l=await ye({layerInfo:i,config:e,category:s,errorStrings:r}))),l},_=o=>o.trim()===""||o===I,Pe=(o,e)=>e.length>1&&!_(o),Ve=(o,e,i)=>!Pe(o,e)&&i!=="";return{a:Ue,b:We,c:eo,d:Fe,e:Ie,f:oo,g:ve,h:Be,i:io,j:ro,k:A,l:Oe,m:fe,n:so,o:Te,p:k,q:be,r:no,s:lo,t:to,u:ao,v:xe,w:co,x:Z,y:Ne,z:yo,A:mo,B:fo,C:Pe,D:Ve}},"intl",a,b,c,e,g)
2
+ import g from"./UH7JWVSL.js";import e from"./POLN44VP.js";import c from"./S5OMB4EV.js";import{c as T}from"./NQAPPISU.js";import b from"./PLV3Y5I7.js";import{h as O,p as te}from"./KGNYAMFB.js";import a from"./QIG6EIK3.js";import{n as B}from"./4XN3YXIY.js";import{Da as K,F as J,G as oe,H as ie,P as D,Q as G,_ as re,ca as H,n as E,p as I}from"./6JI4NDJ6.js";import{a as ee}from"./75Y43JLP.js";import{d as $,g as j,k as U,l as W}from"./FIMXZMTB.js";import{b as d}from"./EZM4ZDQI.js";import{a as f,h,v as u}from"./XOB365BI.js";export default $arcgis.t(([{substitute:P},{O:M,S:se,ec:le,ub:ne,wb:R},{a:L,d:X,e:Y,f:ae,n:ce,r:ye},{a:me},{b:C},{i:N}])=>{var Ue=(o,e)=>e?.series?.[o]?.name,We=(o,e,i)=>{let r=i;r?.series?.[e]!==void 0&&(r.series[e].name=o)},eo=(o,e)=>{let i,r=e.series?.[o];return r?.type===f.BoxPlotSeries?i=r.fillSymbol?.color:r?.type===f.LineSeries&&(i=r.lineSymbol?.color),i},Fe=o=>{let e=o.series[0];return o.showMean===!0&&O(e)?e.fillSymbol?.color:void 0},Ie=(o,e)=>{let i=e.series[0];e.showMean===!0&&O(i)&&(i.fillSymbol!==void 0?i.fillSymbol.color=o:i.fillSymbol={...D(),color:o})},oo=(o,e,i)=>{let r=i?.series?.[e];r?.type===f.BoxPlotSeries&&r.fillSymbol!==void 0?r.fillSymbol.color=o:r?.type===f.LineSeries&&r.lineSymbol!==void 0&&(r.lineSymbol.color=o,r.markerSymbol!==void 0&&(r.markerSymbol.color=o))},ve=o=>o.series.map(e=>e.id),Be=(o,e)=>{e?.series?.sort((i,r)=>o.findIndex(s=>i.id===s)-o.findIndex(s=>r.id===s))},io=(o,e,i)=>{let r=ve(i),[s]=r.splice(o,1);r.splice(e,0,s),Be(r,i)},ro=o=>Z(o)?o.series.findIndex(e=>e.type===f.BoxPlotSeries):-1;function Ae(o,e,i){let r=be(o,e,i),s=me(o),n=C(o);return r===s||n}function de(o,e,i){let r=k(o,e,i),s=T(1,o),n=C(o);return r===s||n}function Me(o){let{config:e,layerInfo:i,newCategory:r}=o,{layerFieldsInfo:s}=i,n=A(e),t=r!==I?B(s,n):"",l=T(0,e),a=C(e);return t===l||a||l.trim()===""}var A=o=>M(o)?.x??I,Oe=$(o=>{let e=M(o),i=e?.query?.where?.split("=")[0].trim()??"";return se(e?.query?.where)?"":i},o=>M(o)?.query?.where),fe=$(o=>le(o?.series).filter(e=>e!==""),o=>o?.series),V=o=>{let{category:e,seriesIndex:i,y:r,commonStrings:s}=o,n={...H(s,i),x:e===void 0||e===""?I:e,y:r,query:{}};return j(n)},Le=o=>{let{category:e,seriesIndex:i,y:r,commonStrings:s}=o,n={...re({commonStrings:s,seriesIndex:i}),x:e===void 0||e===""?I:e,y:r,query:{}};return j(n)};function ge(o){let{x:e,y:i,seriesTemplate:r,commonStrings:s}=o,{id:n,fillSymbol:t}=r??{},l=H(s),a=n??`series_${Date.now()}`;return l.id=a,l.name=a,l.x=e,l.y=i,t?l.fillSymbol=t:l.fillSymbol&&(l.fillSymbol.color=K,l.fillSymbol?.outline&&(l.fillSymbol.outline.color=K)),l}function ue(o){let{numericFields:e,config:i,layerInfo:r,category:s,commonStrings:n}=o,{layerFieldsInfo:t}=r,l=[],a=s??A(i),y=!1,c=N({fieldName:a,numericFields:e,fieldList:t});if(e.length===0){let S=V({y:"",seriesIndex:0,category:a,commonStrings:n});l.push(S)}else if(c){let S=e.length>1?e:e[0],w=V({y:S,seriesIndex:0,category:a,commonStrings:n}),b=e.length>1?n.axisLabels.values:B(r.layerFieldsInfo,e[0]),p={...w,id:e[0],name:b,x:c?I:a},g=i.series.find(m=>W(S,m.y)&&m.query?.where===void 0);g!==void 0&&(!i.colorMatch&&"fillSymbol"in g&&(p.fillSymbol=g.fillSymbol,y=!0),p.id=g.id,p.name=g.name),l.push(p)}else for(let S=0;S<e.length;S+=1){let w=e[S],b=V({y:w,seriesIndex:S,category:a,commonStrings:n}),p=B(t,w),g={...b,id:w,name:p,x:a},m=i.series.find(v=>w===v.y);m!==void 0&&(!i.colorMatch&&"fillSymbol"in m&&(g.fillSymbol=m.fillSymbol,y=!0),g.id=m.id,g.name=m.name),l.push(g)}return i.series.length===1&&l.length===1&&!i.colorMatch&&"fillSymbol"in i.series[0]&&(l[0].fillSymbol=i.series[0].fillSymbol,y=!0),i.colorMatch=!y,l}var Se=o=>o?.query?.where?.split("=")[1].trim().replace(/'/gu,"")??"",Ce=o=>o.series.some(e=>e.type===f.LineSeries)&&o.series.some(e=>e.type===f.BoxPlotSeries);function ke(o,e,i){let r=[];return o.forEach(s=>{if(s.type===f.BoxPlotSeries){let{type:n,fillSymbol:t,...l}=s;r.push({...l,type:f.LineSeries,lineSymbol:{...J({width:E}),...t!==void 0?{color:t.color}:{}},markerSymbol:{...G(),...t!==void 0?{color:t.color}:{}}})}}),r.unshift(ge({x:o[0].x,y:o[0].y,seriesTemplate:i,commonStrings:e})),r}function qe(o){let e=o.slice(1),i=[];return e.forEach(r=>{if(r.type===f.LineSeries){let{type:s,lineSymbol:n,markerSymbol:t,...l}=r,a=D();i.push({...l,type:f.BoxPlotSeries,fillSymbol:{...a,color:n?.color}})}}),i}function pe(o){let{formerSeries:e,newSeries:i,showMean:r}=o,s=i,n=a=>a.type===(r?f.LineSeries:f.BoxPlotSeries),t=e.filter(n).map(a=>a.id),l=i.filter(n).map(a=>a.id);return t.length===l.length&&JSON.stringify(t)!==JSON.stringify(l)&&(s=s.sort((a,y)=>t.findIndex(c=>c===a.id)-t.findIndex(c=>c===y.id))),s}async function De(o){let{config:e,layerInfo:i,commonStrings:r,splitByField:s,numericFields:n,category:t}=o,{layer:l,layerFieldsInfo:a}=i,{fetchNullValues:y}=M(e)?.query??{},c=t??A(e),{categoriesArray:S,splitByFieldType:w}=await ce({config:e,layer:l,layerFieldsInfo:a,xAxisField:_(c)?void 0:c,aggregationFields:n,splitByField:s,fetchNullValues:y,errorStrings:r.errorStrings}),b=[],p=!1,g=Ce(e);if(S.length===0){b=ue({numericFields:n,category:c,config:e,layerInfo:i,commonStrings:r});for(let m of b)m.query&&(m.query.where=`${s}=''`)}else for(let m=0;m<S.length;m+=1){let v=S[m],q={y:n,seriesIndex:m,category:c,commonStrings:r},Q=g?Le(q):V(q),he=R({queryObject:i.layer,fieldName:s,fieldValue:v??""}),z=`${v}`,F={...Q,id:z,name:he??z,x:c===void 0||c===""?I:c,query:{...Q.query,where:`${s}=${w===ee.String&&v!==null?`'${v}'`:v}`}},x=e.series.find(we=>Se(we)===z);x!==void 0&&(e.colorMatch||(F.type===f.BoxPlotSeries?O(x)?F.fillSymbol=x.fillSymbol:F.fillSymbol={...D(),color:x.lineSymbol?.color}:O(x)?(F.lineSymbol={...J({width:E}),...x.fillSymbol!==void 0?{color:x.fillSymbol.color}:{}},F.markerSymbol={...G(),...x.fillSymbol!==void 0?{color:x.fillSymbol.color}:{}}):(F.lineSymbol=x.lineSymbol,F.markerSymbol=x.markerSymbol),p=!0),F.id=x.id,F.name=x.name),b.push(F)}if(b=pe({formerSeries:e.series,newSeries:b,showMean:Z(e)}),e.colorMatch=!p,Z(e)){let m=e.series.find(q=>q.type===f.BoxPlotSeries),v=ge({x:c,y:n,seriesTemplate:m,commonStrings:r});b.unshift(v)}return b}var so=async o=>{let{splitByField:e,numericFields:i,category:r,config:s,layerInfo:n,commonStrings:t}=o,{layerFieldsInfo:l}=n,a=Ve(r,i,e),y=ne(l),c=A(s),S=Ae(s,n,t),w=de(s,n,t),b=Me({config:s,layerInfo:n,newCategory:r}),p=Y(s);if(!y.includes(c)&&y.includes(r)?p=ie():y.includes(c)&&!y.includes(r)&&(p=oe()),p!==void 0&&ae(s,t,p),Ne(a?{newShowMeanLines:s.showMean,config:s,commonStrings:t}:{newShowMeanLines:!1,config:s,commonStrings:t}),s.series=a?await De({config:s,layerInfo:n,splitByField:e,numericFields:i,category:r,commonStrings:t}):ue({numericFields:i,config:s,layerInfo:n,category:r,commonStrings:t}),b){let g=N({fieldName:r,numericFields:i,fieldList:l})?"":B(l,r);L(s,0,g)}if(w){let g=k(s,n,t);L(s,1,g)}s?.title!==void 0&&S&&(s.title.content.text=be(s,n,t)),X({config:s,value:null,axisIndex:1,isMax:!1}),X({config:s,value:null,axisIndex:1,isMax:!0})},Te=o=>o?.standardizeValues??!1;function k(o,e,i){let{layerFieldsInfo:r}=e,s=Te(o)?i.axisLabels.standardizedValues:i.axisLabels.values,n=o?.series?.map(t=>t.y).flat();return n=[...new Set(n)],n.length===1&&(s=B(r,n[0])),s}function be(o,e,i){let{layerFieldsInfo:r}=e,s=A(o),n=fe(o),t=Oe(o),l=n.map(c=>B(r??[],c)).join(", "),a=B(r??[],s),y="";return n.length>0&&(s!==I&&t!==""?y=P(i.titleLabels.distributionOfFieldsByCategoryAndSplitBy,{valueFields:l,category:a,splitByField:t}):s!==I?y=P(i.titleLabels.distributionOfFieldsByCategory,{valueFields:l,category:a}):t!==""?y=P(i.titleLabels.distributionOfFieldsByCategory,{valueFields:l,category:t}):y=P(i.titleLabels.distributionOfField,{valueField:l})),y}var no=o=>{let{series:e,splitByField:i,layerInfo:r,commonStrings:s}=o,n=typeof e.y=="string"?B(r.layerFieldsInfo,e.y):s.axisLabels.values;return U(i)||(n=Se(e)),n=R({queryObject:r.layer,fieldName:i,fieldValue:n??""})??n,n??e.id},lo=o=>o?.showOutliers??!1,to=o=>{let{newShowOutliers:e,config:i,layerInfo:r,commonStrings:s}=o;if(i.showOutliers=e,de(i,r,s)){let n=k(i,r,s);L(i,1,n)}},ao=o=>{let{newStandardizeValues:e,config:i,layerInfo:r,commonStrings:s}=o,n=T(1,i),t=k(i,r,s),l=C(i);if(i.standardizeValues=e,n===t||l){let a=k(i,r,s);L(i,1,a)}},xe=o=>{let e=d.xAxisAsc,i=o.orderOptions?.data?.orderType??u.Category,r=o.orderOptions?.data&&"orderBy"in o.orderOptions.data?o.orderOptions.data.orderBy:h.Ascending;switch(i){case u.Category:e=Array.isArray(r)?d.customSort:r===h.Ascending?d.xAxisAsc:d.xAxisDesc;break;case u.Mean:e=r===h.Ascending?d.meanAsc:d.meanDesc;break;case u.Median:e=r===h.Ascending?d.medianAsc:d.medianDesc;break}return e},co=(o,e,i)=>{let r=u.Category,s=h.Ascending;if(e.orderOptions=e.orderOptions??{},o===d.customSort&&i!==void 0)e.orderOptions.data={orderType:u.Category,orderBy:i};else{switch(o){case d.xAxisAsc:{r=u.Category,s=h.Ascending;break}case d.xAxisDesc:{r=u.Category,s=h.Descending;break}case d.meanAsc:{r=u.Mean,s=h.Ascending;break}case d.meanDesc:{r=u.Mean,s=h.Descending;break}case d.medianAsc:{r=u.Median,s=h.Ascending;break}case d.medianDesc:{r=u.Median,s=h.Descending;break}}e.orderOptions.data={orderType:r,orderBy:s}}},Z=o=>o.showMean??!1,Ne=o=>{let{newShowMeanLines:e=!1,config:i,commonStrings:r,previousMeanLinesBoxColor:s}=o,n=e?s:Fe(i),t=(e??!1)!==(i.showMean??!1);if(i.showMean=e,t){let l;e?l=te(i.series)?ke(i.series,r):i.series:l=qe(i.series),l&&(l=pe({formerSeries:i.series,newSeries:l,showMean:e}),i.series=l)}return e&&s!==void 0&&Ie(s,i),{previousMeanLinesBoxColor:n}},yo=o=>{let e=[],i=o.orderOptions?.data?.orderType;return xe(o)===d.customSort&&i===u.Category&&(e=o.orderOptions?.data?.orderBy),e},mo=(o,e)=>{e.orderOptions??={};let i=e.orderOptions?.data?.orderType;xe(e)===d.customSort&&i===u.Category&&(e.orderOptions.data={orderType:u.Category,orderBy:o})},fo=async o=>{let{config:e,layerInfo:i,errorStrings:r}=o,s=A(e),n=Y(e)?.type,t=fe(e),l=[];return n===f.CategoryAxisFormat&&(N({fieldName:s,numericFields:t,fieldList:i.layerFieldsInfo})?l=t:_(s)||(l=await ye({layerInfo:i,config:e,category:s,errorStrings:r}))),l},_=o=>o.trim()===""||o===I,Pe=(o,e)=>e.length>1&&!_(o),Ve=(o,e,i)=>!Pe(o,e)&&i!=="";return{a:Ue,b:We,c:eo,d:Fe,e:Ie,f:oo,g:ve,h:Be,i:io,j:ro,k:A,l:Oe,m:fe,n:so,o:Te,p:k,q:be,r:no,s:lo,t:to,u:ao,v:xe,w:co,x:Z,y:Ne,z:yo,A:mo,B:fo,C:Pe,D:Ve}},"intl",a,b,c,e,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"./EYHZACXE.js";import d from"./S5OMB4EV.js";import{c as f}from"./NQAPPISU.js";import b from"./PLV3Y5I7.js";import{n as m}from"./4XN3YXIY.js";import{F as l,M as a,qa as n,sa as r}from"./6JI4NDJ6.js";import{c}from"./XOB365BI.js";export default $arcgis.t(([{substitute:C},{a:u,d:t},{a:p},{b:x}])=>{var v=s=>{t({config:s,value:null,axisIndex:0,isMax:!1}),t({config:s,value:null,axisIndex:0,isMax:!0}),t({config:s,value:null,axisIndex:1,isMax:!1}),t({config:s,value:null,axisIndex:1,isMax:!0})};function D(s,e,i){let{layerFieldsInfo:o}=e,y=m(o,g(s));return C(i.titleLabels.distributionOfField,{valueField:y})}var g=s=>s.series[0]?.x??"",E=s=>{let{numericField:e,config:i,layerInfo:o,commonStrings:y}=s,{layerFieldsInfo:b}=o,I=D(i,o,y),F=p(i),S=f(0,i),M=m(b,g(i)),d=x(i);if(v(i),i?.series?.[0]&&(i.series[0].x=e),M===S||d){let T=m(b,e);u(i,0,T)}i.title&&(I===F||d)&&(i.title.content.text=D(i,o,y))},G=s=>s.series[0]?.dataTransformationType??c.None,J=(s,e)=>{v(e),e?.series?.[0]&&(e.series[0].dataTransformationType=s)},K=s=>s.series[0]?.binCount??32,L=(s,e)=>{v(e),e?.series?.[0]&&(e.series[0].binCount=s)},P=s=>s.series[0]?.fillSymbol??r().fillSymbol,R=(s,e)=>{e?.series?.[0]&&(e.series[0].fillSymbol={...e.series[0].fillSymbol,...s})},h=s=>s.series[0]?.overlays?.comparisonDistribution?.symbol??r().overlays.comparisonDistribution?.symbol??l(),U=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.comparisonDistribution??=a(4),e.series[0].overlays.comparisonDistribution.symbol={...e.series[0].overlays.comparisonDistribution.symbol,...s}},z=s=>s.series[0]?.overlays?.mean?.symbol??r().overlays.mean?.symbol??l(),V=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.mean??=a(1),e.series[0].overlays.mean.symbol={...e.series[0].overlays.mean.symbol,...s}},A=s=>s.series[0]?.overlays?.median?.symbol??r().overlays.median?.symbol??l(),W=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.median??=a(2),e.series[0].overlays.median.symbol={...e.series[0].overlays.median.symbol,...s}},N=s=>s.series[0]?.overlays?.standardDeviation?.symbol??r().overlays.standardDeviation?.symbol??l(),Y=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.standardDeviation??=a(3),e.series[0].overlays.standardDeviation.symbol={...e.series[0].overlays.standardDeviation.symbol,...s}},_=s=>(s.series[0]?.overlays?.comparisonDistribution?.created??!1)&&(s.series[0]?.overlays?.comparisonDistribution?.visible??!1),$=(s,e)=>{let i=a(0);i.created=s,i.visible=s,i.symbol=h(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.comparisonDistribution=i)},H=s=>(s.series[0]?.overlays?.mean?.created??!1)&&(s.series[0]?.overlays?.mean?.visible??!1),X=(s,e)=>{let i=a(1);i.created=s,i.visible=s,i.symbol=z(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.mean=i)},ss=s=>(s.series[0]?.overlays?.median?.created??!1)&&(s.series[0]?.overlays?.median?.visible??!1),es=(s,e)=>{let i=a(2);i.created=s,i.visible=s,i.symbol=A(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.median=i)},is=s=>(s.series[0]?.overlays?.standardDeviation?.created??!1)&&(s.series[0]?.overlays?.standardDeviation?.visible??!1),as=(s,e)=>{let i=a(3);i.created=s,i.visible=s,i.symbol=N(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.standardDeviation=i)},rs=s=>s?.series?.[0]?.overlays,os=(s,e)=>{e?.series?.[0]!==void 0&&(e.series[0].overlays=s)};return{a:D,b:g,c:E,d:G,e:J,f:K,g:L,h:P,i:R,j:h,k:U,l:z,m:V,n:A,o:W,p:N,q:Y,r:_,s:$,t:H,u:X,v:ss,w:es,x:is,y:as,z:rs,A:os}},"intl",b,d,e)
2
+ import e from"./POLN44VP.js";import d from"./S5OMB4EV.js";import{c as f}from"./NQAPPISU.js";import b from"./PLV3Y5I7.js";import{n as m}from"./4XN3YXIY.js";import{F as l,M as a,qa as n,sa as r}from"./6JI4NDJ6.js";import{c}from"./XOB365BI.js";export default $arcgis.t(([{substitute:C},{a:u,d:t},{a:p},{b:x}])=>{var v=s=>{t({config:s,value:null,axisIndex:0,isMax:!1}),t({config:s,value:null,axisIndex:0,isMax:!0}),t({config:s,value:null,axisIndex:1,isMax:!1}),t({config:s,value:null,axisIndex:1,isMax:!0})};function D(s,e,i){let{layerFieldsInfo:o}=e,y=m(o,g(s));return C(i.titleLabels.distributionOfField,{valueField:y})}var g=s=>s.series[0]?.x??"",E=s=>{let{numericField:e,config:i,layerInfo:o,commonStrings:y}=s,{layerFieldsInfo:b}=o,I=D(i,o,y),F=p(i),S=f(0,i),M=m(b,g(i)),d=x(i);if(v(i),i?.series?.[0]&&(i.series[0].x=e),M===S||d){let T=m(b,e);u(i,0,T)}i.title&&(I===F||d)&&(i.title.content.text=D(i,o,y))},G=s=>s.series[0]?.dataTransformationType??c.None,J=(s,e)=>{v(e),e?.series?.[0]&&(e.series[0].dataTransformationType=s)},K=s=>s.series[0]?.binCount??32,L=(s,e)=>{v(e),e?.series?.[0]&&(e.series[0].binCount=s)},P=s=>s.series[0]?.fillSymbol??r().fillSymbol,R=(s,e)=>{e?.series?.[0]&&(e.series[0].fillSymbol={...e.series[0].fillSymbol,...s})},h=s=>s.series[0]?.overlays?.comparisonDistribution?.symbol??r().overlays.comparisonDistribution?.symbol??l(),U=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.comparisonDistribution??=a(4),e.series[0].overlays.comparisonDistribution.symbol={...e.series[0].overlays.comparisonDistribution.symbol,...s}},z=s=>s.series[0]?.overlays?.mean?.symbol??r().overlays.mean?.symbol??l(),V=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.mean??=a(1),e.series[0].overlays.mean.symbol={...e.series[0].overlays.mean.symbol,...s}},A=s=>s.series[0]?.overlays?.median?.symbol??r().overlays.median?.symbol??l(),W=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.median??=a(2),e.series[0].overlays.median.symbol={...e.series[0].overlays.median.symbol,...s}},N=s=>s.series[0]?.overlays?.standardDeviation?.symbol??r().overlays.standardDeviation?.symbol??l(),Y=(s,e)=>{e.series[0].overlays??=n(),e.series[0].overlays.standardDeviation??=a(3),e.series[0].overlays.standardDeviation.symbol={...e.series[0].overlays.standardDeviation.symbol,...s}},_=s=>(s.series[0]?.overlays?.comparisonDistribution?.created??!1)&&(s.series[0]?.overlays?.comparisonDistribution?.visible??!1),$=(s,e)=>{let i=a(0);i.created=s,i.visible=s,i.symbol=h(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.comparisonDistribution=i)},H=s=>(s.series[0]?.overlays?.mean?.created??!1)&&(s.series[0]?.overlays?.mean?.visible??!1),X=(s,e)=>{let i=a(1);i.created=s,i.visible=s,i.symbol=z(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.mean=i)},ss=s=>(s.series[0]?.overlays?.median?.created??!1)&&(s.series[0]?.overlays?.median?.visible??!1),es=(s,e)=>{let i=a(2);i.created=s,i.visible=s,i.symbol=A(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.median=i)},is=s=>(s.series[0]?.overlays?.standardDeviation?.created??!1)&&(s.series[0]?.overlays?.standardDeviation?.visible??!1),as=(s,e)=>{let i=a(3);i.created=s,i.visible=s,i.symbol=N(e),e?.series?.[0]?.overlays&&(e.series[0].overlays.standardDeviation=i)},rs=s=>s?.series?.[0]?.overlays,os=(s,e)=>{e?.series?.[0]!==void 0&&(e.series[0].overlays=s)};return{a:D,b:g,c:E,d:G,e:J,f:K,g:L,h:P,i:R,j:h,k:U,l:z,m:V,n:A,o:W,p:N,q:Y,r:_,s:$,t:H,u:X,v:ss,w:es,x:is,y:as,z:rs,A:os}},"intl",b,d,e)