@arcgis/charts-components 6.0.0-next.33 → 6.0.0-next.34
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/{7L6DK5OS.js → 2DLCZPGT.js} +1 -1
- package/dist/cdn/{WKF53DYD.js → 2JY4BULO.js} +1 -1
- package/dist/cdn/{ADENRYX7.js → 33SNFNFO.js} +1 -1
- package/dist/cdn/{LHYWDDAS.js → 42AYSOYQ.js} +1 -1
- package/dist/cdn/{N45L56WG.js → 42NW4KCH.js} +1 -1
- package/dist/cdn/{M4DADMOO.js → 4CI4XQ6A.js} +1 -1
- package/dist/cdn/{DYGFR6KY.js → 4CIFWASN.js} +1 -1
- package/dist/cdn/{SAK4CBE7.js → 4E3S2ML7.js} +1 -1
- package/dist/cdn/{XFXZYSPI.js → 4Q3YU4TS.js} +1 -1
- package/dist/cdn/{7KGHI7WT.js → 57VCII7P.js} +1 -1
- package/dist/cdn/{EEZEPHWK.js → 5UNAEQIF.js} +1 -1
- package/dist/cdn/{PV7DIUGW.js → 6REYJD6E.js} +1 -1
- package/dist/cdn/{7TSIJZWC.js → 7DONLE35.js} +1 -1
- package/dist/cdn/{LSO2XNPH.js → 7M4EWNDY.js} +1 -1
- package/dist/cdn/{JON7QEXZ.js → 7SKEI4E6.js} +5 -5
- package/dist/cdn/{HEL54XVB.js → AXYE2HX6.js} +1 -1
- package/dist/cdn/{4FZEHAQ3.js → BLS6BF2L.js} +1 -1
- package/dist/cdn/{PB4WIYWN.js → BZK3YRC3.js} +1 -1
- package/dist/cdn/{QCSV57EQ.js → CU4UB2A7.js} +1 -1
- package/dist/cdn/{MVPGEBWQ.js → CYSQZIZN.js} +1 -1
- package/dist/cdn/{DK5CFPVG.js → DFPLMKGU.js} +1 -1
- package/dist/cdn/{SMNUEDMN.js → DLJ5JUXJ.js} +1 -1
- package/dist/cdn/{LEWMDRPW.js → DUKNIIM2.js} +1 -1
- package/dist/cdn/{EGEYRUPY.js → DWSCE6QM.js} +1 -1
- package/dist/cdn/{FWGGOXK6.js → DXMYDWMF.js} +1 -1
- package/dist/cdn/{5PW4T4LC.js → E2BM4PQP.js} +1 -1
- package/dist/cdn/{TLC7ZXQM.js → EAHAZABZ.js} +1 -1
- package/dist/cdn/{RGPG43GI.js → EDGME7VO.js} +1 -1
- package/dist/cdn/{6SLVQTPT.js → EDZAQNWX.js} +1 -1
- package/dist/cdn/{4B7KYFKX.js → EMV26WWB.js} +1 -1
- package/dist/cdn/{JFZ5WV6G.js → EV5J5FUX.js} +1 -1
- package/dist/cdn/{ICEANLLZ.js → F2GNY3MM.js} +1 -1
- package/dist/cdn/{4E7XIO26.js → FRN47OTB.js} +1 -1
- package/dist/cdn/{3YLQHPDB.js → FXWVQU7B.js} +1 -1
- package/dist/cdn/{47MLKUMN.js → GTD5EXV2.js} +1 -1
- package/dist/cdn/{CUOXXQBF.js → H2BQNZW4.js} +1 -1
- package/dist/cdn/{KNJKA4IL.js → HBWSBIS4.js} +1 -1
- package/dist/cdn/{7KIHMJWQ.js → HHLOIUUD.js} +1 -1
- package/dist/cdn/{J77BQI65.js → HIFEJ5CV.js} +1 -1
- package/dist/cdn/{HR5JU7P5.js → HMBGKFUN.js} +1 -1
- package/dist/cdn/{6WXE7PI7.js → I3Y5KNFE.js} +1 -1
- package/dist/cdn/{BWNBESN5.js → I6PWQEWZ.js} +1 -1
- package/dist/cdn/{IRSIUA3Z.js → IFDTYYTW.js} +1 -1
- package/dist/cdn/{WE4SAQIV.js → IRP6FSBB.js} +1 -1
- package/dist/cdn/{MXTS44AG.js → J6XOSXEE.js} +1 -1
- package/dist/cdn/{GTXF2Q7A.js → JE3QM6AW.js} +1 -1
- package/dist/cdn/{NEVDA2IQ.js → KF35NZ4P.js} +1 -1
- package/dist/cdn/{XXO5K6N4.js → KISYJDGT.js} +1 -1
- package/dist/cdn/{XI6OEXXA.js → L7UQNGQR.js} +1 -1
- package/dist/cdn/{Y672RHLI.js → LCMUCICY.js} +1 -1
- package/dist/cdn/{OXASIEVD.js → LRDJBGZS.js} +1 -1
- package/dist/cdn/{VOY3C6F2.js → LSMB53E3.js} +1 -1
- package/dist/cdn/{4UGEZMMX.js → LZ6SUMGO.js} +1 -1
- package/dist/cdn/{SD2WCRDV.js → M3QY2KLY.js} +1 -1
- package/dist/cdn/{E5F3CSMH.js → MCZMJAXK.js} +1 -1
- package/dist/cdn/{4L3DNWI7.js → MI5ZOFNE.js} +1 -1
- package/dist/cdn/{PY7P35QO.js → MOPMKH2V.js} +1 -1
- package/dist/cdn/{QGRQW5WK.js → MZRAPDRT.js} +1 -1
- package/dist/cdn/{YK5YAUHK.js → O5UELXJC.js} +1 -1
- package/dist/cdn/{2FSC4TII.js → OKQKTXSG.js} +1 -1
- package/dist/cdn/{4O5PXQHF.js → OXOOIHEE.js} +1 -1
- package/dist/cdn/{USYS3LBV.js → P2AC2FC4.js} +1 -1
- package/dist/cdn/{BDR6ELDH.js → P5JPYG4Z.js} +1 -1
- package/dist/cdn/{VKMVMHTT.js → PDBNCJTF.js} +1 -1
- package/dist/cdn/{7RPS2ZKZ.js → Q4LXZQ7G.js} +1 -1
- package/dist/cdn/{VAUOYVAJ.js → Q5GNPML7.js} +1 -1
- package/dist/cdn/{TFJ4OWRJ.js → QMPQESBZ.js} +1 -1
- package/dist/cdn/{XB6GQZZL.js → R73C2BX4.js} +1 -1
- package/dist/cdn/{6SVLCTQS.js → RFUS6E3N.js} +1 -1
- package/dist/cdn/{WFMIM4RW.js → RQYBXGTL.js} +1 -1
- package/dist/cdn/{S4SOKS52.js → RXOUF2HA.js} +1 -1
- package/dist/cdn/{CUQWT4QG.js → S7ULRE3X.js} +1 -1
- package/dist/cdn/{TQHFCEOB.js → T2CFMDZV.js} +1 -1
- package/dist/cdn/{GIJFJBQ5.js → TDNKE2VP.js} +1 -1
- package/dist/cdn/{JTXDHQSH.js → TSKWTKCT.js} +1 -1
- package/dist/cdn/{OJFYB73J.js → UE6N5N3X.js} +1 -1
- package/dist/cdn/UMPW3YOW.js +2 -0
- package/dist/cdn/{XR46HOI2.js → URBOZ7IV.js} +1 -1
- package/dist/cdn/{MIONK5O5.js → UWRA674P.js} +1 -1
- package/dist/cdn/{H4EBGCSZ.js → V62HBNDH.js} +1 -1
- package/dist/cdn/{XERWQ4IR.js → VL4FR4TN.js} +1 -1
- package/dist/cdn/{6GBCPR5J.js → VQK7RKE3.js} +1 -1
- package/dist/cdn/{OLXXAT2G.js → VUILGVZ6.js} +1 -1
- package/dist/cdn/{7HBNUKHF.js → WBQM4ASJ.js} +1 -1
- package/dist/cdn/{CVYI4FDJ.js → XDLBRYVE.js} +1 -1
- package/dist/cdn/{R6XBFNY4.js → XLF3VSA3.js} +1 -1
- package/dist/cdn/{BAC6JT5W.js → XMFFQFWM.js} +1 -1
- package/dist/cdn/{T35WVFIU.js → YDODSSRW.js} +1 -1
- package/dist/cdn/{CY3KIENE.js → YJ7WPVBF.js} +1 -1
- package/dist/cdn/{ZHMYNWSY.js → YWWWL7VA.js} +1 -1
- package/dist/cdn/{2P3VH3BF.js → YYOMI2VT.js} +1 -1
- package/dist/cdn/{424VG732.js → ZMD6HSI6.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/index3.js +106 -159
- package/dist/chunks/rest-js-object-literals.js +5 -41
- package/dist/chunks/serial-chart-data.js +2 -2
- package/dist/components/arcgis-charts-config-create-flow/customElement.js +2 -6
- 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 +411 -417
- package/dist/json-schema/index.d.ts +38 -68
- package/dist/spec/rest-js-object-literals.d.ts +0 -66
- package/dist/spec/web-chart.d.ts +2 -2
- package/package.json +6 -6
- package/dist/cdn/BIFGQ23U.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as te}from"./YKSQH65V.js";import{a as Q,h as ee}from"./IBCFYECI.js";import j from"./BWNBESN5.js";import{l as s,m as y}from"./5AKOPV7Z.js";import{a as S}from"./Q3P2IG23.js";import g from"./4FZEHAQ3.js";import e from"./JON7QEXZ.js";import b from"./XI6OEXXA.js";import a from"./4O5PXQHF.js";import{Aa as W,q,s as d,t as K}from"./XXO5K6N4.js";import{f as H}from"./WKF53DYD.js";import{l as I,s as O}from"./L2G4TISY.js";import{g as D,i as _,j as N}from"./WPAN7ZED.js";import{A as c,B as M,C as o,D as x,F as T,H as w,g as E,i,n as A,z as n}from"./HECZ3OT6.js";import{c as Z}from"./FHN6CIIO.js";import"./AUKJ4CBR.js";import{a as p,b as m,l as u,m as C,n as h,w as L,x as f}from"./BNAX4Y53.js";import"./TIWCUJOG.js";export default $arcgis.t(([{Dc:R,a:U,hc:B,l:V,qc:X},{b:G,g:z,h:b,i:Y},{d:J},{h:j},{g:ae,s:k}])=>{var le=E`.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;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label{display:flex;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}.color-ramp{width:100%;height:20px;overflow:hidden;border-radius:0}.color-ramp-segment{height:100%;display:inline-block}.list{margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}.accordion{margin-top:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}`,r={label:"label",colorRamp:"color-ramp",colorRampSegment:"color-ramp-segment",list:"list",accordion:"accordion"},P=class extends M{constructor(){super(...arguments),this._messages=S(),this.commonStrings=S({name:"common",blocking:!0}),this.heatChartPopover=null,this.xAxisFieldElement=n(),this.aggregationElement=n(),this.numericFieldsElement=n(),this.calendarTypeElement=n(),this.calendarViewTypeElement=n(),this.classBreakMethodElement=n(),this.nullElement=n(),this.breaksCountElement=n(),this.colorSchemeElement=n(),this.onHeatChartDataPopoverChange=async e=>{try{if(e.detail?.value!==void 0){let{contentKind:a}=e.detail,t=e.detail.value;switch(a){case s.aggregation:this.model.aggregationType=t,t===m.Count||t===m.Sum?this.model.nullPolicy=h.Zero:this.model.nullPolicy=h.Null;break;case s.xAxisField:this.model.xAxisField=t,this.setDefaultPropertiesForCalendarHeatChart();break;case s.numericFields:this.model.numericFields=[t.trim()||""],(this.model.numericFields??[]).length>0&&this.model.aggregationType===m.Count&&this.model.numericFields[0]!==R(this.model.layer).idField&&(this.model.aggregationType=m.Sum);break;case s.calendarType:{this.applyCalendarTypePreset(t);break}case s.calendarViewType:{this.model.viewType=t;break}case s.classBreakMethod:{this.model.classificationMethod=t,await this.generateAndUpdateClassBreaks();break}default:break}}}catch(a){throw this.arcgisChartsConfigDataChangeError.emit({error:a,model:this.model}),a}this.removeHeatChartDataPopover(),this.requestUpdate()},this.popoverClose=e=>{this.heatChartPopover===e?.target&&this.removeHeatChartDataPopover()},this.onModelConfigChange=()=>{this.requestUpdate()},this.allColorRamps=[],this.onColorRampSelection=async e=>{let{isFlipped:a,rampName:t}=e.detail,l=this.model.colorRampName!==t,g=this.model.isColorRampFlipped!==a;this.model.colorRampName=t,this.model.isColorRampFlipped=a,(l||g)&&await this.generateAndUpdateClassBreaks(!0)},this.onEmptyCellNameChange=e=>{let{name:a}=e.detail;a!==void 0&&(this.model.emptyCellText=a)},this.onEmptyCellColorChange=e=>{let{color:a}=e.detail;if(a!==void 0){let t=this.model.emptyCellSymbol,l={...t,type:H.SFS,color:a,outline:t?.outline&&{...t.outline,color:a}};this.model.emptyCellSymbol=l}},this.availableColorRamps=[],this.layerFieldsInfo=[],this.open=!1,this.arcgisChartsConfigDataChangeError=A()}static{this.properties={availableColorRamps:16,aggregationLabel:16,messageOverrides:0,model:0,layerFieldsInfo:0,open:5}}static{this.styles=le}connectedCallback(){super.connectedCallback(),this.loadColorRampFromArcGIS()}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),this.aggregationLabel=W(this.model.aggregationType,this.commonStrings)}disconnectedCallback(){super.disconnectedCallback(),this.model?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}loadColorRampFromArcGIS(){let e=b.esriColorRamps;this.allColorRamps=e,this.availableColorRamps=this.allColorRamps}getSelectedOrDefaultColorRampName(){return this.model.colorRampName??(J(this.model?.config)?b.defaultColorRampForCharts?.name:void 0)}getRequestedBreaksCount(){return this.requestedBreaksCount??this.model.breaksCount??K}getFirstDayOfWeek(){let{lang:e}=N(this.el??document.documentElement),a=_(e);return U.local().setLocale(e).startOf("week",{useLocaleWeeks:a!==D}).weekday}applyCalendarTypePreset(e){switch(e){case y.YearByMonthAndDayOfMonth:{let a={type:p.CalendarDateParts,unit:u.DayOfMonth},t={type:p.CalendarDateParts,unit:u.MonthOfYear};this.model.xTemporalBinning=a,this.model.yTemporalBinning=t;break}case y.WeekByDayOfWeekAndHourOfDay:{let a={type:p.CalendarDateParts,unit:u.HourOfDay},t={type:p.CalendarDateParts,unit:u.DayOfWeek};this.model.firstDayOfWeek=this.getFirstDayOfWeek(),this.model.xTemporalBinning=a,this.model.yTemporalBinning=t;break}}}async generateClassBreaks(e=!1){let a=[],t=this.model.chartRenderer?.classBreakInfos,l=ee(Q);return l&&(a=await z({data:l,xAxisField:this.model.xAxisField,classificationMethod:this.model.classificationMethod,breaksCount:this.model.breaksCount,colorRampName:this.model.colorRampName,availableColorRamps:this.availableColorRamps,existingClassBreakInfos:t,useExistingColors:!e,isColorRampFlipped:this.model.isColorRampFlipped})),a}applyGeneratedClassBreaks(e,a){if(this.model.chartRenderer={type:"classBreaks",field:q.valueField,classBreakInfos:e},this.model.heatRulesType!==C.Renderer&&(this.model.heatRulesType=C.Renderer),this.model.classificationMethod!==f.manual){let t=e.length||a;this.model.breaksCount!==t&&(this.model.breaksCount=t)}}async generateAndUpdateClassBreaks(e=!1){let a=this.getRequestedBreaksCount(),t=await this.generateClassBreaks(e);Y({currentBreaks:t,configBreaks:this.model.chartRenderer?.classBreakInfos??[],treatReversedColorsAsEqual:!e})&&this.applyGeneratedClassBreaks(t,a)}modelChange(e,a){a?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}getCorrectedXAxisFieldValue(){return j({fieldName:this.model.xAxisField,fieldList:this.layerFieldsInfo})?"":B(this.layerFieldsInfo,this.model.xAxisField)}onXAxisFieldSelect(e){this.contentKind=s.xAxisField,this.setupPopover(e)}onNumericFieldSelect(e){this.contentKind=s.numericFields,this.setupPopover(e)}onCalendarTypeSelect(e){this.contentKind=s.calendarType,this.setupPopover(e)}onClassBreakMethodSelect(e){this.contentKind=s.classBreakMethod,this.setupPopover(e)}onColorSchemeSelect(e){this.contentKind=s.colorScheme,this.setupPopover(e)}async onBreaksCountChange(e){let a=I(e.target.value);a<d.min?a=d.min:a>d.max&&(a=d.max),X(a)&&(this.breaksCountElement.value&&(this.breaksCountElement.value.value=a.toString()),this.requestedBreaksCount=a,this.model.breaksCount=a,await this.generateAndUpdateClassBreaks())}onAggregationSelect(e){this.contentKind=s.aggregation,this.setupPopover(e)}onNullSelect(e){this.contentKind=s.null,this.setupPopover(e)}onIncludeLeapDayChange(e){let a=e.target.checked;this.model.includeLeapDay=a}onNullPolicyChange(e){this.model.nullPolicy=e.target.selectedItem?.value}setupPopover(e){e.stopImmediatePropagation(),this.removeHeatChartDataPopover();let a,t,l;switch(this.contentKind){case s.aggregation:a=this.aggregationElement.value,t=this._messages.aggregationHeader,l=this.model.aggregationType;break;case s.xAxisField:a=this.xAxisFieldElement.value,t=this._messages.xAxisField,l=this.model.xAxisField;break;case s.numericFields:a=this.numericFieldsElement.value,t=this._messages.numericField,l=this.model.numericFields?.[0];break;case s.calendarType:a=this.calendarTypeElement.value,t=this._messages.calendarType,l=k(this.model);break;case s.calendarViewType:a=this.calendarViewTypeElement.value,t=this._messages.viewType,l=this.model.viewType;break;case s.classBreakMethod:a=this.classBreakMethodElement.value,t=this._messages.method,l=this.model.classificationMethod;break;case s.colorScheme:a=this.colorSchemeElement.value,t=this._messages.colorScheme,l=this.getSelectedOrDefaultColorRampName();break;case s.null:a=e.target,t=this._messages.null;break}this.heatChartPopover=T(i`<arcgis-charts-config-heat-chart-popover .headingTitle=${t} .referenceElement=${a} open .contentKind=${this.contentKind} .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${l} @arcgisChartsConfigHeatChartDataPopoverChange=${this.onHeatChartDataPopoverChange} @arcgisChartsConfigPopoverClose=${this.popoverClose} .colorRamps=${this.availableColorRamps} @arcgisChartsConfigHeatChartColorRampChange=${this.onColorRampSelection} @arcgisChartsConfigPopoverEmptyCellColorChange=${this.onEmptyCellColorChange} @arcgisChartsConfigPopoverEmptyCellNameChange=${this.onEmptyCellNameChange} .isFlipped=${this.model.isColorRampFlipped}></arcgis-charts-config-heat-chart-popover>`),!document.body.contains(this.heatChartPopover)&&this.heatChartPopover!==null&&document.body.appendChild(this.heatChartPopover)}removeHeatChartDataPopover(){this.heatChartPopover!==null&&(this.heatChartPopover.open=!1,this.heatChartPopover=te(this.heatChartPopover))}setDefaultPropertiesForCalendarHeatChart(){this.model.yAxisField=this.model.xAxisField,this.model.setYAxisSortOrder(Z.Desc),this.model.classificationMethod===void 0&&(this.model.classificationMethod=f.naturalBreaks),this.model.heatRulesType!==C.Renderer&&(this.model.heatRulesType=C.Renderer),this.model.viewType===void 0&&(this.model.viewType=L.singleCalendarView),(this.model.aggregationType===m.Count||this.model.aggregationType===m.Sum)&&this.model.nullPolicy!==h.Zero&&(this.model.nullPolicy=h.Zero),this.model.colorRampName===void 0&&(this.model.colorRampName=b.defaultColorRampForCharts?.name)}renderXAxisFieldSelect(){let e=this.getCorrectedXAxisFieldValue();return i`<arcgis-charts-config-field-picker .label=${e} @click=${this.onXAxisFieldSelect} ${c(this.xAxisFieldElement)}></arcgis-charts-config-field-picker>`}renderAggregation(){return i`<arcgis-charts-config-field-picker .label=${this.model.aggregationType===m.NoAggregation?this._messages.noAggregation:this.aggregationLabel} @click=${this.onAggregationSelect} ${c(this.aggregationElement)}></arcgis-charts-config-field-picker>`}renderNumericFieldsSelect(){let e=this.model.numericFields?.[0]===R(this.model.layer).idField?"":B(this.layerFieldsInfo,this.model.numericFields?.[0]);return i`<arcgis-charts-config-field-picker .label=${e} @click=${this.onNumericFieldSelect} ${c(this.numericFieldsElement)}></arcgis-charts-config-field-picker>`}renderCalendarTypeSelect(){let e=k(this.model)??"",a={weekByDayOfWeekAndHourOfDay:this._messages.weekByDayOfWeekAndHourOfDay,yearByMonthAndDayOfMonth:this._messages.yearByMonthAndDayOfMonth},t=e?a[e]??"":"";return i`<arcgis-charts-config-field-picker .label=${t} @click=${this.onCalendarTypeSelect} ${c(this.calendarTypeElement)}></arcgis-charts-config-field-picker>`}renderClassBreakMethodSelect(){let e={equalInterval:this._messages.classBreaksMethod?.equalInterval,manual:this._messages.classBreaksMethod?.manual,naturalBreaks:this._messages.classBreaksMethod?.naturalBreaks,quantile:this._messages.classBreaksMethod?.quantile},a=this.model.classificationMethod?e[O(this.model.classificationMethod)]??"":"";return i`<arcgis-charts-config-field-picker .label=${a} @click=${this.onClassBreakMethodSelect} ${c(this.classBreakMethodElement)}></arcgis-charts-config-field-picker>`}renderColorRampSelect(){let e=this.model.chartRenderer?.classBreakInfos?.map(a=>{let t=a!==void 0?G(a.symbol.color):"#FFFFFF";return i`<div class=${o(r.colorRampSegment)} style=${x({backgroundColor:t,width:`${100/this.model.breaksCount}%`})}></div>`});return i`<arcgis-charts-config-field-picker label @click=${this.onColorSchemeSelect} ${c(this.colorSchemeElement)}><div slot=fieldPickerSlot class=${o(r.colorRamp)}>${e}</div></arcgis-charts-config-field-picker>`}renderClassBreaksTable(){let e=this.model.chartRenderer?.classBreakInfos??[];return i`<calcite-table caption="Simple table"><calcite-table-row slot=table-header><calcite-table-header .heading=${this._messages.symbol}></calcite-table-header><calcite-table-header .heading=${this._messages.upperValue}></calcite-table-header></calcite-table-row>${e.map(a=>i`<calcite-table-row><calcite-table-cell><calcite-swatch label scale=m .color=${`rgba(${a.symbol.color?.[0]}, ${a.symbol.color?.[1]}, ${a.symbol.color?.[2]}, ${a.symbol.color?.[3]/255})`}></calcite-swatch></calcite-table-cell><calcite-table-cell>${a.label}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`}renderNullUI(){let e=this.model.emptyCell,a=this._messages.null,t=e?.symbol?.color??this.model.emptyCellSymbol?.color??V.grayColor,[l,g,v,$]=[...t],F=`rgba(${l},${g},${v},${$/255})`;return i`<calcite-list label class=${o(r.list)} selection-mode=none ${c(this.nullElement)}><calcite-list-item .label=${a} .value=${a} @calciteListItemSelect=${this.onNullSelect}><calcite-icon icon=square-f style=${x({color:F})} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}renderEmptyBins(){return i`<calcite-radio-button-group name=empty-bins layout=vertical @calciteRadioButtonGroupChange=${this.onNullPolicyChange}><calcite-label layout=inline><calcite-radio-button .value=${h.Zero} .checked=${this.model.nullPolicy===h.Zero}></calcite-radio-button>${this._messages.treatAsZero}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${h.Null} .checked=${this.model.nullPolicy===h.Null}></calcite-radio-button>${this._messages.treatAsNull}</calcite-label></calcite-radio-button-group>`}render(){let e=this.renderXAxisFieldSelect(),a=this.renderAggregation(),t=this.renderNumericFieldsSelect(),l=this.renderCalendarTypeSelect(),g=this.renderClassBreakMethodSelect(),v=this.renderColorRampSelect(),$=this.renderClassBreaksTable(),F=this.renderNullUI(),se=this.renderEmptyBins();return i`<calcite-label class=${o(r.label)}>${this._messages.dateRequired}${e}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.calendarType}${l}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.aggregation}${a}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.numericField}${t}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.method}${g}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.numberOfClasses}<calcite-input type=number .min=${d.min} .max=${d.max} .disabled=${this.model.classificationMethod===void 0||this.model.classificationMethod===f.manual} step=1 .value=${ae(this.model.breaksCount,5)} @calciteInputInput=${this.onBreaksCountChange} ${c(this.breaksCountElement)}></calcite-input></calcite-label><calcite-label class=${o(r.label)}>${this._messages.colorScheme}${v}</calcite-label>${F}<calcite-accordion class=${o(r.accordion)} appearance=transparent selection-mode=single><calcite-accordion-item .heading=${this._messages.classBreaks}>${$}</calcite-accordion-item></calcite-accordion><calcite-label class=${o(r.label)}>${this._messages.emptyBins}${se}</calcite-label>${k(this.model)===y.YearByMonthAndDayOfMonth?i`<calcite-label class=${o(r.label)} layout=inline-space-between>${this._messages.includeLeapDay}<calcite-switch .checked=${this.model.includeLeapDay} @calciteSwitchChange=${this.onIncludeLeapDayChange}></calcite-switch></calcite-label>`:null}`}};w("arcgis-charts-config-heat-chart-data",P);return P},a,b,e,g,j)
|
|
2
|
+
import{a as te}from"./YKSQH65V.js";import{a as Q,h as ee}from"./IBCFYECI.js";import j from"./I6PWQEWZ.js";import{l as s,m as y}from"./5AKOPV7Z.js";import{a as S}from"./Q3P2IG23.js";import g from"./BLS6BF2L.js";import e from"./7SKEI4E6.js";import b from"./L7UQNGQR.js";import a from"./OXOOIHEE.js";import{Aa as W,q,s as d,t as K}from"./KISYJDGT.js";import{f as H}from"./2JY4BULO.js";import{l as I,s as O}from"./L2G4TISY.js";import{g as D,i as _,j as N}from"./WPAN7ZED.js";import{A as c,B as M,C as o,D as x,F as T,H as w,g as E,i,n as A,z as n}from"./HECZ3OT6.js";import{c as Z}from"./FHN6CIIO.js";import"./AUKJ4CBR.js";import{a as p,b as m,l as u,m as C,n as h,w as L,x as f}from"./BNAX4Y53.js";import"./TIWCUJOG.js";export default $arcgis.t(([{Dc:R,a:U,hc:B,l:V,qc:X},{b:G,g:z,h:b,i:Y},{d:J},{h:j},{g:ae,s:k}])=>{var le=E`.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;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label{display:flex;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}.color-ramp{width:100%;height:20px;overflow:hidden;border-radius:0}.color-ramp-segment{height:100%;display:inline-block}.list{margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}.accordion{margin-top:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}`,r={label:"label",colorRamp:"color-ramp",colorRampSegment:"color-ramp-segment",list:"list",accordion:"accordion"},P=class extends M{constructor(){super(...arguments),this._messages=S(),this.commonStrings=S({name:"common",blocking:!0}),this.heatChartPopover=null,this.xAxisFieldElement=n(),this.aggregationElement=n(),this.numericFieldsElement=n(),this.calendarTypeElement=n(),this.calendarViewTypeElement=n(),this.classBreakMethodElement=n(),this.nullElement=n(),this.breaksCountElement=n(),this.colorSchemeElement=n(),this.onHeatChartDataPopoverChange=async e=>{try{if(e.detail?.value!==void 0){let{contentKind:a}=e.detail,t=e.detail.value;switch(a){case s.aggregation:this.model.aggregationType=t,t===m.Count||t===m.Sum?this.model.nullPolicy=h.Zero:this.model.nullPolicy=h.Null;break;case s.xAxisField:this.model.xAxisField=t,this.setDefaultPropertiesForCalendarHeatChart();break;case s.numericFields:this.model.numericFields=[t.trim()||""],(this.model.numericFields??[]).length>0&&this.model.aggregationType===m.Count&&this.model.numericFields[0]!==R(this.model.layer).idField&&(this.model.aggregationType=m.Sum);break;case s.calendarType:{this.applyCalendarTypePreset(t);break}case s.calendarViewType:{this.model.viewType=t;break}case s.classBreakMethod:{this.model.classificationMethod=t,await this.generateAndUpdateClassBreaks();break}default:break}}}catch(a){throw this.arcgisChartsConfigDataChangeError.emit({error:a,model:this.model}),a}this.removeHeatChartDataPopover(),this.requestUpdate()},this.popoverClose=e=>{this.heatChartPopover===e?.target&&this.removeHeatChartDataPopover()},this.onModelConfigChange=()=>{this.requestUpdate()},this.allColorRamps=[],this.onColorRampSelection=async e=>{let{isFlipped:a,rampName:t}=e.detail,l=this.model.colorRampName!==t,g=this.model.isColorRampFlipped!==a;this.model.colorRampName=t,this.model.isColorRampFlipped=a,(l||g)&&await this.generateAndUpdateClassBreaks(!0)},this.onEmptyCellNameChange=e=>{let{name:a}=e.detail;a!==void 0&&(this.model.emptyCellText=a)},this.onEmptyCellColorChange=e=>{let{color:a}=e.detail;if(a!==void 0){let t=this.model.emptyCellSymbol,l={...t,type:H.SFS,color:a,outline:t?.outline&&{...t.outline,color:a}};this.model.emptyCellSymbol=l}},this.availableColorRamps=[],this.layerFieldsInfo=[],this.open=!1,this.arcgisChartsConfigDataChangeError=A()}static{this.properties={availableColorRamps:16,aggregationLabel:16,messageOverrides:0,model:0,layerFieldsInfo:0,open:5}}static{this.styles=le}connectedCallback(){super.connectedCallback(),this.loadColorRampFromArcGIS()}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),this.aggregationLabel=W(this.model.aggregationType,this.commonStrings)}disconnectedCallback(){super.disconnectedCallback(),this.model?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}loadColorRampFromArcGIS(){let e=b.esriColorRamps;this.allColorRamps=e,this.availableColorRamps=this.allColorRamps}getSelectedOrDefaultColorRampName(){return this.model.colorRampName??(J(this.model?.config)?b.defaultColorRampForCharts?.name:void 0)}getRequestedBreaksCount(){return this.requestedBreaksCount??this.model.breaksCount??K}getFirstDayOfWeek(){let{lang:e}=N(this.el??document.documentElement),a=_(e);return U.local().setLocale(e).startOf("week",{useLocaleWeeks:a!==D}).weekday}applyCalendarTypePreset(e){switch(e){case y.YearByMonthAndDayOfMonth:{let a={type:p.CalendarDateParts,unit:u.DayOfMonth},t={type:p.CalendarDateParts,unit:u.MonthOfYear};this.model.xTemporalBinning=a,this.model.yTemporalBinning=t;break}case y.WeekByDayOfWeekAndHourOfDay:{let a={type:p.CalendarDateParts,unit:u.HourOfDay},t={type:p.CalendarDateParts,unit:u.DayOfWeek};this.model.firstDayOfWeek=this.getFirstDayOfWeek(),this.model.xTemporalBinning=a,this.model.yTemporalBinning=t;break}}}async generateClassBreaks(e=!1){let a=[],t=this.model.chartRenderer?.classBreakInfos,l=ee(Q);return l&&(a=await z({data:l,xAxisField:this.model.xAxisField,classificationMethod:this.model.classificationMethod,breaksCount:this.model.breaksCount,colorRampName:this.model.colorRampName,availableColorRamps:this.availableColorRamps,existingClassBreakInfos:t,useExistingColors:!e,isColorRampFlipped:this.model.isColorRampFlipped})),a}applyGeneratedClassBreaks(e,a){if(this.model.chartRenderer={type:"classBreaks",field:q.valueField,classBreakInfos:e},this.model.heatRulesType!==C.Renderer&&(this.model.heatRulesType=C.Renderer),this.model.classificationMethod!==f.manual){let t=e.length||a;this.model.breaksCount!==t&&(this.model.breaksCount=t)}}async generateAndUpdateClassBreaks(e=!1){let a=this.getRequestedBreaksCount(),t=await this.generateClassBreaks(e);Y({currentBreaks:t,configBreaks:this.model.chartRenderer?.classBreakInfos??[],treatReversedColorsAsEqual:!e})&&this.applyGeneratedClassBreaks(t,a)}modelChange(e,a){a?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}getCorrectedXAxisFieldValue(){return j({fieldName:this.model.xAxisField,fieldList:this.layerFieldsInfo})?"":B(this.layerFieldsInfo,this.model.xAxisField)}onXAxisFieldSelect(e){this.contentKind=s.xAxisField,this.setupPopover(e)}onNumericFieldSelect(e){this.contentKind=s.numericFields,this.setupPopover(e)}onCalendarTypeSelect(e){this.contentKind=s.calendarType,this.setupPopover(e)}onClassBreakMethodSelect(e){this.contentKind=s.classBreakMethod,this.setupPopover(e)}onColorSchemeSelect(e){this.contentKind=s.colorScheme,this.setupPopover(e)}async onBreaksCountChange(e){let a=I(e.target.value);a<d.min?a=d.min:a>d.max&&(a=d.max),X(a)&&(this.breaksCountElement.value&&(this.breaksCountElement.value.value=a.toString()),this.requestedBreaksCount=a,this.model.breaksCount=a,await this.generateAndUpdateClassBreaks())}onAggregationSelect(e){this.contentKind=s.aggregation,this.setupPopover(e)}onNullSelect(e){this.contentKind=s.null,this.setupPopover(e)}onIncludeLeapDayChange(e){let a=e.target.checked;this.model.includeLeapDay=a}onNullPolicyChange(e){this.model.nullPolicy=e.target.selectedItem?.value}setupPopover(e){e.stopImmediatePropagation(),this.removeHeatChartDataPopover();let a,t,l;switch(this.contentKind){case s.aggregation:a=this.aggregationElement.value,t=this._messages.aggregationHeader,l=this.model.aggregationType;break;case s.xAxisField:a=this.xAxisFieldElement.value,t=this._messages.xAxisField,l=this.model.xAxisField;break;case s.numericFields:a=this.numericFieldsElement.value,t=this._messages.numericField,l=this.model.numericFields?.[0];break;case s.calendarType:a=this.calendarTypeElement.value,t=this._messages.calendarType,l=k(this.model);break;case s.calendarViewType:a=this.calendarViewTypeElement.value,t=this._messages.viewType,l=this.model.viewType;break;case s.classBreakMethod:a=this.classBreakMethodElement.value,t=this._messages.method,l=this.model.classificationMethod;break;case s.colorScheme:a=this.colorSchemeElement.value,t=this._messages.colorScheme,l=this.getSelectedOrDefaultColorRampName();break;case s.null:a=e.target,t=this._messages.null;break}this.heatChartPopover=T(i`<arcgis-charts-config-heat-chart-popover .headingTitle=${t} .referenceElement=${a} open .contentKind=${this.contentKind} .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${l} @arcgisChartsConfigHeatChartDataPopoverChange=${this.onHeatChartDataPopoverChange} @arcgisChartsConfigPopoverClose=${this.popoverClose} .colorRamps=${this.availableColorRamps} @arcgisChartsConfigHeatChartColorRampChange=${this.onColorRampSelection} @arcgisChartsConfigPopoverEmptyCellColorChange=${this.onEmptyCellColorChange} @arcgisChartsConfigPopoverEmptyCellNameChange=${this.onEmptyCellNameChange} .isFlipped=${this.model.isColorRampFlipped}></arcgis-charts-config-heat-chart-popover>`),!document.body.contains(this.heatChartPopover)&&this.heatChartPopover!==null&&document.body.appendChild(this.heatChartPopover)}removeHeatChartDataPopover(){this.heatChartPopover!==null&&(this.heatChartPopover.open=!1,this.heatChartPopover=te(this.heatChartPopover))}setDefaultPropertiesForCalendarHeatChart(){this.model.yAxisField=this.model.xAxisField,this.model.setYAxisSortOrder(Z.Desc),this.model.classificationMethod===void 0&&(this.model.classificationMethod=f.naturalBreaks),this.model.heatRulesType!==C.Renderer&&(this.model.heatRulesType=C.Renderer),this.model.viewType===void 0&&(this.model.viewType=L.singleCalendarView),(this.model.aggregationType===m.Count||this.model.aggregationType===m.Sum)&&this.model.nullPolicy!==h.Zero&&(this.model.nullPolicy=h.Zero),this.model.colorRampName===void 0&&(this.model.colorRampName=b.defaultColorRampForCharts?.name)}renderXAxisFieldSelect(){let e=this.getCorrectedXAxisFieldValue();return i`<arcgis-charts-config-field-picker .label=${e} @click=${this.onXAxisFieldSelect} ${c(this.xAxisFieldElement)}></arcgis-charts-config-field-picker>`}renderAggregation(){return i`<arcgis-charts-config-field-picker .label=${this.model.aggregationType===m.NoAggregation?this._messages.noAggregation:this.aggregationLabel} @click=${this.onAggregationSelect} ${c(this.aggregationElement)}></arcgis-charts-config-field-picker>`}renderNumericFieldsSelect(){let e=this.model.numericFields?.[0]===R(this.model.layer).idField?"":B(this.layerFieldsInfo,this.model.numericFields?.[0]);return i`<arcgis-charts-config-field-picker .label=${e} @click=${this.onNumericFieldSelect} ${c(this.numericFieldsElement)}></arcgis-charts-config-field-picker>`}renderCalendarTypeSelect(){let e=k(this.model)??"",a={weekByDayOfWeekAndHourOfDay:this._messages.weekByDayOfWeekAndHourOfDay,yearByMonthAndDayOfMonth:this._messages.yearByMonthAndDayOfMonth},t=e?a[e]??"":"";return i`<arcgis-charts-config-field-picker .label=${t} @click=${this.onCalendarTypeSelect} ${c(this.calendarTypeElement)}></arcgis-charts-config-field-picker>`}renderClassBreakMethodSelect(){let e={equalInterval:this._messages.classBreaksMethod?.equalInterval,manual:this._messages.classBreaksMethod?.manual,naturalBreaks:this._messages.classBreaksMethod?.naturalBreaks,quantile:this._messages.classBreaksMethod?.quantile},a=this.model.classificationMethod?e[O(this.model.classificationMethod)]??"":"";return i`<arcgis-charts-config-field-picker .label=${a} @click=${this.onClassBreakMethodSelect} ${c(this.classBreakMethodElement)}></arcgis-charts-config-field-picker>`}renderColorRampSelect(){let e=this.model.chartRenderer?.classBreakInfos?.map(a=>{let t=a!==void 0?G(a.symbol.color):"#FFFFFF";return i`<div class=${o(r.colorRampSegment)} style=${x({backgroundColor:t,width:`${100/this.model.breaksCount}%`})}></div>`});return i`<arcgis-charts-config-field-picker label @click=${this.onColorSchemeSelect} ${c(this.colorSchemeElement)}><div slot=fieldPickerSlot class=${o(r.colorRamp)}>${e}</div></arcgis-charts-config-field-picker>`}renderClassBreaksTable(){let e=this.model.chartRenderer?.classBreakInfos??[];return i`<calcite-table caption="Simple table"><calcite-table-row slot=table-header><calcite-table-header .heading=${this._messages.symbol}></calcite-table-header><calcite-table-header .heading=${this._messages.upperValue}></calcite-table-header></calcite-table-row>${e.map(a=>i`<calcite-table-row><calcite-table-cell><calcite-swatch label scale=m .color=${`rgba(${a.symbol.color?.[0]}, ${a.symbol.color?.[1]}, ${a.symbol.color?.[2]}, ${a.symbol.color?.[3]/255})`}></calcite-swatch></calcite-table-cell><calcite-table-cell>${a.label}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`}renderNullUI(){let e=this.model.emptyCell,a=this._messages.null,t=e?.symbol?.color??this.model.emptyCellSymbol?.color??V.grayColor,[l,g,v,$]=[...t],F=`rgba(${l},${g},${v},${$/255})`;return i`<calcite-list label class=${o(r.list)} selection-mode=none ${c(this.nullElement)}><calcite-list-item .label=${a} .value=${a} @calciteListItemSelect=${this.onNullSelect}><calcite-icon icon=square-f style=${x({color:F})} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}renderEmptyBins(){return i`<calcite-radio-button-group name=empty-bins layout=vertical @calciteRadioButtonGroupChange=${this.onNullPolicyChange}><calcite-label layout=inline><calcite-radio-button .value=${h.Zero} .checked=${this.model.nullPolicy===h.Zero}></calcite-radio-button>${this._messages.treatAsZero}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${h.Null} .checked=${this.model.nullPolicy===h.Null}></calcite-radio-button>${this._messages.treatAsNull}</calcite-label></calcite-radio-button-group>`}render(){let e=this.renderXAxisFieldSelect(),a=this.renderAggregation(),t=this.renderNumericFieldsSelect(),l=this.renderCalendarTypeSelect(),g=this.renderClassBreakMethodSelect(),v=this.renderColorRampSelect(),$=this.renderClassBreaksTable(),F=this.renderNullUI(),se=this.renderEmptyBins();return i`<calcite-label class=${o(r.label)}>${this._messages.dateRequired}${e}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.calendarType}${l}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.aggregation}${a}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.numericField}${t}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.method}${g}</calcite-label><calcite-label class=${o(r.label)}>${this._messages.numberOfClasses}<calcite-input type=number .min=${d.min} .max=${d.max} .disabled=${this.model.classificationMethod===void 0||this.model.classificationMethod===f.manual} step=1 .value=${ae(this.model.breaksCount,5)} @calciteInputInput=${this.onBreaksCountChange} ${c(this.breaksCountElement)}></calcite-input></calcite-label><calcite-label class=${o(r.label)}>${this._messages.colorScheme}${v}</calcite-label>${F}<calcite-accordion class=${o(r.accordion)} appearance=transparent selection-mode=single><calcite-accordion-item .heading=${this._messages.classBreaks}>${$}</calcite-accordion-item></calcite-accordion><calcite-label class=${o(r.label)}>${this._messages.emptyBins}${se}</calcite-label>${k(this.model)===y.YearByMonthAndDayOfMonth?i`<calcite-label class=${o(r.label)} layout=inline-space-between>${this._messages.includeLeapDay}<calcite-switch .checked=${this.model.includeLeapDay} @calciteSwitchChange=${this.onIncludeLeapDayChange}></calcite-switch></calcite-label>`:null}`}};w("arcgis-charts-config-heat-chart-data",P);return P},a,b,e,g,j)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as C}from"./Y6URECIF.js";import{a as b}from"./5EAIW2ZK.js";import{b as S,c as T}from"./YKSQH65V.js";import e from"./
|
|
2
|
+
import{a as C}from"./Y6URECIF.js";import{a as b}from"./5EAIW2ZK.js";import{b as S,c as T}from"./YKSQH65V.js";import e from"./I6PWQEWZ.js";import{h as a}from"./5AKOPV7Z.js";import{a as f}from"./Q3P2IG23.js";import d from"./OXOOIHEE.js";import{Aa as x}from"./KISYJDGT.js";import{a as L}from"./2JY4BULO.js";import{o as y}from"./L2G4TISY.js";import"./WPAN7ZED.js";import{A as p,B as $,C as r,H as P,g as k,i as s,n as m,z as g}from"./HECZ3OT6.js";import{d as c}from"./FHN6CIIO.js";import"./AUKJ4CBR.js";import"./BNAX4Y53.js";import"./TIWCUJOG.js";export default $arcgis.t(([{Ec:I,Ic:D,hc:F},{a:w,d:u,k:h,o:E}])=>{var o={name:"pie-chart-data-popover",header:"header",fab:"fab",popoverPickList:"popover-pick-list",flipClass:"sort-counter-clockwise",sortOrderPickList:"sort-order-pick-list",panel:"panel"},O=k`.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-counter-clockwise{transform:scaleX(-1)}.sort-order-pick-list{overflow-y:hidden}.panel{max-height:60vh}`,v=class extends ${constructor(){super(...arguments),this._messages=f(),this.commonStrings=f({name:"common",blocking:!0}),this.picklist=g(),this.popoverElement=g(),this.placement="leading",this.offsetDistance=-200,this.pickListHasChanged=!1,this.aggregationLabels=[],this.open=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigPieChartDataPopoverChange=m(),this.arcgisChartsConfigPopoverClose=m()}static{this.properties={aggregationLabels:16,messageOverrides:0,headingTitle:1,referenceElement:0,open:5,contentKind:1,layerFieldsInfo:0,selectedContent:1}}static{this.styles=O}async reposition(){await this.popoverElement.value?.reposition()}willUpdate(e){e.has("selectedContent")&&this.selectedContentChange(this.selectedContent,e.get("selectedContent"));let t=u.map(i=>x(i,this.commonStrings));y(this.aggregationLabels,t)||(this.aggregationLabels=t)}updated(){S(this.popoverElement.value,this.open),setTimeout(()=>{this.picklist.value?.setFocus()},w.PopoverTimer)}selectedContentChange(e,t){this.pickListHasChanged=T(e,t)}buildAggregationPickListItems(){return C(u,e=>e,(e,t)=>s`<calcite-list-item .label=${this.aggregationLabels[t]} .value=${e} .selected=${h(e,this.selectedContent)}></calcite-list-item>`)}buildSortOrder(){let e=Object.keys(c);return e.splice(e.indexOf(c.customSort),1),C(e,t=>t,t=>{let i="string",l="rotate",n="";switch(t){case c.labelAsc:i="string";break;case c.labelDesc:i="string",n=o.flipClass;break;case c.valueAsc:i="number";break;case c.valueDesc:i="number",n=o.flipClass;break;case c.customSort:}return s`<calcite-list-item .selected=${this.selectedContent===t} .label=${this._messages[t]} .value=${c[t]}><calcite-icon slot=content-end .icon=${i}></calcite-icon><calcite-icon class=${r(n)} slot=content-end .icon=${l}></calcite-icon></calcite-list-item>`})}buildPickListItem(e){return b(e.name,s`<calcite-list-item .label=${F(this.layerFieldsInfo,e.name)} .value=${e.name} .selected=${h(e.name,this.selectedContent)}></calcite-list-item>`)}buildPickListItems(e){let t=this.layerFieldsInfo?.length??0,i=[];switch(e){case a.numericFields:{for(let l=0;l<t;l+=1){let n=this.layerFieldsInfo[l];I(n)&&i.push(this.buildPickListItem(n))}break}case a.category:{let l=b(" ",s`<calcite-list-item label=" " value=" " .selected=${h("",this.selectedContent)}></calcite-list-item>`);i.push(l);for(let n=0;n<t;n+=1){let d=this.layerFieldsInfo[n];(D(d)||d.type===L.String)&&i.push(this.buildPickListItem(d))}break}}return i}closePopover(){if(this.contentKind===a.numericFields&&this.pickListHasChanged){let e={pickListElement:this.picklist.value,eventEmitter:this.arcgisChartsConfigPieChartDataPopoverChange,contentKind:this.contentKind};E(e)}this.arcgisChartsConfigPopoverClose.emit()}onDataContentTypeChange(e){this.pickListHasChanged=!0;let t=e.target.selectedItems;this.arcgisChartsConfigPieChartDataPopoverChange.emit({contentKind:this.contentKind,value:t.map(i=>i.value)}),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 s`<calcite-list label class=${r(o.popoverPickList)} selection-mode=single selection-appearance=border @calciteListChange=${this.onDataContentTypeChange}>${e}</calcite-list>`}renderCategory(){let e=this.buildPickListItems(a.category);return s`<calcite-list label class=${r(o.popoverPickList)} selection-mode=single selection-appearance=border filter-enabled @calciteListChange=${this.onDataContentTypeChange} ${p(this.picklist)}>${e}</calcite-list>`}renderNumericFields(){let e=this.buildPickListItems(a.numericFields);return s`<calcite-list label class=${r(o.popoverPickList)} selection-mode=multiple filter-enabled @calciteListChange=${this.onNumericFieldsChange} ${p(this.picklist)}>${e}</calcite-list>`}renderSortOrder(){let e=this.buildSortOrder();return s`<calcite-list label class=${`${o.popoverPickList} ${o.sortOrderPickList}`} selection-mode=single selection-appearance=border @calciteListChange=${this.onDataContentTypeChange}>${e}</calcite-list>`}renderPopoverInfo(){let e;switch(this.contentKind){case a.aggregation:e=this.renderAggregationType();break;case a.category:e=this.renderCategory();break;case a.numericFields:e=this.renderNumericFields();break;case a.sortOrder:e=this.renderSortOrder();break}return e}render(){let e;return this.contentKind===a.numericFields&&(e=s`<div slot=footer><calcite-fab class=${r(o.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>`),s`<div><calcite-popover class=${r(o.name)} .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} @calcitePopoverClose=${this.closePopover} .offsetDistance=${this.offsetDistance} .open=${this.open} label auto-close ${p(this.popoverElement)}><calcite-panel class=${r(o.panel)} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div slot=header-content class=${r(o.header)}>${this.headingTitle??""}</div>${this.renderPopoverInfo()}${e}</calcite-panel></calcite-popover></div>`}};P("arcgis-charts-config-pie-chart-popover",v);return v},d,e)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{i as we}from"./7JMZPDM5.js";import{c as W}from"./5AKOPV7Z.js";import g from"./
|
|
2
|
+
import{i as we}from"./7JMZPDM5.js";import{c as W}from"./5AKOPV7Z.js";import g from"./Q5GNPML7.js";import f from"./HHLOIUUD.js";import e from"./MCZMJAXK.js";import d from"./QMPQESBZ.js";import c from"./BLS6BF2L.js";import b from"./P5JPYG4Z.js";import a from"./OXOOIHEE.js";import{Fa as le,Ga as _,Ia as k,Ja as ne,p as N,q as E}from"./KISYJDGT.js";import{a as re}from"./2JY4BULO.js";import{h as U,i as K,o as ie,r as v}from"./L2G4TISY.js";import{e as G}from"./FHN6CIIO.js";import{a as se}from"./AUKJ4CBR.js";import{a as O,l as D}from"./BNAX4Y53.js";export default $arcgis.t(([{Dc:ce,E:ue,Fc:me,Kc:ye,Rb:de,S:fe,a:Q,ed: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)
|