@arcgis/charts-components 5.2.0-next.147 → 5.2.0-next.149
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/{GZAROP4P.js → 257PEDYJ.js} +1 -1
- package/dist/cdn/{IPPQ6AYM.js → 25NUJ5YH.js} +1 -1
- package/dist/cdn/{QGC2DLQ4.js → 3E7JBKUK.js} +1 -1
- package/dist/cdn/{AKG64YBZ.js → 4I2I5IVQ.js} +1 -1
- package/dist/cdn/{3RI6PWDI.js → 4P7L6R6R.js} +1 -1
- package/dist/cdn/{4XK5YE6C.js → 4QXXXWA6.js} +1 -1
- package/dist/cdn/{ZGGFAHQL.js → 5FHRHVMR.js} +1 -1
- package/dist/cdn/{3BRUUROM.js → 5KS2PX57.js} +1 -1
- package/dist/cdn/{FIFXR6OH.js → 5TXHUDP4.js} +1 -1
- package/dist/cdn/{HDUMEWQL.js → 5U44JITQ.js} +1 -1
- package/dist/cdn/{TRTVGVQR.js → 6IOXNE24.js} +1 -1
- package/dist/cdn/{6JSWJHZB.js → 6IYV7IV4.js} +1 -1
- package/dist/cdn/{FM6AHBVU.js → 6OLJQWVE.js} +1 -1
- package/dist/cdn/{MVVC6PKQ.js → 72UQY733.js} +1 -1
- package/dist/cdn/{QFFPKVJF.js → 73GS7B7G.js} +1 -1
- package/dist/cdn/7Q7ES4BZ.js +2 -0
- package/dist/cdn/{Z73I4R5C.js → 7TMJU2RX.js} +1 -1
- package/dist/cdn/{INYPNEFZ.js → ACXDPMZD.js} +1 -1
- package/dist/cdn/{K5H4XE7T.js → AGKYRKW5.js} +1 -1
- package/dist/cdn/{QN2JEZ5D.js → AKOQC2SC.js} +1 -1
- package/dist/cdn/{KUGVL62E.js → B2LCOSXO.js} +1 -1
- package/dist/cdn/{46LRKKNP.js → BH2DGNXG.js} +1 -1
- package/dist/cdn/{GBL2FACR.js → BTDPI3AR.js} +1 -1
- package/dist/cdn/{AQOVEDUP.js → E2IXXH5R.js} +1 -1
- package/dist/cdn/{M7PFJOW7.js → F7VQ6K7S.js} +1 -1
- package/dist/cdn/{MVXG6N2M.js → FAFM7HRN.js} +1 -1
- package/dist/cdn/{HRZK3GLD.js → G63T5MU4.js} +1 -1
- package/dist/cdn/{7IJMKD5M.js → GHAC6H6F.js} +1 -1
- package/dist/cdn/{UUXIIGCK.js → GJUNAKKB.js} +1 -1
- package/dist/cdn/{YB4ZDSSI.js → GQ5T4JIV.js} +1 -1
- package/dist/cdn/H4HQBS46.js +4 -0
- package/dist/cdn/{TQS3LLJX.js → HL3H6U7M.js} +1 -1
- package/dist/cdn/IIYJJRMN.js +2 -0
- package/dist/cdn/{YIYP2ECR.js → IRYTXVTM.js} +1 -1
- package/dist/cdn/{65I7BUS4.js → ITTVEYZH.js} +1 -1
- package/dist/cdn/{N3YF4TVT.js → IVUICF2P.js} +1 -1
- package/dist/cdn/{E66QO3GL.js → JASVY2S5.js} +1 -1
- package/dist/cdn/{YUOEB6DF.js → JIANMLCP.js} +1 -1
- package/dist/cdn/{4VSBIIP2.js → JX7NTVFL.js} +1 -1
- package/dist/cdn/{JMYVXU4O.js → KJFL57RE.js} +1 -1
- package/dist/cdn/{MTAGYPDJ.js → LBMIXS7P.js} +1 -1
- package/dist/cdn/{EU5EYFH2.js → LJ3IPYWK.js} +1 -1
- package/dist/cdn/{VZ64E76N.js → M3EQKFST.js} +1 -1
- package/dist/cdn/{P5RPGI3P.js → MCY2C5IV.js} +1 -1
- package/dist/cdn/{4752WHSR.js → MMPVO6UX.js} +13 -13
- package/dist/cdn/{7DWJIEIJ.js → MOSYGTYS.js} +1 -1
- package/dist/cdn/{CZVLHPR7.js → MSFQI34M.js} +1 -1
- package/dist/cdn/{PNVMXN36.js → NDBNHEEZ.js} +1 -1
- package/dist/cdn/{BOGEJ7J7.js → NVPRRSLO.js} +1 -1
- package/dist/cdn/{C3XMGCU5.js → OKB4GB4J.js} +1 -1
- package/dist/cdn/{ZUYZHJTU.js → OPLY5TWI.js} +1 -1
- package/dist/cdn/{FGNSVA6W.js → PFAQRCVD.js} +1 -1
- package/dist/cdn/{IMSN4JMC.js → PFIVTH6Z.js} +1 -1
- package/dist/cdn/{S2PIPJCQ.js → QAN2SQN2.js} +1 -1
- package/dist/cdn/{7PW4JAXI.js → QBP5QHM5.js} +1 -1
- package/dist/cdn/{2GE65C6S.js → QGHGUVWE.js} +1 -1
- package/dist/cdn/{PU63PVCT.js → QJJRZHVE.js} +1 -1
- package/dist/cdn/{3JVIX4TL.js → QYMY2RNU.js} +1 -1
- package/dist/cdn/{JWGHSOOD.js → R2R6S5K6.js} +1 -1
- package/dist/cdn/{I2FZ2KUR.js → SDMBKMSY.js} +1 -1
- package/dist/cdn/{B3V4VZYM.js → SHG5B5EO.js} +1 -1
- package/dist/cdn/{OOFDTNBW.js → SKN5OMXV.js} +1 -1
- package/dist/cdn/{V32BIR37.js → SLH66QHH.js} +1 -1
- package/dist/cdn/{C2GHXSU5.js → TLCAHGNK.js} +1 -1
- package/dist/cdn/{5JERAZSG.js → TQW7WM4O.js} +1 -1
- package/dist/cdn/{SHQXINAI.js → TRI6WAGM.js} +1 -1
- package/dist/cdn/{BKABNAQM.js → UK2ILVTG.js} +1 -1
- package/dist/cdn/{5PTMLDOB.js → VCKFHB4U.js} +1 -1
- package/dist/cdn/{KMMYG2QX.js → VRVLAPPS.js} +1 -1
- package/dist/cdn/{D3Z4NVKQ.js → VSRAB3LY.js} +1 -1
- package/dist/cdn/{N2DHNIDT.js → VVHVHDWG.js} +1 -1
- package/dist/cdn/W2XIAHGG.js +2 -0
- package/dist/cdn/{7ZDSUAN6.js → WQQUCFW5.js} +1 -1
- package/dist/cdn/{7MBF4226.js → WZIPMTG5.js} +1 -1
- package/dist/cdn/{BDUTHXO4.js → XKKO432P.js} +1 -1
- package/dist/cdn/{KVHAU3R7.js → XOZZXRKR.js} +1 -1
- package/dist/cdn/{4BM25G3S.js → XWYYPCI6.js} +1 -1
- package/dist/cdn/YOAS5HJU.js +2 -0
- package/dist/cdn/{YM5SNR26.js → YR2QJZ5S.js} +1 -1
- package/dist/cdn/{HMHWVIF2.js → YRHDWCLS.js} +1 -1
- package/dist/cdn/{WK4FA5IO.js → ZP2Y7KD7.js} +1 -1
- package/dist/cdn/{CEZ2VRFW.js → ZUMDTFHS.js} +1 -1
- package/dist/cdn/{H4GILMDJ.js → ZY2X4X6T.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/box-plot-data.js +68 -67
- package/dist/chunks/box-plot-model.js +4 -1
- package/dist/chunks/index.js +955 -943
- package/dist/chunks/pie-chart-model.js +9 -6
- package/dist/chunks/serial-chart-data.js +283 -282
- package/dist/chunks/serial-chart-model.js +4 -1
- package/dist/components/arcgis-chart/customElement.js +1292 -1291
- package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +54 -52
- package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +105 -103
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/model/box-plot-model/box-plot-model.d.ts +6 -2
- package/dist/model/pie-chart-model/pie-chart-model.d.ts +6 -2
- package/dist/model/serial-chart-model/serial-chart-model.d.ts +6 -2
- package/dist/utils/data/categorical-data/index.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cdn/2CZEJ5DR.js +0 -2
- package/dist/cdn/EEN4U5XM.js +0 -2
- package/dist/cdn/EYEWINUB.js +0 -4
- package/dist/cdn/VPADWNW7.js +0 -2
- package/dist/cdn/YOUVPC2K.js +0 -2
|
@@ -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"./3BRUUROM.js";import"./POA2XTTK.js";import{a as O}from"./TJ5BGDYZ.js";import n from"./P5RPGI3P.js";import j from"./7ZDSUAN6.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"./YUOEB6DF.js";import e from"./HMHWVIF2.js";import b from"./K5H4XE7T.js";import a from"./EYEWINUB.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"./YVJE3Q7H.js";import{A as w,B as M,C as p,F as G,H as N,g as V,i as u}from"./UE4KTI5X.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(([{Da:b,Fa: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"./5KS2PX57.js";import"./POA2XTTK.js";import{a as O}from"./TJ5BGDYZ.js";import n from"./MCY2C5IV.js";import j from"./WQQUCFW5.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"./JIANMLCP.js";import e from"./YRHDWCLS.js";import b from"./AGKYRKW5.js";import a from"./H4HQBS46.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"./YVJE3Q7H.js";import{A as w,B as M,C as p,F as G,H as N,g as V,i as u}from"./UE4KTI5X.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(([{Da:b,Fa: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,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"./HL3H6U7M.js";import f from"./UK2ILVTG.js";import e from"./E2IXXH5R.js";import d from"./TRI6WAGM.js";import c from"./OPLY5TWI.js";import b from"./PFIVTH6Z.js";import a from"./H4HQBS46.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(([{Ac:ce,Cc:me,E:ue,Hc:ye,Qb:de,S:fe,a:Q,bd:I,jc:T,l:S,n:B,q:b,xb: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 t,b as n,c}from"./64L7VJJK.js";import{k as o}from"./QP5UAIC6.js";async function m(a){let i="config"in a?n(a.config):a.chartType,r;if(!("layer"in a)&&!("iLayer"in a)&&"config"in a&&a.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(i){case o.LineChart:{let{LineChartModel:e}=await import("./
|
|
2
|
+
import{a as t,b as n,c}from"./64L7VJJK.js";import{k as o}from"./QP5UAIC6.js";async function m(a){let i="config"in a?n(a.config):a.chartType,r;if(!("layer"in a)&&!("iLayer"in a)&&"config"in a&&a.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(i){case o.LineChart:{let{LineChartModel:e}=await import("./AKOQC2SC.js").then(m=>m.default.then(e=>({LineChartModel:e})));r=new e;break}case o.ComboBarLineChart:{let{ComboBarLineChartModel:e}=await import("./4I2I5IVQ.js").then(m=>m.default.then(e=>({ComboBarLineChartModel:e})));r=new e;break}case o.PieChart:{let{PieChartModel:e}=await import("./7Q7ES4BZ.js").then(m=>m.default.then(e=>({PieChartModel:e})));r=new e;break}case o.Histogram:{let{HistogramModel:e}=await import("./LJ3IPYWK.js").then(m=>m.default.then(e=>({HistogramModel:e})));r=new e;break}case o.Scatterplot:{let{ScatterplotModel:e}=await import("./ITTVEYZH.js").then(m=>m.default.then(e=>({ScatterplotModel:e})));r=new e;break}case o.BoxPlot:{let{BoxPlotModel:e}=await import("./W2XIAHGG.js").then(m=>m.default.then(e=>({BoxPlotModel:e})));r=new e;break}case o.Gauge:{let{GaugeModel:e}=await import("./KJFL57RE.js").then(m=>m.default.then(e=>({GaugeModel:e})));r=new e;break}case o.RadarChart:{let{RadarChartModel:e}=await import("./IVUICF2P.js").then(m=>m.default.then(e=>({RadarChartModel:e})));r=new e;break}case o.HeatChart:{let{HeatChartModel:e}=await import("./YR2QJZ5S.js").then(m=>m.default.then(e=>({HeatChartModel:e})));r=new e;break}case o.BarChart:default:{let{BarChartModel:e}=await import("./VVHVHDWG.js").then(m=>m.default.then(e=>({BarChartModel:e})));r=new e;break}}if(await r?.setup({layer:"layer"in a?a.layer:void 0,iLayer:"iLayer"in a?a.iLayer:void 0,config:"config"in a?a.config:void 0,commonStrings:"commonStrings"in a?a.commonStrings:void 0,chartLimits:"chartLimits"in a?a.chartLimits:void 0}),i!==void 0&&c(r,i))return r;{let e=t(r.chartType);throw new Error(`Please check the arguments provided to \`createModel\`. The generated model's type (\`${e}\`) does not match the type specified by either the \`chartType\` or the \`config\` argument (\`${i}\`).`)}}export{m as a};
|