@arcgis/charts-components 5.2.0-next.162 → 5.2.0-next.164
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.
- package/dist/cdn/{ZTMZ6GG4.js → 3BD4I5JQ.js} +1 -1
- package/dist/cdn/{TPWN3WU6.js → 3TO4L72A.js} +1 -1
- package/dist/cdn/{HYQNWCWA.js → 5OIYMIQP.js} +1 -1
- package/dist/cdn/5XXJOV3V.js +2 -0
- package/dist/cdn/{F4PYAQO2.js → 6ALZCZ36.js} +1 -1
- package/dist/cdn/{WJINSWQO.js → 6RZNHZEN.js} +1 -1
- package/dist/cdn/{QPMXPJOU.js → 6SKZWI33.js} +1 -1
- package/dist/cdn/{6PN24NZH.js → A7U4VQMX.js} +1 -1
- package/dist/cdn/{YAH2CORT.js → CDVLQX4S.js} +1 -1
- package/dist/cdn/{VBZUDWPR.js → DW44U5PH.js} +1 -1
- package/dist/cdn/{IDULNX4O.js → ETHXVKWT.js} +1 -1
- package/dist/cdn/{L3P6D53Z.js → G63YJSVM.js} +1 -1
- package/dist/cdn/{4SKI2UZ4.js → G7VDU373.js} +1 -1
- package/dist/cdn/{UQCVYMWO.js → H4XMNS3O.js} +1 -1
- package/dist/cdn/{JXJGHXNJ.js → HGJNYEUX.js} +1 -1
- package/dist/cdn/{MMYG2RYL.js → I56GEKJB.js} +1 -1
- package/dist/cdn/{57IBZI2Q.js → IL763V5P.js} +1 -1
- package/dist/cdn/{HTC5S4WI.js → KYL7MGSG.js} +1 -1
- package/dist/cdn/{DHXQHBHG.js → MGLAVOUI.js} +1 -1
- package/dist/cdn/{SNQONC4I.js → OQ4UEZRC.js} +1 -1
- package/dist/cdn/{FN2RSJVM.js → PAFLJ3WT.js} +1 -1
- package/dist/cdn/{HFXBJYPZ.js → PXU4TMFH.js} +1 -1
- package/dist/cdn/{GBJ2EWWV.js → QARQR7H5.js} +1 -1
- package/dist/cdn/{XWZLBTHL.js → RCG3QHMV.js} +1 -1
- package/dist/cdn/{KEKVMGV6.js → RGK27YR7.js} +1 -1
- package/dist/cdn/{UMPUQD5F.js → SATVPAKF.js} +1 -1
- package/dist/cdn/{KQ74SEOV.js → SNFP2PAX.js} +1 -1
- package/dist/cdn/SQHO6UMU.js +2 -0
- package/dist/cdn/{J2J3NXRC.js → U7COJZ2D.js} +1 -1
- package/dist/cdn/{AU5XPM24.js → UIE52DE3.js} +19 -19
- package/dist/cdn/{O2WFSEOJ.js → WLK4WDAW.js} +1 -1
- package/dist/cdn/{MDZELM6Q.js → WNFNL4XM.js} +1 -1
- package/dist/cdn/{BPJQFWYG.js → WX5OSLU3.js} +1 -1
- package/dist/cdn/{UN4K7L7T.js → XCZG24EM.js} +1 -1
- package/dist/cdn/{W2E7LFTT.js → XJIL6CYH.js} +1 -1
- package/dist/cdn/XP4MBNF6.js +2 -0
- package/dist/cdn/{ANON4Y5O.js → XTEZ6SCO.js} +1 -1
- package/dist/cdn/{34EBYEM7.js → XTQ4C5NA.js} +1 -1
- package/dist/cdn/{WEVL6WYI.js → XXEU3UNC.js} +1 -1
- package/dist/cdn/{32HL4LJM.js → ZCU3SS64.js} +1 -1
- package/dist/cdn/{VSD6BE2P.js → ZZXYM44J.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/action-bar-utils.js +1 -1
- package/dist/chunks/box-plot-data.js +1 -1
- package/dist/chunks/data.js +16 -16
- package/dist/chunks/generate-x-axis-title.js +9 -9
- package/dist/chunks/histogram-data.js +10 -10
- package/dist/chunks/index.js +5 -5
- package/dist/chunks/index3.js +1 -1
- package/dist/chunks/pie-chart-data.js +1 -1
- package/dist/chunks/pie-chart-model.js +162 -162
- package/dist/chunks/scatterplot-model.js +66 -65
- package/dist/chunks/serial-chart-data.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/web-component-utils.js +1 -1
- package/dist/components/arcgis-chart/customElement.js +2163 -2138
- package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +5 -5
- package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +4 -4
- package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +5 -5
- package/dist/components/arcgis-charts-config-histogram-data/customElement.js +3 -3
- package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +6 -6
- package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +5 -5
- package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +5 -5
- package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +5 -5
- package/dist/components/arcgis-charts-config-pie-chart/customElement.js +38 -34
- package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +1 -1
- package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/spec/rest-js-types.d.ts +1 -5
- package/dist/utils/chart-config/converter/index.js +18 -18
- package/package.json +4 -4
- package/dist/cdn/E6TZMNXL.js +0 -2
- package/dist/cdn/NW7U6HWL.js +0 -2
- package/dist/cdn/YFDABY5Y.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import x from"./
|
|
2
|
+
import x from"./MGLAVOUI.js";import w from"./7P6O2RHA.js";import"./K4GPJ36N.js";import v from"./RCG3QHMV.js";import u from"./ETHXVKWT.js";import t from"./JR2RRIKO.js";import s from"./H4XMNS3O.js";import r from"./IL763V5P.js";import q from"./ENSGJAYI.js";import p from"./ZDM5IDLI.js";import o from"./5RI6YXV2.js";import n from"./G63YJSVM.js";import k from"./DW44U5PH.js";import j from"./3TO4L72A.js";import i from"./CDVLQX4S.js";import"./O4TPXFX4.js";import h from"./AZ2Z7W7G.js";import g from"./TWAPMNSX.js";import f from"./XTQ4C5NA.js";import e from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import{C as c,ca as l,i as S,oa as d}from"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as m}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Cc:o,Zb:y},,{e:g},,,,,,,,,,,,,,{ta:f},{b:u,c:p,e:b},{b:I,d:v,f:_,h:k,j:x,t:w},L])=>{var F=Object.defineProperty,M=Object.getOwnPropertyDescriptor,D=(a,e,s,t)=>{for(var i=M(e,s),r=a.length-1,h;r>=0;r--)(h=a[r])&&(i=h(e,s,i)||i);return i&&F(e,s,i),i},n=class extends b{constructor(){super(...arguments),this._chartType=m.LineSeries}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&await this.rebuildSeries(),this.initDefaultSeries(),typeof this.resolveSetup=="function"&&this.resolveSetup()}generateDefaultConfig(){let e=d(this.commonStrings);return e.series=[l({commonStrings:this.commonStrings,objectIDField:o(this.layerInfo.layer).idField})],e}initDefaultSeries(){this.defaultSeries=l({commonStrings:this.commonStrings,objectIDField:o(this.layerInfo.layer).idField})}resetSeriesStyling(){for(let e=0;e<this.seriesLength;e+=1){let s=c({colorIndex:e,opacity:S});if(p(s,e,this._config),_(s,e,this._config),this.layerInfo!==void 0){let t=this.getSeriesId(e),i=f({config:this._config,seriesIndex:e,layerInfo:this.layerInfo,commonStrings:this.commonStrings});i!==o(this.layerInfo.layer).idField&&u(i??t,e,this._config)}I({style:this.defaultSeries?.lineSymbol?.style,seriesIndex:e,config:this._config}),v({width:this.defaultSeries?.lineSymbol?.width,seriesIndex:e,config:this._config}),k({style:this.defaultSeries?.markerSymbol?.style,seriesIndex:e,config:this._config}),x({size:this.defaultSeries?.markerSymbol?.size,seriesIndex:e,config:this._config})}this._config.colorMatch=!0}resetAvailable(){let e=!this.colorMatch,s=!1;if(!e)for(let t=0;t<this.seriesLength;t+=1){if(this.layerInfo!==void 0){let i=f({config:this._config,seriesIndex:t,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),r=this.getSeriesName(t);i!==void 0&&i!==this.layerInfo.objectIdField&&i!==r&&(s=!0)}if(this.defaultSeries?.lineSymbol?.style!==void 0&&this.defaultSeries?.lineSymbol.style!==this.getSeriesLineStyle(t)||this.defaultSeries?.lineSymbol?.width!==void 0&&this.defaultSeries?.lineSymbol.width!==this.getSeriesLineWidth(t)||this.defaultSeries?.markerSymbol?.style!==void 0&&this.defaultSeries?.markerSymbol?.style!==this.getSeriesMarkerStyle(t)||this.defaultSeries?.markerSymbol?.size!==void 0&&this.defaultSeries?.markerSymbol?.size!==this.getSeriesMarkerSize(t)){s=!0;break}}return e||s}};D([g],n.prototype,"resetSeriesStyling");var j=[w,L];y(n,j);return n},a,b,e,f,g,h,i,j,k,n,o,p,q,r,s,t,u,v,w,x)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import p from"./
|
|
2
|
+
import p from"./QARQR7H5.js";import o from"./IL763V5P.js";import n from"./ENSGJAYI.js";import m from"./ZDM5IDLI.js";import l from"./5RI6YXV2.js";import k from"./DW44U5PH.js";import j from"./3TO4L72A.js";import i from"./CDVLQX4S.js";import"./O4TPXFX4.js";import f from"./AZ2Z7W7G.js";import e from"./TWAPMNSX.js";import d from"./XTQ4C5NA.js";import c from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import{xa as g}from"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as h}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Zb:y},,{e:e},,,z,{b:Y,d:Z,f:$},{b:U,d:V,f:X},{d:J,e:K},,{b:tt},{a:A,b:L,c:B,d:G},{a:Q,b:R},{A:q,a:c,b:p,c:f,d:l,e:d,f:u,g:v,h:_,i:b,j:S,k:w,l:O,m:D,n:C,o:M,p:T,q:E,r:F,s:W,t:j,u:x,v:I,w:N,x:H,y:P,z:k}])=>{var st=Object.defineProperty,et=Object.getOwnPropertyDescriptor,o=(a,t,i,rt)=>{for(var r=et(t,i),n=a.length-1,m;n>=0;n--)(m=a[n])&&(r=m(t,i,r)||r);return r&&st(t,i,r),r},s=class extends z{constructor(){super(...arguments),this._chartType=h.HistogramSeries}async setup(t){await this.loadConfigFromLayer(t),typeof this.resolveSetup=="function"&&this.resolveSetup()}get numericField(){return p(this._config)}set numericField(t){f({numericField:t,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get binCount(){return u(this._config)}set binCount(t){v(t,this._config),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get binSymbol(){return _(this._config)}set binSymbol(t){b(t,this._config)}get dataTransformationType(){return l(this._config)}set dataTransformationType(t){d(t,this._config),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get meanSymbol(){return O(this._config)}set meanSymbol(t){D(t,this._config)}get medianSymbol(){return C(this._config)}set medianSymbol(t){M(t,this._config)}get normalDistSymbol(){return S(this._config)}set normalDistSymbol(t){w(t,this._config)}get standardDevSymbol(){return T(this._config)}set standardDevSymbol(t){E(t,this._config)}get showNormalDistOverlay(){return F(this._config)}set showNormalDistOverlay(t){W(t,this._config)}get showMeanOverlay(){return j(this._config)}set showMeanOverlay(t){x(t,this._config)}get showMedianOverlay(){return I(this._config)}set showMedianOverlay(t){N(t,this._config)}get showStandardDevOverlay(){return H(this._config)}set showStandardDevOverlay(t){P(t,this._config)}get seriesOverlays(){return k(this._config)}set seriesOverlays(t){q(t,this._config)}generateChartTitle(){return c(this._config,this.layerInfo,this.commonStrings)}generateDefaultConfig(){return g(this.commonStrings)}};o([e],s.prototype,"numericField");o([e],s.prototype,"binCount");o([e],s.prototype,"binSymbol");o([e],s.prototype,"dataTransformationType");o([e],s.prototype,"meanSymbol");o([e],s.prototype,"medianSymbol");o([e],s.prototype,"normalDistSymbol");o([e],s.prototype,"standardDevSymbol");o([e],s.prototype,"showNormalDistOverlay");o([e],s.prototype,"showMeanOverlay");o([e],s.prototype,"showMedianOverlay");o([e],s.prototype,"showStandardDevOverlay");o([e],s.prototype,"seriesOverlays");var ot=[Q,A,L,B,G,tt,R,Y,J,Z,K,U,V,X,$];y(s,ot);return s},a,b,c,d,e,f,i,j,k,l,m,n,o,p)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as k}from"./Y5CHG4IT.js";import{a as $}from"./KSDJFASU.js";import{b as
|
|
2
|
+
import{a as k}from"./Y5CHG4IT.js";import{a as $}from"./KSDJFASU.js";import{b as _,c as B}from"./RP6LD7CU.js";import c from"./BWLIKQZM.js";import{f as s}from"./POA2XTTK.js";import{a as f}from"./WZFDIC2M.js";import b from"./7DHOI5P2.js";import{Aa as x,Ba as E}from"./43DLRSYB.js";import{a as I}from"./KX7KGXKQ.js";import{b as v}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as p,B as P,C as o,H as F,g as L,i as a,n as u,z as h}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{k as r,o as m}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Dc:b,Ec:D,Gc:T,Hc:z,hc:A,mc:S},{a:w,c:C,g:K,k:d,o:N}])=>{var H=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)}.name{display:flex;flex-direction:column;margin:.5rem;padding:.5rem;background:#fff;min-width:250px}.header{margin:0;font-weight:bolder}.fab{display:flex;justify-content:stretch}.popover-pick-list{font-size:small;max-width:var(--arcgis-charts-config-popover-pick-list-max-width)}.sort-icon-color{color:#000}.sort-y-axis{transform:rotate(90deg)}calcite-panel{max-height:60vh}calcite-panel .size-section{width:19rem;margin:1rem 0;display:flex;flex-wrap:wrap;justify-content:space-evenly}calcite-panel .size-section calcite-label{width:8rem;margin-bottom:.25rem}calcite-panel .apply-button{width:17rem}`,c={name:"line-chart-data-popover",header:"header",fab:"fab",popoverPickList:"popover-pick-list",sizeSection:"size-section",applyButton:"apply-button"},y=class extends P{constructor(){super(...arguments),this._messages=f(),this.commonStrings=f({name:"common",blocking:!0}),this.picklist=h(),this.intervalSizeElement=h(),this.intervalTypeElement=h(),this.popoverElement=h(),this.placement="leading",this.offsetDistance=-200,this.pickListHasChanged=!1,this.open=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigLineChartDataPopoverChange=u(),this.arcgisChartsConfigLineChartPopoverClose=u()}static{this.properties={aggregationLabels:16,timeAggregationLabels:16,messageOverrides:0,headingTitle:1,referenceElement:0,open:5,contentKind:1,layerFieldsInfo:0,selectedContent:1}}static{this.styles=H}async reposition(){await this.popoverElement.value?.reposition()}willUpdate(e){e.has("selectedContent")&&this.selectedContentChange(this.selectedContent,e.get("selectedContent"));let t=C.map(n=>x(n,this.commonStrings));v(this.aggregationLabels,t)||(this.aggregationLabels=t);let i=[m.Start,m.End].map(n=>E(n,this.commonStrings));v(this.timeAggregationLabels,i)||(this.timeAggregationLabels=i)}updated(){setTimeout(()=>{typeof this.picklist.value?.setFocus=="function"&&this.picklist.value?.setFocus()},w.PopoverTimer),_(this.popoverElement.value,this.open)}selectedContentChange(e,t){this.pickListHasChanged=B(e,t)}buildAggregationPickListItems(){return k(C,e=>e,(e,t)=>a`<calcite-list-item .label=${this.aggregationLabels?.[t]} .value=${e} .selected=${d(e,this.selectedContent)}></calcite-list-item>`)}buildIntervalAlignmentPickListItems(){let e=[m.Start,m.End];return k(e,t=>t,(t,i)=>a`<calcite-list-item .label=${this.timeAggregationLabels?.[i]} .value=${t} .selected=${d(t,this.selectedContent)}></calcite-list-item>`)}buildPickListItem(e){return $(e.name,a`<calcite-list-item .label=${A(this.layerFieldsInfo,e.name)} .value=${e.name} .selected=${d(e.name,this.selectedContent)}></calcite-list-item>`)}buildPickListItems(e){let t=this.layerFieldsInfo?.length??0,i=[];switch(e){case s.numericFields:{for(let n=0;n<t;n+=1){let l=this.layerFieldsInfo?.[n];l&&b(l)&&i.push(this.buildPickListItem(l))}break}case s.xAxisField:{for(let n=0;n<t;n+=1){let l=this.layerFieldsInfo?.[n];l&&(b(l)||D(l)||T(l))&&i.push(this.buildPickListItem(l))}break}case s.splitByField:{let n=$(" ",a`<calcite-list-item label=" " value=" " .selected=${d("",this.selectedContent)}></calcite-list-item>`);i.push(n);for(let l=0;l<t;l+=1){let g=this.layerFieldsInfo?.[l];g&&(z(g)||g.type===I.String)&&i.push(this.buildPickListItem(g))}break}}return i}closePopover(){if(this.contentKind===s.numericFields&&this.pickListHasChanged){let e={pickListElement:this.picklist.value,eventEmitter:this.arcgisChartsConfigLineChartDataPopoverChange,contentKind:this.contentKind};N(e)}this.open=!1,this.arcgisChartsConfigLineChartPopoverClose.emit()}onDataContentTypeChange(e){this.pickListHasChanged=!0;let t=e.target.selectedItems;this.arcgisChartsConfigLineChartDataPopoverChange.emit({contentKind:this.contentKind,value:t.map(i=>i.value)}),this.open=!1}intervalChange(){let e=Number.parseInt(this.intervalSizeElement.value?.value??""),t=this.intervalTypeElement.value?.selectedOption?.value;!Number.isNaN(e)&&e>0&&this.arcgisChartsConfigLineChartDataPopoverChange.emit({contentKind:this.contentKind,value:[{intervalSize:e,intervalUnits:t}]}),this.open=!1}onNumericFieldsChange(e){e.target!==null&&(this.selectedContent=e.target.selectedItems.map(t=>t.value))}onNumericFieldSelectionDone(){this.closePopover()}renderAggregationType(){let e=this.buildAggregationPickListItems();return a`<calcite-list label class=${o(c.popoverPickList)} selection-mode=single selection-appearance=border @calciteListChange=${this.onDataContentTypeChange}>${e}</calcite-list>`}renderXAxisField(){let e=this.buildPickListItems(s.xAxisField);return a`<calcite-list label class=${o(c.popoverPickList)} selection-mode=single selection-appearance=border filter-enabled @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderNumericFields(){let e=this.buildPickListItems(s.numericFields);return a`<calcite-list label class=${o(c.popoverPickList)} selection-mode=multiple filter-enabled @calciteListChange=${this.onNumericFieldsChange} ${p(this.picklist)}>${e}</calcite-list>`}renderSplitByField(){let e=this.buildPickListItems(s.splitByField);return a`<calcite-list label class=${o(c.popoverPickList)} selection-mode=single selection-appearance=border filter-enabled @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderIntervalAlignment(){let e=this.buildIntervalAlignmentPickListItems();return a`<calcite-list label class=${o(c.popoverPickList)} selection-mode=single selection-appearance=border @calciteListChange=${this.onDataContentTypeChange}>${e}</calcite-list>`}renderInterval(){let e=this.selectedContent,t=[r.Second,r.Minute,r.Hour,r.Day,r.Week,r.Month,r.Year];return a`<div><div class=${o(c.sizeSection)}><calcite-label scale=m>${this._messages.intervalSize}<calcite-input type=number scale=m min=1 step=any .value=${K(e?.size,1)} ${p(this.intervalSizeElement)}></calcite-input></calcite-label><calcite-label scale=m>${this._messages.intervalType}<calcite-select .label=${this._messages.intervalType??""} ${p(this.intervalTypeElement)}>${t.map(i=>a`<calcite-option .value=${i} .label=${S(i,this._messages)} .selected=${e?.unit===i}></calcite-option>`)}</calcite-select></calcite-label><calcite-button class=${o(c.applyButton)} appearance=outline @click=${this.intervalChange}>${this._messages.apply}</calcite-button></div></div>`}renderPopoverInfo(){let e;switch(this.contentKind){case s.aggregation:e=this.renderAggregationType();break;case s.xAxisField:e=this.renderXAxisField();break;case s.numericFields:e=this.renderNumericFields();break;case s.splitByField:e=this.renderSplitByField();break;case s.intervalAlignment:e=this.renderIntervalAlignment();break;case s.interval:e=this.renderInterval();break}return e}render(){let e;return this.contentKind===s.numericFields&&(e=a`<div slot=footer><calcite-fab class=${o(c.fab)} appearance=outline-fill kind=neutral .icon=${void 0} .label=${this._messages.selectionDone} scale=s text-enabled .text=${this._messages.selectionDone} @click=${this.onNumericFieldSelectionDone}></calcite-fab></div>`),a`<div><calcite-popover class=${o(c.name)} .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .offsetDistance=${this.offsetDistance} @calcitePopoverClose=${this.closePopover} .open=${this.open} label auto-close ${p(this.popoverElement)}><calcite-panel closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div slot=header-content class=${o(c.header)}>${this.headingTitle??""}</div>${this.renderPopoverInfo()}${e}</calcite-panel></calcite-popover></div>`}};F("arcgis-charts-config-line-chart-popover",y);return y},b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import h from"./BWLIKQZM.js";import"./POA2XTTK.js";import{a as A}from"./WZFDIC2M.js";import g from"./5RI6YXV2.js";import f from"./
|
|
2
|
+
import h from"./BWLIKQZM.js";import"./POA2XTTK.js";import{a as A}from"./WZFDIC2M.js";import g from"./5RI6YXV2.js";import f from"./CDVLQX4S.js";import{j as r,l as o,p as n}from"./O4TPXFX4.js";import e from"./XTQ4C5NA.js";import d from"./LEUIZWRV.js";import c from"./3L5TASX6.js";import b from"./7DHOI5P2.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{q as v}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as u,B as C,C as i,H as $,g as T,i as l,z as p}from"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{e as a}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([,,,,{a:c,c:m,e:g},{d:f},{h:y,i:b}])=>{var s={textInput:"text-input",label:"label",labelContainer:"label-container",select:"select"},I=T`.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;margin-top:var(--arcgis-charts-top-section-margin)}.text-input,.select{margin-bottom:var(--arcgis-charts-inter-section-margin)}.label{display:flex;justify-content:space-between}.label-container{display:flex;flex-direction:column;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}`,x=class extends C{constructor(){super(...arguments),this._messages=A(),this.characterLimitInputElement=p(),this.onModelConfigChange=()=>{this.requestUpdate()},this.resetChartTitleToBeDynamic=()=>{let e=this.model.generateChartTitle();this.model.titleText=e,this.disableResetButtonForChartTitle=!1},this.resetXAxisTitleToBeDynamic=()=>{if(c(this.model)&&g(this.model)){let e=this.model.generateXAxisTitle();this.model.xAxisTitleText=e}this.disableResetButtonForXAxisTitle=!1},this.resetYAxisTitleToBeDynamic=()=>{if(o(this.model)){let e=r(this.model)?this.model.getDefaultXAxisTitleText():this.model.generateYAxisTitle();this.model.setAxisTitleText(e,1)}this.disableResetButtonForYAxisTitle=!1},this.isPartialConfig=!1,this.disableResetButtonForChartTitle=!1,this.disableResetButtonForXAxisTitle=!1,this.disableResetButtonForYAxisTitle=!1,this.isChartTitleInvalid=!1,this.open=!1}static{this.properties={disableResetButtonForChartTitle:16,disableResetButtonForXAxisTitle:16,disableResetButtonForYAxisTitle:16,isChartTitleInvalid:16,messageOverrides:0,model:0,open:5}}static{this.styles=I}load(){this.modelChange(this.model)}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),this.handleResetButtons()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}handleResetButtons(){this.isPartialConfig=f(this.model.config);let e=this.model.generateChartTitle(),t=this.model.titleText;if(this.disableResetButtonForChartTitle=this.isPartialConfig||e===t,c(this.model)&&g(this.model)){let h=this.model.generateXAxisTitle(),d=this.model.xAxisTitleText;this.disableResetButtonForXAxisTitle=this.isPartialConfig||h===d}if(o(this.model)){let h=r(this.model)?this.model.getDefaultXAxisTitleText():this.model.generateYAxisTitle(),d=this.model.getAxisTitleText(1);this.disableResetButtonForYAxisTitle=this.isPartialConfig||h===d}}modelChange(e,t){t?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}setChartTitle(e){let{value:t}=e.target;this.isChartTitleInvalid=v(t.trim()),this.characterLimitInputElement.value&&y({inputElement:this.characterLimitInputElement.value,status:this.isChartTitleInvalid?b.INVALID:b.IDLE}),this.isChartTitleInvalid||(this.model.titleText=t)}setChartLegendTitle(e){let{value:t}=e.target;t!==void 0&&n(this.model)&&(this.model.legendTitleText=t)}setChartXAxisTitle(e){let{value:t}=e.target;t!==void 0&&c(this.model)&&(this.model.xAxisTitleText=t)}setChartYAxisTitle(e){let{value:t}=e.target;t!==void 0&&o(this.model)&&this.model.setAxisTitleText(t,1)}setChartDescription(e){let{value:t}=e.target;t!==void 0&&(this.model.descriptionText=t)}enableChartTitle(e){let t=e.target.checked;this.model.chartTitleVisibility=t}enableXAxisTitle(e){let t=e.target.checked;m(this.model)&&(this.model.xAxisTitleVisibility=t)}enableYAxisTitle(e){let t=e.target.checked;o(this.model)&&this.model.setAxisTitleVisibility(t,1)}enableLegendTitle(e){let t=e.target.checked;n(this.model)&&(this.model.legendTitleVisibility=t)}enableDescription(e){let t=e.target.checked;this.model.descriptionVisibility=t}legendPositionChange(e){let t=e.target?.selectedItems[0]?.value;n(this.model)&&(this.model.legendPosition=t)}renderLegendPositions(){return n(this.model)?[l`<calcite-combobox-item .value=${a.Right} .heading=${this._messages.legendRightPosition??""} .selected=${this.model.legendPosition===a.Right} icon=right-edge></calcite-combobox-item>`,l`<calcite-combobox-item .value=${a.Left} .heading=${this._messages.legendLeftPosition??""} .selected=${this.model.legendPosition===a.Left} icon=left-edge></calcite-combobox-item>`,l`<calcite-combobox-item .value=${a.Top} .heading=${this._messages.legendTopPosition??""} .selected=${this.model.legendPosition===a.Top} icon=upload-to></calcite-combobox-item>`,l`<calcite-combobox-item .value=${a.Bottom} .heading=${this._messages.legendBottomPosition??""} .selected=${this.model.legendPosition===a.Bottom} icon=download-to></calcite-combobox-item>`]:[]}render(){return l`<div class=${i(s.labelContainer)}><calcite-label layout=inline-space-between class=${i(s.label)}>${this._messages.chartTitle}<div><calcite-button @click=${this.resetChartTitleToBeDynamic} .disabled=${this.disableResetButtonForChartTitle} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button><calcite-switch .checked=${this.model.chartTitleVisibility} @calciteSwitchChange=${this.enableChartTitle}></calcite-switch></div></calcite-label><calcite-input class=${i(s.textInput)} type=text .disabled=${!this.model.chartTitleVisibility} .value=${this.isPartialConfig?"":this.model.titleText} @calciteInputInput=${this.setChartTitle} ${u(this.characterLimitInputElement)}></calcite-input><arcgis-charts-config-invalid-input-message .invalidInputMessage=${this._messages.emptyChartTitle} .isInvalid=${this.isChartTitleInvalid}></arcgis-charts-config-invalid-input-message></div>${c(this.model)&&m(this.model)?[l`<div class=${i(s.labelContainer)}><calcite-label layout=inline-space-between class=${i(s.label)}>${this._messages.xAxisTitle}<div><calcite-button @click=${this.resetXAxisTitleToBeDynamic} .disabled=${this.disableResetButtonForXAxisTitle} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button><calcite-switch .checked=${this.model.xAxisTitleVisibility} @calciteSwitchChange=${this.enableXAxisTitle}></calcite-switch></div></calcite-label><calcite-input class=${i(s.textInput)} type=text .disabled=${!this.model.xAxisTitleVisibility} .value=${this.isPartialConfig?"":this.model.xAxisTitleText} @calciteInputInput=${this.setChartXAxisTitle}></calcite-input></div>`,o(this.model)?l`<div class=${i(s.labelContainer)}><calcite-label layout=inline-space-between class=${i(s.label)}>${this._messages.yAxisTitle}<div><calcite-button @click=${this.resetYAxisTitleToBeDynamic} .disabled=${this.disableResetButtonForYAxisTitle} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button><calcite-switch .checked=${this.model.getAxisTitleVisibility(1)} @calciteSwitchChange=${this.enableYAxisTitle}></calcite-switch></div></calcite-label><calcite-input class=${i(s.textInput)} tabindex=1 type=text .disabled=${!this.model.getAxisTitleVisibility(1)} .value=${this.model.getAxisTitleText(1)} @calciteInputInput=${this.setChartYAxisTitle}></calcite-input></div>`:null]:null}${n(this.model)?l`<div class=${i(s.labelContainer)}><calcite-label layout=inline-space-between class=${i(s.label)}>${this._messages.legendTitle}<calcite-switch .checked=${this.model.legendTitleVisibility} @calciteSwitchChange=${this.enableLegendTitle}></calcite-switch></calcite-label><calcite-input class=${i(s.textInput)} type=text .disabled=${!this.model.legendTitleVisibility} .value=${this.model.legendTitleText} @calciteInputInput=${this.setChartLegendTitle}></calcite-input></div>`:null}<div class=${i(s.labelContainer)}><calcite-label layout=inline-space-between class=${i(s.label)}>${this._messages.legendPosition}</calcite-label><calcite-combobox clear-disabled label class=${i(s.select)} @calciteComboboxChange=${this.legendPositionChange} selection-mode=single>${this.renderLegendPositions()}</calcite-combobox></div><div class=${i(s.labelContainer)}><calcite-label layout=inline-space-between class=${i(s.label)}>${this._messages.description}<calcite-switch .checked=${this.model.descriptionVisibility} @calciteSwitchChange=${this.enableDescription}></calcite-switch></calcite-label><calcite-text-area .disabled=${!this.model.descriptionVisibility} .value=${this.model.descriptionText} @calciteTextAreaInput=${this.setChartDescription} resize=vertical></calcite-text-area></div>`}};$("arcgis-charts-config-general",x);return x},b,c,d,e,f,g,h)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import v from"./7IIIIZMH.js";import{a as te}from"./L7CMLBHB.js";import{a as ae}from"./Y5CHG4IT.js";import{a as w}from"./KSDJFASU.js";import{a as ie}from"./RP6LD7CU.js";import u from"./32HL4LJM.js";import{a as $,b as J,e as W}from"./OBPAQN4H.js";import{a as f}from"./DRYZWCWX.js";import t from"./BWLIKQZM.js";import{d as c}from"./POA2XTTK.js";import{a as I}from"./WZFDIC2M.js";import s from"./ZTMZ6GG4.js";import r from"./GBJ2EWWV.js";import p from"./6PN24NZH.js";import{a as Q}from"./KEKVMGV6.js";import"./K4GPJ36N.js";import m from"./IDULNX4O.js";import l from"./JR2RRIKO.js";import k from"./UQCVYMWO.js";import i from"./5RI6YXV2.js";import{b as j,c as P,i as q,l as B,p as L,r as K}from"./O4TPXFX4.js";import g from"./TWAPMNSX.js";import e from"./34EBYEM7.js";import d from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{b as M,d as U}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A,B as V,C as h,D as _,F as S,H as z,g as F,i as n,n as C,z as N}from"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as o,k as H}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{substitute:le},{Fb:X,kc:G,l:R,s:O,t:b,tc:v,ya:x},,,,,{d:T},,{a:Y},,,,,{r:ee},{e:y,f:Z},{b:k}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function se(m,e){let t=new Set,a=e;return m?.forEach((i,s)=>{let r=i.chartId;(t.has(r)||r===void 0||r==="")&&(i.chartId=`Chart_${Date.now()}_${s}`,e===r&&(a=i.chartId)),t.add(r)}),a}function oe(m){let{layerRasterInfo:e,layerId:t,layerType:a}=m,i=[];return O(a)&&t!==void 0?(i=[o.HistogramSeries,o.ScatterSeries],e?.attributeTable&&i.push(o.BarSeries)):a==="parquet"?i=[o.BarSeries,o.LineSeries,o.PieSeries,o.HistogramSeries]:i=[o.HistogramSeries,o.BarSeries,o.BoxPlotSeries,o.HeatSeries,o.LineSeries,o.PieSeries,o.ScatterSeries],i}function ce(m){let{modelList:e,layerList:t,activeLayerId:a,disableEditing:i}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),i||t.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!a||r.id===a)}function ne(m,e){m.forEach(t=>{e.forEach(a=>{t?.id===a.layer?.id&&re(t,a)})})}function re(m,e){let t=m;if(t){let a=[...t?.charts??[]],i=a?.findIndex(r=>r.id===e.chartId),s=!1;i!==void 0&&i>-1?(s=!M(a[i],e.config),a[i]=e.config):t&&!T(e.config)&&(s=!0,a.push(e.config)),s&&(t.charts=a)}}function he(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 de(m,e){let t=m;if(t){let a=[...t.charts??[]];a=v({arrayA:a,arrayB:e.map(i=>i.config),getKey:i=>i.id??i.title?.content.text??""}),t.charts=a}}var me=F`.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}`,D=class extends V{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=N(),this._messages=I(),this.commonStrings=I({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 o.HistogramSeries:if(this.chartData=a,i&&(i.dataStore.chartData=a,b(i.layer))){let r=i,l=a?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=a,i&&(i.dataStore.chartData=a);break}case o.ScatterSeries:{let r=a,{dataItems:l,r2:p,aggregated:g}=r,u=p;Number.isFinite(p)||(u=void 0),this.r2=u,q(i)&&(i.dataStore.r2=u,i.dataStore.aggregated=g,g&&(i.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=a;(P(s)||j(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&&W($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}}},this.chartAxesMinMaxChange=e=>{let t=e,{bounds:a,model:i}=t.detail,s=this.getModel(this.selectedChartId),r=i?.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=a,i&&(i.dataStore.calculatedMinMaxBounds=a),this.updateAxesBoundsInAppState(a);break}},this.chartSeriesColorChange=e=>{let t=e,{colorMatchApplied:a,data:i,model:s}=t.detail,r=this.getModel(this.selectedChartId);if(s?.isSameChartAs(r))switch(r?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=i,s&&(s.dataStore.seriesColor=i),this.applyNullCategorySeriesColor({colorMatchApplied:a,data:i,model:r});break;case o.PieSeries:{let l=new Map([[0,i]]);this.seriesColor=l,s&&(s.dataStore.seriesColor=l);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let t=e,{propName:a,value:i,model:s}=t.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(a){case"rotation":typeof i=="boolean"&&Y(r)&&(r.rotated=i);break;case"legendPosition":typeof i=="string"&&L(r)&&(r.legendPosition=i);break;case"legendVisibility":typeof i=="boolean"&&L(r)&&(r.legendVisibility=i);break}},this.chartLegendItemVisibilityChange=e=>{let t=e,{legendItemVisibility:a,model:i}=t.detail,s=this.modelList.find(r=>i?.isSameChartAs(r));s?.setSeriesVisibility(a),B(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),P(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;re(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}],view:0,r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:Z}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=me}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;K(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=U(R.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=v({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&&de(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 p=await i.createFeatureLayer();if(!p)continue;i=p}let s=i.charts,r=b(i)?await x(i):void 0,l=oe({layerRasterInfo:r,layerId:i.id,layerType:i.type});for(let p of s??[]){let g;G(l,p)&&(g=await Q({layer:i,config:p,commonStrings:this.commonStrings})),g&&e.push(g)}}se(e),e.forEach(i=>{a.find(s=>s.isSameChartAs(i))===void 0&&a.push(i)}),this.modelList=a}modelListChange(e,t){this.selectedChartId=se(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?k({chartType:a.chartType,commonStrings:this.commonStrings,config:a.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&ne(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=c.Data;let t=this.getModel(e);this.setEventBasedPropsFromModelData(t),this.currentChartTypeText=t?.chartType!==void 0?k({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",e!==void 0&&e!==$.selectedChartId&&($.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=X({chartConfig:t,chartData:e}),{minY:s,maxY:r,minX:l,maxX:p}=i;a=[{isXAxis:!0,minimum:l,maximum:p},{isXAxis:!1,minimum:s,maximum:r}]}return a}updateAxesBoundsInAppState(e){e?.forEach(t=>{let{isXAxis:a,maximum:i,minimum:s}=t,r=this.getModel(this.selectedChartId);if(r!==void 0&&B(r)&&this.selectedChartId!==void 0){let l=new te(r,a),p=J({chartId:this.selectedChartId,isXAxis:a,isLogarithmic:l.getLogarithmic()}),g=$.chartAxesBoundDataMap;g[this.selectedChartId]===void 0&&(g[this.selectedChartId]={});let u=g[this.selectedChartId]?.[p],E={defaultMinBound:u?.defaultMinBound===u?.currMinBound?s:u?.defaultMinBound,currMinBound:s,defaultMaxBound:u?.defaultMaxBound===u?.currMaxBound?i:u?.defaultMaxBound,currMaxBound:i};!M(u,E)&&this.selectedChartId!==void 0&&g?.[this.selectedChartId]!==void 0&&(g[this.selectedChartId][p]=E)}})}getPlacement(e){let t;return this.popoverPlacement!==void 0?t=this.popoverPlacement:t=e<=2?"bottom":"top",t}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:t,layer:a}=e.detail;this.removeSelectChartTypePopover();let i=oe({layerId:a?.id,layerType:a?.type,layerRasterInfo:b(a)?await x(a):void 0}),s=this.getPlacement(i.length);this.selectChartTypePopover=S(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${t} open .layerId=${a?.id?.toString()} .layerType=${a?.type} .supportedChartTypes=${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=ie(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!T(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&&he(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=S(n`<calcite-tooltip style=${_({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${t} open placement=top>${a}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){ee(this.tooltip)}renderViewCharts(){let e=ce({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ae(e,t=>t.id,t=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${this.modelList.filter(a=>a.layer?.id===t.id)} .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:n`<calcite-flow>${w("charts-list",n`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${A(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 w("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=${this._messages.series??""}></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=${this._messages.series??""}></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=${this._messages.series??""}></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=${this._messages.slices??""}></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=${this._messages.axes??""}></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=${this._messages.guides??""}></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=${this._messages.format??""}></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=${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 o.BarSeries:a=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:a=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:a=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .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:a=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:a=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .view=${this.view} .page=${this.selectedPanel??c.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:a=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:a=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data}></arcgis-charts-config-heat-chart>`;break}return a}};z("arcgis-charts-config-create-flow",D);return D},"intl",a,b,d,e,g,i,k,l,m,p,r,s,t,u,v)
|
|
2
|
+
import v from"./7IIIIZMH.js";import{a as te}from"./L7CMLBHB.js";import{a as ae}from"./Y5CHG4IT.js";import{a as w}from"./KSDJFASU.js";import{a as ie}from"./RP6LD7CU.js";import u from"./ZCU3SS64.js";import{a as $,b as J,e as W}from"./OBPAQN4H.js";import{a as f}from"./DRYZWCWX.js";import t from"./BWLIKQZM.js";import{d as c}from"./POA2XTTK.js";import{a as I}from"./WZFDIC2M.js";import s from"./3BD4I5JQ.js";import r from"./QARQR7H5.js";import p from"./A7U4VQMX.js";import{a as Q}from"./RGK27YR7.js";import"./K4GPJ36N.js";import m from"./ETHXVKWT.js";import l from"./JR2RRIKO.js";import k from"./H4XMNS3O.js";import i from"./5RI6YXV2.js";import{b as j,c as P,i as q,l as B,p as L,r as K}from"./O4TPXFX4.js";import g from"./TWAPMNSX.js";import e from"./XTQ4C5NA.js";import d from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{b as M,d as U}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A,B as V,C as h,D as _,F as S,H as z,g as F,i as n,n as C,z as N}from"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as o,k as H}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{substitute:le},{Fb:X,kc:G,l:R,s:O,t:b,tc:v,ya:x},,,,,{d:T},,{a:Y},,,,,{r:ee},{e:y,f:Z},{b:k}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function se(m,e){let t=new Set,a=e;return m?.forEach((i,s)=>{let r=i.chartId;(t.has(r)||r===void 0||r==="")&&(i.chartId=`Chart_${Date.now()}_${s}`,e===r&&(a=i.chartId)),t.add(r)}),a}function oe(m){let{layerRasterInfo:e,layerId:t,layerType:a}=m,i=[];return O(a)&&t!==void 0?(i=[o.HistogramSeries,o.ScatterSeries],e?.attributeTable&&i.push(o.BarSeries)):a==="parquet"?i=[o.BarSeries,o.LineSeries,o.PieSeries,o.HistogramSeries]:i=[o.HistogramSeries,o.BarSeries,o.BoxPlotSeries,o.HeatSeries,o.LineSeries,o.PieSeries,o.ScatterSeries],i}function ce(m){let{modelList:e,layerList:t,activeLayerId:a,disableEditing:i}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),i||t.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!a||r.id===a)}function ne(m,e){m.forEach(t=>{e.forEach(a=>{t?.id===a.layer?.id&&re(t,a)})})}function re(m,e){let t=m;if(t){let a=[...t?.charts??[]],i=a?.findIndex(r=>r.id===e.chartId),s=!1;i!==void 0&&i>-1?(s=!M(a[i],e.config),a[i]=e.config):t&&!T(e.config)&&(s=!0,a.push(e.config)),s&&(t.charts=a)}}function he(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 de(m,e){let t=m;if(t){let a=[...t.charts??[]];a=v({arrayA:a,arrayB:e.map(i=>i.config),getKey:i=>i.id??i.title?.content.text??""}),t.charts=a}}var me=F`.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}`,D=class extends V{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=N(),this._messages=I(),this.commonStrings=I({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 o.HistogramSeries:if(this.chartData=a,i&&(i.dataStore.chartData=a,b(i.layer))){let r=i,l=a?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=a,i&&(i.dataStore.chartData=a);break}case o.ScatterSeries:{let r=a,{dataItems:l,r2:p,aggregated:g}=r,u=p;Number.isFinite(p)||(u=void 0),this.r2=u,q(i)&&(i.dataStore.r2=u,i.dataStore.aggregated=g,g&&(i.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=a;(P(s)||j(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&&W($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}}},this.chartAxesMinMaxChange=e=>{let t=e,{bounds:a,model:i}=t.detail,s=this.getModel(this.selectedChartId),r=i?.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=a,i&&(i.dataStore.calculatedMinMaxBounds=a),this.updateAxesBoundsInAppState(a);break}},this.chartSeriesColorChange=e=>{let t=e,{colorMatchApplied:a,data:i,model:s}=t.detail,r=this.getModel(this.selectedChartId);if(s?.isSameChartAs(r))switch(r?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=i,s&&(s.dataStore.seriesColor=i),this.applyNullCategorySeriesColor({colorMatchApplied:a,data:i,model:r});break;case o.PieSeries:{let l=new Map([[0,i]]);this.seriesColor=l,s&&(s.dataStore.seriesColor=l);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let t=e,{propName:a,value:i,model:s}=t.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(a){case"rotation":typeof i=="boolean"&&Y(r)&&(r.rotated=i);break;case"legendPosition":typeof i=="string"&&L(r)&&(r.legendPosition=i);break;case"legendVisibility":typeof i=="boolean"&&L(r)&&(r.legendVisibility=i);break}},this.chartLegendItemVisibilityChange=e=>{let t=e,{legendItemVisibility:a,model:i}=t.detail,s=this.modelList.find(r=>i?.isSameChartAs(r));s?.setSeriesVisibility(a),B(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),P(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;re(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}],view:0,r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:Z}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=me}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;K(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=U(R.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=v({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&&de(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 p=await i.createFeatureLayer();if(!p)continue;i=p}let s=i.charts,r=b(i)?await x(i):void 0,l=oe({layerRasterInfo:r,layerId:i.id,layerType:i.type});for(let p of s??[]){let g;G(l,p)&&(g=await Q({layer:i,config:p,commonStrings:this.commonStrings})),g&&e.push(g)}}se(e),e.forEach(i=>{a.find(s=>s.isSameChartAs(i))===void 0&&a.push(i)}),this.modelList=a}modelListChange(e,t){this.selectedChartId=se(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?k({chartType:a.chartType,commonStrings:this.commonStrings,config:a.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&ne(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=c.Data;let t=this.getModel(e);this.setEventBasedPropsFromModelData(t),this.currentChartTypeText=t?.chartType!==void 0?k({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",e!==void 0&&e!==$.selectedChartId&&($.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=X({chartConfig:t,chartData:e}),{minY:s,maxY:r,minX:l,maxX:p}=i;a=[{isXAxis:!0,minimum:l,maximum:p},{isXAxis:!1,minimum:s,maximum:r}]}return a}updateAxesBoundsInAppState(e){e?.forEach(t=>{let{isXAxis:a,maximum:i,minimum:s}=t,r=this.getModel(this.selectedChartId);if(r!==void 0&&B(r)&&this.selectedChartId!==void 0){let l=new te(r,a),p=J({chartId:this.selectedChartId,isXAxis:a,isLogarithmic:l.getLogarithmic()}),g=$.chartAxesBoundDataMap;g[this.selectedChartId]===void 0&&(g[this.selectedChartId]={});let u=g[this.selectedChartId]?.[p],E={defaultMinBound:u?.defaultMinBound===u?.currMinBound?s:u?.defaultMinBound,currMinBound:s,defaultMaxBound:u?.defaultMaxBound===u?.currMaxBound?i:u?.defaultMaxBound,currMaxBound:i};!M(u,E)&&this.selectedChartId!==void 0&&g?.[this.selectedChartId]!==void 0&&(g[this.selectedChartId][p]=E)}})}getPlacement(e){let t;return this.popoverPlacement!==void 0?t=this.popoverPlacement:t=e<=2?"bottom":"top",t}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:t,layer:a}=e.detail;this.removeSelectChartTypePopover();let i=oe({layerId:a?.id,layerType:a?.type,layerRasterInfo:b(a)?await x(a):void 0}),s=this.getPlacement(i.length);this.selectChartTypePopover=S(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${t} open .layerId=${a?.id?.toString()} .layerType=${a?.type} .supportedChartTypes=${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=ie(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!T(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&&he(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=S(n`<calcite-tooltip style=${_({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${t} open placement=top>${a}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){ee(this.tooltip)}renderViewCharts(){let e=ce({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ae(e,t=>t.id,t=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${this.modelList.filter(a=>a.layer?.id===t.id)} .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:n`<calcite-flow>${w("charts-list",n`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${A(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 w("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=${this._messages.series??""}></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=${this._messages.series??""}></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=${this._messages.series??""}></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=${this._messages.slices??""}></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=${this._messages.axes??""}></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=${this._messages.guides??""}></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=${this._messages.format??""}></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=${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 o.BarSeries:a=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:a=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:a=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .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:a=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:a=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .view=${this.view} .page=${this.selectedPanel??c.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:a=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:a=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${t} .page=${this.selectedPanel??c.Data}></arcgis-charts-config-heat-chart>`;break}return a}};z("arcgis-charts-config-create-flow",D);return D},"intl",a,b,d,e,g,i,k,l,m,p,r,s,t,u,v)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import o from"./IL763V5P.js";import n from"./ENSGJAYI.js";import l from"./ZDM5IDLI.js";import k from"./5RI6YXV2.js";import j from"./G63YJSVM.js";import i from"./DW44U5PH.js";import h from"./3TO4L72A.js";import g from"./CDVLQX4S.js";import"./O4TPXFX4.js";import f from"./AZ2Z7W7G.js";import e from"./TWAPMNSX.js";import d from"./XTQ4C5NA.js";import c from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import{X as A,Y as y,sa as L}from"./43DLRSYB.js";import"./KX7KGXKQ.js";import{b as F,q as m}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as _}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{substitute:oe},{Hc:C,Zb:M,hc:f,t:b},,{e:l},{c:v,f:g,i:O,r:I},{a:P},w,{b:H,d:J,f:K},{b:q,d:B,f:G},{d:Y,e:D},j,{d:p},{b:Q},{a:z,b:E,c:k,d:W},{a:N,b:X}])=>{var U=i=>{g({config:i,value:null,axisIndex:0,isMax:!1}),g({config:i,value:null,axisIndex:0,isMax:!0}),g({config:i,value:null,axisIndex:1,isMax:!1}),g({config:i,value:null,axisIndex:1,isMax:!0})},V=i=>{let{name:e,axisIndex:s,config:r,layerInfo:o}=i,{layerFieldsInfo:t}=o,n=t.find(x=>x.name===e),d=n!==void 0&&C(n);O(r,s,d)};function Z(i,e,s){let r=T(i,e,s),o=P(i),t=p(i);return r===o||t}function $(i,e){let{layerFieldsInfo:s}=e,r=f(s,h(i)),o=I(1,i),t=p(i);return r===o||t}function ee(i,e){let{layerFieldsInfo:s}=e,r=u(i),o=f(s,r),t=I(0,i),n=p(i);return o===t||n}function T(i,e,s){let r=u(i),o=h(i),{layerFieldsInfo:t}=e,n=f(t,r),d=f(t,o);return oe(s.titleLabels.xAndY,{x:n,y:d})}var ie=i=>{let{x:e,y:s,config:r,layerInfo:o,updateChartTitle:t,updateXAxisTitle:n,updateYAxisTitle:d,commonStrings:x}=i,{layerFieldsInfo:S}=o,se=f(S,e),re=f(S,s);!m(e)&&n&&v(r,0,se),!m(s)&&d&&v(r,1,re),!m(e)&&!m(s)&&r.title&&t&&(r.title.content.text=T(r,o,x))},u=i=>i.series[0]?.x??"",h=i=>i.series[0]?.y??"",te=i=>{let{fieldName:e,config:s,layerInfo:r,commonStrings:o}=i,t=Z(s,r,o),n=ee(s,r),d=$(s,r);U(s),s.series[0]&&(s.series[0].x=e),ie({x:e,y:h(s),config:s,layerInfo:r,updateChartTitle:t,commonStrings:o,updateXAxisTitle:n,updateYAxisTitle:d}),V({name:e,axisIndex:0,config:s,layerInfo:r})},ne=i=>{let{fieldName:e,config:s,layerInfo:r,commonStrings:o}=i,t=Z(s,r,o),n=ee(s,r),d=$(s,r);U(s),s.series[0]&&(s.series[0].y=e),ie({x:u(s),y:e,config:s,layerInfo:r,commonStrings:o,updateChartTitle:t,updateXAxisTitle:n,updateYAxisTitle:d}),V({name:e,axisIndex:1,config:s,layerInfo:r})},ae=i=>{let e={};return i.series[0]?.markerSymbol??e},le=(i,e)=>{e.series[0]&&(e.series[0].markerSymbol=i)},de=i=>i.series[0]?.locationsOfInterest,ce=(i,e)=>{e.series[0]&&(e.series[0].locationsOfInterest=i)},fe=i=>(i.series[0]?.overlays?.trendLine?.visible??!0)&&(i.series[0]?.overlays?.trendLine?.created??!1),ye=i=>{let e={};return i.series[0]?.overlays?.trendLine?.symbol??e},me=(i,e)=>{e.series[0].overlays??=y(),e.series[0].overlays.trendLine??=y().trendLine,e.series[0].overlays.trendLine.symbol=i},ge=(i,e)=>{e.series[0].overlays??=y(),e.series[0].overlays.trendLine??=y().trendLine,e.series[0].overlays.trendLine.visible=i},pe=(i,e)=>{!(e.series[0]?.overlays?.trendLine?.created??!1)&&i&&(e.series[0].overlays??=y(),e.series[0].overlays.trendLine??=y().trendLine,e.series[0].overlays.trendLine.created=i),ge(i,e)},R=i=>i.series[0]?.sizePolicy??A(),ue=(i,e)=>{e.series[0]&&(i!==void 0&&i.field?.trim()!==""?e.series[0].sizePolicy={...e.series[0].sizePolicy,...i}:e.series[0].sizePolicy=void 0)},he=i=>i?.series?.[0]?.overlays,xe=(i,e)=>{e?.series[0]!==void 0&&(e.series[0].overlays=i)},ve=i=>i.series.find(e=>e.additionalTooltipFields!==void 0)?.additionalTooltipFields??[],Ie=(i,e)=>{e.series.forEach(s=>{Array.isArray(i)?s.additionalTooltipFields=i:typeof i=="string"?s.additionalTooltipFields=i.trim()===""?[]:[i]:s.additionalTooltipFields=[]})},Te=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,c=(i,e,s,r)=>{for(var o=Se(e,s),t=i.length-1,n;t>=0;t--)(n=i[t])&&(o=n(e,s,o)||o);return o&&Te(e,s,o),o},a=class extends w{constructor(){super(...arguments),this._chartType=_.ScatterSeries}async setup(e){await this.loadConfigFromLayer(e),typeof this.resolveSetup=="function"&&this.resolveSetup()}get xAxisField(){return u(this._config)}set xAxisField(e){te({fieldName:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get yAxisField(){return h(this._config)}set yAxisField(e){ne({fieldName:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get showLinearTrend(){return fe(this._config)}set showLinearTrend(e){pe(e,this._config)}get linearTrendSymbol(){return ye(this._config)}set linearTrendSymbol(e){me(e,this._config)}get fixedMarkerSymbol(){return ae(this._config)}set fixedMarkerSymbol(e){le(e,this._config)}get locationsOfInterest(){return de(this._config)}set locationsOfInterest(e){ce(e,this._config)}get sizePolicy(){return R(this._config)}set sizePolicy(e){let s=R(this._config);F(s,e)||ue(e,this._config)}get seriesOverlays(){return he(this._config)}set seriesOverlays(e){e!==void 0&&xe(e,this._config)}get additionalTooltipField(){return ve(this._config)}set additionalTooltipField(e){Ie(e,this._config)}generateChartTitle(){return T(this._config,this.layerInfo,this.commonStrings)}generateYAxisTitle(){let e=this.yAxisField;return f(this.layerInfo.layerFieldsInfo,e)}generateDefaultConfig(){let e=L(this.commonStrings);return b(this.layerInfo?.layer)&&(e.colorMatch=!1),e}};c([l],a.prototype,"xAxisField");c([l],a.prototype,"yAxisField");c([l],a.prototype,"showLinearTrend");c([l],a.prototype,"linearTrendSymbol");c([l],a.prototype,"fixedMarkerSymbol");c([l],a.prototype,"locationsOfInterest");c([l],a.prototype,"sizePolicy");c([l],a.prototype,"seriesOverlays");c([l],a.prototype,"additionalTooltipField");var Fe=[N,z,E,k,W,Q,j,X,H,Y,J,D,q,B,G,K];M(a,Fe);return a},"intl",a,b,c,d,e,f,g,h,i,j,k,l,n,o)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as k}from"./RP6LD7CU.js";import o from"./BWLIKQZM.js";import"./POA2XTTK.js";import{a as O}from"./WZFDIC2M.js";import n from"./ZDM5IDLI.js";import j from"./TPWN3WU6.js";import{g as T,i as I,k as _,l as d,m as L,p as h}from"./O4TPXFX4.js";import f from"./34EBYEM7.js";import e from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import"./43DLRSYB.js";import{b as z,f as g}from"./KX7KGXKQ.js";import{a as E,c as P,d as c,n as D,q as y}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as w,B as M,C as p,F as G,H as N,g as V,i as u}from"./23EBTARY.js";import"./64L7VJJK.js";import{g as i,h as m,i as H}from"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as l}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Ea:b,Ga:a,l:j},,,,{a:x,c:v,e:S},{a:C},{e:R}])=>{var F={type:g.TS,color:[1,1,1,255],font:{family:"Tahoma",size:12,decoration:"none",style:"normal",weight:"normal"}},$={type:g.SLS,color:[1,1,1,255],style:z.Solid,width:2},f={element:"chart-element",elementList:"element-list",sectionLabel:"section-label"},Y=V`.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{width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin)}.section-label{display:flex;margin:var(--arcgis-charts-config-margin-major) var(--arcgis-charts-config-margin-minor);justify-content:space-between;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size-0)}.element-list{margin:var(--arcgis-charts-config-margin-minor)}.element{user-select:none}`,A=class extends M{constructor(){super(...arguments),this._messages=O(),this.formatPopover=null,this.selectableElements=[],this.textProperties=[],this.symbolProperties=[],this.symbolPropertyChange=t=>{let e=t;e.stopImmediatePropagation();let s;if(e.target?.localName==="calcite-list-item"?s=e.target?.value:s=e.target?.parentNode?.value,this.selectedTexts=[],this.selectedBackground=[],this.selectedSymbols.includes(s))this.selectedSymbols=[],this.updateSelectedElement(this.selectedSymbols);else{let o=this.getFormatValue(s);this.selectedSymbols=[s],this.initSelectedSymbols(b(o)?o:$)}this.setupFormatPopover()},this.textPropertyChange=t=>{let e=t;e.stopImmediatePropagation();let s;if(e.target?.localName==="calcite-list-item"?s=e.target?.value:s=e.target?.parentNode?.value,this.selectedSymbols=[],this.selectedBackground=[],e.shiftKey){this.selectedTexts=[];let o=this.textProperties.indexOf(this.lastSelectedText??s),r=this.textProperties.indexOf(s);this.textProperties.forEach((n,B)=>{B>=Math.min(o,r)&&B<=Math.max(o,r)&&this.selectedTexts.push(n)}),this.updateSelectedElement(this.selectedTexts),this.setupFormatPopover()}else if(e.ctrlKey)this.selectedTexts.includes(s)?(this.selectedTexts=this.selectedTexts.filter(o=>o!==s),this.updateSelectedElement(this.selectedTexts)):(this.selectedTexts=[...this.selectedTexts,s],this.updateSelectedElement(this.selectedTexts)),this.setupFormatPopover();else if(this.selectedTexts.includes(s))this.selectedTexts=[],this.updateSelectedElement(this.selectedTexts),this.setupFormatPopover();else{let o=this.getFormatValue(s);this.selectedTexts=[s],this.initSelectedTexts(a(o)?o:F),this.setupFormatPopover()}this.lastSelectedText=s},this.backgroundChange=t=>{let e=t;e.stopImmediatePropagation();let s;if(e.target?.localName==="calcite-list-item"?s=e.target?.value:s=e.target?.parentNode?.value,this.selectedSymbols=[],this.selectedTexts=[],this.selectedBackground.includes(s))this.selectedBackground=[],this.selectedElement=void 0;else{let o=this.getFormatValue(s),r=[...j.backgroundColor];this.selectedBackground=[s],this.selectedElement=o??r}this.setupFormatPopover()},this.updateSymbolProps=t=>{let e=t.detail;this.selectedSymbols.forEach(s=>{this.setFormatValue(s,e)}),this.selectedElement=c(t.target.selectedElement)},this.updateBackground=t=>{this.setFormatValue(H.Background,t.detail),this.selectedElement=t.detail},this.updateTextProps=t=>{let{font:e,color:s}=t.detail;this.selectedTexts.forEach(o=>{let r=this.getFormatValue(o),n=a(r)?r:void 0;this.setFormatValue(o,{...n,type:g.TS,font:{...n?.font,...e},color:s??n?.color})}),this.selectedElement=c(t.target.selectedElement)},this.onModelConfigChange=()=>{this.requestUpdate()},this.formatPopoverClose=t=>{this.formatPopover===t?.target&&(this.selectedTexts=[],this.selectedSymbols=[],this.selectedBackground=[],this.selectedElement={},this.removeFormatPopover())},this.mergeFormatValues=(t,e)=>{let s=!1;E(t)&&E(e)||P(t)&&P(e)?s=!0:s=t===e;let o=typeof t=="number"||typeof e=="number"?Number.NaN:"";return s?void 0:o},this.updateSelectableElements=t=>{t&&!this.selectableElements.includes(t)&&this.selectableElements.push(t)},this.selectedSymbols=[],this.selectedTexts=[],this.selectedBackground=[]}static{this.properties={selectedSymbols:16,selectedTexts:16,selectedBackground:16,selectedElement:16,messageOverrides:0,model:0}}static{this.styles=Y}load(){this.modelChange(this.model)}willUpdate(t){t.has("model")&&this.modelChange(this.model,t.get("model"))}disconnectedCallback(){super.disconnectedCallback(),this.removeFormatPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(t,e){e?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),t?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}correctTextElementSelection(){for(let t of this.selectableElements){let e=this.selectedTexts.includes(t.value)||this.selectedSymbols.includes(t.value)||this.selectedBackground.includes(t.value);t.selected=e}}updateSelectedElement(t,e){if(this.selectedElement=void 0,e===void 0){let s=c(this.getFormatValue(t[0]));this.selectedElement=t?.reduce((o,r)=>{let n=this.getFormatValue(r);return D(o,n,this.mergeFormatValues)},s)}else{let s=c(e);y(e)&&(this.selectedSymbols?.length>0&&(s=c($)),this.selectedTexts?.length>0&&(s=c(F))),this.selectedElement=s}}initSelectedTexts(t){let e=c(t);y(t)&&(e=c(F)),this.selectedElement=e}initSelectedSymbols(t){let e=c(t);y(t)&&(e=c($)),this.selectedElement=e}setupFormatPopover(){this.formatPopover=k(this.formatPopover);let t=this.selectedElement;t?.type===g.TS||t?.type===g.SLS||Array.isArray(this.selectedElement)?(this.formatPopover=G(u`<arcgis-charts-config-format-popover .selectedElement=${this.selectedElement} .referenceElement=${this.el} @arcgisChartsConfigFormatPopoverSymbolChange=${this.updateSymbolProps} @arcgisChartsConfigFormatPopoverTextChange=${this.updateTextProps} @arcgisChartsConfigFormatPopoverColorChange=${this.updateBackground} placement=auto @arcgisChartsConfigPopoverClose=${this.formatPopoverClose} open></arcgis-charts-config-format-popover>`),this.formatPopover!==null&&!document.body.contains(this.formatPopover)&&document.body.appendChild(this.formatPopover)):this.removeFormatPopover()}removeFormatPopover(){this.formatPopover!==null&&(this.formatPopover.open=!1,this.formatPopover=k(this.formatPopover))}getFormatValue(t){switch(t){case i.Title:return this.model.titleSymbol;case i.Description:return this.model.descriptionSymbol;case i.XAxisTitle:return x(this.model)?this.model.xAxisTitleSymbol:void 0;case i.YAxisTitle:return d(this.model)?this.model.getAxisTitleSymbol(1):void 0;case i.AxisLabels:return v(this.model)?this.model.axisLabelsSymbol:void 0;case i.GuideLabels:return L(this.model)?this.model.guideLabelsSymbol:void 0;case i.LegendText:return h(this.model)?this.model.legendTextSymbol:void 0;case i.LegendTitle:return h(this.model)?this.model.legendTitleSymbol:void 0;case i.DataLabels:return C(this.model)?this.model.dataLabelsSymbol:void 0;case m.AxisLines:return S(this.model)?this.model.axisLinesSymbol:void 0;case m.GridLines:return d(this.model)?this.model.getGridLinesSymbol():void 0;case m.LeaderLines:return T(this.model)?this.model.ticksSymbol:void 0;case i.Background:return this.model.backgroundColor;default:return}}setFormatValue(t,e){switch(t){case i.Title:a(e)&&(this.model.titleSymbol=e);break;case i.Description:a(e)&&(this.model.descriptionSymbol=e);break;case i.XAxisTitle:x(this.model)&&a(e)&&(this.model.xAxisTitleSymbol=e);break;case i.YAxisTitle:d(this.model)&&a(e)&&this.model.setAxisTitleSymbol(e,1);break;case i.AxisLabels:v(this.model)&&a(e)&&(this.model.axisLabelsSymbol=e);break;case i.GuideLabels:L(this.model)&&a(e)&&(this.model.guideLabelsSymbol=e);break;case i.LegendText:h(this.model)&&a(e)&&(this.model.legendTextSymbol=e);break;case i.LegendTitle:h(this.model)&&a(e)&&(this.model.legendTitleSymbol=e);break;case i.DataLabels:C(this.model)&&a(e)&&(this.model.dataLabelsSymbol=e);break;case m.AxisLines:S(this.model)&&b(e)&&(this.model.axisLinesSymbol=e);break;case m.GridLines:if(b(e)){if(_(this.model))this.model.setGridLinesSymbol(e);else if(d(this.model)){let s=this.model.chartType,o=[];switch(s){case l.BarSeries:case l.LineSeries:case l.ComboLineAndBarSeries:case l.HistogramSeries:case l.BoxPlotSeries:case l.RadarSeries:{o=[1];break}case l.ScatterSeries:{o=[0,1];break}}this.model.setGridLinesSymbol(e,o)}}break;case m.LeaderLines:T(this.model)&&b(e)&&(this.model.ticksSymbol=e);break;case i.Background:Array.isArray(e)&&(this.model.backgroundColor=e);break}}renderFormatElements(){this.textProperties=[i.Title,...x(this.model)?[i.XAxisTitle]:[],...d(this.model)?[i.YAxisTitle]:[],...h(this.model)?[i.LegendTitle]:[],i.Description,...h(this.model)?[i.LegendText]:[],...v(this.model)?[i.AxisLabels]:[],...L(this.model)&&this.model.chartType!==l.HeatSeries?[i.GuideLabels]:[],...C(this.model)&&this.model.chartType!==l.HeatSeries&&this.model.chartType!==l.BoxPlotSeries?[i.DataLabels]:[]],I(this.model)&&(this.textProperties=this.textProperties.filter(s=>s!==i.DataLabels)),this.symbolProperties=[i.Background,...S(this.model)&&this.model.chartType!==l.HeatSeries?[m.AxisLines]:[],...d(this.model)?[m.GridLines]:[],...T(this.model)?[m.LeaderLines]:[]];let t=this.textProperties.map(s=>this.renderTextElement(s,this.textPropertyChange)),e=this.symbolProperties.map(s=>s===i.Background?this.renderTextElement(s,this.backgroundChange):this.renderTextElement(s,this.symbolPropertyChange));return{textElements:t,symbolElements:e}}renderTextElement(t,e){let s=R(t),o=this.getFormatValue(t),r=typeof o=="string"?o:"",n=this.selectedTexts.includes(t)||this.selectedSymbols.includes(t)||this.selectedBackground.includes(t);return u`<calcite-list-item class=${p(f.element)} .label=${this._messages[t]} .description=${r} .value=${t} .selected=${n} @click=${e} ${w(this.updateSelectableElements)}>${s!==void 0?u`<calcite-icon slot=content-start scale=s .icon=${s}></calcite-icon>`:null}</calcite-list-item>`}render(){let{textElements:t,symbolElements:e}=this.renderFormatElements();return u`<div class=${p(f.sectionLabel)}>${this._messages.textElements}</div><calcite-list label class=${p(f.elementList)} selection-mode=multiple selection-appearance=border @calciteListChange=${this.correctTextElementSelection}>${t}</calcite-list><div class=${p(f.sectionLabel)}>${this._messages.symbolElements}</div><calcite-list label class=${p(f.elementList)} selection-mode=single selection-appearance=border>${e}</calcite-list>`}};N("arcgis-charts-config-format",A);return A},a,b,e,f,j,n,o)
|
|
2
|
+
import{a as k}from"./RP6LD7CU.js";import o from"./BWLIKQZM.js";import"./POA2XTTK.js";import{a as O}from"./WZFDIC2M.js";import n from"./ZDM5IDLI.js";import j from"./3TO4L72A.js";import{g as T,i as I,k as _,l as d,m as L,p as h}from"./O4TPXFX4.js";import f from"./XTQ4C5NA.js";import e from"./LEUIZWRV.js";import b from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import"./43DLRSYB.js";import{b as z,f as g}from"./KX7KGXKQ.js";import{a as E,c as P,d as c,n as D,q as y}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as w,B as M,C as p,F as G,H as N,g as V,i as u}from"./23EBTARY.js";import"./64L7VJJK.js";import{g as i,h as m,i as H}from"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as l}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Ea:b,Ga:a,l:j},,,,{a:x,c:v,e:S},{a:C},{e:R}])=>{var F={type:g.TS,color:[1,1,1,255],font:{family:"Tahoma",size:12,decoration:"none",style:"normal",weight:"normal"}},$={type:g.SLS,color:[1,1,1,255],style:z.Solid,width:2},f={element:"chart-element",elementList:"element-list",sectionLabel:"section-label"},Y=V`.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{width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin)}.section-label{display:flex;margin:var(--arcgis-charts-config-margin-major) var(--arcgis-charts-config-margin-minor);justify-content:space-between;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size-0)}.element-list{margin:var(--arcgis-charts-config-margin-minor)}.element{user-select:none}`,A=class extends M{constructor(){super(...arguments),this._messages=O(),this.formatPopover=null,this.selectableElements=[],this.textProperties=[],this.symbolProperties=[],this.symbolPropertyChange=t=>{let e=t;e.stopImmediatePropagation();let s;if(e.target?.localName==="calcite-list-item"?s=e.target?.value:s=e.target?.parentNode?.value,this.selectedTexts=[],this.selectedBackground=[],this.selectedSymbols.includes(s))this.selectedSymbols=[],this.updateSelectedElement(this.selectedSymbols);else{let o=this.getFormatValue(s);this.selectedSymbols=[s],this.initSelectedSymbols(b(o)?o:$)}this.setupFormatPopover()},this.textPropertyChange=t=>{let e=t;e.stopImmediatePropagation();let s;if(e.target?.localName==="calcite-list-item"?s=e.target?.value:s=e.target?.parentNode?.value,this.selectedSymbols=[],this.selectedBackground=[],e.shiftKey){this.selectedTexts=[];let o=this.textProperties.indexOf(this.lastSelectedText??s),r=this.textProperties.indexOf(s);this.textProperties.forEach((n,B)=>{B>=Math.min(o,r)&&B<=Math.max(o,r)&&this.selectedTexts.push(n)}),this.updateSelectedElement(this.selectedTexts),this.setupFormatPopover()}else if(e.ctrlKey)this.selectedTexts.includes(s)?(this.selectedTexts=this.selectedTexts.filter(o=>o!==s),this.updateSelectedElement(this.selectedTexts)):(this.selectedTexts=[...this.selectedTexts,s],this.updateSelectedElement(this.selectedTexts)),this.setupFormatPopover();else if(this.selectedTexts.includes(s))this.selectedTexts=[],this.updateSelectedElement(this.selectedTexts),this.setupFormatPopover();else{let o=this.getFormatValue(s);this.selectedTexts=[s],this.initSelectedTexts(a(o)?o:F),this.setupFormatPopover()}this.lastSelectedText=s},this.backgroundChange=t=>{let e=t;e.stopImmediatePropagation();let s;if(e.target?.localName==="calcite-list-item"?s=e.target?.value:s=e.target?.parentNode?.value,this.selectedSymbols=[],this.selectedTexts=[],this.selectedBackground.includes(s))this.selectedBackground=[],this.selectedElement=void 0;else{let o=this.getFormatValue(s),r=[...j.backgroundColor];this.selectedBackground=[s],this.selectedElement=o??r}this.setupFormatPopover()},this.updateSymbolProps=t=>{let e=t.detail;this.selectedSymbols.forEach(s=>{this.setFormatValue(s,e)}),this.selectedElement=c(t.target.selectedElement)},this.updateBackground=t=>{this.setFormatValue(H.Background,t.detail),this.selectedElement=t.detail},this.updateTextProps=t=>{let{font:e,color:s}=t.detail;this.selectedTexts.forEach(o=>{let r=this.getFormatValue(o),n=a(r)?r:void 0;this.setFormatValue(o,{...n,type:g.TS,font:{...n?.font,...e},color:s??n?.color})}),this.selectedElement=c(t.target.selectedElement)},this.onModelConfigChange=()=>{this.requestUpdate()},this.formatPopoverClose=t=>{this.formatPopover===t?.target&&(this.selectedTexts=[],this.selectedSymbols=[],this.selectedBackground=[],this.selectedElement={},this.removeFormatPopover())},this.mergeFormatValues=(t,e)=>{let s=!1;E(t)&&E(e)||P(t)&&P(e)?s=!0:s=t===e;let o=typeof t=="number"||typeof e=="number"?Number.NaN:"";return s?void 0:o},this.updateSelectableElements=t=>{t&&!this.selectableElements.includes(t)&&this.selectableElements.push(t)},this.selectedSymbols=[],this.selectedTexts=[],this.selectedBackground=[]}static{this.properties={selectedSymbols:16,selectedTexts:16,selectedBackground:16,selectedElement:16,messageOverrides:0,model:0}}static{this.styles=Y}load(){this.modelChange(this.model)}willUpdate(t){t.has("model")&&this.modelChange(this.model,t.get("model"))}disconnectedCallback(){super.disconnectedCallback(),this.removeFormatPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(t,e){e?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),t?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}correctTextElementSelection(){for(let t of this.selectableElements){let e=this.selectedTexts.includes(t.value)||this.selectedSymbols.includes(t.value)||this.selectedBackground.includes(t.value);t.selected=e}}updateSelectedElement(t,e){if(this.selectedElement=void 0,e===void 0){let s=c(this.getFormatValue(t[0]));this.selectedElement=t?.reduce((o,r)=>{let n=this.getFormatValue(r);return D(o,n,this.mergeFormatValues)},s)}else{let s=c(e);y(e)&&(this.selectedSymbols?.length>0&&(s=c($)),this.selectedTexts?.length>0&&(s=c(F))),this.selectedElement=s}}initSelectedTexts(t){let e=c(t);y(t)&&(e=c(F)),this.selectedElement=e}initSelectedSymbols(t){let e=c(t);y(t)&&(e=c($)),this.selectedElement=e}setupFormatPopover(){this.formatPopover=k(this.formatPopover);let t=this.selectedElement;t?.type===g.TS||t?.type===g.SLS||Array.isArray(this.selectedElement)?(this.formatPopover=G(u`<arcgis-charts-config-format-popover .selectedElement=${this.selectedElement} .referenceElement=${this.el} @arcgisChartsConfigFormatPopoverSymbolChange=${this.updateSymbolProps} @arcgisChartsConfigFormatPopoverTextChange=${this.updateTextProps} @arcgisChartsConfigFormatPopoverColorChange=${this.updateBackground} placement=auto @arcgisChartsConfigPopoverClose=${this.formatPopoverClose} open></arcgis-charts-config-format-popover>`),this.formatPopover!==null&&!document.body.contains(this.formatPopover)&&document.body.appendChild(this.formatPopover)):this.removeFormatPopover()}removeFormatPopover(){this.formatPopover!==null&&(this.formatPopover.open=!1,this.formatPopover=k(this.formatPopover))}getFormatValue(t){switch(t){case i.Title:return this.model.titleSymbol;case i.Description:return this.model.descriptionSymbol;case i.XAxisTitle:return x(this.model)?this.model.xAxisTitleSymbol:void 0;case i.YAxisTitle:return d(this.model)?this.model.getAxisTitleSymbol(1):void 0;case i.AxisLabels:return v(this.model)?this.model.axisLabelsSymbol:void 0;case i.GuideLabels:return L(this.model)?this.model.guideLabelsSymbol:void 0;case i.LegendText:return h(this.model)?this.model.legendTextSymbol:void 0;case i.LegendTitle:return h(this.model)?this.model.legendTitleSymbol:void 0;case i.DataLabels:return C(this.model)?this.model.dataLabelsSymbol:void 0;case m.AxisLines:return S(this.model)?this.model.axisLinesSymbol:void 0;case m.GridLines:return d(this.model)?this.model.getGridLinesSymbol():void 0;case m.LeaderLines:return T(this.model)?this.model.ticksSymbol:void 0;case i.Background:return this.model.backgroundColor;default:return}}setFormatValue(t,e){switch(t){case i.Title:a(e)&&(this.model.titleSymbol=e);break;case i.Description:a(e)&&(this.model.descriptionSymbol=e);break;case i.XAxisTitle:x(this.model)&&a(e)&&(this.model.xAxisTitleSymbol=e);break;case i.YAxisTitle:d(this.model)&&a(e)&&this.model.setAxisTitleSymbol(e,1);break;case i.AxisLabels:v(this.model)&&a(e)&&(this.model.axisLabelsSymbol=e);break;case i.GuideLabels:L(this.model)&&a(e)&&(this.model.guideLabelsSymbol=e);break;case i.LegendText:h(this.model)&&a(e)&&(this.model.legendTextSymbol=e);break;case i.LegendTitle:h(this.model)&&a(e)&&(this.model.legendTitleSymbol=e);break;case i.DataLabels:C(this.model)&&a(e)&&(this.model.dataLabelsSymbol=e);break;case m.AxisLines:S(this.model)&&b(e)&&(this.model.axisLinesSymbol=e);break;case m.GridLines:if(b(e)){if(_(this.model))this.model.setGridLinesSymbol(e);else if(d(this.model)){let s=this.model.chartType,o=[];switch(s){case l.BarSeries:case l.LineSeries:case l.ComboLineAndBarSeries:case l.HistogramSeries:case l.BoxPlotSeries:case l.RadarSeries:{o=[1];break}case l.ScatterSeries:{o=[0,1];break}}this.model.setGridLinesSymbol(e,o)}}break;case m.LeaderLines:T(this.model)&&b(e)&&(this.model.ticksSymbol=e);break;case i.Background:Array.isArray(e)&&(this.model.backgroundColor=e);break}}renderFormatElements(){this.textProperties=[i.Title,...x(this.model)?[i.XAxisTitle]:[],...d(this.model)?[i.YAxisTitle]:[],...h(this.model)?[i.LegendTitle]:[],i.Description,...h(this.model)?[i.LegendText]:[],...v(this.model)?[i.AxisLabels]:[],...L(this.model)&&this.model.chartType!==l.HeatSeries?[i.GuideLabels]:[],...C(this.model)&&this.model.chartType!==l.HeatSeries&&this.model.chartType!==l.BoxPlotSeries?[i.DataLabels]:[]],I(this.model)&&(this.textProperties=this.textProperties.filter(s=>s!==i.DataLabels)),this.symbolProperties=[i.Background,...S(this.model)&&this.model.chartType!==l.HeatSeries?[m.AxisLines]:[],...d(this.model)?[m.GridLines]:[],...T(this.model)?[m.LeaderLines]:[]];let t=this.textProperties.map(s=>this.renderTextElement(s,this.textPropertyChange)),e=this.symbolProperties.map(s=>s===i.Background?this.renderTextElement(s,this.backgroundChange):this.renderTextElement(s,this.symbolPropertyChange));return{textElements:t,symbolElements:e}}renderTextElement(t,e){let s=R(t),o=this.getFormatValue(t),r=typeof o=="string"?o:"",n=this.selectedTexts.includes(t)||this.selectedSymbols.includes(t)||this.selectedBackground.includes(t);return u`<calcite-list-item class=${p(f.element)} .label=${this._messages[t]} .description=${r} .value=${t} .selected=${n} @click=${e} ${w(this.updateSelectableElements)}>${s!==void 0?u`<calcite-icon slot=content-start scale=s .icon=${s}></calcite-icon>`:null}</calcite-list-item>`}render(){let{textElements:t,symbolElements:e}=this.renderFormatElements();return u`<div class=${p(f.sectionLabel)}>${this._messages.textElements}</div><calcite-list label class=${p(f.elementList)} selection-mode=multiple selection-appearance=border @calciteListChange=${this.correctTextElementSelection}>${t}</calcite-list><div class=${p(f.sectionLabel)}>${this._messages.symbolElements}</div><calcite-list label class=${p(f.elementList)} selection-mode=single selection-appearance=border>${e}</calcite-list>`}};N("arcgis-charts-config-format",A);return A},a,b,e,f,j,n,o)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./7DHOI5P2.js";import{Aa as A,G as x,I as c,K as y,_ as p,c as l}from"./43DLRSYB.js";import{a as F}from"./Z5QPCSUQ.js";import{a as r,b as d,f as I}from"./QVG3TOL4.js";export default $arcgis.t(([{substitute:S},{Cc:N,Ra:g,fc:L,hc:f}])=>{var v=i=>{let{config:s,axisIndex:t,callback:e}=i;[t!==void 0?s.axes?.[t]:s.axes].flat().forEach((a,o)=>{a!==void 0&&e(a,t!==void 0?t:o)})},E=i=>{let{config:s,axisIndex:t,callback:e}=i;[t!==void 0?s.axes?.[t]:s.axes].flat().forEach(a=>{a!==void 0&&g(a.valueFormat)&&e(a)})};function H(i,s,t){let e=i?.axes?.[s];e?.title!==void 0?e.title.content.text=t:e!==void 0&&(e.title=c({text:t,visible:!0,font:x(l.AxisTitle)}))}function J(i){let{config:s,layerInfo:t,commonStrings:e,numericFields:a,aggregationType:o}=i,n="";if(s)if(L(s)===I.Stacked100)n=e.utilsStrings.statistics.percent;else{let m=A(o,e);if(s.series[0]?.type===r.HeatSeries)n=f(t.layerFieldsInfo,s.series[0].y);else if(a.length===1){let u=f(t.layerFieldsInfo,a[0]),b=N(t.layer).idField;o===d.NoAggregation?n=u:o===d.Count&&b!==void 0&&a[0]===b?n=e.utilsStrings.statistics.count:n=S(e.axisLabels.aggregationOfFieldName,{aggregation:m,fieldName:u})}else a.length>1&&(o===d.NoAggregation?n=e.axisLabels.values:n=S(e.axisLabels.aggregationOfValues,{aggregation:m}))}return n}var k=(i,s,t)=>i.axes?.[s]??p(t,i.type)[s],T=i=>{let{config:s,axis:t,axisIndex:e}=i;s.axes!==void 0&&(s.axes[e]=t)},$=i=>{let{config:s,axisIndex:t,isMax:e}=i,a=Number.NaN;return e?a=s.axes?.[t]?.maximum:a=s.axes?.[t]?.minimum,a??Number.NaN},h=i=>{let{config:s,value:t,axisIndex:e,isMax:a}=i,o=s?.axes?.[e];o!==void 0&&(a?o.maximum=t:o.minimum=t)},j=i=>i.axes?.[0]?.valueFormat??y(),D=(i,s,t)=>{let e=k(i,0,s);if(e!==void 0&&t!==void 0){let a={...e,valueFormat:t};T({config:i,axis:a,axisIndex:0})}},G=(i,s,t)=>{let e=i.axes?.[s];e!==void 0&&(e.integerOnlyValues=t)},M=i=>{let s=F(i.series);return s===r.BarSeries||s===r.ComboLineAndBarSeries||s===r.LineSeries},
|
|
2
|
+
import a from"./7DHOI5P2.js";import{Aa as A,G as x,I as c,K as y,_ as p,c as l}from"./43DLRSYB.js";import{a as F}from"./Z5QPCSUQ.js";import{a as r,b as d,f as I}from"./QVG3TOL4.js";export default $arcgis.t(([{substitute:S},{Cc:N,Ra:g,fc:L,hc:f}])=>{var v=i=>{let{config:s,axisIndex:t,callback:e}=i;[t!==void 0?s.axes?.[t]:s.axes].flat().forEach((a,o)=>{a!==void 0&&e(a,t!==void 0?t:o)})},E=i=>{let{config:s,axisIndex:t,callback:e}=i;[t!==void 0?s.axes?.[t]:s.axes].flat().forEach(a=>{a!==void 0&&g(a.valueFormat)&&e(a)})};function H(i,s,t){let e=i?.axes?.[s];e?.title!==void 0?e.title.content.text=t:e!==void 0&&(e.title=c({text:t,visible:!0,font:x(l.AxisTitle)}))}function J(i){let{config:s,layerInfo:t,commonStrings:e,numericFields:a,aggregationType:o}=i,n="";if(s)if(L(s)===I.Stacked100)n=e.utilsStrings.statistics.percent;else{let m=A(o,e);if(s.series[0]?.type===r.HeatSeries)n=f(t.layerFieldsInfo,s.series[0].y);else if(a.length===1){let u=f(t.layerFieldsInfo,a[0]),b=N(t.layer).idField;o===d.NoAggregation?n=u:o===d.Count&&b!==void 0&&a[0]===b?n=e.utilsStrings.statistics.count:n=S(e.axisLabels.aggregationOfFieldName,{aggregation:m,fieldName:u})}else a.length>1&&(o===d.NoAggregation?n=e.axisLabels.values:n=S(e.axisLabels.aggregationOfValues,{aggregation:m}))}return n}var k=(i,s,t)=>i.axes?.[s]??p(t,i.type)[s],T=i=>{let{config:s,axis:t,axisIndex:e}=i;s.axes!==void 0&&(s.axes[e]=t)},$=i=>{let{config:s,axisIndex:t,isMax:e}=i,a=Number.NaN;return e?a=s.axes?.[t]?.maximum:a=s.axes?.[t]?.minimum,a??Number.NaN},h=i=>{let{config:s,value:t,axisIndex:e,isMax:a}=i,o=s?.axes?.[e];o!==void 0&&(a?o.maximum=t:o.minimum=t)},j=i=>i.axes?.[0]?.valueFormat??y(),D=(i,s,t)=>{let e=k(i,0,s);if(e!==void 0&&t!==void 0){let a={...e,valueFormat:t};T({config:i,axis:a,axisIndex:0})}},G=(i,s,t)=>{let e=i.axes?.[s];e!==void 0&&(e.integerOnlyValues=t)},M=i=>{let s=F(i.series);return s===r.BarSeries||s===r.ComboLineAndBarSeries||s===r.LineSeries},C=i=>{let{axisIndex:s,config:t,isMultiAxis:e}=i,a=!1;return s===0||s===1&&e?a=!0:s===2&&(a=M(t)),a},K=i=>{let{axisIndex:s,func:t,config:e}=i;return C({axisIndex:s,config:e,isMultiAxis:!0})?t(s):void 0},P=(i,s)=>{let t,e=s.axes?.[i]?.valueFormat;return(i===0||i>=1&&g(e))&&(t=e),t},Q=i=>{let{config:s,commonStrings:t,valueFormat:e,axisIndex:a=0}=i,o=k(s,a,t);if(o!==void 0&&e!==void 0){let n={...o,valueFormat:e};T({config:s,axis:n,axisIndex:a})}},R=(i,s)=>i.axes?.[s]?.isLogarithmic??!1,U=i=>{let{config:s,isLogarithmic:t,axisIndex:e}=i,a=s.axes?.[e];a&&(a.isLogarithmic=t,h({config:s,value:null,axisIndex:e,isMax:!0}),h({config:s,value:null,axisIndex:e,isMax:!1}))},X=i=>{let{config:s,scrollbar:t,axisIndex:e}=i;s.axes?.[e]!==void 0&&(s.axes[e].scrollbar=t)},Y=(i,s)=>s.axes?.[i]?.labels?.visible??!0,Z=i=>{let{visibility:s,axisIndex:t,config:e}=i;v({config:e,axisIndex:t,callback:a=>{a.labels!==void 0?a.labels.visible=s:a.labels=c({text:"",visible:s,font:x(l.AxisLabels),type:l.AxisLabels})}})},O=(i,s)=>s.axes?.[i]?.title?.content.text??"",_=(i,s,t)=>{let e=t.axes?.[s];e?.title!==void 0?e.title.content.text=i:e!==void 0&&e?.title===void 0&&(e.title=c({text:i,visible:!0,font:x(l.AxisTitle)}))},W=(i,s)=>s.axes?.[i]?.title?.visible??!1,ss=i=>{let{visibility:s,axisIndex:t,config:e}=i;v({config:e,axisIndex:t,callback:(a,o)=>{a.title!==void 0?a.title.visible=s:a.title=c({text:O(o,e),visible:s,font:x(l.AxisTitle)})}})},es=(i,s)=>i.axes?.[s]?.title?.content,is=i=>{let{config:s,axisIndex:t,symbol:e}=i;v({config:s,axisIndex:t,callback:a=>{let o=a.title?.content.text;(a.title===void 0||e===void 0)&&(a.title=c({text:"",visible:!0,font:x(l.AxisTitle),type:l.AxisTitle})),e!==void 0&&(a.title.content={...e}),a.title.content.text=o}})};return{a:v,b:E,c:H,d:J,e:$,f:h,g:j,h:D,i:G,j:K,k:P,l:Q,m:R,n:U,o:X,p:Y,q:Z,r:O,s:_,t:W,u:ss,v:es,w:is}},"intl",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import o from"./
|
|
2
|
+
import o from"./G63YJSVM.js";import n from"./DW44U5PH.js";import m from"./3TO4L72A.js";import k from"./CDVLQX4S.js";import"./O4TPXFX4.js";import j from"./AZ2Z7W7G.js";import i from"./TWAPMNSX.js";import g from"./XTQ4C5NA.js";import e from"./LEUIZWRV.js";import d from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import{$ as l,I as p,S as v,ka as h,ra as _}from"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as c,b as f,s as b}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Cc:I,Zb:S},,{e:i},{d:C},,L,{b:w,d:V,f:D},{b:F,d:E,f:W},{d:T,e:A},B])=>{var M=t=>t.axes[0].needle?.visible??!0,P=(t,e)=>{e.axes[0].needle===void 0&&(e.axes[0].needle=l()),e.axes[0].needle.visible=t},$=t=>t.axes[0].needle?.symbol,G=(t,e)=>{e.axes[0].needle===void 0&&(e.axes[0].needle=l()),e.axes[0].needle.symbol=t},j=t=>t.axes[0].needle?.startWidth,q=(t,e)=>{e.axes[0].needle===void 0&&(e.axes[0].needle=l()),e.axes[0].needle.startWidth=t},O=t=>t.axes[0].needle?.endWidth,N=(t,e)=>{e.axes[0].needle===void 0&&(e.axes[0].needle=l()),e.axes[0].needle.endWidth=t},z=t=>t.axes[0].needle?.innerRadius,H=(t,e)=>{e.axes[0].needle===void 0&&(e.axes[0].needle=l()),e.axes[0].needle.innerRadius=t},J=t=>t.axes[0].needle?.displayPin??!1,K=(t,e)=>{e.axes[0].needle===void 0&&(e.axes[0].needle=l()),e.axes[0].needle.displayPin=t},Q=t=>t.axes[0].innerLabel?.visible??!0,U=(t,e)=>{e.axes[0].innerLabel===void 0&&(e.axes[0].innerLabel=p()),e.axes[0].innerLabel.visible=t},X=t=>t.axes[0].innerLabel?.content,Y=(t,e)=>{e.axes[0].innerLabel===void 0&&(e.axes[0].innerLabel=p()),t!==void 0&&(e.axes[0].innerLabel.content=t)},Z=t=>t.axes[0].progressBands?.visible??!0,ee=(t,e)=>{e.axes[0].progressBands===void 0&&(e.axes[0].progressBands={type:c.FixedProgressBands}),e.axes[0].progressBands.visible=t},te=t=>t.axes[0].progressBands,se=(t,e)=>{t===void 0?delete e.axes[0].progressBands:e.axes[0].progressBands=t},ne=t=>t.axes[0].ticks?.visible??!0,ie=(t,e)=>{e.axes[0].ticks===void 0&&(e.axes[0].ticks={type:c.GaugeAxisTick}),e.axes[0].ticks.visible=t},re=t=>t.axes[0].labelsIncrement,oe=(t,e)=>{e.axes[0].labelsIncrement=t},ae=t=>t.axes[0].onlyShowFirstAndLastLabels??!1,ge=(t,e)=>{e.axes[0].onlyShowFirstAndLastLabels=t},le=t=>t.series[0]?.valueConversion,de=(t,e)=>{e.series[0]!==void 0&&(e.series[0].valueConversion=t)},k=t=>t.series[0]?.featureIndex,R=t=>{let{featureIndex:e,config:s,layerInfo:a,commonStrings:o}=t,g=x(s),d=u(s);e===null?delete s.series[0].featureIndex:s.series[0]!==void 0&&(s.series[0].featureIndex=e),y({config:s,layerInfo:a,field:g,aggregationType:d,commonStrings:o})},ce=t=>t.subType??b.StatisticGauge,fe=t=>{let{config:e,field:s,aggregationType:a}=t;if(a!==f.NoAggregation){let o=k(e),g=m(o)?{}:{outStatistics:[{statisticType:a,onStatisticField:s,outStatisticFieldName:`${a}_${s}`}]};e.series[0].query=g}},pe=t=>{let{config:e,layerInfo:s,commonStrings:a,field:o,aggregationType:g}=t;e.title&&(e.title.content.text=C({config:e,layerInfo:s,commonStrings:a,numericFields:[o],aggregationType:g}))},y=t=>{let{config:e,field:s,aggregationType:a}=t;e.series[0]===void 0&&(e.series=[h({})]);let o=m(e.series[0]?.featureIndex),g=o?s:`${a}_${s}`;o&&s.startsWith(`${a}_`)&&(g=s.replace(`${a}_`,"")),e.series[0].x=g,fe({config:e,field:s,aggregationType:a}),pe(t)},u=t=>t.series[0]?.query?.outStatistics?.[0]?.statisticType??f.Count,he=t=>{let{config:e,layerInfo:s,commonStrings:a,aggregationType:o}=t,g=x(e);y({config:e,layerInfo:s,commonStrings:a,field:g,aggregationType:o})},m=t=>typeof t=="number"&&t>=0,x=t=>m(t.series[0]?.featureIndex)?t.series[0]?.x:t.series[0]?.query?.outStatistics?.[0]?.onStatisticField??"",ye=t=>{let{field:e,config:s,layerInfo:a,commonStrings:o}=t,g=u(s);y({config:s,layerInfo:a,commonStrings:o,field:e,aggregationType:g})},ue=t=>t.innerRadius??50,me=(t,e)=>{e.innerRadius=t},xe=t=>t.startAngle??-90,be=(t,e)=>{e.startAngle=t},ve=t=>t.endAngle??270,_e=(t,e)=>{e.endAngle=t};function Se(t){return v(t)}var Ie=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,r=(t,e,s,a)=>{for(var o=Ce(e,s),g=t.length-1,d;g>=0;g--)(d=t[g])&&(o=d(e,s,o)||o);return o&&Ie(e,s,o),o},n=class extends L{constructor(){super(...arguments),this._chartType=c.GaugeSeries}generateChartTitle(){return Se(this.commonStrings)}async setup(e){await this.loadConfigFromLayer(e),typeof this.resolveSetup=="function"&&this.resolveSetup()}get field(){return x(this._config)}set field(e){ye({field:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get aggregationType(){return u(this._config)}set aggregationType(e){he({aggregationType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get innerRadius(){return ue(this._config)}set innerRadius(e){me(e,this._config),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get startAngle(){return xe(this._config)}set startAngle(e){be(e,this._config),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get endAngle(){return ve(this._config)}set endAngle(e){_e(e,this._config),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get valueConversion(){return le(this._config)}set valueConversion(e){de(e,this._config)}get featureIndex(){return k(this._config)}set featureIndex(e){R({featureIndex:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}removeFeatureIndex(){R({featureIndex:null,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get gaugeSubType(){return ce(this._config)}get needleVisibility(){return M(this._config)}set needleVisibility(e){P(e,this._config)}get needleSymbol(){return $(this._config)}set needleSymbol(e){G(e,this._config)}get needleStartWidth(){return j(this._config)}set needleStartWidth(e){q(e,this._config)}get needleEndWidth(){return O(this._config)}set needleEndWidth(e){N(e,this._config)}get needleInnerRadius(){return z(this._config)}set needleInnerRadius(e){H(e,this._config)}get needleDisplayPin(){return J(this._config)}set needleDisplayPin(e){K(e,this._config)}get innerLabelVisible(){return Q(this._config)}set innerLabelVisible(e){U(e,this._config)}get innerLabelContent(){return X(this._config)}set innerLabelContent(e){Y(e,this._config)}get progressBandsVisibility(){return Z(this._config)}set progressBandsVisibility(e){ee(e,this._config)}get progressBands(){return te(this._config)}set progressBands(e){se(e,this._config)}get axisTickVisibility(){return ne(this._config)}set axisTickVisibility(e){ie(e,this._config)}get labelsIncrement(){return re(this._config)}set labelsIncrement(e){oe(e,this._config)}get onlyShowFirstAndLastLabels(){return ae(this._config)}set onlyShowFirstAndLastLabels(e){ge(e,this._config)}generateDefaultConfig(){let e=_(this.commonStrings);return e.series=[h({objectIDField:I(this.layerInfo.layer).idField})],e}};r([i],n.prototype,"field");r([i],n.prototype,"aggregationType");r([i],n.prototype,"innerRadius");r([i],n.prototype,"startAngle");r([i],n.prototype,"endAngle");r([i],n.prototype,"valueConversion");r([i],n.prototype,"featureIndex");r([i],n.prototype,"removeFeatureIndex");r([i],n.prototype,"needleVisibility");r([i],n.prototype,"needleSymbol");r([i],n.prototype,"needleStartWidth");r([i],n.prototype,"needleEndWidth");r([i],n.prototype,"needleInnerRadius");r([i],n.prototype,"needleDisplayPin");r([i],n.prototype,"innerLabelVisible");r([i],n.prototype,"innerLabelContent");r([i],n.prototype,"progressBandsVisibility");r([i],n.prototype,"progressBands");r([i],n.prototype,"axisTickVisibility");r([i],n.prototype,"labelsIncrement");r([i],n.prototype,"onlyShowFirstAndLastLabels");var Le=[w,T,V,A,F,E,W,D,B];S(n,Le);return n},a,d,e,g,i,j,k,m,n,o)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{i as we}from"./DRYZWCWX.js";import{c as W}from"./POA2XTTK.js";import g from"./
|
|
2
|
+
import{i as we}from"./DRYZWCWX.js";import{c as W}from"./POA2XTTK.js";import g from"./3BD4I5JQ.js";import f from"./QARQR7H5.js";import e from"./A7U4VQMX.js";import d from"./ETHXVKWT.js";import c from"./H4XMNS3O.js";import b from"./TWAPMNSX.js";import a from"./7DHOI5P2.js";import{Fa as le,Ga as _,Ia as k,Ja as ne,p as N,q as E}from"./43DLRSYB.js";import{a as re}from"./KX7KGXKQ.js";import{b as ie,i as U,j as K,r as v}from"./NGXRBJKL.js";import{e as G}from"./QP5UAIC6.js";import{a as se}from"./Z5QPCSUQ.js";import{a as O,l as D}from"./QVG3TOL4.js";export default $arcgis.t(([{Cc:ce,E:ue,Ec:me,Jc:ye,Rb:de,S:fe,a:Q,dd:I,l:S,lc:T,n:B,q:b,yb:V},{c:X},{f:be,g:H},{na:te,oa:ve,pa:ae},{m:Y,n:q,o:ee,z:ge},{b:xe},{a:pe,c:Le,d:Fe}])=>{function Se(l){let{hour:e,minute:t=0,format:a,locale:o="en-US"}=l,i=a&&Object.keys(a).length>0?a:{hour:"numeric",minute:"2-digit",hour12:!1},r=e.toString();if(Number.isInteger(e)&&e>=0&&e<=23&&Number.isInteger(t)&&t>=0&&t<=59){let n=new Date(2e3,0,1,e,t);r=new Intl.DateTimeFormat(o,i).format(n),r.includes(":")||r.startsWith("0")&&(r=r.slice(1))}return r}function he(l){let{weekdayNumber:e,format:t,locale:a="en-US",firstDayOfWeek:o=7}=l,i=t&&Object.keys(t).length>0?t:{weekday:"long"},r=e.toString();if(Number.isInteger(e)&&e>0&&e<=7&&Number.isInteger(o)&&o>0&&o<=7){let n=(e+o-1)%7,s=new Date(2e3,0,2+n);r=new Intl.DateTimeFormat(a,i).format(s)}return r}function Oe(l){let{monthNumber:e,format:t,locale:a="en-US"}=l,o=t&&Object.keys(t).length>0?t:{month:"long"},i=e.toString();if(Number.isInteger(e)&&e>0&&e<=12){let r=new Date(2e3,e-1);i=new Intl.DateTimeFormat(a,o).format(r)}return i}function Ce(l){let{value:e,formatLocale:t,unit:a,config:o,utilsStrings:i}=l,r={label:"",value:e.toString()};switch(a){case D.DayOfWeek:r={label:i.heatChartCalendarDatePartsUnits.dayOfWeek,value:he({weekdayNumber:e,firstDayOfWeek:"firstDayOfWeek"in o?o.firstDayOfWeek:ne,locale:t})};break;case D.MonthOfYear:r={label:i.heatChartCalendarDatePartsUnits.monthOfYear,value:Oe({monthNumber:e,locale:t})};break;case D.HourOfDay:r={label:i.heatChartCalendarDatePartsUnits.hourOfDay,value:Se({hour:e,format:{hour:"numeric",hour12:!1},locale:t})};break;case D.DayOfMonth:r={label:i.heatChartCalendarDatePartsUnits.dayOfMonth,value:typeof e=="string"?e:e?.toString()??""};break;case D.DayOfYear:r={label:i.heatChartCalendarDatePartsUnits.dayOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.MinuteOfDay:r={label:i.heatChartCalendarDatePartsUnits.minuteOfDay,value:typeof e=="string"?e:e?.toString()??""};break;case D.WeekOfYear:r={label:i.heatChartCalendarDatePartsUnits.weekOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.QuarterOfYear:r={label:i.heatChartCalendarDatePartsUnits.quarterOfYear,value:typeof e=="string"?e:e?.toString()??""};break}return r}function ke(l,e){return!ie(l,e)}function st(l,e){return ke(l,e)||l!==e}function $e(l){return(new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??".")==="."?",":";"}function Me(l){return new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??"."}var Be=l=>{let{value:e,quoteAll:t=!1,locale:a,roundDecimals:o}=l,i=e==null?"":String(e);if(e===null)i="null";else if(e===void 0)i="";else if(typeof e=="number"&&Number.isFinite(e)&&a!==void 0){let r=Me(a),n=o??i.split(r)[1]?.length??2;i=new Intl.NumberFormat(a,{maximumFractionDigits:n}).format(e).replace(/\u202F/gu," ")}return(t||/[",\r\n]/u.test(i))&&(i=`"${i.replace(/"/gu,'""')}"`),i};function ut(l,e={}){let{columns:t,delimiter:a,includeHeader:o=!0,quoteAll:i=!1,locale:r,roundDecimals:n}=e,s=l.length===0,f="";if(!s){let c=t??Object.keys(l[0]),u=[],g=a??$e(r??"en");if(r!==void 0&&g!==","&&(f+=`sep=${g}\r
|
|
3
3
|
`),o){let w=c.map(x=>Be({value:x,quoteAll:i,locale:r,roundDecimals:n}));u.push(w.join(g))}l.forEach(w=>{let x=c.map(p=>Be({value:w[p],quoteAll:i,locale:r,roundDecimals:n}));u.push(x.join(g))}),f+=u.join(`\r
|
|
4
4
|
`)}return f}function ft(l){let{rawData:e,config:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n,formatLocale:s,utilsStrings:f}=l,c=[];if(t!==void 0&&Array.isArray(e)&&e.length>0){let u=se(t?.series);u===O.HistogramSeries?c=Ve(t,e,i):u===O.HeatSeries?c=Re({config:t,rows:e,layer:a,fieldList:o,formatLocale:s,utilsStrings:f}):u===O.BarSeries||u===O.LineSeries||u===O.ComboLineAndBarSeries?c=Ie({config:t,rows:e,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n}):u===O.PieSeries?c=Ue({config:t,rows:e,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n}):u===O.BoxPlotSeries&&(c=_e({config:t,rows:e,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n}))}return c}function P(l){let{value:e,originalValue:t,formatter:a}=l,o=e;return a!==void 0&&(e===null||e instanceof Date||typeof e=="number"||typeof e=="string")&&(o=a(e,t)),o}function M(l){let{field:e,value:t,dataContext:a,layer:o,fieldList:i,formatter:r,timeZone:n}=l,s;if(t==null||typeof t=="boolean"||Array.isArray(t))s=t;else if(typeof t=="string"||typeof t=="number"||t instanceof Date){let f=Ne({fieldName:e,dataContext:a})??(o!==void 0&&(typeof t=="string"||typeof t=="number")?ye({queryObject:o,fieldName:e,fieldValue:t}):void 0);s=De({field:e,value:f??t,fieldList:i,timeZone:n})}else s=t;return P({value:s,originalValue:t,formatter:r})}function $(l){let{field:e,row:t,layer:a,fieldList:o,formatter:i,useRendererLabel:r=!1,timeZone:n}=l,s=Object.keys(t).find(u=>u.toLocaleLowerCase()===e.toLocaleLowerCase()),f=t[s??e],c=fe({value:f,dataContext:t,useRendererLabel:r});return M({field:e,value:c,dataContext:t,layer:a,fieldList:o,formatter:i,timeZone:n})}function Ze(l,e){let t=!1;if(l===e)t=!0;else if(l!=null&&e!=null){let a=String(l),o=String(e);t=a===o||!Number.isNaN(Number(a))&&!Number.isNaN(Number(o))&&Number(a)===Number(o)}return t}function Ne(l){let{fieldName:e,dataContext:t}=l,a=S.rendererSymbolField;return e===a&&t!==void 0?de(t):void 0}function Pe(l){let{config:e,splitByField:t,splitByValue:a,splitByValueIndex:o,layer:i,fieldList:r,timeZone:n}=l,s,f=e.series[o??-1]?.name;return f!==void 0?s=f:s=M({field:t,value:a,layer:i,fieldList:r,timeZone:n}),s}function Re(l){let{config:e,rows:t,layer:a,fieldList:o,formatLocale:i,utilsStrings:r}=l,[n]=e.series,s=n.x,f=te(e),c=ae(e),u=H({config:e,xAxisField:s,numericFields:c,aggregationType:f,layer:a,fieldList:o});return t.map(g=>{let w=g[E.xField],x=g[E.yField],p=g[E.valueField],F=typeof p=="number"&&Number.isFinite(p)?p.toFixed(2):p,m={label:n.x,value:w},y={label:n.y,value:x};if(n.xTemporalBinning!==void 0){let{label:d,value:L}=Ce({value:Number(w),config:e,formatLocale:i,unit:n.xTemporalBinning.unit,utilsStrings:r});!T(d)&&!T(L)&&(m={label:d,value:L})}if(n.yTemporalBinning!==void 0){let{label:d,value:L}=Ce({value:Number(x),config:e,formatLocale:i,unit:n.yTemporalBinning.unit,utilsStrings:r});!T(d)&&!T(L)&&(y={label:d,value:L})}return{[m.label]:m.value,[y.label]:y.value,[u.description]:F}})}function Ve(l,e,t){let a=xe(l),o=`${v(W.Min)} of ${a}`,i=`${v(W.Max)} of ${a}`,r=`${v(W.Count)} of ${a}`;return e.map(n=>{let{minValue:s,maxValue:f,count:c}=n,u=U(s),g=U(f),w=U(c),x={};if(u&&(x[o]=P({value:s,originalValue:s,formatter:t?.xAxisLabelFormatter})),g&&(x[i]=P({value:f,originalValue:f,formatter:t?.xAxisLabelFormatter})),u&&g){let p=P({value:s,originalValue:s,formatter:t?.xAxisLabelFormatter}),F=P({value:f,originalValue:f,formatter:t?.xAxisLabelFormatter});x.Label=`${String(p??"")} - ${String(F??"")}`}return w&&(x[r]=c),x})}function Te(l,e,t){let a=Object.keys(l),o=[];return t?o=t.map(i=>a.find(r=>r.toLowerCase().includes(i.toLowerCase()))||""):o=a.filter(i=>i.toLowerCase().includes(e.toLowerCase())),o.filter(i=>i.trim()!=="")}function Ie(l){let{config:e,rows:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r=!1,timeZone:n}=l,s=be(e),f=te(e),c=v(f),u=ae(e),g=I(e.series),w=X(e),x=ve(e),{idField:p,isTraditionalTypeOID:F}=ce(ue(a)),m=F&&u.length===1&&u[0]===p,y;switch(g){case b.BarAndLineNoAggregation:y=t.map(d=>{let L=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),C={[s]:L};return Object.assign(C,...u.map(A=>({[A]:P({value:d[A],originalValue:d[A]})}))),C});break;case b.BarAndLineFromFields:y=K(u,t).map(([d,L])=>{let C=V(e.series)[0],A={};return L!==void 0&&d!==void 0&&(A.Field=P({value:L[s],originalValue:L[s],formatter:i?.xAxisLabelFormatter}),A.Value=P({value:L[C],originalValue:L[C]})),A});break;case b.BarAndLineMonoField:case b.BarAndLineMultiFields:y=t.map(d=>{let L=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),C={[s]:L};return u.forEach((A,h)=>{let Z=H({config:e,xAxisField:s,numericFields:u,aggregationType:f,layer:a,numericFieldIndex:h,fieldList:o}),R=V(e.series)[h],oe=R,J=R;R.toLowerCase()===Z.name.toLowerCase()&&(oe=Z.description,J=Z.name),C[oe]=P({value:d[J],originalValue:d[J]})}),C});break;case b.BarAndLineSplitBy:y=t.flatMap(d=>{let L=V(e.series),C=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});return w.map((A,h)=>{let Z=Pe({config:e,splitByField:x,splitByValue:A,splitByValueIndex:h,layer:a,fieldList:o,timeZone:n});return{[s]:C,[x]:Z,[m?c:`${c} of ${u[0]}`]:d[L[h]]}})});break;case b.BarAndLineSplitByNoAggregation:y=t.map(d=>{let L=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),C=Te(d,u[0],w),A=d[x],h=w.findIndex(R=>Ze(R,A)),Z=Pe({config:e,splitByField:x,splitByValue:A,splitByValueIndex:h>=0?h:void 0,layer:a,fieldList:o,timeZone:n});return{[s]:L,[x]:Z,[u[0]]:d[C[0]]}});break;default:y=t}return y}function je(l){if(l.length===0)return[];let e=l.reduce((t,a)=>{for(let[o,i]of Object.entries(a))typeof i=="number"&&Number.isFinite(i)&&(t[o]=(t[o]??0)+i);return t},{});return l.map(t=>{let a={...t};for(let[o,i]of Object.entries(t))if(typeof i=="number"&&e[o]>0){let r=i/e[o];a[`${o}${k}`]=r.toPrecision(2)}return a})}function Ue(l){let{config:e,rows:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r=!1,timeZone:n}=l,s=pe(e),f=I(e.series),c=je(t),u=Le(e),g=f!==b.PieFromFields?G.Category:G.Fields,w=Fe(e,g),x=H({config:e,xAxisField:s,numericFields:u,aggregationType:w,mode:g,layer:a,fieldList:o}),p=V(e.series)[0];return f===b.PieFromCategory||f===b.PieNoAggregation?c=c.map(F=>{let m=$({field:s,row:F,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),y={[s]:m},d=p,L=p;return f===b.PieFromCategory&&p.toLowerCase()===x.name.toLowerCase()&&(d=x.description,L=x.name),y[d]=P({value:F[L],originalValue:F[L]}),y[v(k.trim())]=P({value:F[`${L}${k}`],originalValue:F[`${L}${k}`]}),y}):f===b.PieFromFields&&(c=K(u,c).map(([F,m])=>{let y={};return m!==void 0&&F!==void 0&&(y.Field=P({value:m[s],originalValue:m[s],formatter:i?.xAxisLabelFormatter}),y.Value=P({value:m[p],originalValue:m[p]}),y[v(k.trim())]=P({value:m[`${p}${k}`],originalValue:m[`${p}${k}`]})),y})),c}function z(l){let{rawData:e,keyBase:t="",outRow:a}=l;for(let[o,i]of Object.entries(B)){let r=e[t+i];r!==void 0&&(a[o]=r);let n=e[t+i+le];n!==void 0&&(a[`${o} Outlier`]=n);let s=e[t+i+_];s!==void 0&&(a[`${o} Z-Score`]=s)}}function j(l){let{rawData:e,outRow:t,config:a,boxPlotSubType:o,layer:i,fieldList:r,timeZone:n}=l,s=Y(a),f=ee(a),c=q(a),u=B.Outlier,g=N;switch(o){case b.BoxPlotC3MonoFieldAndCategory:{let p=De({field:s,value:e[s],fieldList:r,timeZone:n});t[s]=p,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC4MultiFieldsAndCategory:{t[v(s)]=e[s],u=`${f.find(p=>Object.keys(e).some(F=>F.toLowerCase().includes(p.toLowerCase())))??""}_${u}`,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC5MonoFieldAndSplitBy:case b.BoxPlotC6MultiFieldsAndSplitBy:{let p=String(e[c]),F=M({field:c,value:p,layer:i,fieldList:r,timeZone:n});u=`${p}_${u}`,t.Field=e[g],t[v(c)]=F,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC7MonoFieldAndCategoryAndSplitBy:{let p=String(e[c]),F=M({field:c,value:p,layer:i,fieldList:r,timeZone:n});u=`${p}_${u}`,t[v(s)]=e[s],t[v(c)]=F,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC1MonoField:case b.BoxPlotC2MultiFields:default:{t.Field=e[g],t[v(B.Outlier)]=e[u];break}}let w=`${u}${_}`,x=e[w];x!==void 0&&(t[`${v(B.Outlier)} Z-Score`]=x)}function Ee(l){let{rawData:e,outRow:t,config:a,splitByValue:o,layer:i,fieldList:r,timeZone:n}=l,s=I(a.series),f=e[`${o}_${B.Average}`],c=q(a),u=Y(a),g="";switch(s){case b.BoxPlotC5MonoFieldAndSplitBy:{g=`${o}_${c}`,t.Field=e[N],t[v(c)]=M({field:c,value:e[g],layer:i,fieldList:r,timeZone:n});break}case b.BoxPlotC6MultiFieldsAndSplitBy:{g=`${o}_${B.Average}`,t.Field=e[N],t[v(c)]=M({field:c,value:e[g],layer:i,fieldList:r,timeZone:n});break}case b.BoxPlotC7MonoFieldAndCategoryAndSplitBy:{g=`${o}_${B.Average}`,t[u]=e[u],t[v(c)]=M({field:c,value:o,layer:i,fieldList:r,timeZone:n});break}}t[v(B.Average)]=f;let w=`${String(f)}${_}`,x=e[w];x!==void 0&&(t[`${v(B.Average)} Z-Score`]=x)}function _e(l){let{config:e,rows:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r=!1,timeZone:n}=l,s=I(e.series),f=s,c=ge(e),u=Array.isArray(t)&&t.length>0&&t.every(m=>m[S.boxPlot.boxPlotMeanLineMarkerId]!==void 0);c&&!u&&(s===b.BoxPlotC5MonoFieldAndSplitBy?f=b.BoxPlotC1MonoField:s===b.BoxPlotC6MultiFieldsAndSplitBy?f=b.BoxPlotC2MultiFields:s===b.BoxPlotC7MonoFieldAndCategoryAndSplitBy&&(f=b.BoxPlotC3MonoFieldAndCategory));let g=Y(e),w=ee(e),x=X(e),p=q(e),F;switch(f){case b.BoxPlotC1MonoField:case b.BoxPlotC3MonoFieldAndCategory:{F=t.map(m=>{let y={};if(m[S.boxPlot.boxPlotOutlierId])j({rawData:m,outRow:y,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n});else{if(f===b.BoxPlotC3MonoFieldAndCategory){let d=$({field:g,row:m,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});y[g]=d}else f===b.BoxPlotC1MonoField&&(y.Field=m[N]);z({rawData:m,outRow:y})}return y});break}case b.BoxPlotC2MultiFields:{F=t.flatMap(m=>{let y={};return m[S.boxPlot.boxPlotOutlierId]?j({rawData:m,outRow:y,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n}):(y.Field=m[N],z({rawData:m,outRow:y})),[y]});break}case b.BoxPlotC4MultiFieldsAndCategory:{F=t.flatMap(m=>w.map(y=>{let d={},L="";if(d.Field=y,m[S.boxPlot.boxPlotOutlierId])j({rawData:m,outRow:d,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n});else{if(f===b.BoxPlotC4MultiFieldsAndCategory){let C=$({field:g,row:m,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});d[g]=C,L=`${y}_`}z({rawData:m,outRow:d,keyBase:L})}return d}));break}case b.BoxPlotC5MonoFieldAndSplitBy:case b.BoxPlotC6MultiFieldsAndSplitBy:case b.BoxPlotC7MonoFieldAndCategoryAndSplitBy:{F=t.flatMap(m=>{if(m[S.boxPlot.boxPlotOutlierId]){let y={};return j({rawData:m,outRow:y,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n}),[y]}else return m[S.boxPlot.boxPlotMeanLineMarkerId]?x?.map(y=>{let d={};return Ee({rawData:m,outRow:d,splitByValue:y,config:e,layer:a,fieldList:o,timeZone:n}),d}):x.map(y=>{let d={},L=M({field:p,value:y,layer:a,fieldList:o});if(f===b.BoxPlotC7MonoFieldAndCategoryAndSplitBy){let C=$({field:g,row:m,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});d[g]=C}return m[S.boxPlot.boxPlotOutlierId]?j({rawData:m,outRow:d,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n}):(d[p]=L,z({rawData:m,outRow:d,keyBase:`${y}_`})),d})});break}default:F=t}return F}var Ae=l=>{let e=!1;return(typeof l=="string"||typeof l=="number")&&(e=!Number.isNaN(new Date(l).getTime())),e},We=(l,e)=>Q.fromJSDate(l,{zone:e??"local"}).toFormat("yyyy-LL-dd"),He=(l,e)=>Q.fromJSDate(l,{zone:e??"local"}).toFormat("yyyy-LL-dd'T'HH:mm:ss"),De=l=>{let{field:e,value:t,fieldList:a,timeZone:o}=l,i=t,r=a?.find(n=>n.name===e);if(r){let n=r.type===re.DateOnly;me(r)&&!n?i=Ae(t)?He(new Date(t),o):t:n&&typeof t!="string"&&(i=Ae(t)?We(new Date(t),o):t)}return i};function dt(l){let{runtimeDataFilters:e,view:t,viewTimeExtentChangePolicy:a,syncViewTimeExtent:o}=l,i=e;return t&&(a===we.Refresh||o)&&t.timeExtent?.start!=null&&t.timeExtent?.end!=null&&(i={...e,timeExtent:[t.timeExtent.start.valueOf(),t.timeExtent.end.valueOf()]}),i}return{a:Se,b:he,c:Oe,d:Ce,e:ke,f:st,g:ut,h:ft,i:dt}},a,b,c,d,e,f,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as h}from"./Y5CHG4IT.js";import{a as R}from"./KSDJFASU.js";import{b as q}from"./RP6LD7CU.js";import f from"./BWLIKQZM.js";import{l as c,m as b}from"./POA2XTTK.js";import{a as x}from"./WZFDIC2M.js";import e from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import{Aa as _,i as E}from"./43DLRSYB.js";import{a as A}from"./KX7KGXKQ.js";import{b as T}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as p,B as F,C as l,D as I,E as g,H as L,g as P,i as s,n as d,z as v}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{b as S,w as u,x as C}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([O,{Dc:N,Ec:B,hc:D,l:f},{c:$,d:y},{a:M,c:k,k:m}])=>{var z=P`.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)}.name{display:flex;flex-direction:column;margin:.5rem;padding:.5rem;background:#fff;min-width:250px}.header{margin:0;font-weight:bolder}.popover-pick-list{font-size:small;max-width:var(--arcgis-charts-config-popover-pick-list-max-width)}.panel{max-height:60vh}.color-ramp-popover{display:flex;flex-direction:column;gap:.75rem;min-width:320px;max-width:480px}.color-ramp-toolbar{display:flex;gap:.5rem;align-items:center;padding:5px 5px 0}.ramp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.5rem;max-height:300px;overflow:auto;padding:.25rem}.ramp-item{display:flex;flex-direction:column;border:1px solid var(--calcite-color-foreground-3);background:var(--calcite-color-foreground-1);cursor:pointer;box-shadow:inset 0 0 0 1px transparent;transition:box-shadow .12s;border-radius:2px;min-height:56px;padding:4px}.ramp-item:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}.ramp-name{font-size:.625rem;line-height:1;padding:2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-3)}.ramp-item.selected{background-color:var(--calcite-color-brand)!important;border-color:var(--calcite-color-brand)!important;outline:2px solid var(--calcite-color-brand)!important;color:var(--calcite-color-foreground-1)}.ramp-item.selected .ramp-name{color:var(--calcite-color-foreground-1)}.ramp-item.selected .ramp-strip{box-shadow:none;border:none}.ramp-strips{display:flex;flex:1;height:28px;width:100%;overflow:hidden}.ramp-strip{flex:1;min-width:0}.ramp-strip-fallback{background:repeating-linear-gradient(45deg,var(--calcite-color-foreground-3) 0,var(--calcite-color-foreground-3) 5px,var(--calcite-color-foreground-2) 5px,var(--calcite-color-foreground-2) 10px)}.ramp-empty{grid-column:1/-1;font-size:.75rem;color:var(--calcite-color-text-3)}.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}.color-ramp-popover-footer{display:flex;padding:.5rem}.color-ramp-popover-footer calcite-button{flex:1}`,o={name:"bar-chart-data-popover",header:"header",popoverPickList:"popover-pick-list",panel:"panel",colorRampPopover:"color-ramp-popover",colorRampToolbar:"color-ramp-toolbar",rampGrid:"ramp-grid",rampItem:"ramp-item",rampName:"ramp-name",rampStrips:"ramp-strips",rampStrip:"ramp-strip",rampStripFallback:"ramp-strip-fallback",rampEmpty:"ramp-empty",panelChildrenContainer:"panel-children-container",colorRampPopoverFooter:"color-ramp-popover-footer"},w=class extends F{constructor(){super(...arguments),this._messages=x(),this.commonStrings=x({name:"common",blocking:!0}),this.picklist=v(),this.popoverElement=v(),this.placement="leading",this.offsetDistance=-200,this.availableColorRamps=[],this.selectedCategory=y.all,this.aggregationLabels=[],this.isFlipped=!1,this.open=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigHeatChartColorRampChange=d(),this.arcgisChartsConfigHeatChartDataPopoverChange=d(),this.arcgisChartsConfigPopoverClose=d(),this.arcgisChartsConfigPopoverEmptyCellColorChange=d(),this.arcgisChartsConfigPopoverEmptyCellNameChange=d()}static{this.properties={availableColorRamps:16,selectedColorRampName:16,selectedCategory:16,aggregationLabels:16,isFlipped:5,model:0,messageOverrides:0,headingTitle:1,referenceElement:0,open:5,contentKind:1,layerFieldsInfo:0,selectedContent:1,colorRamps:0}}static{this.styles=z}async reposition(){await this.popoverElement.value?.reposition()}willUpdate(){let e=k.map(t=>_(t,this.commonStrings));T(this.aggregationLabels,e)||(this.aggregationLabels=e),this.colorRamps&&this.colorRamps!==this.availableColorRamps&&(this.availableColorRamps=this.colorRamps),this.contentKind===c.colorScheme&&this.selectedContent&&!this.selectedColorRampName&&(this.selectedColorRampName=this.selectedContent)}updated(){setTimeout(()=>{this.picklist.value?.setFocus()},M.PopoverTimer),q(this.popoverElement.value,this.open)}buildAggregationListItems(){return h(k.filter(e=>e!==S.NoAggregation),e=>e,(e,t)=>s`<calcite-list-item .label=${this.aggregationLabels[t]} .value=${e} .selected=${m(e,this.selectedContent)}></calcite-list-item>`)}buildPickListItem(e){return R(e.name,s`<calcite-list-item .label=${D(this.layerFieldsInfo,e.name)} .value=${e.name} .selected=${m(e.name,this.selectedContent)}></calcite-list-item>`)}buildPickListItems(e){let t=this.layerFieldsInfo?.length??0,a=[];switch(e){case c.numericFields:{let i=R(" ",s`<calcite-list-item label=" " value=" " .selected=${m("",this.selectedContent)}></calcite-list-item>`);a.push(i);for(let r=0;r<t;r+=1){let n=this.layerFieldsInfo?.[r];n&&N(n)&&a.push(this.buildPickListItem(n))}break}case c.xAxisField:{for(let i=0;i<t;i+=1){let r=this.layerFieldsInfo?.[i];r&&B(r)&&a.push(this.buildPickListItem(r))}break}}return a}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}onDataContentTypeChange(e){let t=e.target.selectedItems;this.arcgisChartsConfigHeatChartDataPopoverChange.emit({contentKind:this.contentKind,value:t.map(a=>a.value)[0]}),this.open=!1}filterColorRamps(){let e=[];if(this.selectedCategory===y.all)e=this.availableColorRamps;else{let t=$[this.selectedCategory];e=this.availableColorRamps?.filter(a=>t.some(i=>a.tags.includes(i)))}return e}getRampColors(e){let t=e.colors;return this.isFlipped?[...t].reverse():t}rampColorToCss(e){let t="#000000";try{if(e){if(e instanceof O){let a=e.toHex();typeof a=="string"&&a.length&&(t=a)}else if(Array.isArray(e)){let[a,i,r,n]=e;[a,i,r].every(H=>typeof H=="number")&&(t=`rgba(${a},${i},${r},${n??1})`)}else if(typeof e=="object"&&e){let{r:a,g:i,b:r,a:n}=e;if(a!=null&&i!=null&&r!=null)return`rgba(${a},${i},${r},${n??1})`}}}catch{}return t}onCategoryDropdownSelect(e){let t=e.target.selectedItems[0]?.getAttribute("data-tag");t&&(this.selectedCategory=t)}onFlipAll(){if(this.isFlipped=!this.isFlipped,this.selectedColorRampName){let e=this.availableColorRamps.find(t=>t.name===this.selectedColorRampName);if(e){let t={...e,colors:this.getRampColors(e)};this.arcgisChartsConfigHeatChartColorRampChange.emit({rampName:e.name,ramp:t,isFlipped:this.isFlipped})}}}onRampSelect(e){this.selectedColorRampName=e.name;let t={...e,colors:this.getRampColors(e)};this.arcgisChartsConfigHeatChartColorRampChange.emit({rampName:e.name,ramp:t,isFlipped:this.isFlipped})}nameChange(e){let t=e.target.value;this.model.emptyCellText!==t&&(this.model.emptyCellText=t,this.arcgisChartsConfigPopoverEmptyCellNameChange.emit({name:t}))}colorChange(e){let t=e instanceof CustomEvent?e.detail:e,[a,i,r]=t,n=E*255;this.arcgisChartsConfigPopoverEmptyCellColorChange.emit({color:[a,i,r,n]})}renderAggregationType(){let e=this.buildAggregationListItems();return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single selection-appearance=border @calciteListChange=${this.onDataContentTypeChange}>${e}</calcite-list>`}renderXAxisFieldSelect(){let e=this.buildPickListItems(c.xAxisField);return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single selection-appearance=border filter-enabled @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderNumericFields(){let e=this.buildPickListItems(c.numericFields);return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderCalendarType(){let e=this.layerFieldsInfo.find(i=>i.name===this.model.xAxisField),t=Object.values(b).filter(i=>i!==b.WeekByDayOfWeekAndHourOfDay||e?.type!==A.DateOnly),a=h(t,i=>i,i=>{let r=this._messages[i];return s`<calcite-list-item .label=${r} .value=${i} .selected=${m(i,this.selectedContent)}></calcite-list-item>`});return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${a}</calcite-list>`}renderCalendarViewType(){let e=h(Object.values(u),t=>t,t=>{let a=this._messages[t];return s`<calcite-list-item .label=${a} .value=${t} .disabled=${t!==u.singleCalendarView} .selected=${m(t,this.selectedContent)}></calcite-list-item>`});return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderClassBreakMethod(){let e=[{value:C.naturalBreaks,title:this._messages?.classBreaksMethod?.naturalBreaks,msg:this._messages?.classBreaksMethod?.naturalBreaksMsg},{value:C.equalInterval,title:this._messages?.classBreaksMethod?.equalInterval,msg:this._messages?.classBreaksMethod?.equalIntervalMsg},{value:C.quantile,title:this._messages?.classBreaksMethod?.quantile,msg:this._messages?.classBreaksMethod?.quantileMsg}],t=h(Object.values(e),({value:a})=>a,a=>{let{title:i,msg:r,value:n}=a;return s`<calcite-list-item .label=${i} .description=${r} .value=${n} .selected=${m(n,this.selectedContent)}></calcite-list-item>`});return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${t}</calcite-list>`}renderPopoverInfo(){let e;switch(this.contentKind){case c.aggregation:e=this.renderAggregationType();break;case c.numericFields:e=this.renderNumericFields();break;case c.xAxisField:e=this.renderXAxisFieldSelect();break;case c.calendarType:e=this.renderCalendarType();break;case c.calendarViewType:e=this.renderCalendarViewType();break;case c.classBreakMethod:e=this.renderClassBreakMethod();break;case c.colorScheme:e=this.renderColorRampSelect();break;case c.null:e=this.renderEmptyCellUI();break;default:e=s`<div></div>`;break}return e}renderColorRampSelect(){let e=this.filterColorRamps(),t=this._messages?.colorRampCategories?this._messages.colorRampCategories[this.selectedCategory]:this.selectedCategory;return s`<div class=${l(o.colorRampPopover)}><div class=${l(o.colorRampToolbar)}><calcite-dropdown selection-mode=single placement=bottom-start @calciteDropdownSelect=${this.onCategoryDropdownSelect}><calcite-button slot=trigger appearance=outline icon-end=chevron-down>${t}</calcite-button><calcite-dropdown-group group-title=${this._messages?.colorRamp?.allCategories??"All color ramps"??g}>${Object.keys($).map(a=>s`<calcite-dropdown-item data-tag=${a??g} .selected=${this.selectedCategory===a}>${this._messages?.colorRampCategories?this._messages.colorRampCategories[a]:a}</calcite-dropdown-item>`)}</calcite-dropdown-group></calcite-dropdown><calcite-button appearance=outline icon-start=arrow-up-down @click=${this.onFlipAll}>${this._messages?.colorRamp?.flipRampColors}</calcite-button></div><div class=${l(o.rampGrid)}>${e.length===0&&s`<div class=${l(o.rampEmpty)}>${this._messages?.colorRamp?.noRamps} ${this.selectedCategory!=="all"?`"${this.selectedCategory}"`:""}</div>`||""}${e.map(a=>{let i=this.getRampColors(a),r=a.name===this.selectedColorRampName;return s`<div class=${`${o.rampItem} ${r?"selected":""}`} title=${a.name??g} @click=${()=>this.onRampSelect(a)}><div class=${l(o.rampName)} aria-hidden=true>${a.name}</div><div class=${l(o.rampStrips)}>${h(i,n=>n,n=>s`<div class=${l(o.rampStrip)} style=${I({backgroundColor:this.rampColorToCss(n)})}></div>`)}${i.length===0&&s`<div class=${`${o.rampStrip} ${o.rampStripFallback}`}></div>`||""}</div></div>`})}</div><div class=${l(o.colorRampPopoverFooter)}><calcite-button appearance=solid kind=brand @click=${this.closePopover}>${this._messages?.colorRamp?.done}</calcite-button></div></div>`}renderEmptyCellUI(){let e=this.model.emptyCellSymbol?.color??f.grayColor,t=this.model.emptyCellText??f.nullCategory?.text??"";return s`<div><div class=${l(o.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${t} @calciteInputInput=${this.nameChange}></calcite-input></calcite-label></div><div class=${l(o.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages?.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></div>`}render(){return s`<div><calcite-popover class=${l(o.name)} .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .offsetDistance=${this.offsetDistance} .open=${this.open} @calcitePopoverClose=${this.closePopover} label auto-close ${p(this.popoverElement)}><calcite-panel class=${l(o.panel)} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div slot=header-content class=${l(o.header)}>${this.headingTitle??""}</div>${this.renderPopoverInfo()}${void 0}</calcite-panel></calcite-popover></div>`}};L("arcgis-charts-config-heat-chart-popover",w);return w},"Color",a,e,f)
|
|
2
|
+
import{a as h}from"./Y5CHG4IT.js";import{a as R}from"./KSDJFASU.js";import{b as q}from"./RP6LD7CU.js";import f from"./BWLIKQZM.js";import{l as c,m as b}from"./POA2XTTK.js";import{a as x}from"./WZFDIC2M.js";import e from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import{Aa as _,i as E}from"./43DLRSYB.js";import{a as A}from"./KX7KGXKQ.js";import{b as T}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as p,B as F,C as l,D as I,E as g,H as L,g as P,i as s,n as d,z as v}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{b as S,w as u,x as C}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([O,{Dc:N,Ec:M,hc:D,l:f},{c:$,d:y},{a:B,c:k,k:m}])=>{var z=P`.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)}.name{display:flex;flex-direction:column;margin:.5rem;padding:.5rem;background:#fff;min-width:250px}.header{margin:0;font-weight:bolder}.popover-pick-list{font-size:small;max-width:var(--arcgis-charts-config-popover-pick-list-max-width)}.panel{max-height:60vh}.color-ramp-popover{display:flex;flex-direction:column;gap:.75rem;min-width:320px;max-width:480px}.color-ramp-toolbar{display:flex;gap:.5rem;align-items:center;padding:5px 5px 0}.ramp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.5rem;max-height:300px;overflow:auto;padding:.25rem}.ramp-item{display:flex;flex-direction:column;border:1px solid var(--calcite-color-foreground-3);background:var(--calcite-color-foreground-1);cursor:pointer;box-shadow:inset 0 0 0 1px transparent;transition:box-shadow .12s;border-radius:2px;min-height:56px;padding:4px}.ramp-item:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}.ramp-name{font-size:.625rem;line-height:1;padding:2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-3)}.ramp-item.selected{background-color:var(--calcite-color-brand)!important;border-color:var(--calcite-color-brand)!important;outline:2px solid var(--calcite-color-brand)!important;color:var(--calcite-color-foreground-1)}.ramp-item.selected .ramp-name{color:var(--calcite-color-foreground-1)}.ramp-item.selected .ramp-strip{box-shadow:none;border:none}.ramp-strips{display:flex;flex:1;height:28px;width:100%;overflow:hidden}.ramp-strip{flex:1;min-width:0}.ramp-strip-fallback{background:repeating-linear-gradient(45deg,var(--calcite-color-foreground-3) 0,var(--calcite-color-foreground-3) 5px,var(--calcite-color-foreground-2) 5px,var(--calcite-color-foreground-2) 10px)}.ramp-empty{grid-column:1/-1;font-size:.75rem;color:var(--calcite-color-text-3)}.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}.color-ramp-popover-footer{display:flex;padding:.5rem}.color-ramp-popover-footer calcite-button{flex:1}`,o={name:"bar-chart-data-popover",header:"header",popoverPickList:"popover-pick-list",panel:"panel",colorRampPopover:"color-ramp-popover",colorRampToolbar:"color-ramp-toolbar",rampGrid:"ramp-grid",rampItem:"ramp-item",rampName:"ramp-name",rampStrips:"ramp-strips",rampStrip:"ramp-strip",rampStripFallback:"ramp-strip-fallback",rampEmpty:"ramp-empty",panelChildrenContainer:"panel-children-container",colorRampPopoverFooter:"color-ramp-popover-footer"},w=class extends F{constructor(){super(...arguments),this._messages=x(),this.commonStrings=x({name:"common",blocking:!0}),this.picklist=v(),this.popoverElement=v(),this.placement="leading",this.offsetDistance=-200,this.availableColorRamps=[],this.selectedCategory=y.all,this.aggregationLabels=[],this.isFlipped=!1,this.open=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigHeatChartColorRampChange=d(),this.arcgisChartsConfigHeatChartDataPopoverChange=d(),this.arcgisChartsConfigPopoverClose=d(),this.arcgisChartsConfigPopoverEmptyCellColorChange=d(),this.arcgisChartsConfigPopoverEmptyCellNameChange=d()}static{this.properties={availableColorRamps:16,selectedColorRampName:16,selectedCategory:16,aggregationLabels:16,isFlipped:5,model:0,messageOverrides:0,headingTitle:1,referenceElement:0,open:5,contentKind:1,layerFieldsInfo:0,selectedContent:1,colorRamps:0}}static{this.styles=z}async reposition(){await this.popoverElement.value?.reposition()}willUpdate(){let e=k.map(t=>_(t,this.commonStrings));T(this.aggregationLabels,e)||(this.aggregationLabels=e),this.colorRamps&&this.colorRamps!==this.availableColorRamps&&(this.availableColorRamps=this.colorRamps),this.contentKind===c.colorScheme&&this.selectedContent&&!this.selectedColorRampName&&(this.selectedColorRampName=this.selectedContent)}updated(){setTimeout(()=>{this.picklist.value?.setFocus()},B.PopoverTimer),q(this.popoverElement.value,this.open)}buildAggregationListItems(){return h(k.filter(e=>e!==S.NoAggregation),e=>e,(e,t)=>s`<calcite-list-item .label=${this.aggregationLabels[t]} .value=${e} .selected=${m(e,this.selectedContent)}></calcite-list-item>`)}buildPickListItem(e){return R(e.name,s`<calcite-list-item .label=${D(this.layerFieldsInfo,e.name)} .value=${e.name} .selected=${m(e.name,this.selectedContent)}></calcite-list-item>`)}buildPickListItems(e){let t=this.layerFieldsInfo?.length??0,a=[];switch(e){case c.numericFields:{let i=R(" ",s`<calcite-list-item label=" " value=" " .selected=${m("",this.selectedContent)}></calcite-list-item>`);a.push(i);for(let r=0;r<t;r+=1){let n=this.layerFieldsInfo?.[r];n&&N(n)&&a.push(this.buildPickListItem(n))}break}case c.xAxisField:{for(let i=0;i<t;i+=1){let r=this.layerFieldsInfo?.[i];r&&M(r)&&a.push(this.buildPickListItem(r))}break}}return a}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}onDataContentTypeChange(e){let t=e.target.selectedItems;this.arcgisChartsConfigHeatChartDataPopoverChange.emit({contentKind:this.contentKind,value:t.map(a=>a.value)[0]}),this.open=!1}filterColorRamps(){let e=[];if(this.selectedCategory===y.all)e=this.availableColorRamps;else{let t=$[this.selectedCategory];e=this.availableColorRamps?.filter(a=>t.some(i=>a.tags.includes(i)))}return e}getRampColors(e){let t=e.colors;return this.isFlipped?[...t].reverse():t}rampColorToCss(e){let t="#000000";try{if(e){if(e instanceof O){let a=e.toHex();typeof a=="string"&&a.length&&(t=a)}else if(Array.isArray(e)){let[a,i,r,n]=e;[a,i,r].every(H=>typeof H=="number")&&(t=`rgba(${a},${i},${r},${n??1})`)}else if(typeof e=="object"&&e){let{r:a,g:i,b:r,a:n}=e;if(a!=null&&i!=null&&r!=null)return`rgba(${a},${i},${r},${n??1})`}}}catch{}return t}onCategoryDropdownSelect(e){let t=e.target.selectedItems[0]?.getAttribute("data-tag");t&&(this.selectedCategory=t)}onFlipAll(){if(this.isFlipped=!this.isFlipped,this.selectedColorRampName){let e=this.availableColorRamps.find(t=>t.name===this.selectedColorRampName);if(e){let t={...e,colors:this.getRampColors(e)};this.arcgisChartsConfigHeatChartColorRampChange.emit({rampName:e.name,ramp:t,isFlipped:this.isFlipped})}}}onRampSelect(e){this.selectedColorRampName=e.name;let t={...e,colors:this.getRampColors(e)};this.arcgisChartsConfigHeatChartColorRampChange.emit({rampName:e.name,ramp:t,isFlipped:this.isFlipped})}nameChange(e){let t=e.target.value;this.model.emptyCellText!==t&&(this.model.emptyCellText=t,this.arcgisChartsConfigPopoverEmptyCellNameChange.emit({name:t}))}colorChange(e){let t=e instanceof CustomEvent?e.detail:e,[a,i,r]=t,n=E*255;this.arcgisChartsConfigPopoverEmptyCellColorChange.emit({color:[a,i,r,n]})}renderAggregationType(){let e=this.buildAggregationListItems();return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single selection-appearance=border @calciteListChange=${this.onDataContentTypeChange}>${e}</calcite-list>`}renderXAxisFieldSelect(){let e=this.buildPickListItems(c.xAxisField);return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single selection-appearance=border filter-enabled @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderNumericFields(){let e=this.buildPickListItems(c.numericFields);return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderCalendarType(){let e=this.layerFieldsInfo.find(i=>i.name===this.model.xAxisField),t=Object.values(b).filter(i=>i!==b.WeekByDayOfWeekAndHourOfDay||e?.type!==A.DateOnly),a=h(t,i=>i,i=>{let r=this._messages[i];return s`<calcite-list-item .label=${r} .value=${i} .selected=${m(i,this.selectedContent)}></calcite-list-item>`});return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${a}</calcite-list>`}renderCalendarViewType(){let e=h(Object.values(u),t=>t,t=>{let a=this._messages[t];return s`<calcite-list-item .label=${a} .value=${t} .disabled=${t!==u.singleCalendarView} .selected=${m(t,this.selectedContent)}></calcite-list-item>`});return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderClassBreakMethod(){let e=[{value:C.naturalBreaks,title:this._messages?.classBreaksMethod?.naturalBreaks,msg:this._messages?.classBreaksMethod?.naturalBreaksMsg},{value:C.equalInterval,title:this._messages?.classBreaksMethod?.equalInterval,msg:this._messages?.classBreaksMethod?.equalIntervalMsg},{value:C.quantile,title:this._messages?.classBreaksMethod?.quantile,msg:this._messages?.classBreaksMethod?.quantileMsg}],t=h(Object.values(e),({value:a})=>a,a=>{let{title:i,msg:r,value:n}=a;return s`<calcite-list-item .label=${i} .description=${r} .value=${n} .selected=${m(n,this.selectedContent)}></calcite-list-item>`});return s`<calcite-list label class=${l(o.popoverPickList)} selection-mode=single filter-enabled selection-appearance=border @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${t}</calcite-list>`}renderPopoverInfo(){let e;switch(this.contentKind){case c.aggregation:e=this.renderAggregationType();break;case c.numericFields:e=this.renderNumericFields();break;case c.xAxisField:e=this.renderXAxisFieldSelect();break;case c.calendarType:e=this.renderCalendarType();break;case c.calendarViewType:e=this.renderCalendarViewType();break;case c.classBreakMethod:e=this.renderClassBreakMethod();break;case c.colorScheme:e=this.renderColorRampSelect();break;case c.null:e=this.renderEmptyCellUI();break;default:e=s`<div></div>`;break}return e}renderColorRampSelect(){let e=this.filterColorRamps(),t=this._messages?.colorRampCategories?this._messages.colorRampCategories[this.selectedCategory]:this.selectedCategory;return s`<div class=${l(o.colorRampPopover)}><div class=${l(o.colorRampToolbar)}><calcite-dropdown selection-mode=single placement=bottom-start @calciteDropdownSelect=${this.onCategoryDropdownSelect}><calcite-button slot=trigger appearance=outline icon-end=chevron-down>${t}</calcite-button><calcite-dropdown-group group-title=${this._messages?.colorRamp?.allCategories??"All color ramps"??g}>${Object.keys($).map(a=>s`<calcite-dropdown-item data-tag=${a??g} .selected=${this.selectedCategory===a}>${this._messages?.colorRampCategories?this._messages.colorRampCategories[a]:a}</calcite-dropdown-item>`)}</calcite-dropdown-group></calcite-dropdown><calcite-button appearance=outline icon-start=arrow-up-down @click=${this.onFlipAll}>${this._messages?.colorRamp?.flipRampColors}</calcite-button></div><div class=${l(o.rampGrid)}>${e.length===0&&s`<div class=${l(o.rampEmpty)}>${this._messages?.colorRamp?.noRamps} ${this.selectedCategory!=="all"?`"${this.selectedCategory}"`:""}</div>`||""}${e.map(a=>{let i=this.getRampColors(a),r=a.name===this.selectedColorRampName;return s`<div class=${`${o.rampItem} ${r?"selected":""}`} title=${a.name??g} @click=${()=>this.onRampSelect(a)}><div class=${l(o.rampName)} aria-hidden=true>${a.name}</div><div class=${l(o.rampStrips)}>${h(i,n=>n,n=>s`<div class=${l(o.rampStrip)} style=${I({backgroundColor:this.rampColorToCss(n)})}></div>`)}${i.length===0&&s`<div class=${`${o.rampStrip} ${o.rampStripFallback}`}></div>`||""}</div></div>`})}</div><div class=${l(o.colorRampPopoverFooter)}><calcite-button appearance=solid kind=brand @click=${this.closePopover}>${this._messages?.colorRamp?.done}</calcite-button></div></div>`}renderEmptyCellUI(){let e=this.model.emptyCellSymbol?.color??f.grayColor,t=this.model.emptyCellText??f.nullCategory?.text??"";return s`<div><div class=${l(o.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${t} @calciteInputInput=${this.nameChange}></calcite-input></calcite-label></div><div class=${l(o.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages?.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></div>`}render(){return s`<div><calcite-popover class=${l(o.name)} .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .offsetDistance=${this.offsetDistance} .open=${this.open} @calcitePopoverClose=${this.closePopover} label auto-close ${p(this.popoverElement)}><calcite-panel class=${l(o.panel)} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div slot=header-content class=${l(o.header)}>${this.headingTitle??""}</div>${this.renderPopoverInfo()}${void 0}</calcite-panel></calcite-popover></div>`}};L("arcgis-charts-config-heat-chart-popover",w);return w},"Color",a,e,f)
|