@arcgis/charts-components 5.2.0-next.167 → 5.2.0-next.169
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/{XTEZ6SCO.js → 2P5QOZBO.js} +1 -1
- package/dist/cdn/{RNKBI3X2.js → 2Y5NUTIH.js} +1 -1
- package/dist/cdn/{NTJMVBRM.js → 2YUARJ7Z.js} +1 -1
- package/dist/cdn/{7P6O2RHA.js → 3AZFDTOK.js} +1 -1
- package/dist/cdn/{3TO4L72A.js → 3IDRIWA3.js} +1 -1
- package/dist/cdn/{JR2RRIKO.js → 3J3ZEOUR.js} +1 -1
- package/dist/cdn/{CZ2QBJIW.js → 3YQJ6IPZ.js} +1 -1
- package/dist/cdn/{7IIIIZMH.js → 5BXY4XKD.js} +1 -1
- package/dist/cdn/{N2FNNEOT.js → 5PZ32OQS.js} +1 -1
- package/dist/cdn/{PXU4TMFH.js → 62HO4MSO.js} +1 -1
- package/dist/cdn/{PAFLJ3WT.js → 63W32NNI.js} +1 -1
- package/dist/cdn/{Q27MURSA.js → 6D6LFYNM.js} +1 -1
- package/dist/cdn/{OQ4UEZRC.js → 6LPYPMJR.js} +1 -1
- package/dist/cdn/{IL763V5P.js → 6VQYSW2K.js} +1 -1
- package/dist/cdn/{QARQR7H5.js → ALHL3MPJ.js} +1 -1
- package/dist/cdn/{ZDM5IDLI.js → AQHYUF3W.js} +1 -1
- package/dist/cdn/{6RZNHZEN.js → BG73TRZ2.js} +1 -1
- package/dist/cdn/{A7U4VQMX.js → CRMQK4K7.js} +1 -1
- package/dist/cdn/{MGLAVOUI.js → CTZB57Z3.js} +1 -1
- package/dist/cdn/{HK4Z5B22.js → DDIJAZ22.js} +1 -1
- package/dist/cdn/{6ALZCZ36.js → DGGP6FRX.js} +1 -1
- package/dist/cdn/{TWAPMNSX.js → DXBAWY2M.js} +1 -1
- package/dist/cdn/{H3LCE55Z.js → E2AOHDRC.js} +1 -1
- package/dist/cdn/{I56GEKJB.js → EKRJ5FXS.js} +1 -1
- package/dist/cdn/{HGJNYEUX.js → FDGCDFXR.js} +1 -1
- package/dist/cdn/{NDU72CRG.js → FM7I3D2K.js} +1 -1
- package/dist/cdn/{ZNNKZGV6.js → GEOMLJL5.js} +1 -1
- package/dist/cdn/{P7EFHM46.js → GOLJJPKB.js} +1 -1
- package/dist/cdn/{5RI6YXV2.js → GYZYFD7H.js} +1 -1
- package/dist/cdn/{CDVLQX4S.js → HIIU2ALP.js} +1 -1
- package/dist/cdn/{N5GCUS4N.js → HZGEICBS.js} +1 -1
- package/dist/cdn/{UDCAINIH.js → J5OBKFE6.js} +1 -1
- package/dist/cdn/{H4XMNS3O.js → JMCQVJOB.js} +1 -1
- package/dist/cdn/{OH42GU2Y.js → JNXW624I.js} +1 -1
- package/dist/cdn/{SATVPAKF.js → JQGASPDO.js} +1 -1
- package/dist/cdn/{QT5HEM3R.js → JR6MRJUV.js} +1 -1
- package/dist/cdn/{7HDFMHYC.js → KGQ3KMIY.js} +1 -1
- package/dist/cdn/{RRUEVNJ6.js → KIZKV6G4.js} +1 -1
- package/dist/cdn/{6F64K7IO.js → KJVLOCBW.js} +1 -1
- package/dist/cdn/{ZCU3SS64.js → KR57KSI3.js} +1 -1
- package/dist/cdn/{3L5TASX6.js → KRYF7EUZ.js} +1 -1
- package/dist/cdn/{VL4T7FC5.js → LOQ6UWIN.js} +1 -1
- package/dist/cdn/{VAP4V5TC.js → LSF7R5ZL.js} +1 -1
- package/dist/cdn/{BWLIKQZM.js → MESJTWTA.js} +1 -1
- package/dist/cdn/{WFCQTLQZ.js → MGWKL4TI.js} +1 -1
- package/dist/cdn/{5XXJOV3V.js → MQB5BNTG.js} +1 -1
- package/dist/cdn/{XP4MBNF6.js → N2KZFRJ3.js} +1 -1
- package/dist/cdn/{FW6RGCL5.js → N6SGJRTX.js} +1 -1
- package/dist/cdn/{3BD4I5JQ.js → NIBYZLE2.js} +1 -1
- package/dist/cdn/{6THDMW4S.js → NKFO5BUL.js} +1 -1
- package/dist/cdn/{AM34FK2L.js → OK32TFAU.js} +1 -1
- package/dist/cdn/{XXEU3UNC.js → OLN4EPAT.js} +1 -1
- package/dist/cdn/{U7COJZ2D.js → OQQG3ZAD.js} +1 -1
- package/dist/cdn/{LEUIZWRV.js → ORB3STUT.js} +1 -1
- package/dist/cdn/{NSVQKFEV.js → PX4AHYPG.js} +1 -1
- package/dist/cdn/{W6V4XEM4.js → PZIS4GKR.js} +1 -1
- package/dist/cdn/{ZZXYM44J.js → QBCAHGWR.js} +1 -1
- package/dist/cdn/{7DHOI5P2.js → QCTVBQL7.js} +3 -3
- package/dist/cdn/{WLK4WDAW.js → QQNIUR7B.js} +1 -1
- package/dist/cdn/{AZ2Z7W7G.js → RE6KTVV7.js} +1 -1
- package/dist/cdn/{XCZG24EM.js → SGDEQPBL.js} +1 -1
- package/dist/cdn/{DW44U5PH.js → SMPXWF64.js} +1 -1
- package/dist/cdn/{WX5OSLU3.js → TIJWEYNF.js} +1 -1
- package/dist/cdn/{SQHO6UMU.js → TLPT5AYI.js} +1 -1
- package/dist/cdn/{XTQ4C5NA.js → TUOR2NKQ.js} +1 -1
- package/dist/cdn/{ETHXVKWT.js → TVQQVFCF.js} +1 -1
- package/dist/cdn/{6SKZWI33.js → U67KK4JS.js} +1 -1
- package/dist/cdn/{SNFP2PAX.js → VB3MDZZI.js} +1 -1
- package/dist/cdn/{UIE52DE3.js → VBCVBFTF.js} +25 -25
- package/dist/cdn/{5OIYMIQP.js → VOREI442.js} +1 -1
- package/dist/cdn/{RCG3QHMV.js → WBKQLB5N.js} +1 -1
- package/dist/cdn/{XJIL6CYH.js → WEPATZI7.js} +1 -1
- package/dist/cdn/{UGHZZOEP.js → WN2NHQBF.js} +1 -1
- package/dist/cdn/{G63YJSVM.js → WO5X2L7Q.js} +1 -1
- package/dist/cdn/{6B2Q4ZZ4.js → WY2QCCKG.js} +1 -1
- package/dist/cdn/{KYL7MGSG.js → X4D5CZIF.js} +1 -1
- package/dist/cdn/{WNFNL4XM.js → XFEGZHUT.js} +1 -1
- package/dist/cdn/{6KA3POYJ.js → XKYWLJ7N.js} +1 -1
- package/dist/cdn/{ENSGJAYI.js → XOFYHYJP.js} +1 -1
- package/dist/cdn/{G7VDU373.js → YIQPB4WO.js} +1 -1
- package/dist/cdn/{RGK27YR7.js → Z3YD62D7.js} +1 -1
- package/dist/cdn/{OZMMTR6U.js → ZZBKUAPK.js} +1 -1
- package/dist/cdn/{C77CMKWU.js → ZZTCUFOT.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/index.js +103 -100
- package/dist/components/arcgis-chart/customElement.js +4656 -4598
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/model/mixins/model-with-multi-axes.d.ts +24 -1
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{f as d,h as y,i as T,j as m,k as b}from"./O4TPXFX4.js";import e from"./
|
|
2
|
+
import{f as d,h as y,i as T,j as m,k as b}from"./O4TPXFX4.js";import e from"./TUOR2NKQ.js";import c from"./ORB3STUT.js";import a from"./QCTVBQL7.js";import{p as f}from"./43DLRSYB.js";export default $arcgis.t(([{hc:o},{d:a,e:x},{r:h,s:g,t:u,u:p}])=>{var P=Object.defineProperty,j=Object.getOwnPropertyDescriptor,O=(i,t,e,v)=>{for(var s=j(t,e),r=i.length-1,n;r>=0;r--)(n=i[r])&&(s=n(t,e,s)||s);return s&&P(t,e,s),s};function X(i){return i!==void 0&&"xAxisTitleText"in i}var l=class extends a{get xAxisTitleText(){return h(0,this._config)}set xAxisTitleText(t){g(t,0,this._config)}};O([x],l.prototype,"xAxisTitleText");var _=Object.defineProperty,C=Object.getOwnPropertyDescriptor,D=(i,t,e,v)=>{for(var s=C(t,e),r=i.length-1,n;r>=0;r--)(n=i[r])&&(s=n(t,e,s)||s);return s&&_(t,e,s),s};function w(i){return i!==void 0&&"xAxisTitleVisibility"in i}var c=class extends a{get xAxisTitleVisibility(){return u(0,this._config)}set xAxisTitleVisibility(t){p({visibility:t,axisIndex:0,config:this._config})}};D([x],c.prototype,"xAxisTitleVisibility");function B(i){return i!==void 0&&"generateXAxisTitle"in i}var A=class extends a{generateXAxisTitle(){let t=this.layerInfo?.layerFieldsInfo;if(t===void 0)return"";if(T(this)||d(this))return o(t,this.xAxisField);if(y(this))return this.category!==f?o(t,this.category):"";if(m(this))return o(t,this.numericField);if(b(this)){let e=this.xTemporalBinning?.unit;return e!==void 0?this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[e]:""}return""}};return{a:X,b:l,c:w,d:c,e:B,f:A}},a,c,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as C}from"./KSDJFASU.js";import{b}from"./RP6LD7CU.js";import d from"./
|
|
2
|
+
import{a as C}from"./KSDJFASU.js";import{b}from"./RP6LD7CU.js";import d from"./MESJTWTA.js";import{j as r}from"./POA2XTTK.js";import{a as S}from"./WZFDIC2M.js";import a from"./QCTVBQL7.js";import"./43DLRSYB.js";import{f as h}from"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as p,B as f,C as l,H as v,g,i as s,n as o,z as c}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Dc:$,hc:y},{a:u,k:d,l:P}])=>{var n={scatterplotPopover:"scatter-plot-popover",fillColor:"fill-color",header:"header",popoverPickList:"popover-pick-list",pickListPanel:"pick-list-panel"},k=g`.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:100%}.pick-list-panel{max-height:60vh}.popover-pick-list{font-size:small;max-width:var(--arcgis-charts-config-popover-pick-list-max-width)}`,m=class extends f{constructor(){super(...arguments),this.picklist=c(),this._messages=S(),this.popoverElement=c(),this.open=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigPopoverClose=o(),this.arcgisChartsConfigScatterplotFillColorChange=o(),this.arcgisChartsConfigScatterplotLineStyleChange=o(),this.arcgisChartsConfigScatterplotSizeVariableFieldChange=o(),this.arcgisChartsConfigScatterplotAdditionalTooltipFieldChange=o(),this.arcgisChartsConfigScatterplotXYFieldChange=o()}static{this.properties={messageOverrides:0,headingTitle:1,contentKind:1,selectedContent:1,referenceElement:0,placement:1,open:5,layerFieldsInfo:0}}static{this.styles=k}async reposition(){await this.popoverElement.value?.reposition()}updated(){setTimeout(()=>{this.picklist.value?.setFocus()},u.PopoverTimer),b(this.popoverElement.value,this.open)}seriesPopoverClose(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}updateSymbolProperties(e){this.selectedContent=e.target.lineStyle,this.arcgisChartsConfigScatterplotLineStyleChange.emit(e.detail)}updateColorProperties(e){this.selectedContent=e.detail,this.arcgisChartsConfigScatterplotFillColorChange.emit(e.detail)}onFieldSelectionChange(e){let t=e.target.selectedItems;this.contentKind===r.sizeVariable?this.arcgisChartsConfigScatterplotSizeVariableFieldChange.emit(t.map(i=>i.value)[0]):this.contentKind===r.additionalTooltipFields?this.arcgisChartsConfigScatterplotAdditionalTooltipFieldChange.emit(t.map(i=>i.value)[0]):this.arcgisChartsConfigScatterplotXYFieldChange.emit(t.map(i=>i.value)[0]),this.open=!1}render(){let e=this.selectedContent,t=this.selectedContent;return s`<div><calcite-popover class=${l(n.scatterplotPopover)} .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .offsetDistance=${P(this.placement)} @calcitePopoverClose=${this.closePopover} .open=${this.open} label auto-close ${p(this.popoverElement)}>${Array.isArray(e)?s`<arcgis-charts-config-color-style .header=${this._messages.fillColor} class=${l(n.fillColor)} enable-close .open=${this.open} .selectedColor=${e} @arcgisChartsConfigColorStyleClose=${this.seriesPopoverClose} @arcgisChartsConfigColorStyleChange=${this.updateColorProperties}></arcgis-charts-config-color-style>`:null}${t?.type===h.SLS?s`<arcgis-charts-config-line-style .header=${this._messages.lineStyle} .open=${this.open} enable-close use-panel .lineStyle=${t} @arcgisChartsConfigLineStyleClose=${this.seriesPopoverClose} @arcgisChartsConfigLineStyleChange=${this.updateSymbolProperties}></arcgis-charts-config-line-style>`:null}${!Array.isArray(e)&&t?.type!==h.SLS?this.renderVariablePickList():null}</calcite-popover></div>`}renderVariablePickList(){let e=this.layerFieldsInfo?.length??0,t=[];(this.contentKind===r.sizeVariable||this.contentKind===r.additionalTooltipFields)&&t.push(C(" ",s`<calcite-list-item label=" " value=" " .selected=${d("",this.selectedContent)}></calcite-list-item>`));for(let i=0;i<e;i+=1){let a=this.layerFieldsInfo?.[i]??void 0;if(a!==void 0&&(this.contentKind===r.additionalTooltipFields||$(a))){let F=y(this.layerFieldsInfo,a.name);t.push(C(a.name,s`<calcite-list-item .label=${F} .value=${a.name} .selected=${d(a.name,this.selectedContent)}></calcite-list-item>`))}}return s`<calcite-panel class=${l(n.pickListPanel)} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div slot=header-content class=${l(n.header)}>${this.headingTitle??""}</div><calcite-list label class=${l(n.popoverPickList)} selection-mode=single selection-appearance=border filter-enabled @calciteListChange=${this.onFieldSelectionChange} ${p(this.picklist)}>${t}</calcite-list></calcite-panel>`}};v("arcgis-charts-config-scatter-plot-popover",m);return m},a,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as C}from"./RP6LD7CU.js";import f from"./
|
|
2
|
+
import{b as C}from"./RP6LD7CU.js";import f from"./MESJTWTA.js";import"./POA2XTTK.js";import{a as g}from"./WZFDIC2M.js";import b from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{q as d}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as n,B as m,C as e,H as p,g as c,i as h,n as a,z as i}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([,{h:v,i:s}])=>{var r={chartRenameComponent:"chart-rename-component",renameLabelContainer:"rename-label-container",renamePanel:"rename-panel"},u=c`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.chart-rename-component{width:var(--arcgis-charts-config-panel-width-medium);height:var(--arcgis-charts-config-panel-height)}:host{overflow-y:auto;width:min-content}.rename-label-container{display:flex}.rename-label-container calcite-label{flex:1 1 0px;display:flex;width:0px}.rename-label-container{padding:0 1rem;margin-top:1rem}.rename-panel{width:calc(var(--calcite-panel-width-multiplier) * 20vw);max-width:calc(var(--calcite-panel-width-multiplier) * 420px);min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}`,l=class extends m{constructor(){super(...arguments),this._messages=g(),this.characterLimitInputElement=i(),this.popoverElement=i(),this.isChartTitleInvalid=!1,this.changedName="",this.name="",this.open=!1,this.arcgisChartsConfigChartRenamePopoverChange=a(),this.arcgisChartsConfigPopoverClose=a()}static{this.properties={isChartTitleInvalid:16,changedName:16,messageOverrides:0,name:1,open:5,referenceElement:0}}static{this.styles=u}async reposition(){await this.popoverElement.value?.reposition()}willUpdate(t){t.has("name")&&(this.changedName=this.name)}updated(){this.popoverElement.value?.reposition(),C(this.popoverElement.value,this.open)}onNameChange(t){let o=t.target.value;this.changedName=o,this.isChartTitleInvalid=d(o.trim()),this.characterLimitInputElement.value&&v({inputElement:this.characterLimitInputElement.value,status:this.isChartTitleInvalid?s.INVALID:s.IDLE})}onCancelClick(){this.changedName=this.name,this.arcgisChartsConfigPopoverClose.emit(),this.open=!1}onSubmitClick(){this.isChartTitleInvalid||(this.name=this.changedName,this.arcgisChartsConfigChartRenamePopoverChange.emit({name:this.changedName}),this.open=!1)}popoverClose(){this.changedName=this.name,this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}render(){return h`<div class=${e({[r.chartRenameComponent]:!0})}><calcite-popover .referenceElement=${this.referenceElement??document.body} @calcitePopoverClose=${this.popoverClose} .open=${this.open} placement=bottom label auto-close ${n(this.popoverElement)}><calcite-panel class=${e(r.renamePanel)} closable .closed=${!this.open} @calcitePanelClose=${this.popoverClose} .heading=${this._messages.renameChart}><div class=${e(r.renameLabelContainer)}><calcite-label>${this._messages.chartName}<calcite-input required type=text .value=${this.changedName} @calciteInputInput=${this.onNameChange} ${n(this.characterLimitInputElement)}></calcite-input><arcgis-charts-config-invalid-input-message .invalidInputMessage=${this._messages.emptyChartTitle} .isInvalid=${this.isChartTitleInvalid}></arcgis-charts-config-invalid-input-message></calcite-label></div><calcite-button slot=footer appearance=solid scale=m width=half @click=${this.onSubmitClick}>${this._messages.submit}</calcite-button><calcite-button slot=footer appearance=outline-fill scale=m width=half @click=${this.onCancelClick}>${this._messages.cancel}</calcite-button></calcite-panel></calcite-popover></div>`}};p("arcgis-charts-config-chart-rename-popover",l);return l},b,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./QCTVBQL7.js";import{p as O}from"./43DLRSYB.js";import{r as g}from"./NGXRBJKL.js";import{a,c as f,e as I}from"./QP5UAIC6.js";import{a as S}from"./Z5QPCSUQ.js";import{a as n,b as A,h as c,v as d}from"./QVG3TOL4.js";export default $arcgis.t(([{$:_,Cc:h,E:L,Mc:C,O:F,P:T,Q:D,R:N,dd:v,q:B,t:$,wa:b}])=>{function k(e,r){let s;return r===d.Category&&Array.isArray(e)?s=a.customSort:r===d.Category?s=e===c.Ascending?a.xAxisAsc:a.xAxisDesc:e===c.Ascending?s=a.yAxisAsc:s=a.yAxisDesc,s}function q(e,r){let s;return r===d.Category&&Array.isArray(e)?s=f.customSort:s=e===c.Ascending?f.Asc:f.Desc,s}var E=e=>{let r=e.orderOptions?.data&&"orderBy"in e.orderOptions.data?e.orderOptions.data.orderBy:c.Ascending;return k(r,e.orderOptions?.data?.orderType??d.Category)},R=e=>{let r=S(e.series),s=!1;return(r===n.BarSeries||r===n.LineSeries)&&(s=E(e)===a.customSort),s},G=e=>{let r=[],s=e.orderOptions?.data?.orderType;return R(e)&&s===d.Category&&(r=e.orderOptions?.data?.orderBy),r},Q=(e,r,s,i)=>{let t=S(r.series),m=_(r);r.orderOptions??={};let o=m?[""]:c.Ascending;if(m)e===f.customSort&&s!==void 0?o=[...s]:o=e===f.Desc?c.Descending:c.Ascending,i?r.orderOptions.data={...r.orderOptions.data,orderByY:o,orderType:d.MultiAxes}:r.orderOptions.data={...r.orderOptions.data,orderByX:o,orderType:d.MultiAxes};else if(t===n.BarSeries||t===n.LineSeries){let l=d.Category;e===a.customSort&&s!==void 0?(o=[...s],r.orderOptions.data={orderType:l,orderBy:o}):(l=e===a.xAxisAsc||e===a.xAxisDesc?d.Category:d.YValue,o=e===a.xAxisAsc||e===a.yAxisAsc?c.Ascending:c.Descending,r.orderOptions.data={orderType:l,orderBy:o})}},ee=e=>e?.series?.[0]?.x??"",re=e=>{let{config:r,xAxisField:s,numericFields:i,aggregationType:t,mode:m,layer:o,numericFieldIndex:l,seriesIndex:U,splitByField:w="",fieldList:H}=e,M=S(r.series),P=v(r.series),u;if($(o)){let y=b(o);u=i.length===1&&i[0]===y}else{let{idField:y,isTraditionalTypeOID:Y}=h(L(o));u=Y&&i.length===1&&i[0]===y}let p="y",x="y";switch(M){case n.PieSeries:{t!==A.NoAggregation?m===I.Category?(p=`${t}_${i[0]}_0`.toUpperCase(),x=u?g(A.Count):g(`${t} of ${i[0]}`)):p=T:p=i[0];break}case n.BarSeries:case n.LineSeries:case n.ComboLineAndBarSeries:case n.RadarSeries:case n.HeatSeries:{if(w===""||i.length>1)j({fieldName:s,numericFields:i,fieldList:H??[]})||P===B.BarAndLineFromFields?p=N:(p=t!==A.NoAggregation?`${t}_${i[l??0]}_${l??0}`.toUpperCase():i[l??0],x=u?g(A.Count):g(`${t} of ${i[l??0]}`));else{let y=i[0];p=t!==A.NoAggregation?`${t}_${y}_${U??0}`.toUpperCase():y,x=u?g(A.Count):g(`${t} of ${y}`)}break}}return{name:p,description:x}};function V(e){let{fieldName:r,fieldList:s}=e,i=C(s??[],r);return r===D||r===F||r===O||r===void 0||r.trim()===""||i===void 0}function j(e){let{fieldName:r,fieldList:s,numericFields:i}=e,t=i.filter(m=>C(s??[],m)?.type!=="esriFieldTypeOID");return V({fieldName:r,fieldList:s})&&(t?.length??0)>0}return{a:k,b:q,c:E,d:G,e:Q,f:ee,g:re,h:V,i:j}},b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"./
|
|
2
|
+
import e from"./MESJTWTA.js";import"./POA2XTTK.js";import{a as b}from"./WZFDIC2M.js";import c from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as g,B as d,C as a,H as p,g as l,i as o,n as u,z as h}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([,{f:v,g:f,h:c,i:m}])=>{var s={container:"container",label:"label",numberInput:"number-input"},D=l`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.container{width:var(--arcgis-charts-config-calcite-block-width, var(--arcgis-charts-config-calcite-block-default-width));height:var(--arcgis-charts-config-calcite-block-height, var(--arcgis-charts-config-calcite-block-default-height));margin-top:.5rem}.container>.number-input{margin-bottom:.5rem;display:flex}.container>.number-input>div{width:100%}.label{display:flex;margin-bottom:.5rem;justify-content:space-between}`,r=class extends d{constructor(){super(...arguments),this._messages=b(),this.decimalPlacesInputElement=h(),this.isDecimalPlacesInvalid=!1,this.arcgisChartsConfigNumberFormatChange=u()}static{this.properties={isDecimalPlacesInvalid:16,messageOverrides:0,numberFormat:0}}static{this.styles=D}onDecimalPlacesChange(){let i=this.decimalPlacesInputElement.value?.value,t=Math.floor(Number(i)),n=t===Number(i)&&t>=0;if(i!==void 0&&n&&v(i,this.decimalPlacesInputElement.value?.min,this.decimalPlacesInputElement.value?.max)){let I=Number.parseInt(i),e={minimumFractionDigits:this.numberFormat?.minimumFractionDigits,maximumFractionDigits:I};e.maximumFractionDigits!==void 0&&e.minimumFractionDigits!==void 0&&e.minimumFractionDigits>e.maximumFractionDigits&&(e.minimumFractionDigits=e.maximumFractionDigits);let F=this.getUpdatedNumberFormat(e);this.arcgisChartsConfigNumberFormatChange.emit(F),this.decimalPlacesInputElement.value&&(this.isDecimalPlacesInvalid=!1,c({inputElement:this.decimalPlacesInputElement.value,status:m.IDLE}))}else this.decimalPlacesInputElement.value&&(this.isDecimalPlacesInvalid=!0,c({inputElement:this.decimalPlacesInputElement.value,status:m.INVALID}))}onShowThousandsSeparatorChange(i){let t=i.target.checked,n=this.getUpdatedNumberFormat({useGrouping:t});this.arcgisChartsConfigNumberFormatChange.emit(n)}getUpdatedNumberFormat(i){return{...this.numberFormat,...i}}render(){return o`<div class=${a(s.container)}><calcite-label class=${a(s.label)}>${this._messages.decimalPlaces}<calcite-input type=number class=${a(s.numberInput)} min=0 max=20 step=1 .value=${f(this.numberFormat?.maximumFractionDigits,2)} @calciteInputInput=${this.onDecimalPlacesChange} ${g(this.decimalPlacesInputElement)}></calcite-input><arcgis-charts-config-invalid-input-message .invalidInputMessage=${this._messages.invalidDecimalPlaces} .isInvalid=${this.isDecimalPlacesInvalid}></arcgis-charts-config-invalid-input-message></calcite-label><calcite-label layout=inline-space-between class=${a(s.label)}>${this._messages.showThousandSeparators}<calcite-switch name=useGrouping .checked=${!!(this.numberFormat?.useGrouping??!0)} @calciteSwitchChange=${this.onShowThousandsSeparatorChange}></calcite-switch></calcite-label></div>`}};p("arcgis-charts-config-number-format",r);return r},c,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import k from"./SNFP2PAX.js";import{b as e,c as t,d as l}from"./DRYZWCWX.js";import j from"./BWLIKQZM.js";import{a as u}from"./POA2XTTK.js";import{a as E}from"./WZFDIC2M.js";import i from"./JR2RRIKO.js";import h from"./5RI6YXV2.js";import{a as r,p as b}from"./O4TPXFX4.js";import f from"./LEUIZWRV.js";import c from"./3L5TASX6.js";import a from"./7DHOI5P2.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as v,B as M,C as O,D as A,E as n,F as m,H as _,g as z,i as s,n as d,z as g}from"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as x}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{j:p},,,,{a:L},{r:h},{a:F}])=>{function R(f){return f?.tagName.toLowerCase()==="arcgis-chart"}var Z={actionBar:"action-bar"},q=z`.action-bar{display:flex;flex-direction:column;height:100%;border-right:1px solid var(--calcite-color-border-2);width:fit-content}:host{z-index:1001}`,S=class extends M{constructor(){super(...arguments),this.calciteActionBar=g(),this.exportCalciteActionBar=g(),this.expandAction=null,this._messages=E(),this.commonStrings=E({name:"common",blocking:!0}),this.handleMouseOver=a=>{if(this.calciteActionBar.value&&!this.calciteActionBar.value?.expanded){let o=a.target;this.actionTooltip!==void 0&&(this.actionTooltip=h(this.actionTooltip));let i;o?.tagName==="CALCITE-ACTION"?i=o:(o?.tagName==="CALCITE-ACTION-MENU"||o?.tagName==="DIV")&&(i=o.firstChild),i!==void 0&&(this.actionTooltip=m(s`<calcite-tooltip style=${A({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=trailing-end>${i.text}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}else this.actionTooltip=h(this.actionTooltip)},this._csvExportExclusionList=[x.ScatterSeries,x.BoxPlotSeries],this.actionTooltip=null,this.forceDisableActions=!1,this.editChartToggle=t.Inactive,this.editChartActive=!1,this.editChartState=l.Disabled,this.editChartEnabled=!1,this.legendToggle=t.Inactive,this.legendActive=!1,this.legendState=l.Enabled,this.legendDisabled=!1,this.rotateChartToggle=t.Inactive,this.rotateChartActive=!1,this.rotateChartState=l.Enabled,this.rotateChartDisabled=!1,this.filterBySelectionToggle=t.Inactive,this.filterBySelectionActive=!1,this.filterBySelectionState=l.Enabled,this.filterBySelectionDisabled=!1,this.filterByExtentToggle=t.Inactive,this.filterByViewExtentActive=!1,this.filterByExtentState=l.Enabled,this.filterByViewExtentDisabled=!1,this.actionBarSelectionMode=p.MultiSelectionWithCtrlKey,this.selectionToggle=t.Inactive,this.selectionActive=!1,this.selectionState=l.Enabled,this.selectionDisabled=!1,this.zoomToggle=t.Inactive,this.zoomActive=!1,this.zoomState=l.Enabled,this.zoomDisabled=!1,this.fullExtentToggle=t.Inactive,this.fullExtentActive=!1,this.fullExtentState=l.Enabled,this.fullExtentDisabled=!1,this.clearSelectionToggle=t.Inactive,this.clearSelectionActive=!1,this.clearSelectionState=l.Enabled,this.clearSelectionDisabled=!1,this.switchSelectionToggle=t.Inactive,this.switchSelectionActive=!1,this.switchSelectionState=l.Enabled,this.switchSelectionDisabled=!1,this.exportAsImageState=l.Enabled,this.exportAsImageDisabled=!1,this.exportAsCSVState=l.Enabled,this.exportAsCSVDisabled=!1,this.disableCSVExportForChartTypes=this._csvExportExclusionList,this.csvExportExclusionList=this._csvExportExclusionList,this.exportActionState=l.Enabled,this.exportActionDisabled=!1,this.expanded=!1,this.hiddenActions=[e.EditChart],this.arcgisActionBarToggle=d(),this.arcgisDefaultActionSelect=d()}static{this.properties={actionTooltip:16,messageOverrides:0,chartType:1,chartElement:0,forceDisableActions:5,editChartToggle:1,editChartActive:5,editChartState:1,editChartEnabled:5,editChartTitle:1,legendToggle:1,legendActive:5,legendState:1,legendDisabled:5,legendTitle:1,rotateChartToggle:1,rotateChartActive:5,rotateChartState:1,rotateChartDisabled:5,rotateChartTitle:1,filterBySelectionToggle:1,filterBySelectionActive:5,filterBySelectionState:1,filterBySelectionDisabled:5,filterBySelectionTitle:1,filterByExtentToggle:1,filterByViewExtentActive:5,filterByExtentState:1,filterByViewExtentDisabled:5,filterByExtentTitle:1,filterByViewExtentTitle:1,actionBarSelectionMode:1,selectionToggle:1,selectionActive:5,selectionState:1,selectionDisabled:5,selectionTitle:1,zoomToggle:1,zoomActive:5,zoomState:1,zoomDisabled:5,zoomTitle:1,fullExtentToggle:1,fullExtentActive:5,fullExtentState:1,fullExtentDisabled:5,fullExtentTitle:1,clearSelectionToggle:1,clearSelectionActive:5,clearSelectionState:1,clearSelectionDisabled:5,clearSelectionTitle:1,switchSelectionToggle:1,switchSelectionActive:5,switchSelectionState:1,switchSelectionDisabled:5,switchSelectionTitle:1,exportAsImageState:1,exportAsImageDisabled:5,exportAsImageTitle:1,exportAsCSVState:1,exportAsCSVDisabled:5,exportAsCSVTitle:1,disableCSVExportForChartTypes:0,csvExportExclusionList:0,exportActionState:1,exportActionDisabled:5,expanded:5,hiddenActions:0}}static{this.styles=q}load(){this.chartElement=R(this.el.parentElement)?this.el.parentElement:void 0}updated(){this.handleExpandTooltip()}disconnectedCallback(){super.disconnectedCallback(),this.actionTooltip?.remove()}async onDefaultActionClick(a){let o=a.currentTarget,i={actionId:o.id,actionActive:!1};switch(o.id){case e.EditChart:{let c=!(this.editChartToggle===t.Active||this.editChartActive);this.editChartToggle=c?t.Active:t.Inactive,this.editChartActive=c,i.actionActive=c;break}case e.Legend:{let c=!(this.legendToggle===t.Active||this.legendActive);this.legendToggle=c?t.Active:t.Inactive,this.legendActive=c,i.actionActive=c,r(this.chartElement?.model)&&b(this.chartElement?.model)&&(this.chartElement.model.legendVisibility=i.actionActive),this.chartElement?.model&&(r(this.chartElement.model)?b(this.chartElement.model)&&(this.chartElement.model.legendVisibility=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break}case e.RotateChart:{let c=!(this.rotateChartToggle===t.Active||this.rotateChartActive);this.rotateChartToggle=c?t.Active:t.Inactive,this.rotateChartActive=c,i.actionActive=c,this.chartElement?.model&&(r(this.chartElement.model)?L(this.chartElement.model)&&(this.chartElement.model.rotated=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break}case e.FilterBySelection:{let c=!(this.filterBySelectionToggle===t.Active||this.filterBySelectionActive);this.filterBySelectionToggle=c?t.Active:t.Inactive,this.filterBySelectionActive=c,i.actionActive=c,this.chartElement!==void 0&&(this.chartElement.filterBySelection=i.actionActive);break}case e.FilterByViewExtent:{let c=!(this.filterByExtentToggle===t.Active||this.filterByViewExtentActive);this.filterByExtentToggle=c?t.Active:t.Inactive,this.filterByViewExtentActive=c,i.actionActive=c,this.chartElement!==void 0&&(this.chartElement.filterByViewExtent=i.actionActive);break}case e.Selection:{this.selectionToggle=t.Active,this.selectionActive=!0,this.zoomToggle=t.Inactive,this.zoomActive=!1,i.actionActive=!0,this.chartElement!==void 0&&(this.chartElement.actionMode=this.actionBarSelectionMode);break}case e.Zoom:{this.zoomToggle=t.Active,this.zoomActive=!0,this.selectionToggle=t.Inactive,this.selectionActive=!1,i.actionActive=!0,this.chartElement!==void 0&&(this.chartElement.actionMode=p.Zoom);break}case e.ClearSelection:i.actionActive=this.clearSelectionToggle===t.Active||this.clearSelectionActive,this.chartElement?.clearSelection();break;case e.FullExtent:i.actionActive=this.fullExtentToggle===t.Active||this.fullExtentActive,this.chartElement?.resetZoom();break;case e.SwitchSelection:i.actionActive=this.switchSelectionToggle===t.Active||this.switchSelectionActive,this.chartElement?.switchSelection();break;case e.ExportAsImage:i.actionActive=!0,await this.chartElement?.exportAsImage();break;case e.ExportAsCSV:i.actionActive=!0,await this.chartElement?.exportAsCSV();break}this.arcgisDefaultActionSelect.emit(i)}handleCalciteActionBarToggle(){this.expanded=this.calciteActionBar.value?.expanded??!1,this.setCustomActionsExpanded(),this.arcgisActionBarToggle.emit(this.expanded)}handleMouseOut(){this.actionTooltip!==null&&(this.actionTooltip=h(this.actionTooltip))}handleSlotChange(a){let o=a.currentTarget.assignedElements();for(let i of o)i.onmouseover=this.handleMouseOver}setCustomActionsExpanded(){this.el.querySelectorAll("calcite-action").forEach(a=>{let o=a;o.textEnabled=this.expanded})}handleExpandTooltip(){this.expandAction===null&&(this.expandAction=this.calciteActionBar.value?.shadowRoot?.querySelector("calcite-action")??null,this.expandAction!==null&&(this.listenOn(this.expandAction,"mouseenter",()=>{!this.calciteActionBar.value?.expanded&&this.expandAction!==null&&!document.body.contains(this.actionTooltip)&&(this.actionTooltip=m(s`<calcite-tooltip style=${A({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${this.expandAction} open placement=trailing-end>${this._messages.expand??""}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}),this.listenOn(this.expandAction,"mouseleave",()=>{!this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=h(this.actionTooltip))}),this.listenOn(this.expandAction,"click",()=>{this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=h(this.actionTooltip))})))}renderDefaultActions(){let a=F(this.chartType).filter(N=>!this.hiddenActions?.includes(N)),o=this.chartElement?.layer&&"isTable"in this.chartElement.layer?this.chartElement.layer.isTable:!1,i=a.includes(e.EditChart),c=a.includes(e.Legend),T=a.includes(e.RotateChart),$=a.includes(e.FilterBySelection),C=a.includes(e.FilterByViewExtent)&&!o,D=a.includes(e.Zoom),y=a.includes(e.Selection),B=a.includes(e.ClearSelection),w=a.includes(e.FullExtent),k=a.includes(e.SwitchSelection),I=a.includes(e.ExportAsImage),V=a.includes(e.ExportAsCSV);return[c||T?s`<calcite-action-group>${i?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.EditChart??n} icon=gear .text=${this.commonStrings?.utilsStrings.actions?.editChart??""} .textEnabled=${this.expanded} .active=${this.editChartToggle===t.Active||this.editChartActive} .disabled=${this.editChartState===l.Disabled||!this.editChartEnabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${c?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Legend??n} .text=${this.legendTitle??this._messages?.legend??""} .textEnabled=${this.expanded} .active=${this.legendToggle===t.Active||this.legendActive} .disabled=${this.legendState===l.Disabled||this.legendDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}><calcite-icon icon=legend scale=s flip-rtl></calcite-icon></calcite-action></div>`:null}${T?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.RotateChart??n} icon=rotate .text=${this.rotateChartTitle??this._messages?.rotateChart??""} .textEnabled=${this.expanded} .active=${this.rotateChartToggle===t.Active||this.rotateChartActive} .disabled=${this.rotateChartState===l.Disabled||this.rotateChartDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,$||C?s`<calcite-action-group>${$?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterBySelection??n} icon=selection-filter .text=${this.filterBySelectionTitle??this._messages?.filterBySelection??""} .textEnabled=${this.expanded} .active=${this.filterBySelectionToggle===t.Active||this.filterBySelectionActive} .disabled=${this.filterBySelectionState===l.Disabled||this.filterBySelectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${C?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterByViewExtent??n} icon=extent-filter .text=${(this.filterByExtentTitle||this.filterByViewExtentTitle)??this._messages?.filterByExtent??""} .textEnabled=${this.expanded} .active=${this.filterByExtentToggle===t.Active||this.filterByViewExtentActive} .disabled=${this.filterByExtentState===l.Disabled||this.filterByViewExtentDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,y||D||w||B||k?s`<calcite-action-group>${D?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Zoom??n} icon=magnifying-glass .text=${this.zoomTitle??this._messages?.zoom??""} .textEnabled=${this.expanded} .active=${this.zoomToggle===t.Active||this.zoomActive} .disabled=${this.zoomState===l.Disabled||this.zoomDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${y?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Selection??n} icon=cursor-selection .text=${this.selectionTitle??this._messages?.selection??""} .textEnabled=${this.expanded} .active=${this.selectionToggle===t.Active||this.selectionActive} .disabled=${this.selectionState===l.Disabled||this.selectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${B?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.ClearSelection??n} icon=erase .text=${this.clearSelectionTitle??this._messages?.clearSelection??""} .textEnabled=${this.expanded} .active=${this.clearSelectionToggle===t.Active||this.clearSelectionActive} .disabled=${this.clearSelectionState===l.Disabled||this.clearSelectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${w?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FullExtent??n} icon=zoom-out-fixed .text=${this.fullExtentTitle??this._messages?.fullExtent??""} .textEnabled=${this.expanded} .active=${this.fullExtentToggle===t.Active||this.fullExtentActive} .disabled=${this.fullExtentState===l.Disabled||this.fullExtentDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${k?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.SwitchSelection??n} icon=arrow-right-left .text=${this.switchSelectionTitle??this._messages?.switchSelection??""} .textEnabled=${this.expanded} .active=${this.switchSelectionToggle===t.Active||this.switchSelectionActive} .disabled=${this.switchSelectionState===l.Disabled||this.switchSelectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,I||V?s`<calcite-action-menu .label=${this._messages?.export??""} ${v(this.exportCalciteActionBar)}><calcite-action id=export icon=export .text=${this._messages?.export??""} .textEnabled=${this.expanded} .disabled=${this.exportActionState===l.Disabled||this.exportActionDisabled||this.forceDisableActions} @mouseover=${this.handleMouseOver} slot=trigger></calcite-action>${I?s`<div><calcite-action id=${e.ExportAsImage??n} icon=graph-bar .text=${this.exportAsImageTitle??this._messages?.exportAsImage??""} .disabled=${this.exportAsImageState===l.Disabled||this.exportAsImageDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}${V?s`<div><calcite-action id=${e.ExportAsCSV??n} icon=table .text=${this.exportAsCSVTitle??this._messages?.exportAsTable??""} .disabled=${this.exportAsCSVState===l.Disabled||this.exportAsCSVDisabled||this.forceDisableActions||this.chartType&&(this.disableCSVExportForChartTypes.includes(this.chartType)||this.csvExportExclusionList.includes(this.chartType))} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}</calcite-action-menu>`:null]}render(){return s`<calcite-action-bar class=${O(Z.actionBar)} @calciteActionBarToggle=${this.handleCalciteActionBarToggle} @mouseout=${this.handleMouseOut} .expanded=${this.expanded} .messageOverrides=${{expand:this._messages.expand,collapse:this._messages.collapse}} overflow-actions-disabled ${v(this.calciteActionBar)}><slot name=${u.customActionTop} @slotchange=${this.handleSlotChange}></slot>${this.renderDefaultActions()}<slot name=${u.customActionBelow} @slotchange=${this.handleSlotChange}></slot></calcite-action-bar>`}};_("arcgis-charts-action-bar",S);return S},a,c,f,h,i,j,k)
|
|
2
|
+
import k from"./VB3MDZZI.js";import{b as e,c as t,d as l}from"./DRYZWCWX.js";import j from"./MESJTWTA.js";import{a as u}from"./POA2XTTK.js";import{a as E}from"./WZFDIC2M.js";import i from"./3J3ZEOUR.js";import h from"./GYZYFD7H.js";import{a as r,p as b}from"./O4TPXFX4.js";import f from"./ORB3STUT.js";import c from"./KRYF7EUZ.js";import a from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as v,B as M,C as O,D as A,E as n,F as m,H as _,g as z,i as s,n as d,z as g}from"./23EBTARY.js";import"./64L7VJJK.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{a as x}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{j:p},,,,{a:L},{r:h},{a:F}])=>{function R(f){return f?.tagName.toLowerCase()==="arcgis-chart"}var Z={actionBar:"action-bar"},q=z`.action-bar{display:flex;flex-direction:column;height:100%;border-right:1px solid var(--calcite-color-border-2);width:fit-content}:host{z-index:1001}`,S=class extends M{constructor(){super(...arguments),this.calciteActionBar=g(),this.exportCalciteActionBar=g(),this.expandAction=null,this._messages=E(),this.commonStrings=E({name:"common",blocking:!0}),this.handleMouseOver=a=>{if(this.calciteActionBar.value&&!this.calciteActionBar.value?.expanded){let o=a.target;this.actionTooltip!==void 0&&(this.actionTooltip=h(this.actionTooltip));let i;o?.tagName==="CALCITE-ACTION"?i=o:(o?.tagName==="CALCITE-ACTION-MENU"||o?.tagName==="DIV")&&(i=o.firstChild),i!==void 0&&(this.actionTooltip=m(s`<calcite-tooltip style=${A({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=trailing-end>${i.text}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}else this.actionTooltip=h(this.actionTooltip)},this._csvExportExclusionList=[x.ScatterSeries,x.BoxPlotSeries],this.actionTooltip=null,this.forceDisableActions=!1,this.editChartToggle=t.Inactive,this.editChartActive=!1,this.editChartState=l.Disabled,this.editChartEnabled=!1,this.legendToggle=t.Inactive,this.legendActive=!1,this.legendState=l.Enabled,this.legendDisabled=!1,this.rotateChartToggle=t.Inactive,this.rotateChartActive=!1,this.rotateChartState=l.Enabled,this.rotateChartDisabled=!1,this.filterBySelectionToggle=t.Inactive,this.filterBySelectionActive=!1,this.filterBySelectionState=l.Enabled,this.filterBySelectionDisabled=!1,this.filterByExtentToggle=t.Inactive,this.filterByViewExtentActive=!1,this.filterByExtentState=l.Enabled,this.filterByViewExtentDisabled=!1,this.actionBarSelectionMode=p.MultiSelectionWithCtrlKey,this.selectionToggle=t.Inactive,this.selectionActive=!1,this.selectionState=l.Enabled,this.selectionDisabled=!1,this.zoomToggle=t.Inactive,this.zoomActive=!1,this.zoomState=l.Enabled,this.zoomDisabled=!1,this.fullExtentToggle=t.Inactive,this.fullExtentActive=!1,this.fullExtentState=l.Enabled,this.fullExtentDisabled=!1,this.clearSelectionToggle=t.Inactive,this.clearSelectionActive=!1,this.clearSelectionState=l.Enabled,this.clearSelectionDisabled=!1,this.switchSelectionToggle=t.Inactive,this.switchSelectionActive=!1,this.switchSelectionState=l.Enabled,this.switchSelectionDisabled=!1,this.exportAsImageState=l.Enabled,this.exportAsImageDisabled=!1,this.exportAsCSVState=l.Enabled,this.exportAsCSVDisabled=!1,this.disableCSVExportForChartTypes=this._csvExportExclusionList,this.csvExportExclusionList=this._csvExportExclusionList,this.exportActionState=l.Enabled,this.exportActionDisabled=!1,this.expanded=!1,this.hiddenActions=[e.EditChart],this.arcgisActionBarToggle=d(),this.arcgisDefaultActionSelect=d()}static{this.properties={actionTooltip:16,messageOverrides:0,chartType:1,chartElement:0,forceDisableActions:5,editChartToggle:1,editChartActive:5,editChartState:1,editChartEnabled:5,editChartTitle:1,legendToggle:1,legendActive:5,legendState:1,legendDisabled:5,legendTitle:1,rotateChartToggle:1,rotateChartActive:5,rotateChartState:1,rotateChartDisabled:5,rotateChartTitle:1,filterBySelectionToggle:1,filterBySelectionActive:5,filterBySelectionState:1,filterBySelectionDisabled:5,filterBySelectionTitle:1,filterByExtentToggle:1,filterByViewExtentActive:5,filterByExtentState:1,filterByViewExtentDisabled:5,filterByExtentTitle:1,filterByViewExtentTitle:1,actionBarSelectionMode:1,selectionToggle:1,selectionActive:5,selectionState:1,selectionDisabled:5,selectionTitle:1,zoomToggle:1,zoomActive:5,zoomState:1,zoomDisabled:5,zoomTitle:1,fullExtentToggle:1,fullExtentActive:5,fullExtentState:1,fullExtentDisabled:5,fullExtentTitle:1,clearSelectionToggle:1,clearSelectionActive:5,clearSelectionState:1,clearSelectionDisabled:5,clearSelectionTitle:1,switchSelectionToggle:1,switchSelectionActive:5,switchSelectionState:1,switchSelectionDisabled:5,switchSelectionTitle:1,exportAsImageState:1,exportAsImageDisabled:5,exportAsImageTitle:1,exportAsCSVState:1,exportAsCSVDisabled:5,exportAsCSVTitle:1,disableCSVExportForChartTypes:0,csvExportExclusionList:0,exportActionState:1,exportActionDisabled:5,expanded:5,hiddenActions:0}}static{this.styles=q}load(){this.chartElement=R(this.el.parentElement)?this.el.parentElement:void 0}updated(){this.handleExpandTooltip()}disconnectedCallback(){super.disconnectedCallback(),this.actionTooltip?.remove()}async onDefaultActionClick(a){let o=a.currentTarget,i={actionId:o.id,actionActive:!1};switch(o.id){case e.EditChart:{let c=!(this.editChartToggle===t.Active||this.editChartActive);this.editChartToggle=c?t.Active:t.Inactive,this.editChartActive=c,i.actionActive=c;break}case e.Legend:{let c=!(this.legendToggle===t.Active||this.legendActive);this.legendToggle=c?t.Active:t.Inactive,this.legendActive=c,i.actionActive=c,r(this.chartElement?.model)&&b(this.chartElement?.model)&&(this.chartElement.model.legendVisibility=i.actionActive),this.chartElement?.model&&(r(this.chartElement.model)?b(this.chartElement.model)&&(this.chartElement.model.legendVisibility=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break}case e.RotateChart:{let c=!(this.rotateChartToggle===t.Active||this.rotateChartActive);this.rotateChartToggle=c?t.Active:t.Inactive,this.rotateChartActive=c,i.actionActive=c,this.chartElement?.model&&(r(this.chartElement.model)?L(this.chartElement.model)&&(this.chartElement.model.rotated=i.actionActive):this.chartElement.model.rotated=this.chartElement.model.rotated!==!0);break}case e.FilterBySelection:{let c=!(this.filterBySelectionToggle===t.Active||this.filterBySelectionActive);this.filterBySelectionToggle=c?t.Active:t.Inactive,this.filterBySelectionActive=c,i.actionActive=c,this.chartElement!==void 0&&(this.chartElement.filterBySelection=i.actionActive);break}case e.FilterByViewExtent:{let c=!(this.filterByExtentToggle===t.Active||this.filterByViewExtentActive);this.filterByExtentToggle=c?t.Active:t.Inactive,this.filterByViewExtentActive=c,i.actionActive=c,this.chartElement!==void 0&&(this.chartElement.filterByViewExtent=i.actionActive);break}case e.Selection:{this.selectionToggle=t.Active,this.selectionActive=!0,this.zoomToggle=t.Inactive,this.zoomActive=!1,i.actionActive=!0,this.chartElement!==void 0&&(this.chartElement.actionMode=this.actionBarSelectionMode);break}case e.Zoom:{this.zoomToggle=t.Active,this.zoomActive=!0,this.selectionToggle=t.Inactive,this.selectionActive=!1,i.actionActive=!0,this.chartElement!==void 0&&(this.chartElement.actionMode=p.Zoom);break}case e.ClearSelection:i.actionActive=this.clearSelectionToggle===t.Active||this.clearSelectionActive,this.chartElement?.clearSelection();break;case e.FullExtent:i.actionActive=this.fullExtentToggle===t.Active||this.fullExtentActive,this.chartElement?.resetZoom();break;case e.SwitchSelection:i.actionActive=this.switchSelectionToggle===t.Active||this.switchSelectionActive,this.chartElement?.switchSelection();break;case e.ExportAsImage:i.actionActive=!0,await this.chartElement?.exportAsImage();break;case e.ExportAsCSV:i.actionActive=!0,await this.chartElement?.exportAsCSV();break}this.arcgisDefaultActionSelect.emit(i)}handleCalciteActionBarToggle(){this.expanded=this.calciteActionBar.value?.expanded??!1,this.setCustomActionsExpanded(),this.arcgisActionBarToggle.emit(this.expanded)}handleMouseOut(){this.actionTooltip!==null&&(this.actionTooltip=h(this.actionTooltip))}handleSlotChange(a){let o=a.currentTarget.assignedElements();for(let i of o)i.onmouseover=this.handleMouseOver}setCustomActionsExpanded(){this.el.querySelectorAll("calcite-action").forEach(a=>{let o=a;o.textEnabled=this.expanded})}handleExpandTooltip(){this.expandAction===null&&(this.expandAction=this.calciteActionBar.value?.shadowRoot?.querySelector("calcite-action")??null,this.expandAction!==null&&(this.listenOn(this.expandAction,"mouseenter",()=>{!this.calciteActionBar.value?.expanded&&this.expandAction!==null&&!document.body.contains(this.actionTooltip)&&(this.actionTooltip=m(s`<calcite-tooltip style=${A({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${this.expandAction} open placement=trailing-end>${this._messages.expand??""}</calcite-tooltip>`),document.body.appendChild(this.actionTooltip))}),this.listenOn(this.expandAction,"mouseleave",()=>{!this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=h(this.actionTooltip))}),this.listenOn(this.expandAction,"click",()=>{this.calciteActionBar.value?.expanded&&this.actionTooltip!==null&&(this.actionTooltip=h(this.actionTooltip))})))}renderDefaultActions(){let a=F(this.chartType).filter(N=>!this.hiddenActions?.includes(N)),o=this.chartElement?.layer&&"isTable"in this.chartElement.layer?this.chartElement.layer.isTable:!1,i=a.includes(e.EditChart),c=a.includes(e.Legend),T=a.includes(e.RotateChart),$=a.includes(e.FilterBySelection),C=a.includes(e.FilterByViewExtent)&&!o,D=a.includes(e.Zoom),y=a.includes(e.Selection),B=a.includes(e.ClearSelection),w=a.includes(e.FullExtent),k=a.includes(e.SwitchSelection),I=a.includes(e.ExportAsImage),V=a.includes(e.ExportAsCSV);return[c||T?s`<calcite-action-group>${i?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.EditChart??n} icon=gear .text=${this.commonStrings?.utilsStrings.actions?.editChart??""} .textEnabled=${this.expanded} .active=${this.editChartToggle===t.Active||this.editChartActive} .disabled=${this.editChartState===l.Disabled||!this.editChartEnabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${c?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Legend??n} .text=${this.legendTitle??this._messages?.legend??""} .textEnabled=${this.expanded} .active=${this.legendToggle===t.Active||this.legendActive} .disabled=${this.legendState===l.Disabled||this.legendDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}><calcite-icon icon=legend scale=s flip-rtl></calcite-icon></calcite-action></div>`:null}${T?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.RotateChart??n} icon=rotate .text=${this.rotateChartTitle??this._messages?.rotateChart??""} .textEnabled=${this.expanded} .active=${this.rotateChartToggle===t.Active||this.rotateChartActive} .disabled=${this.rotateChartState===l.Disabled||this.rotateChartDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,$||C?s`<calcite-action-group>${$?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterBySelection??n} icon=selection-filter .text=${this.filterBySelectionTitle??this._messages?.filterBySelection??""} .textEnabled=${this.expanded} .active=${this.filterBySelectionToggle===t.Active||this.filterBySelectionActive} .disabled=${this.filterBySelectionState===l.Disabled||this.filterBySelectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${C?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FilterByViewExtent??n} icon=extent-filter .text=${(this.filterByExtentTitle||this.filterByViewExtentTitle)??this._messages?.filterByExtent??""} .textEnabled=${this.expanded} .active=${this.filterByExtentToggle===t.Active||this.filterByViewExtentActive} .disabled=${this.filterByExtentState===l.Disabled||this.filterByViewExtentDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,y||D||w||B||k?s`<calcite-action-group>${D?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Zoom??n} icon=magnifying-glass .text=${this.zoomTitle??this._messages?.zoom??""} .textEnabled=${this.expanded} .active=${this.zoomToggle===t.Active||this.zoomActive} .disabled=${this.zoomState===l.Disabled||this.zoomDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${y?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.Selection??n} icon=cursor-selection .text=${this.selectionTitle??this._messages?.selection??""} .textEnabled=${this.expanded} .active=${this.selectionToggle===t.Active||this.selectionActive} .disabled=${this.selectionState===l.Disabled||this.selectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${B?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.ClearSelection??n} icon=erase .text=${this.clearSelectionTitle??this._messages?.clearSelection??""} .textEnabled=${this.expanded} .active=${this.clearSelectionToggle===t.Active||this.clearSelectionActive} .disabled=${this.clearSelectionState===l.Disabled||this.clearSelectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${w?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.FullExtent??n} icon=zoom-out-fixed .text=${this.fullExtentTitle??this._messages?.fullExtent??""} .textEnabled=${this.expanded} .active=${this.fullExtentToggle===t.Active||this.fullExtentActive} .disabled=${this.fullExtentState===l.Disabled||this.fullExtentDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}${k?s`<div @mouseover=${this.handleMouseOver}><calcite-action id=${e.SwitchSelection??n} icon=arrow-right-left .text=${this.switchSelectionTitle??this._messages?.switchSelection??""} .textEnabled=${this.expanded} .active=${this.switchSelectionToggle===t.Active||this.switchSelectionActive} .disabled=${this.switchSelectionState===l.Disabled||this.switchSelectionDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick}></calcite-action></div>`:null}</calcite-action-group>`:null,I||V?s`<calcite-action-menu .label=${this._messages?.export??""} ${v(this.exportCalciteActionBar)}><calcite-action id=export icon=export .text=${this._messages?.export??""} .textEnabled=${this.expanded} .disabled=${this.exportActionState===l.Disabled||this.exportActionDisabled||this.forceDisableActions} @mouseover=${this.handleMouseOver} slot=trigger></calcite-action>${I?s`<div><calcite-action id=${e.ExportAsImage??n} icon=graph-bar .text=${this.exportAsImageTitle??this._messages?.exportAsImage??""} .disabled=${this.exportAsImageState===l.Disabled||this.exportAsImageDisabled||this.forceDisableActions} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}${V?s`<div><calcite-action id=${e.ExportAsCSV??n} icon=table .text=${this.exportAsCSVTitle??this._messages?.exportAsTable??""} .disabled=${this.exportAsCSVState===l.Disabled||this.exportAsCSVDisabled||this.forceDisableActions||this.chartType&&(this.disableCSVExportForChartTypes.includes(this.chartType)||this.csvExportExclusionList.includes(this.chartType))} @click=${this.onDefaultActionClick} text-enabled></calcite-action></div>`:null}</calcite-action-menu>`:null]}render(){return s`<calcite-action-bar class=${O(Z.actionBar)} @calciteActionBarToggle=${this.handleCalciteActionBarToggle} @mouseout=${this.handleMouseOut} .expanded=${this.expanded} .messageOverrides=${{expand:this._messages.expand,collapse:this._messages.collapse}} overflow-actions-disabled ${v(this.calciteActionBar)}><slot name=${u.customActionTop} @slotchange=${this.handleSlotChange}></slot>${this.renderDefaultActions()}<slot name=${u.customActionBelow} @slotchange=${this.handleSlotChange}></slot></calcite-action-bar>`}};_("arcgis-charts-action-bar",S);return S},a,c,f,h,i,j,k)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as $}from"./KSDJFASU.js";import{a as P}from"./RP6LD7CU.js";import c from"./BWLIKQZM.js";import"./POA2XTTK.js";import{a as z}from"./WZFDIC2M.js";import a from"./7DHOI5P2.js";import{Ea as y,o as I}from"./43DLRSYB.js";import{f as k}from"./KX7KGXKQ.js";import{e as _,k as b,q as G}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as g,B as x,C as s,D as p,F as S,H as N,g as T,i as d,k as E,z as m}from"./23EBTARY.js";import{f as h}from"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([,{a:v,g:u,r:M}])=>{var a={sectionLabel:"section-label",label:"label",sliceList:"slice-list",radioGroup:"radio-group",pieDonutLabelsContainer:"pie-donut-labels-container",sliderInputContainer:"slider-input-container",groupingLabelContainer:"grouping-label-container",numberInput:"number-input"},D=T`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;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)}.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}.label .grouping-label-container{display:flex;justify-content:space-between}.label .slider-input-container calcite-slider{--calcite-label-margin-bottom: var(--arcgis-charts-intra-section-margin) !important;margin-right:var(--arcgis-charts-config-margin-minor);flex-grow:1}.label .slider-input-container .number-input{width:8rem}.label .slider-input-container{display:flex}.slice-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)}.radio-group{margin-top:var(--arcgis-charts-config-margin-minor)}.pie-donut-labels-container{display:flex;justify-content:space-between;margin-top:calc(var(--arcgis-charts-config-margin-minor) * -3)}`,L=class extends x{constructor(){super(...arguments),this._messages=z(),this.slicesPopover=null,this.donutSizeSliderElement=m(),this.groupingThresholdElement=m(),this.groupingThresholdSliderElement=m(),this.labelCharacterLimitElement=m(),this.decimalPlacesElement=m(),this.open=!1,this.onDonutSizeSliderChange=b(()=>{this.donutSizeSliderElement.value&&Number.isInteger(this.donutSizeSliderElement.value?.value)&&(this.model.innerRadius=this.donutSizeSliderElement.value.value??y)},v.SliderTimer),this.onGroupingThresholdSliderChange=b(()=>{let e=this.groupingThresholdSliderElement.value?.value;e!==void 0&&!Number.isNaN(e)?(this.groupingThresholdElement?.value&&(this.groupingThresholdElement.value.value=e.toString()),this.groupingThresholdSliderElement.value&&(this.groupingThresholdSliderElement.value.value=e),this.model.groupingThreshold=e):this.model.groupingThreshold=0},v.SliderTimer),this.sliceNameChange=e=>{if(e.detail!==null||e.detail!==void 0){let i=e.detail?.name,l=this.model.slices?.findIndex(r=>r.sliceId===this.selectedSliceId),t=this.model.sliceGrouping;l!=null&&l>=0?this.model.setSliceName(i,l):t?.sliceId===this.selectedSliceId&&t!==void 0&&(this.model.sliceGrouping={...t,label:i})}},this.sliceColorChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{color:i}=e.detail,l=this.model.slices?.findIndex(r=>r.sliceId===this.selectedSliceId),t=this.model.sliceGrouping;l!=null&&l>=0?(this.model.colorMatch=!1,this.model.setSliceColor(i,l)):t?.sliceId===this.selectedSliceId&&t!==void 0&&(this.model.colorMatch=!1,this.model.sliceGrouping={...t,fillSymbol:{...t.fillSymbol,type:k.SFS,color:i}})}},this.slicesPopoverClose=e=>{let{selectedSliceId:i}=e.detail;i===this.selectedSliceId&&(this.selectedSliceId=void 0,this.slicesPopover=P(this.slicesPopover))},this.onModelConfigChange=()=>{this.requestUpdate()},this.onGroupingThresholdChange=b(()=>{let e=this.groupingThresholdElement.value?.value??"",i=Number.parseInt(e);i>100?i=100:i<0&&(i=0),Number.isNaN(i)?this.model.groupingThreshold=0:(this.groupingThresholdElement?.value&&(this.groupingThresholdElement.value.value=i.toString()),this.model.groupingThreshold=i,this.groupingThresholdSliderElement.value&&(this.groupingThresholdSliderElement.value.value=i))},v.DebounceTimer),this.popoverPlacement="leading"}static{this.properties={selectedSliceId:16,messageOverrides:0,model:0,popoverPlacement:1,chartData:0}}static{this.styles=D}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("selectedSliceId")&&this.selectedSliceIdChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeSlicesPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,i){i?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}selectedSliceIdChange(){if(!G(this.selectedSliceId)){let e=this.model.slices,i=this.model.sliceGrouping,l,t;if(this.selectedSliceId===i?.sliceId)l=i?.label,t=i?.fillSymbol?.color;else if(e!==void 0){let r=e.findIndex(n=>n.sliceId===this.selectedSliceId);l=this.model.getSliceName(r),t=this.model.getSliceColor(r)}this.slicesPopover=S(d`<arcgis-charts-config-pie-chart-slices-popover .referenceElement=${this.el} .placement=${this.popoverPlacement} .open=${this.open} .selectedSliceId=${this.selectedSliceId} .selectedName=${l} .selectedColor=${t} @arcgisChartsConfigSlicesPopoverColorChange=${this.sliceColorChange} @arcgisChartsConfigSlicesPopoverNameChange=${this.sliceNameChange} @arcgisChartsConfigPopoverClose=${this.slicesPopoverClose}></arcgis-charts-config-pie-chart-slices-popover>`),this.slicesPopover&&!document.body.contains(this.slicesPopover)&&document.body.appendChild(this.slicesPopover)}}removeSlicesPopover(){this.slicesPopover!==void 0&&this.slicesPopover!==null&&(this.slicesPopover.open=!1,this.slicesPopover.selectedName=void 0,this.slicesPopover.selectedColor=void 0,this.slicesPopover=P(this.slicesPopover))}buildSliceListItem(){let e="#CCCCCC",i="minus-square",l=[],t=this.model.slices,r=this.chartData?.dataItems;r&&(t=t?.filter(o=>r?.findIndex(c=>c.arcgis_charts_slice_id===o.sliceId)!==-1)),t?.forEach(o=>{if(o.fillSymbol?.color!==void 0){i="square-f";let[c,f,C,w]=[...o.fillSymbol.color];e=`rgba(${c},${f},${C},${w/255})`}if(o!==void 0&&!this.model.groupedSliceIds.includes(o.sliceId)){let c=o.sliceId;c===I.emptySliceId?c=this._messages.emptySlice??"":c===I.nullSliceId&&(c=this._messages.nullSlice??""),l?.push($(o.sliceId,d`<calcite-list-item .label=${o.label??o.sliceId} .description=${c} .value=${o.sliceId} .selected=${this.selectedSliceId===o.sliceId} @click=${this.openSlicesPopover}><calcite-icon slot=content-end .icon=${i} style=${p({color:e})}></calcite-icon></calcite-list-item>`))}});let n=this.model.sliceGrouping;if(n?.fillSymbol?.color!==void 0){i="square-f";let[o,c,f,C]=[...n.fillSymbol.color];e=`rgba(${o},${c},${f},${C/255})`}return this.model.groupedSliceIds.length>0&&l?.push($(n?.sliceId,d`<calcite-list-item .label=${n?.label??n?.sliceId??""} .description=${this._messages.groupedSlices} .value=${n?.sliceId??""} .selected=${this.selectedSliceId===n?.sliceId} @click=${this.openSlicesPopover}><calcite-icon slot=content-end .icon=${i} style=${p({color:e})}></calcite-icon></calcite-list-item>`)),l}buildGroupedSlicesListItem(){let e="#CCCCCC",i="minus-square",l=[];return this.model.slices?.forEach(t=>{if(t.fillSymbol?.color!==void 0){i="square-f";let[r,n,o,c]=[...t.fillSymbol.color];e=`rgba(${r},${n},${o},${c/255})`}t!==void 0&&this.model.groupedSliceIds.includes(t.sliceId)&&l?.push($(t.sliceId,d`<calcite-list-item .label=${t.label??t.sliceId} .description=${t.sliceId} .value=${t.sliceId} .selected=${this.selectedSliceId===t.sliceId} @click=${this.openSlicesPopover}><calcite-icon slot=content-end .icon=${i} style=${p({color:e})}></calcite-icon></calcite-list-item>`))}),l}buildSliceList(){return d`<calcite-list .label=${this._messages.slices??""} class=${s(a.sliceList)} selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildSliceListItem()}</calcite-list>`}buildGroupedSliceList(){return d`<calcite-list .label=${this._messages.groupedSlices??""} class=${s(a.sliceList)} selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildGroupedSlicesListItem()}</calcite-list>`}onLabelCharacterLimitChange(e){let i=e.target.value,l=Number.parseInt(i);l<1&&(l=1),Number.isNaN(l)?this.model.labelCharacterLimit=null:(this.labelCharacterLimitElement.value&&(this.labelCharacterLimitElement.value.value=l.toString()),this.model.labelCharacterLimit=l)}onDecimalPlacesChange(e){let i=e.target.value,l=Number.parseInt(i);l<0?l=0:l>20&&(l=20),Number.isNaN(l)?this.model.decimalPlaces=0:(this.decimalPlacesElement.value&&(this.decimalPlacesElement.value.value=l.toString()),this.model.decimalPlaces=l)}onDisplayTypeChange(e){let i=e.target.selectedItem;this.model.displayType=i?.value}resetSlicesOriginal(){this.selectedSliceId=void 0,this.model.colorMatch=!0,this.model.resetSlices()}onCalciteListOrderChange(e){if(e.detail!==null&&e.detail!==void 0){let{newIndex:i,oldIndex:l}=e.detail;this.model.moveSeries(l??0,i??l??0)}}openSlicesPopover(e){e.stopImmediatePropagation(),this.removeSlicesPopover();let i=e.target,l=i.localName==="calcite-list-item"?i:i.parentNode;l.value===this.model.sliceGrouping?.sliceId?this.selectedSliceId=this.model.sliceGrouping?.sliceId:this.selectedSliceId=l.value,this.open=!0}createTooltip(e){let i=e.currentTarget;this.tooltip=S(d`<calcite-tooltip style=${p({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top .innerHTML=${this._messages.groupingInfo??""??""}></calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){M(this.tooltip)}render(){return d`<div class=${s(a.sectionLabel)}>${this._messages.settings}</div><calcite-label class=${s(a.label)}>${this._messages.shape}<calcite-slider min=0 max=100 step=1 snap .value=${this.model.innerRadius??y} @calciteSliderChange=${this.onDonutSizeSliderChange} ${g(this.donutSizeSliderElement)}></calcite-slider></calcite-label><div class=${s(a.pieDonutLabelsContainer)}><calcite-label class=${s(a.label)}>${this._messages.pie}</calcite-label><calcite-label class=${s(a.label)}>${this._messages.donut}</calcite-label></div><calcite-label class=${s(a.label)}><div class=${s(a.groupingLabelContainer)}><div>${this._messages.groupingPercent}</div><calcite-icon icon=information scale=s flip-rtl role=img tabindex=0 aria-label=${this._messages.groupingInfo??""??E} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} @focus=${this.createTooltip} @blur=${this.destroyTooltip}></calcite-icon></div><div class=${s(a.sliderInputContainer)}><calcite-slider min=0 max=100 step=1 snap .value=${_(u(this.model.groupingThreshold??0))} @calciteSliderChange=${this.onGroupingThresholdSliderChange} ${g(this.groupingThresholdSliderElement)}></calcite-slider><calcite-input class=${s(a.numberInput)} type=number min=0 max=100 step=1 suffix-text=% .value=${u(this.model.groupingThreshold??0)} @calciteInputInput=${this.onGroupingThresholdChange} @click=${e=>{e.stopPropagation()}} ${g(this.groupingThresholdElement)}></calcite-input></div></calcite-label><div class=${s(a.sectionLabel)}>${this._messages.labels}</div><calcite-label class=${s(a.label)}>${this._messages.labelCharacterLimit}<calcite-input type=number min=1 step=1 .value=${u(this.model.labelCharacterLimit)} @calciteInputInput=${this.onLabelCharacterLimitChange} ${g(this.labelCharacterLimitElement)}></calcite-input></calcite-label><calcite-label class=${s(a.label)}>${this._messages.decimalPlaces}<calcite-input type=number min=0 max=20 step=1 .value=${u(this.model.decimalPlaces)} @calciteInputInput=${this.onDecimalPlacesChange} ${g(this.decimalPlacesElement)}></calcite-input></calcite-label><calcite-label class=${s(a.label)}>${this._messages.display}<calcite-radio-button-group class=${s(a.radioGroup)} name=display layout=vertical @calciteRadioButtonGroupChange=${this.onDisplayTypeChange}><calcite-label layout=inline><calcite-radio-button .value=${h.Value} .checked=${this.model.displayType===h.Value}></calcite-radio-button>${this._messages.value}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${h.Percentage} .checked=${this.model.displayType===h.Percentage}></calcite-radio-button>${this._messages.percentage}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${h.Both} .checked=${this.model.displayType===h.Both}></calcite-radio-button>${this._messages.both}</calcite-label></calcite-radio-button-group></calcite-label><div class=${s(a.sectionLabel)}>${this._messages.slices}<calcite-button @click=${this.resetSlicesOriginal} .disabled=${!this.model.resetAvailable()} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button></div>${this.buildSliceList()}<div class=${s(a.sectionLabel)}>${this._messages.groupedSlices}</div>${this.buildGroupedSliceList()}`}};N("arcgis-charts-config-pie-chart-slices",L);return L},a,c)
|
|
2
|
+
import{a as $}from"./KSDJFASU.js";import{a as P}from"./RP6LD7CU.js";import c from"./MESJTWTA.js";import"./POA2XTTK.js";import{a as z}from"./WZFDIC2M.js";import a from"./QCTVBQL7.js";import{Ea as y,o as I}from"./43DLRSYB.js";import{f as k}from"./KX7KGXKQ.js";import{e as _,k as b,q as G}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{A as g,B as x,C as s,D as p,F as S,H as N,g as T,i as d,k as E,z as m}from"./23EBTARY.js";import{f as h}from"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([,{a:v,g:u,r:M}])=>{var a={sectionLabel:"section-label",label:"label",sliceList:"slice-list",radioGroup:"radio-group",pieDonutLabelsContainer:"pie-donut-labels-container",sliderInputContainer:"slider-input-container",groupingLabelContainer:"grouping-label-container",numberInput:"number-input"},D=T`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;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)}.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}.label .grouping-label-container{display:flex;justify-content:space-between}.label .slider-input-container calcite-slider{--calcite-label-margin-bottom: var(--arcgis-charts-intra-section-margin) !important;margin-right:var(--arcgis-charts-config-margin-minor);flex-grow:1}.label .slider-input-container .number-input{width:8rem}.label .slider-input-container{display:flex}.slice-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)}.radio-group{margin-top:var(--arcgis-charts-config-margin-minor)}.pie-donut-labels-container{display:flex;justify-content:space-between;margin-top:calc(var(--arcgis-charts-config-margin-minor) * -3)}`,L=class extends x{constructor(){super(...arguments),this._messages=z(),this.slicesPopover=null,this.donutSizeSliderElement=m(),this.groupingThresholdElement=m(),this.groupingThresholdSliderElement=m(),this.labelCharacterLimitElement=m(),this.decimalPlacesElement=m(),this.open=!1,this.onDonutSizeSliderChange=b(()=>{this.donutSizeSliderElement.value&&Number.isInteger(this.donutSizeSliderElement.value?.value)&&(this.model.innerRadius=this.donutSizeSliderElement.value.value??y)},v.SliderTimer),this.onGroupingThresholdSliderChange=b(()=>{let e=this.groupingThresholdSliderElement.value?.value;e!==void 0&&!Number.isNaN(e)?(this.groupingThresholdElement?.value&&(this.groupingThresholdElement.value.value=e.toString()),this.groupingThresholdSliderElement.value&&(this.groupingThresholdSliderElement.value.value=e),this.model.groupingThreshold=e):this.model.groupingThreshold=0},v.SliderTimer),this.sliceNameChange=e=>{if(e.detail!==null||e.detail!==void 0){let i=e.detail?.name,l=this.model.slices?.findIndex(r=>r.sliceId===this.selectedSliceId),t=this.model.sliceGrouping;l!=null&&l>=0?this.model.setSliceName(i,l):t?.sliceId===this.selectedSliceId&&t!==void 0&&(this.model.sliceGrouping={...t,label:i})}},this.sliceColorChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{color:i}=e.detail,l=this.model.slices?.findIndex(r=>r.sliceId===this.selectedSliceId),t=this.model.sliceGrouping;l!=null&&l>=0?(this.model.colorMatch=!1,this.model.setSliceColor(i,l)):t?.sliceId===this.selectedSliceId&&t!==void 0&&(this.model.colorMatch=!1,this.model.sliceGrouping={...t,fillSymbol:{...t.fillSymbol,type:k.SFS,color:i}})}},this.slicesPopoverClose=e=>{let{selectedSliceId:i}=e.detail;i===this.selectedSliceId&&(this.selectedSliceId=void 0,this.slicesPopover=P(this.slicesPopover))},this.onModelConfigChange=()=>{this.requestUpdate()},this.onGroupingThresholdChange=b(()=>{let e=this.groupingThresholdElement.value?.value??"",i=Number.parseInt(e);i>100?i=100:i<0&&(i=0),Number.isNaN(i)?this.model.groupingThreshold=0:(this.groupingThresholdElement?.value&&(this.groupingThresholdElement.value.value=i.toString()),this.model.groupingThreshold=i,this.groupingThresholdSliderElement.value&&(this.groupingThresholdSliderElement.value.value=i))},v.DebounceTimer),this.popoverPlacement="leading"}static{this.properties={selectedSliceId:16,messageOverrides:0,model:0,popoverPlacement:1,chartData:0}}static{this.styles=D}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("selectedSliceId")&&this.selectedSliceIdChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeSlicesPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,i){i?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}selectedSliceIdChange(){if(!G(this.selectedSliceId)){let e=this.model.slices,i=this.model.sliceGrouping,l,t;if(this.selectedSliceId===i?.sliceId)l=i?.label,t=i?.fillSymbol?.color;else if(e!==void 0){let r=e.findIndex(n=>n.sliceId===this.selectedSliceId);l=this.model.getSliceName(r),t=this.model.getSliceColor(r)}this.slicesPopover=S(d`<arcgis-charts-config-pie-chart-slices-popover .referenceElement=${this.el} .placement=${this.popoverPlacement} .open=${this.open} .selectedSliceId=${this.selectedSliceId} .selectedName=${l} .selectedColor=${t} @arcgisChartsConfigSlicesPopoverColorChange=${this.sliceColorChange} @arcgisChartsConfigSlicesPopoverNameChange=${this.sliceNameChange} @arcgisChartsConfigPopoverClose=${this.slicesPopoverClose}></arcgis-charts-config-pie-chart-slices-popover>`),this.slicesPopover&&!document.body.contains(this.slicesPopover)&&document.body.appendChild(this.slicesPopover)}}removeSlicesPopover(){this.slicesPopover!==void 0&&this.slicesPopover!==null&&(this.slicesPopover.open=!1,this.slicesPopover.selectedName=void 0,this.slicesPopover.selectedColor=void 0,this.slicesPopover=P(this.slicesPopover))}buildSliceListItem(){let e="#CCCCCC",i="minus-square",l=[],t=this.model.slices,r=this.chartData?.dataItems;r&&(t=t?.filter(o=>r?.findIndex(c=>c.arcgis_charts_slice_id===o.sliceId)!==-1)),t?.forEach(o=>{if(o.fillSymbol?.color!==void 0){i="square-f";let[c,f,C,w]=[...o.fillSymbol.color];e=`rgba(${c},${f},${C},${w/255})`}if(o!==void 0&&!this.model.groupedSliceIds.includes(o.sliceId)){let c=o.sliceId;c===I.emptySliceId?c=this._messages.emptySlice??"":c===I.nullSliceId&&(c=this._messages.nullSlice??""),l?.push($(o.sliceId,d`<calcite-list-item .label=${o.label??o.sliceId} .description=${c} .value=${o.sliceId} .selected=${this.selectedSliceId===o.sliceId} @click=${this.openSlicesPopover}><calcite-icon slot=content-end .icon=${i} style=${p({color:e})}></calcite-icon></calcite-list-item>`))}});let n=this.model.sliceGrouping;if(n?.fillSymbol?.color!==void 0){i="square-f";let[o,c,f,C]=[...n.fillSymbol.color];e=`rgba(${o},${c},${f},${C/255})`}return this.model.groupedSliceIds.length>0&&l?.push($(n?.sliceId,d`<calcite-list-item .label=${n?.label??n?.sliceId??""} .description=${this._messages.groupedSlices} .value=${n?.sliceId??""} .selected=${this.selectedSliceId===n?.sliceId} @click=${this.openSlicesPopover}><calcite-icon slot=content-end .icon=${i} style=${p({color:e})}></calcite-icon></calcite-list-item>`)),l}buildGroupedSlicesListItem(){let e="#CCCCCC",i="minus-square",l=[];return this.model.slices?.forEach(t=>{if(t.fillSymbol?.color!==void 0){i="square-f";let[r,n,o,c]=[...t.fillSymbol.color];e=`rgba(${r},${n},${o},${c/255})`}t!==void 0&&this.model.groupedSliceIds.includes(t.sliceId)&&l?.push($(t.sliceId,d`<calcite-list-item .label=${t.label??t.sliceId} .description=${t.sliceId} .value=${t.sliceId} .selected=${this.selectedSliceId===t.sliceId} @click=${this.openSlicesPopover}><calcite-icon slot=content-end .icon=${i} style=${p({color:e})}></calcite-icon></calcite-list-item>`))}),l}buildSliceList(){return d`<calcite-list .label=${this._messages.slices??""} class=${s(a.sliceList)} selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildSliceListItem()}</calcite-list>`}buildGroupedSliceList(){return d`<calcite-list .label=${this._messages.groupedSlices??""} class=${s(a.sliceList)} selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildGroupedSlicesListItem()}</calcite-list>`}onLabelCharacterLimitChange(e){let i=e.target.value,l=Number.parseInt(i);l<1&&(l=1),Number.isNaN(l)?this.model.labelCharacterLimit=null:(this.labelCharacterLimitElement.value&&(this.labelCharacterLimitElement.value.value=l.toString()),this.model.labelCharacterLimit=l)}onDecimalPlacesChange(e){let i=e.target.value,l=Number.parseInt(i);l<0?l=0:l>20&&(l=20),Number.isNaN(l)?this.model.decimalPlaces=0:(this.decimalPlacesElement.value&&(this.decimalPlacesElement.value.value=l.toString()),this.model.decimalPlaces=l)}onDisplayTypeChange(e){let i=e.target.selectedItem;this.model.displayType=i?.value}resetSlicesOriginal(){this.selectedSliceId=void 0,this.model.colorMatch=!0,this.model.resetSlices()}onCalciteListOrderChange(e){if(e.detail!==null&&e.detail!==void 0){let{newIndex:i,oldIndex:l}=e.detail;this.model.moveSeries(l??0,i??l??0)}}openSlicesPopover(e){e.stopImmediatePropagation(),this.removeSlicesPopover();let i=e.target,l=i.localName==="calcite-list-item"?i:i.parentNode;l.value===this.model.sliceGrouping?.sliceId?this.selectedSliceId=this.model.sliceGrouping?.sliceId:this.selectedSliceId=l.value,this.open=!0}createTooltip(e){let i=e.currentTarget;this.tooltip=S(d`<calcite-tooltip style=${p({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top .innerHTML=${this._messages.groupingInfo??""??""}></calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){M(this.tooltip)}render(){return d`<div class=${s(a.sectionLabel)}>${this._messages.settings}</div><calcite-label class=${s(a.label)}>${this._messages.shape}<calcite-slider min=0 max=100 step=1 snap .value=${this.model.innerRadius??y} @calciteSliderChange=${this.onDonutSizeSliderChange} ${g(this.donutSizeSliderElement)}></calcite-slider></calcite-label><div class=${s(a.pieDonutLabelsContainer)}><calcite-label class=${s(a.label)}>${this._messages.pie}</calcite-label><calcite-label class=${s(a.label)}>${this._messages.donut}</calcite-label></div><calcite-label class=${s(a.label)}><div class=${s(a.groupingLabelContainer)}><div>${this._messages.groupingPercent}</div><calcite-icon icon=information scale=s flip-rtl role=img tabindex=0 aria-label=${this._messages.groupingInfo??""??E} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} @focus=${this.createTooltip} @blur=${this.destroyTooltip}></calcite-icon></div><div class=${s(a.sliderInputContainer)}><calcite-slider min=0 max=100 step=1 snap .value=${_(u(this.model.groupingThreshold??0))} @calciteSliderChange=${this.onGroupingThresholdSliderChange} ${g(this.groupingThresholdSliderElement)}></calcite-slider><calcite-input class=${s(a.numberInput)} type=number min=0 max=100 step=1 suffix-text=% .value=${u(this.model.groupingThreshold??0)} @calciteInputInput=${this.onGroupingThresholdChange} @click=${e=>{e.stopPropagation()}} ${g(this.groupingThresholdElement)}></calcite-input></div></calcite-label><div class=${s(a.sectionLabel)}>${this._messages.labels}</div><calcite-label class=${s(a.label)}>${this._messages.labelCharacterLimit}<calcite-input type=number min=1 step=1 .value=${u(this.model.labelCharacterLimit)} @calciteInputInput=${this.onLabelCharacterLimitChange} ${g(this.labelCharacterLimitElement)}></calcite-input></calcite-label><calcite-label class=${s(a.label)}>${this._messages.decimalPlaces}<calcite-input type=number min=0 max=20 step=1 .value=${u(this.model.decimalPlaces)} @calciteInputInput=${this.onDecimalPlacesChange} ${g(this.decimalPlacesElement)}></calcite-input></calcite-label><calcite-label class=${s(a.label)}>${this._messages.display}<calcite-radio-button-group class=${s(a.radioGroup)} name=display layout=vertical @calciteRadioButtonGroupChange=${this.onDisplayTypeChange}><calcite-label layout=inline><calcite-radio-button .value=${h.Value} .checked=${this.model.displayType===h.Value}></calcite-radio-button>${this._messages.value}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${h.Percentage} .checked=${this.model.displayType===h.Percentage}></calcite-radio-button>${this._messages.percentage}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${h.Both} .checked=${this.model.displayType===h.Both}></calcite-radio-button>${this._messages.both}</calcite-label></calcite-radio-button-group></calcite-label><div class=${s(a.sectionLabel)}>${this._messages.slices}<calcite-button @click=${this.resetSlicesOriginal} .disabled=${!this.model.resetAvailable()} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button></div>${this.buildSliceList()}<div class=${s(a.sectionLabel)}>${this._messages.groupedSlices}</div>${this.buildGroupedSliceList()}`}};N("arcgis-charts-config-pie-chart-slices",L);return L},a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{d as t}from"./POA2XTTK.js";import a from"./
|
|
2
|
+
import{d as t}from"./POA2XTTK.js";import a from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{b as l}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{B as c,H as h,g as n,i}from"./23EBTARY.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Ac:m,Ha:d,yc:g}])=>{var p=n`:host{overflow-y:auto;overflow-x:hidden;margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,r=class extends c{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let o=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(o)},this.activeColorMatch=!1,this.popoverPlacement="leading",this.usePopupTemplateFieldsInfo=!1}static{this.properties={layerFieldsInfo:16,activeColorMatch:16,model:0,popoverPlacement:1,seriesColor:0,page:1,calculatedMinMaxBounds:0,layer:0,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5}}static{this.styles=p}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let o=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!l(e.get("layer"),this.layer)&&(o=!0),(e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")||e.has("popupTemplateFieldInfosEnabled")&&this.popupTemplateFieldInfosEnabled!==e.get("popupTemplateFieldInfosEnabled"))&&(o=!0),e.has("seriesColor")&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(o=!0),o&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,o){o?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){this.activeColorMatch=e?.get(0)===void 0,this.model.colorMatch&&e?.forEach((o,s)=>{let a;o&&("fillSymbol"in o?a=o.fillSymbol?.color:"lineSymbol"in o&&(a=o.lineSymbol.color)),e?.get(0)!==void 0&&a!==void 0&&!l(this.model.getSeriesColor(s),a)&&this.model.setSeriesColor(a,s)})}async updateFetchLayerFieldsInfo(e){let o=e??this.model.config,s=this.layer;if(!s){let a=d(o)?o.iLayer:void 0;a&&(s=await g(a))}s&&(await s.load(),this.layerFieldsInfo=m(s,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled))}render(){let e;switch(this.page){case t.Data:e=i`<arcgis-charts-config-box-plot-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-box-plot-data>`;break;case t.Series:e=i`<arcgis-charts-config-box-plot-series .model=${this.model} .activeColorMatch=${this.activeColorMatch} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-box-plot-series>`;break;case t.Axes:e=i`<arcgis-charts-config-axes .model=${this.model} show-min-y-bound-option show-max-y-bound-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-axes>`;break;case t.Guides:e=i`<arcgis-charts-config-guides .model=${this.model} enable-y-axis-guide></arcgis-charts-config-guides>`;break;case t.Format:e=i`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case t.General:e=i`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:e="";break}return e}};h("arcgis-charts-config-box-plot",r);return r},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{d as t}from"./POA2XTTK.js";import a from"./
|
|
2
|
+
import{d as t}from"./POA2XTTK.js";import a from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{b as n}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{B as p,H as f,g,i,n as m}from"./23EBTARY.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Ac:v,Da:c,Ec:F,Ha:u,Kd:y,Pc:b,yc:C}])=>{var M=g`:host{margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,h=class extends p{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let o=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(o)},this.activeColorMatch=!1,this.popoverPlacement="leading",this.usePopupTemplateFieldsInfo=!1,this.arcgisChartsConfigNoSeriesUpdate=m()}static{this.properties={layerFieldsInfo:16,activeColorMatch:16,model:0,timeZone:1,popoverPlacement:1,seriesColor:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5}}static{this.styles=M}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let o=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!n(e.get("layer"),this.layer)&&(o=!0),(e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==void 0&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")||e.has("popupTemplateFieldInfosEnabled")&&this.popupTemplateFieldInfosEnabled!==void 0&&this.popupTemplateFieldInfosEnabled!==e.get("popupTemplateFieldInfosEnabled"))&&(o=!0),e.has("seriesColor")&&this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(o=!0),o&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,o){o?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){let o=e.get(0);if(this.activeColorMatch=o===void 0,this.model.colorMatch){let s=c(o)?o.color:void 0,a=this.model.nullCategory,r=y(a);s!==void 0&&a!==void 0&&r!==void 0&&(this.model.nullCategory={...a,fillSymbol:{...r,color:s,outline:r.outline&&{...r.outline,color:s}}}),e.forEach((l,d)=>{c(l)&&o!==void 0&&l?.color!==void 0&&!n(this.model.getSeriesColor(d),l?.color)&&this.model.setSeriesColor(l?.color,d)})}}async updateFetchLayerFieldsInfo(e){let o=e??this.model.config,s=this.layer;if(!s){let a=u(o)?o.iLayer:void 0;a&&(s=await C(a))}s&&(await b(s),this.layerFieldsInfo=v(s,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled))}render(){let e=this.layerFieldsInfo?.find(a=>a.name===this.model.xAxisField),o=e!==void 0&&F(e),s;switch(this.page){case t.Data:s=i`<arcgis-charts-config-bar-chart-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-bar-chart-data>`;break;case t.Series:s=i`<arcgis-charts-config-bar-chart-series .model=${this.model} .activeColorMatch=${this.activeColorMatch} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-bar-chart-series>`;break;case t.Axes:s=i`<arcgis-charts-config-axes .model=${this.model} show-max-y-bound-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-axes>`;break;case t.Guides:s=i`<arcgis-charts-config-guides .model=${this.model} .timeZone=${this.timeZone} .enableXAxisGuide=${o} enable-y-axis-guide .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-guides>`;break;case t.Format:s=i`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case t.General:s=i`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:s="";break}return s}};f("arcgis-charts-config-bar-chart",h);return h},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as C}from"./Y5CHG4IT.js";import{a as b}from"./KSDJFASU.js";import{b as S,c as T}from"./RP6LD7CU.js";import e from"./
|
|
2
|
+
import{a as C}from"./Y5CHG4IT.js";import{a as b}from"./KSDJFASU.js";import{b as S,c as T}from"./RP6LD7CU.js";import e from"./MESJTWTA.js";import{h as a}from"./POA2XTTK.js";import{a as f}from"./WZFDIC2M.js";import d from"./QCTVBQL7.js";import{Aa as x}from"./43DLRSYB.js";import{a as L}from"./KX7KGXKQ.js";import{b as y}from"./NGXRBJKL.js";import"./ZM64YDWU.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"./23EBTARY.js";import{d as c}from"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Dc:I,Hc: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/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"./NIBYZLE2.js";import f from"./ALHL3MPJ.js";import e from"./CRMQK4K7.js";import d from"./TVQQVFCF.js";import c from"./JMCQVJOB.js";import b from"./DXBAWY2M.js";import a from"./QCTVBQL7.js";import{Fa as le,Ga as _,Ia as k,Ja as ne,p as N,q as E}from"./43DLRSYB.js";import{a as re}from"./KX7KGXKQ.js";import{b as ie,i as U,j as K,r as v}from"./NGXRBJKL.js";import{e as G}from"./QP5UAIC6.js";import{a as se}from"./Z5QPCSUQ.js";import{a as O,l as D}from"./QVG3TOL4.js";export default $arcgis.t(([{Cc:ce,E:ue,Ec:me,Jc:ye,Rb:de,S:fe,a:Q,dd:I,l:S,lc:T,n:B,q:b,yb:V},{c:X},{f:be,g:H},{na:te,oa:ve,pa:ae},{m:Y,n:q,o:ee,z:ge},{b:xe},{a:pe,c:Le,d:Fe}])=>{function Se(l){let{hour:e,minute:t=0,format:a,locale:o="en-US"}=l,i=a&&Object.keys(a).length>0?a:{hour:"numeric",minute:"2-digit",hour12:!1},r=e.toString();if(Number.isInteger(e)&&e>=0&&e<=23&&Number.isInteger(t)&&t>=0&&t<=59){let n=new Date(2e3,0,1,e,t);r=new Intl.DateTimeFormat(o,i).format(n),r.includes(":")||r.startsWith("0")&&(r=r.slice(1))}return r}function he(l){let{weekdayNumber:e,format:t,locale:a="en-US",firstDayOfWeek:o=7}=l,i=t&&Object.keys(t).length>0?t:{weekday:"long"},r=e.toString();if(Number.isInteger(e)&&e>0&&e<=7&&Number.isInteger(o)&&o>0&&o<=7){let n=(e+o-1)%7,s=new Date(2e3,0,2+n);r=new Intl.DateTimeFormat(a,i).format(s)}return r}function Oe(l){let{monthNumber:e,format:t,locale:a="en-US"}=l,o=t&&Object.keys(t).length>0?t:{month:"long"},i=e.toString();if(Number.isInteger(e)&&e>0&&e<=12){let r=new Date(2e3,e-1);i=new Intl.DateTimeFormat(a,o).format(r)}return i}function Ce(l){let{value:e,formatLocale:t,unit:a,config:o,utilsStrings:i}=l,r={label:"",value:e.toString()};switch(a){case D.DayOfWeek:r={label:i.heatChartCalendarDatePartsUnits.dayOfWeek,value:he({weekdayNumber:e,firstDayOfWeek:"firstDayOfWeek"in o?o.firstDayOfWeek:ne,locale:t})};break;case D.MonthOfYear:r={label:i.heatChartCalendarDatePartsUnits.monthOfYear,value:Oe({monthNumber:e,locale:t})};break;case D.HourOfDay:r={label:i.heatChartCalendarDatePartsUnits.hourOfDay,value:Se({hour:e,format:{hour:"numeric",hour12:!1},locale:t})};break;case D.DayOfMonth:r={label:i.heatChartCalendarDatePartsUnits.dayOfMonth,value:typeof e=="string"?e:e?.toString()??""};break;case D.DayOfYear:r={label:i.heatChartCalendarDatePartsUnits.dayOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.MinuteOfDay:r={label:i.heatChartCalendarDatePartsUnits.minuteOfDay,value:typeof e=="string"?e:e?.toString()??""};break;case D.WeekOfYear:r={label:i.heatChartCalendarDatePartsUnits.weekOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.QuarterOfYear:r={label:i.heatChartCalendarDatePartsUnits.quarterOfYear,value:typeof e=="string"?e:e?.toString()??""};break}return r}function ke(l,e){return!ie(l,e)}function st(l,e){return ke(l,e)||l!==e}function $e(l){return(new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??".")==="."?",":";"}function Me(l){return new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??"."}var Be=l=>{let{value:e,quoteAll:t=!1,locale:a,roundDecimals:o}=l,i=e==null?"":String(e);if(e===null)i="null";else if(e===void 0)i="";else if(typeof e=="number"&&Number.isFinite(e)&&a!==void 0){let r=Me(a),n=o??i.split(r)[1]?.length??2;i=new Intl.NumberFormat(a,{maximumFractionDigits:n}).format(e).replace(/\u202F/gu," ")}return(t||/[",\r\n]/u.test(i))&&(i=`"${i.replace(/"/gu,'""')}"`),i};function ut(l,e={}){let{columns:t,delimiter:a,includeHeader:o=!0,quoteAll:i=!1,locale:r,roundDecimals:n}=e,s=l.length===0,f="";if(!s){let c=t??Object.keys(l[0]),u=[],g=a??$e(r??"en");if(r!==void 0&&g!==","&&(f+=`sep=${g}\r
|
|
3
3
|
`),o){let w=c.map(x=>Be({value:x,quoteAll:i,locale:r,roundDecimals:n}));u.push(w.join(g))}l.forEach(w=>{let x=c.map(p=>Be({value:w[p],quoteAll:i,locale:r,roundDecimals:n}));u.push(x.join(g))}),f+=u.join(`\r
|
|
4
4
|
`)}return f}function ft(l){let{rawData:e,config:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n,formatLocale:s,utilsStrings:f}=l,c=[];if(t!==void 0&&Array.isArray(e)&&e.length>0){let u=se(t?.series);u===O.HistogramSeries?c=Ve(t,e,i):u===O.HeatSeries?c=Re({config:t,rows:e,layer:a,fieldList:o,formatLocale:s,utilsStrings:f}):u===O.BarSeries||u===O.LineSeries||u===O.ComboLineAndBarSeries?c=Ie({config:t,rows:e,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n}):u===O.PieSeries?c=Ue({config:t,rows:e,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n}):u===O.BoxPlotSeries&&(c=_e({config:t,rows:e,layer:a,fieldList:o,formatters:i,useRendererLabel:r,timeZone:n}))}return c}function P(l){let{value:e,originalValue:t,formatter:a}=l,o=e;return a!==void 0&&(e===null||e instanceof Date||typeof e=="number"||typeof e=="string")&&(o=a(e,t)),o}function M(l){let{field:e,value:t,dataContext:a,layer:o,fieldList:i,formatter:r,timeZone:n}=l,s;if(t==null||typeof t=="boolean"||Array.isArray(t))s=t;else if(typeof t=="string"||typeof t=="number"||t instanceof Date){let f=Ne({fieldName:e,dataContext:a})??(o!==void 0&&(typeof t=="string"||typeof t=="number")?ye({queryObject:o,fieldName:e,fieldValue:t}):void 0);s=De({field:e,value:f??t,fieldList:i,timeZone:n})}else s=t;return P({value:s,originalValue:t,formatter:r})}function $(l){let{field:e,row:t,layer:a,fieldList:o,formatter:i,useRendererLabel:r=!1,timeZone:n}=l,s=Object.keys(t).find(u=>u.toLocaleLowerCase()===e.toLocaleLowerCase()),f=t[s??e],c=fe({value:f,dataContext:t,useRendererLabel:r});return M({field:e,value:c,dataContext:t,layer:a,fieldList:o,formatter:i,timeZone:n})}function Ze(l,e){let t=!1;if(l===e)t=!0;else if(l!=null&&e!=null){let a=String(l),o=String(e);t=a===o||!Number.isNaN(Number(a))&&!Number.isNaN(Number(o))&&Number(a)===Number(o)}return t}function Ne(l){let{fieldName:e,dataContext:t}=l,a=S.rendererSymbolField;return e===a&&t!==void 0?de(t):void 0}function Pe(l){let{config:e,splitByField:t,splitByValue:a,splitByValueIndex:o,layer:i,fieldList:r,timeZone:n}=l,s,f=e.series[o??-1]?.name;return f!==void 0?s=f:s=M({field:t,value:a,layer:i,fieldList:r,timeZone:n}),s}function Re(l){let{config:e,rows:t,layer:a,fieldList:o,formatLocale:i,utilsStrings:r}=l,[n]=e.series,s=n.x,f=te(e),c=ae(e),u=H({config:e,xAxisField:s,numericFields:c,aggregationType:f,layer:a,fieldList:o});return t.map(g=>{let w=g[E.xField],x=g[E.yField],p=g[E.valueField],F=typeof p=="number"&&Number.isFinite(p)?p.toFixed(2):p,m={label:n.x,value:w},y={label:n.y,value:x};if(n.xTemporalBinning!==void 0){let{label:d,value:L}=Ce({value:Number(w),config:e,formatLocale:i,unit:n.xTemporalBinning.unit,utilsStrings:r});!T(d)&&!T(L)&&(m={label:d,value:L})}if(n.yTemporalBinning!==void 0){let{label:d,value:L}=Ce({value:Number(x),config:e,formatLocale:i,unit:n.yTemporalBinning.unit,utilsStrings:r});!T(d)&&!T(L)&&(y={label:d,value:L})}return{[m.label]:m.value,[y.label]:y.value,[u.description]:F}})}function Ve(l,e,t){let a=xe(l),o=`${v(W.Min)} of ${a}`,i=`${v(W.Max)} of ${a}`,r=`${v(W.Count)} of ${a}`;return e.map(n=>{let{minValue:s,maxValue:f,count:c}=n,u=U(s),g=U(f),w=U(c),x={};if(u&&(x[o]=P({value:s,originalValue:s,formatter:t?.xAxisLabelFormatter})),g&&(x[i]=P({value:f,originalValue:f,formatter:t?.xAxisLabelFormatter})),u&&g){let p=P({value:s,originalValue:s,formatter:t?.xAxisLabelFormatter}),F=P({value:f,originalValue:f,formatter:t?.xAxisLabelFormatter});x.Label=`${String(p??"")} - ${String(F??"")}`}return w&&(x[r]=c),x})}function Te(l,e,t){let a=Object.keys(l),o=[];return t?o=t.map(i=>a.find(r=>r.toLowerCase().includes(i.toLowerCase()))||""):o=a.filter(i=>i.toLowerCase().includes(e.toLowerCase())),o.filter(i=>i.trim()!=="")}function Ie(l){let{config:e,rows:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r=!1,timeZone:n}=l,s=be(e),f=te(e),c=v(f),u=ae(e),g=I(e.series),w=X(e),x=ve(e),{idField:p,isTraditionalTypeOID:F}=ce(ue(a)),m=F&&u.length===1&&u[0]===p,y;switch(g){case b.BarAndLineNoAggregation:y=t.map(d=>{let L=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),C={[s]:L};return Object.assign(C,...u.map(A=>({[A]:P({value:d[A],originalValue:d[A]})}))),C});break;case b.BarAndLineFromFields:y=K(u,t).map(([d,L])=>{let C=V(e.series)[0],A={};return L!==void 0&&d!==void 0&&(A.Field=P({value:L[s],originalValue:L[s],formatter:i?.xAxisLabelFormatter}),A.Value=P({value:L[C],originalValue:L[C]})),A});break;case b.BarAndLineMonoField:case b.BarAndLineMultiFields:y=t.map(d=>{let L=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),C={[s]:L};return u.forEach((A,h)=>{let Z=H({config:e,xAxisField:s,numericFields:u,aggregationType:f,layer:a,numericFieldIndex:h,fieldList:o}),R=V(e.series)[h],oe=R,J=R;R.toLowerCase()===Z.name.toLowerCase()&&(oe=Z.description,J=Z.name),C[oe]=P({value:d[J],originalValue:d[J]})}),C});break;case b.BarAndLineSplitBy:y=t.flatMap(d=>{let L=V(e.series),C=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});return w.map((A,h)=>{let Z=Pe({config:e,splitByField:x,splitByValue:A,splitByValueIndex:h,layer:a,fieldList:o,timeZone:n});return{[s]:C,[x]:Z,[m?c:`${c} of ${u[0]}`]:d[L[h]]}})});break;case b.BarAndLineSplitByNoAggregation:y=t.map(d=>{let L=$({field:s,row:d,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),C=Te(d,u[0],w),A=d[x],h=w.findIndex(R=>Ze(R,A)),Z=Pe({config:e,splitByField:x,splitByValue:A,splitByValueIndex:h>=0?h:void 0,layer:a,fieldList:o,timeZone:n});return{[s]:L,[x]:Z,[u[0]]:d[C[0]]}});break;default:y=t}return y}function je(l){if(l.length===0)return[];let e=l.reduce((t,a)=>{for(let[o,i]of Object.entries(a))typeof i=="number"&&Number.isFinite(i)&&(t[o]=(t[o]??0)+i);return t},{});return l.map(t=>{let a={...t};for(let[o,i]of Object.entries(t))if(typeof i=="number"&&e[o]>0){let r=i/e[o];a[`${o}${k}`]=r.toPrecision(2)}return a})}function Ue(l){let{config:e,rows:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r=!1,timeZone:n}=l,s=pe(e),f=I(e.series),c=je(t),u=Le(e),g=f!==b.PieFromFields?G.Category:G.Fields,w=Fe(e,g),x=H({config:e,xAxisField:s,numericFields:u,aggregationType:w,mode:g,layer:a,fieldList:o}),p=V(e.series)[0];return f===b.PieFromCategory||f===b.PieNoAggregation?c=c.map(F=>{let m=$({field:s,row:F,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n}),y={[s]:m},d=p,L=p;return f===b.PieFromCategory&&p.toLowerCase()===x.name.toLowerCase()&&(d=x.description,L=x.name),y[d]=P({value:F[L],originalValue:F[L]}),y[v(k.trim())]=P({value:F[`${L}${k}`],originalValue:F[`${L}${k}`]}),y}):f===b.PieFromFields&&(c=K(u,c).map(([F,m])=>{let y={};return m!==void 0&&F!==void 0&&(y.Field=P({value:m[s],originalValue:m[s],formatter:i?.xAxisLabelFormatter}),y.Value=P({value:m[p],originalValue:m[p]}),y[v(k.trim())]=P({value:m[`${p}${k}`],originalValue:m[`${p}${k}`]})),y})),c}function z(l){let{rawData:e,keyBase:t="",outRow:a}=l;for(let[o,i]of Object.entries(B)){let r=e[t+i];r!==void 0&&(a[o]=r);let n=e[t+i+le];n!==void 0&&(a[`${o} Outlier`]=n);let s=e[t+i+_];s!==void 0&&(a[`${o} Z-Score`]=s)}}function j(l){let{rawData:e,outRow:t,config:a,boxPlotSubType:o,layer:i,fieldList:r,timeZone:n}=l,s=Y(a),f=ee(a),c=q(a),u=B.Outlier,g=N;switch(o){case b.BoxPlotC3MonoFieldAndCategory:{let p=De({field:s,value:e[s],fieldList:r,timeZone:n});t[s]=p,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC4MultiFieldsAndCategory:{t[v(s)]=e[s],u=`${f.find(p=>Object.keys(e).some(F=>F.toLowerCase().includes(p.toLowerCase())))??""}_${u}`,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC5MonoFieldAndSplitBy:case b.BoxPlotC6MultiFieldsAndSplitBy:{let p=String(e[c]),F=M({field:c,value:p,layer:i,fieldList:r,timeZone:n});u=`${p}_${u}`,t.Field=e[g],t[v(c)]=F,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC7MonoFieldAndCategoryAndSplitBy:{let p=String(e[c]),F=M({field:c,value:p,layer:i,fieldList:r,timeZone:n});u=`${p}_${u}`,t[v(s)]=e[s],t[v(c)]=F,t[v(B.Outlier)]=e[u];break}case b.BoxPlotC1MonoField:case b.BoxPlotC2MultiFields:default:{t.Field=e[g],t[v(B.Outlier)]=e[u];break}}let w=`${u}${_}`,x=e[w];x!==void 0&&(t[`${v(B.Outlier)} Z-Score`]=x)}function Ee(l){let{rawData:e,outRow:t,config:a,splitByValue:o,layer:i,fieldList:r,timeZone:n}=l,s=I(a.series),f=e[`${o}_${B.Average}`],c=q(a),u=Y(a),g="";switch(s){case b.BoxPlotC5MonoFieldAndSplitBy:{g=`${o}_${c}`,t.Field=e[N],t[v(c)]=M({field:c,value:e[g],layer:i,fieldList:r,timeZone:n});break}case b.BoxPlotC6MultiFieldsAndSplitBy:{g=`${o}_${B.Average}`,t.Field=e[N],t[v(c)]=M({field:c,value:e[g],layer:i,fieldList:r,timeZone:n});break}case b.BoxPlotC7MonoFieldAndCategoryAndSplitBy:{g=`${o}_${B.Average}`,t[u]=e[u],t[v(c)]=M({field:c,value:o,layer:i,fieldList:r,timeZone:n});break}}t[v(B.Average)]=f;let w=`${String(f)}${_}`,x=e[w];x!==void 0&&(t[`${v(B.Average)} Z-Score`]=x)}function _e(l){let{config:e,rows:t,layer:a,fieldList:o,formatters:i,useRendererLabel:r=!1,timeZone:n}=l,s=I(e.series),f=s,c=ge(e),u=Array.isArray(t)&&t.length>0&&t.every(m=>m[S.boxPlot.boxPlotMeanLineMarkerId]!==void 0);c&&!u&&(s===b.BoxPlotC5MonoFieldAndSplitBy?f=b.BoxPlotC1MonoField:s===b.BoxPlotC6MultiFieldsAndSplitBy?f=b.BoxPlotC2MultiFields:s===b.BoxPlotC7MonoFieldAndCategoryAndSplitBy&&(f=b.BoxPlotC3MonoFieldAndCategory));let g=Y(e),w=ee(e),x=X(e),p=q(e),F;switch(f){case b.BoxPlotC1MonoField:case b.BoxPlotC3MonoFieldAndCategory:{F=t.map(m=>{let y={};if(m[S.boxPlot.boxPlotOutlierId])j({rawData:m,outRow:y,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n});else{if(f===b.BoxPlotC3MonoFieldAndCategory){let d=$({field:g,row:m,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});y[g]=d}else f===b.BoxPlotC1MonoField&&(y.Field=m[N]);z({rawData:m,outRow:y})}return y});break}case b.BoxPlotC2MultiFields:{F=t.flatMap(m=>{let y={};return m[S.boxPlot.boxPlotOutlierId]?j({rawData:m,outRow:y,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n}):(y.Field=m[N],z({rawData:m,outRow:y})),[y]});break}case b.BoxPlotC4MultiFieldsAndCategory:{F=t.flatMap(m=>w.map(y=>{let d={},L="";if(d.Field=y,m[S.boxPlot.boxPlotOutlierId])j({rawData:m,outRow:d,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n});else{if(f===b.BoxPlotC4MultiFieldsAndCategory){let C=$({field:g,row:m,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});d[g]=C,L=`${y}_`}z({rawData:m,outRow:d,keyBase:L})}return d}));break}case b.BoxPlotC5MonoFieldAndSplitBy:case b.BoxPlotC6MultiFieldsAndSplitBy:case b.BoxPlotC7MonoFieldAndCategoryAndSplitBy:{F=t.flatMap(m=>{if(m[S.boxPlot.boxPlotOutlierId]){let y={};return j({rawData:m,outRow:y,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n}),[y]}else return m[S.boxPlot.boxPlotMeanLineMarkerId]?x?.map(y=>{let d={};return Ee({rawData:m,outRow:d,splitByValue:y,config:e,layer:a,fieldList:o,timeZone:n}),d}):x.map(y=>{let d={},L=M({field:p,value:y,layer:a,fieldList:o});if(f===b.BoxPlotC7MonoFieldAndCategoryAndSplitBy){let C=$({field:g,row:m,layer:a,fieldList:o,formatter:i?.xAxisLabelFormatter,useRendererLabel:r,timeZone:n});d[g]=C}return m[S.boxPlot.boxPlotOutlierId]?j({rawData:m,outRow:d,config:e,boxPlotSubType:f,layer:a,fieldList:o,timeZone:n}):(d[p]=L,z({rawData:m,outRow:d,keyBase:`${y}_`})),d})});break}default:F=t}return F}var Ae=l=>{let e=!1;return(typeof l=="string"||typeof l=="number")&&(e=!Number.isNaN(new Date(l).getTime())),e},We=(l,e)=>Q.fromJSDate(l,{zone:e??"local"}).toFormat("yyyy-LL-dd"),He=(l,e)=>Q.fromJSDate(l,{zone:e??"local"}).toFormat("yyyy-LL-dd'T'HH:mm:ss"),De=l=>{let{field:e,value:t,fieldList:a,timeZone:o}=l,i=t,r=a?.find(n=>n.name===e);if(r){let n=r.type===re.DateOnly;me(r)&&!n?i=Ae(t)?He(new Date(t),o):t:n&&typeof t!="string"&&(i=Ae(t)?We(new Date(t),o):t)}return i};function dt(l){let{runtimeDataFilters:e,view:t,viewTimeExtentChangePolicy:a,syncViewTimeExtent:o}=l,i=e;return t&&(a===we.Refresh||o)&&t.timeExtent?.start!=null&&t.timeExtent?.end!=null&&(i={...e,timeExtent:[t.timeExtent.start.valueOf(),t.timeExtent.end.valueOf()]}),i}return{a:Se,b:he,c:Oe,d:Ce,e:ke,f:st,g:ut,h:ft,i:dt}},a,b,c,d,e,f,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./7DHOI5P2.js";import{q as R}from"./43DLRSYB.js";import{a as k,b as g,d as h,f as C}from"./KX7KGXKQ.js";import{b as D,d as z,f as q,h as L,l as W}from"./NGXRBJKL.js";import{a as G}from"./QVG3TOL4.js";export default $arcgis.t(([X,{createClassBreaksRenderer:Z},{getSchemes:ee},P,{Lb:A,xc:J}])=>{function te(e){let r;switch(e.length){case 4:{let t=e.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);t&&(r=[Number.parseInt(`${t[1]}${t[1]}`,16),Number.parseInt(`${t[2]}${t[2]}`,16),Number.parseInt(`${t[3]}${t[3]}`,16),255]);break}case 5:{let t=e.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);t&&(r=[Number.parseInt(`${t[1]}${t[1]}`,16),Number.parseInt(`${t[2]}${t[2]}`,16),Number.parseInt(`${t[3]}${t[3]}`,16),Number.parseInt(`${t[4]}${t[4]}`,16)]);break}case 7:{let t=e.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);t&&(r=[Number.parseInt(t[1],16),Number.parseInt(t[2],16),Number.parseInt(t[3],16),255]);break}case 9:{let t=e.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);t&&(r=[Number.parseInt(t[1],16),Number.parseInt(t[2],16),Number.parseInt(t[3],16),Number.parseInt(t[4],16)]);break}}return r}function _(e){let r;if(typeof e=="string"&&e.startsWith("#")){let t=te(e);t&&(r=t)}else Array.isArray(e)&&e.every(t=>typeof t=="number")&&(e.length===4?r=e:e.length===3&&(r=[...e,255]));return r}function K(e){return e===h.BackwardDiagonal||e===h.Cross||e===h.DiagonalCross||e===h.ForwardDiagonal||e===h.Horizontal||e===h.Null||e===h.Solid||e===h.Vertical}function O(e){return e===g.Dash||e===g.DashDot||e===g.DashDotDot||e===g.Dot||e===g.Null||e===g.Solid}function re(e){let{categoryField:r,numericFields:t,configFields:a,inlineData:c}=e,o={};return a&&Object.keys(a).length>0&&"dataItems"in c&&(o={type:"uniqueValue",field1:r,uniqueValueInfos:[]},c.dataItems.forEach(s=>{let l=s[r];if(l!=null){let n={value:l};t.forEach(i=>{let u=_(s[`${a.fillColor}_${i}`]),m=s[`${a.fillOpacity}_${i}`],f=s[`${a.fillStyle}_${i}`],p=s[`${a.markerSize}_${i}`],d=_(s[`${a.outlineColor}_${i}`]),$=s[`${a.outlineOpacity}_${i}`],F=s[`${a.outlineWidth}_${i}`],M=s[`${a.outlineStyle}_${i}`],S=_(s[`${a.lineColor}_${i}`]),x=s[`${a.lineOpacity}_${i}`],I=s[`${a.lineWidth}_${i}`],N=s[`${a.lineStyle}_${i}`],j=s[`${a.displayLabel}_${i}`];if(typeof j=="string"&&(n={...n,label:j}),p!=null){let y={type:C.SMS};p&&typeof p=="number"&&(y.size=p),n.symbol=y}if(u||K(f)){let y=n.symbol?.type===C.SMS?n.symbol:{type:C.SFS};if(u&&(m&&typeof m=="number"&&(u[3]=m),y.color=u),K(f)&&(y.style=f),n.symbol=y,d||F!=null||O(M)){let B={type:C.SLS};d&&($&&typeof $=="number"&&(d[3]=$),B.color=d),O(M)&&(B.style=M),F&&typeof F=="number"&&(B.width=F),n.symbol.outline=B}}else if(S||I!=null||O(N)){let y={type:C.SLS};S&&(x&&typeof x=="number"&&(S[3]=x),y.color=S),O(N)&&(y.style=N),I!=null&&typeof I=="number"&&(y.width=I),n.symbol=y}}),(n.label||n.symbol)&&o.uniqueValueInfos.push(n)}})),o}function ae(e){let{numericFields:r,configFields:t,inlineData:a}=e,c=a;return"dataItems"in a&&Object.entries(t).forEach(([o,s])=>{r.forEach(l=>{let n=`${s}_${l}`;a.dataItems.forEach(i=>{n in i&&delete i[n]})})}),c}function se(e){let{categoryField:r,categoryType:t,numericFields:a,inlineData:c}=e,o;if("dataItems"in c){let{dataItems:s}=c,l=[],n="OBJECTID",i=s.map((m,f)=>{let p={...m};return"FID"in m?n="FID":"ObjectId"in m&&(n="ObjectId"),p[n]||(p[n]=f),{attributes:p}});l.push({type:"esriFieldTypeOID",name:n});let u;switch(t){case"dateOnly":u=k.DateOnly;break;case"timeStampOffset":u=k.TimestampOffset;break;case"date":u=k.Date;break;case"number":u=k.Double;break;default:u=k.String;break}l.push({type:u,name:r}),a.forEach(m=>{l.push({type:k.Double,name:m})}),o={id:"",layerType:"ArcGISFeatureLayer",featureCollection:{layers:[{layerDefinition:{fields:l},featureSet:{features:i}}]}}}return o}async function oe(e){let{categoryField:r,categoryType:t,numericFields:a,configFields:c,inlineData:o}=e,s,l,n=z(o);c&&(s=re({categoryField:r,numericFields:a,configFields:c,inlineData:n}),n=ae({numericFields:a,configFields:c,inlineData:n}));let i=se({categoryField:r,categoryType:t,numericFields:a,inlineData:n});return i&&(l=await J(i)),{chartRenderer:s,iLayer:i,layer:l}}var E=P.all(),ne=ee({geometryType:"point",theme:"high-to-low"});function H(e,r,t){let a=Math.max(0,Math.min(1,t));return[Math.round(e[0]+(r[0]-e[0])*a),Math.round(e[1]+(r[1]-e[1])*a),Math.round(e[2]+(r[2]-e[2])*a),Math.round(e[3]+(r[3]-e[3])*a)]}function le(e,r){return r?.length===e?r:[]}function ie(e){let{numberOfClassBreaks:r,baseColors:t,fallbackStartColor:a=[237,248,251,255],fallbackEndColor:c=[136,65,157,255]}=e,o=[];if(r>0){let s=t?.[0]??a,l=t&&t.length>1?t[t.length-1]:c;if(r===1)o=[s];else for(let n=0;n<r;n++){let i=n/(r-1);o.push(H(s,l,i))}}return o}function Y(e){let{colorRamp:r,numberOfClassBreaks:t,isFlipped:a}=e,c=[],o=!1;if(r.colorsForClassBreaks&&r.colorsForClassBreaks.length>0){let s=r.colorsForClassBreaks.find(l=>l.numClasses===t);if(s?.colors?.length===t){let l=s.colors.map(n=>w(n));l.every(n=>n!==void 0)&&(c=a?l.reverse():l,o=!0)}}if(!o){let s=r.colors||[];if(s.length>0){let l=s.map(w).filter(i=>i!==void 0);a&&(l=l.reverse());let n=[];for(let i=0;i<t;i++){let u=t>1?i/(t-1):0,m=Math.floor(u*(l.length-1)),f=Math.min(m+1,l.length-1),p=l[m],d=l[f];if(!p||!d){c=[];break}let $=u*(l.length-1)-m,F=H(p,d,$);n.push(F)}c=n}}return c}function Q(e){let{numberOfClassBreaks:r,selectedColorRamp:t,colorRamp:a,isFlipped:c=!1}=e,o=le(r,a),s=t?Y({colorRamp:t,numberOfClassBreaks:r,isFlipped:c}):[];return o.length!==r&&(o=s),o.length!==r&&(o=ie({numberOfClassBreaks:r,baseColors:s.length>0?s:a})),o}function U(e,r=2){return e%1===0?e.toString():e.toFixed(r)}function ce(e,r=2){return`\u2264 ${U(e,r)}`}function Re(e){let r="#000000";if(e&&Array.isArray(e)&&e.length>=3){let t=b(e[0]||0),a=b(e[1]||0),c=b(e[2]||0),o=t.toString(16).padStart(2,"0"),s=a.toString(16).padStart(2,"0"),l=c.toString(16).padStart(2,"0");r=`#${o}${s}${l}`}return r}var Oe={all:["*"],light:["light"],dark:["dark"],redsAndYellows:["oranges","reds","yellows"],greens:["greens"],blues:["blues"],purplesAndPinks:["purples","pinks"],browns:["browns"],grays:["grays"],bright:["bright"],subdued:["subdued"],colorblindFriendly:["colorblind-friendly"]},ve={all:"all"},ue=e=>{let r=0,t=o=>{let s=0;return o.forEach(l=>{let n=l.toString().split(".")[1];n&&(s=Math.max(s,n.length))}),s},a=[...e].sort((o,s)=>o-s),c=t(a);for(;r<=c&&a.some((o,s)=>s>0&&A(o,r)<=A(a[s-1],r));)r++;return Math.min(r,c)};function b(e){return Math.max(0,Math.min(255,Math.round(e)))}function w(e){let r;if(e instanceof X){let t=e.toRgba();r=[b(t[0]),b(t[1]),b(t[2]),b(t[3]*255)]}else if(Array.isArray(e)&&e.every(t=>typeof t=="number")&&e.length===4){let t=e.length>=4?e[3]??255:255,a=b(t<=1?t*255:t);r=[b(e[0]??0),b(e[1]??0),b(e[2]??0),a]}return r}function v(e){let r=[];for(let t of e){let a=w(t);a&&r.push(a)}return r}function V(e,r){let t=0,a=e.size<=r.size?e:r,c=a===e?r:e;for(let o of a)c.has(o)&&t++;return t}function me(e){return[...e.colors??[],...q(e.colorsForClassBreaks??[],r=>r.colors??[])]}function fe(e){let{ramp:r,breakKeys:t,breakCount:a,weights:c}=e,o=d=>d.join(","),s=r.colorsForClassBreaks?.find(d=>d.numClasses===a)?.colors??[],l=new Set(v(s).map(o)),n=V(t,l),i=new Set(v(Q({numberOfClassBreaks:a,selectedColorRamp:r})).map(o)),u=V(t,i),m=me(r).filter(d=>!!d),f=new Set(v(m).map(o)),p=V(t,f);return n*c.exactN+u*c.generated+p*c.anyOverlap}function we(e,r){let t={exactN:100,generated:10,anyOverlap:1},a=o=>o.join(","),c;if(e?.length){let o=v(e.map(u=>u.symbol?.color)),s=new Set(o.map(a)),l=o.length,n=r.map(u=>{let m=fe({ramp:u,breakKeys:s,breakCount:l,weights:t});return{ramp:u,score:m}}),i=L(n,[u=>-u.score,u=>u.ramp.name]);i[0]?.score>0&&(c=i[0].ramp)}return c}function Me(e,r){let t=!0;if(!e?.length||r.length<2)t=!1;else{let a=e.map(w),c=r.map(o=>o.symbol.color);if(a.length!==c.length)t=!1;else{let o=(n,i)=>!!n&&!!i&&n.length===i.length&&n.every((u,m)=>u===i[m]),s=0,l=c.length-1;for(;s<a.length&&l>=0;){if(!o(a[s],c[l])){t=!1;break}s++,l--}}}return t}function pe(e){let r=new Set(e.dataItems.map(a=>a[R.valueField])),[t]=r;return r.size===1?t:void 0}function de(e,r){let t=Y({colorRamp:T.defaultColorRampForCharts,numberOfClassBreaks:1})[0];return{classMinValue:0,classMaxValue:e,label:U(e),symbol:{type:C.SFS,style:h.Solid,color:r??t??[0,0,0,255],outline:{style:g.Solid,width:.5,color:[50,50,50,.6]}}}}async function ye(e){let{data:r,breaksCount:t,classificationMethod:a,xAxisField:c,colorsForClassBreaks:o}=e,s=[],l=pe(r);if(l!==void 0)s=[de(l,o?.[0])];else{let n=await oe({categoryField:c??"",categoryType:G.DateAxisFormat,numericFields:[R.valueField],inlineData:r});if(n.layer){let i=ne?.primaryScheme,u=await Z({layer:n.layer,field:R.valueField,classificationMethod:a,numClasses:t,colorScheme:i});if(u?.classBreaksResult?.classBreakInfos?.length){let m=ue(u.classBreaksResult.classBreakInfos.map(f=>f.maxValue));s=u.classBreaksResult.classBreakInfos.map((f,p)=>({classMinValue:f.minValue,classMaxValue:f.maxValue,label:ce(f.maxValue,m),symbol:{type:C.SFS,style:h.Solid,color:o?.[p]||[0,0,0,255],outline:{style:g.Solid,width:.5,color:[50,50,50,.6]}}}))}}}return s}function he(e){return e?.length?e:T.esriColorRamps}function be(e,r){return e?he(r).find(t=>t.name===e):void 0}function ge(e){let{colorRampName:r,availableColorRamps:t}=e;return be(r,t)??T.defaultColorRampForCharts}var xe=W(async e=>{let{data:r,breaksCount:t,classificationMethod:a,xAxisField:c,colorRampName:o,availableColorRamps:s,existingClassBreakInfos:l,useExistingColors:n,isColorRampFlipped:i}=e,u=ge({colorRampName:o,availableColorRamps:s}),m=i??!1,f=Q({numberOfClassBreaks:t,selectedColorRamp:u,colorRamp:n?l?.map(p=>p.symbol?.color):void 0,isFlipped:m});return await ye({data:r,classificationMethod:a,breaksCount:t,xAxisField:c,colorsForClassBreaks:f})},e=>JSON.stringify(e)),T={esriColorRamps:E,defaultColorRampForCharts:E.find(e=>e.name==="Blue 3")??E[0]};function Ne({currentBreaks:e,configBreaks:r,treatReversedColorsAsEqual:t=!0}){let a=!0;if(Array.isArray(e)&&Array.isArray(r)){let c=o=>o.map(({symbol:s,...l})=>l);if(D(c(e),c(r))){let o=e.map(i=>i.symbol?.color),s=r.map(i=>i.symbol?.color),l=D(o,s),n=D(o,[...s].reverse());a=t?!(l||n):!l}}return a}return{a:Q,b:Re,c:Oe,d:ve,e:we,f:Me,g:xe,h:T,i:Ne}},"Color","smartMapping/renderers/color","smartMapping/symbology/color","smartMapping/symbology/support/colorRamps",a)
|
|
2
|
+
import a from"./QCTVBQL7.js";import{q as R}from"./43DLRSYB.js";import{a as k,b as g,d as h,f as C}from"./KX7KGXKQ.js";import{b as D,d as z,f as q,h as L,l as W}from"./NGXRBJKL.js";import{a as G}from"./QVG3TOL4.js";export default $arcgis.t(([X,{createClassBreaksRenderer:Z},{getSchemes:ee},P,{Lb:A,xc:J}])=>{function te(e){let r;switch(e.length){case 4:{let t=e.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);t&&(r=[Number.parseInt(`${t[1]}${t[1]}`,16),Number.parseInt(`${t[2]}${t[2]}`,16),Number.parseInt(`${t[3]}${t[3]}`,16),255]);break}case 5:{let t=e.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);t&&(r=[Number.parseInt(`${t[1]}${t[1]}`,16),Number.parseInt(`${t[2]}${t[2]}`,16),Number.parseInt(`${t[3]}${t[3]}`,16),Number.parseInt(`${t[4]}${t[4]}`,16)]);break}case 7:{let t=e.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);t&&(r=[Number.parseInt(t[1],16),Number.parseInt(t[2],16),Number.parseInt(t[3],16),255]);break}case 9:{let t=e.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);t&&(r=[Number.parseInt(t[1],16),Number.parseInt(t[2],16),Number.parseInt(t[3],16),Number.parseInt(t[4],16)]);break}}return r}function _(e){let r;if(typeof e=="string"&&e.startsWith("#")){let t=te(e);t&&(r=t)}else Array.isArray(e)&&e.every(t=>typeof t=="number")&&(e.length===4?r=e:e.length===3&&(r=[...e,255]));return r}function K(e){return e===h.BackwardDiagonal||e===h.Cross||e===h.DiagonalCross||e===h.ForwardDiagonal||e===h.Horizontal||e===h.Null||e===h.Solid||e===h.Vertical}function O(e){return e===g.Dash||e===g.DashDot||e===g.DashDotDot||e===g.Dot||e===g.Null||e===g.Solid}function re(e){let{categoryField:r,numericFields:t,configFields:a,inlineData:c}=e,o={};return a&&Object.keys(a).length>0&&"dataItems"in c&&(o={type:"uniqueValue",field1:r,uniqueValueInfos:[]},c.dataItems.forEach(s=>{let l=s[r];if(l!=null){let n={value:l};t.forEach(i=>{let u=_(s[`${a.fillColor}_${i}`]),m=s[`${a.fillOpacity}_${i}`],f=s[`${a.fillStyle}_${i}`],p=s[`${a.markerSize}_${i}`],d=_(s[`${a.outlineColor}_${i}`]),$=s[`${a.outlineOpacity}_${i}`],F=s[`${a.outlineWidth}_${i}`],M=s[`${a.outlineStyle}_${i}`],S=_(s[`${a.lineColor}_${i}`]),x=s[`${a.lineOpacity}_${i}`],I=s[`${a.lineWidth}_${i}`],N=s[`${a.lineStyle}_${i}`],j=s[`${a.displayLabel}_${i}`];if(typeof j=="string"&&(n={...n,label:j}),p!=null){let y={type:C.SMS};p&&typeof p=="number"&&(y.size=p),n.symbol=y}if(u||K(f)){let y=n.symbol?.type===C.SMS?n.symbol:{type:C.SFS};if(u&&(m&&typeof m=="number"&&(u[3]=m),y.color=u),K(f)&&(y.style=f),n.symbol=y,d||F!=null||O(M)){let B={type:C.SLS};d&&($&&typeof $=="number"&&(d[3]=$),B.color=d),O(M)&&(B.style=M),F&&typeof F=="number"&&(B.width=F),n.symbol.outline=B}}else if(S||I!=null||O(N)){let y={type:C.SLS};S&&(x&&typeof x=="number"&&(S[3]=x),y.color=S),O(N)&&(y.style=N),I!=null&&typeof I=="number"&&(y.width=I),n.symbol=y}}),(n.label||n.symbol)&&o.uniqueValueInfos.push(n)}})),o}function ae(e){let{numericFields:r,configFields:t,inlineData:a}=e,c=a;return"dataItems"in a&&Object.entries(t).forEach(([o,s])=>{r.forEach(l=>{let n=`${s}_${l}`;a.dataItems.forEach(i=>{n in i&&delete i[n]})})}),c}function se(e){let{categoryField:r,categoryType:t,numericFields:a,inlineData:c}=e,o;if("dataItems"in c){let{dataItems:s}=c,l=[],n="OBJECTID",i=s.map((m,f)=>{let p={...m};return"FID"in m?n="FID":"ObjectId"in m&&(n="ObjectId"),p[n]||(p[n]=f),{attributes:p}});l.push({type:"esriFieldTypeOID",name:n});let u;switch(t){case"dateOnly":u=k.DateOnly;break;case"timeStampOffset":u=k.TimestampOffset;break;case"date":u=k.Date;break;case"number":u=k.Double;break;default:u=k.String;break}l.push({type:u,name:r}),a.forEach(m=>{l.push({type:k.Double,name:m})}),o={id:"",layerType:"ArcGISFeatureLayer",featureCollection:{layers:[{layerDefinition:{fields:l},featureSet:{features:i}}]}}}return o}async function oe(e){let{categoryField:r,categoryType:t,numericFields:a,configFields:c,inlineData:o}=e,s,l,n=z(o);c&&(s=re({categoryField:r,numericFields:a,configFields:c,inlineData:n}),n=ae({numericFields:a,configFields:c,inlineData:n}));let i=se({categoryField:r,categoryType:t,numericFields:a,inlineData:n});return i&&(l=await J(i)),{chartRenderer:s,iLayer:i,layer:l}}var E=P.all(),ne=ee({geometryType:"point",theme:"high-to-low"});function H(e,r,t){let a=Math.max(0,Math.min(1,t));return[Math.round(e[0]+(r[0]-e[0])*a),Math.round(e[1]+(r[1]-e[1])*a),Math.round(e[2]+(r[2]-e[2])*a),Math.round(e[3]+(r[3]-e[3])*a)]}function le(e,r){return r?.length===e?r:[]}function ie(e){let{numberOfClassBreaks:r,baseColors:t,fallbackStartColor:a=[237,248,251,255],fallbackEndColor:c=[136,65,157,255]}=e,o=[];if(r>0){let s=t?.[0]??a,l=t&&t.length>1?t[t.length-1]:c;if(r===1)o=[s];else for(let n=0;n<r;n++){let i=n/(r-1);o.push(H(s,l,i))}}return o}function Y(e){let{colorRamp:r,numberOfClassBreaks:t,isFlipped:a}=e,c=[],o=!1;if(r.colorsForClassBreaks&&r.colorsForClassBreaks.length>0){let s=r.colorsForClassBreaks.find(l=>l.numClasses===t);if(s?.colors?.length===t){let l=s.colors.map(n=>w(n));l.every(n=>n!==void 0)&&(c=a?l.reverse():l,o=!0)}}if(!o){let s=r.colors||[];if(s.length>0){let l=s.map(w).filter(i=>i!==void 0);a&&(l=l.reverse());let n=[];for(let i=0;i<t;i++){let u=t>1?i/(t-1):0,m=Math.floor(u*(l.length-1)),f=Math.min(m+1,l.length-1),p=l[m],d=l[f];if(!p||!d){c=[];break}let $=u*(l.length-1)-m,F=H(p,d,$);n.push(F)}c=n}}return c}function Q(e){let{numberOfClassBreaks:r,selectedColorRamp:t,colorRamp:a,isFlipped:c=!1}=e,o=le(r,a),s=t?Y({colorRamp:t,numberOfClassBreaks:r,isFlipped:c}):[];return o.length!==r&&(o=s),o.length!==r&&(o=ie({numberOfClassBreaks:r,baseColors:s.length>0?s:a})),o}function U(e,r=2){return e%1===0?e.toString():e.toFixed(r)}function ce(e,r=2){return`\u2264 ${U(e,r)}`}function Re(e){let r="#000000";if(e&&Array.isArray(e)&&e.length>=3){let t=b(e[0]||0),a=b(e[1]||0),c=b(e[2]||0),o=t.toString(16).padStart(2,"0"),s=a.toString(16).padStart(2,"0"),l=c.toString(16).padStart(2,"0");r=`#${o}${s}${l}`}return r}var Oe={all:["*"],light:["light"],dark:["dark"],redsAndYellows:["oranges","reds","yellows"],greens:["greens"],blues:["blues"],purplesAndPinks:["purples","pinks"],browns:["browns"],grays:["grays"],bright:["bright"],subdued:["subdued"],colorblindFriendly:["colorblind-friendly"]},ve={all:"all"},ue=e=>{let r=0,t=o=>{let s=0;return o.forEach(l=>{let n=l.toString().split(".")[1];n&&(s=Math.max(s,n.length))}),s},a=[...e].sort((o,s)=>o-s),c=t(a);for(;r<=c&&a.some((o,s)=>s>0&&A(o,r)<=A(a[s-1],r));)r++;return Math.min(r,c)};function b(e){return Math.max(0,Math.min(255,Math.round(e)))}function w(e){let r;if(e instanceof X){let t=e.toRgba();r=[b(t[0]),b(t[1]),b(t[2]),b(t[3]*255)]}else if(Array.isArray(e)&&e.every(t=>typeof t=="number")&&e.length===4){let t=e.length>=4?e[3]??255:255,a=b(t<=1?t*255:t);r=[b(e[0]??0),b(e[1]??0),b(e[2]??0),a]}return r}function v(e){let r=[];for(let t of e){let a=w(t);a&&r.push(a)}return r}function V(e,r){let t=0,a=e.size<=r.size?e:r,c=a===e?r:e;for(let o of a)c.has(o)&&t++;return t}function me(e){return[...e.colors??[],...q(e.colorsForClassBreaks??[],r=>r.colors??[])]}function fe(e){let{ramp:r,breakKeys:t,breakCount:a,weights:c}=e,o=d=>d.join(","),s=r.colorsForClassBreaks?.find(d=>d.numClasses===a)?.colors??[],l=new Set(v(s).map(o)),n=V(t,l),i=new Set(v(Q({numberOfClassBreaks:a,selectedColorRamp:r})).map(o)),u=V(t,i),m=me(r).filter(d=>!!d),f=new Set(v(m).map(o)),p=V(t,f);return n*c.exactN+u*c.generated+p*c.anyOverlap}function we(e,r){let t={exactN:100,generated:10,anyOverlap:1},a=o=>o.join(","),c;if(e?.length){let o=v(e.map(u=>u.symbol?.color)),s=new Set(o.map(a)),l=o.length,n=r.map(u=>{let m=fe({ramp:u,breakKeys:s,breakCount:l,weights:t});return{ramp:u,score:m}}),i=L(n,[u=>-u.score,u=>u.ramp.name]);i[0]?.score>0&&(c=i[0].ramp)}return c}function Me(e,r){let t=!0;if(!e?.length||r.length<2)t=!1;else{let a=e.map(w),c=r.map(o=>o.symbol.color);if(a.length!==c.length)t=!1;else{let o=(n,i)=>!!n&&!!i&&n.length===i.length&&n.every((u,m)=>u===i[m]),s=0,l=c.length-1;for(;s<a.length&&l>=0;){if(!o(a[s],c[l])){t=!1;break}s++,l--}}}return t}function pe(e){let r=new Set(e.dataItems.map(a=>a[R.valueField])),[t]=r;return r.size===1?t:void 0}function de(e,r){let t=Y({colorRamp:T.defaultColorRampForCharts,numberOfClassBreaks:1})[0];return{classMinValue:0,classMaxValue:e,label:U(e),symbol:{type:C.SFS,style:h.Solid,color:r??t??[0,0,0,255],outline:{style:g.Solid,width:.5,color:[50,50,50,.6]}}}}async function ye(e){let{data:r,breaksCount:t,classificationMethod:a,xAxisField:c,colorsForClassBreaks:o}=e,s=[],l=pe(r);if(l!==void 0)s=[de(l,o?.[0])];else{let n=await oe({categoryField:c??"",categoryType:G.DateAxisFormat,numericFields:[R.valueField],inlineData:r});if(n.layer){let i=ne?.primaryScheme,u=await Z({layer:n.layer,field:R.valueField,classificationMethod:a,numClasses:t,colorScheme:i});if(u?.classBreaksResult?.classBreakInfos?.length){let m=ue(u.classBreaksResult.classBreakInfos.map(f=>f.maxValue));s=u.classBreaksResult.classBreakInfos.map((f,p)=>({classMinValue:f.minValue,classMaxValue:f.maxValue,label:ce(f.maxValue,m),symbol:{type:C.SFS,style:h.Solid,color:o?.[p]||[0,0,0,255],outline:{style:g.Solid,width:.5,color:[50,50,50,.6]}}}))}}}return s}function he(e){return e?.length?e:T.esriColorRamps}function be(e,r){return e?he(r).find(t=>t.name===e):void 0}function ge(e){let{colorRampName:r,availableColorRamps:t}=e;return be(r,t)??T.defaultColorRampForCharts}var xe=W(async e=>{let{data:r,breaksCount:t,classificationMethod:a,xAxisField:c,colorRampName:o,availableColorRamps:s,existingClassBreakInfos:l,useExistingColors:n,isColorRampFlipped:i}=e,u=ge({colorRampName:o,availableColorRamps:s}),m=i??!1,f=Q({numberOfClassBreaks:t,selectedColorRamp:u,colorRamp:n?l?.map(p=>p.symbol?.color):void 0,isFlipped:m});return await ye({data:r,classificationMethod:a,breaksCount:t,xAxisField:c,colorsForClassBreaks:f})},e=>JSON.stringify(e)),T={esriColorRamps:E,defaultColorRampForCharts:E.find(e=>e.name==="Blue 3")??E[0]};function Ne({currentBreaks:e,configBreaks:r,treatReversedColorsAsEqual:t=!0}){let a=!0;if(Array.isArray(e)&&Array.isArray(r)){let c=o=>o.map(({symbol:s,...l})=>l);if(D(c(e),c(r))){let o=e.map(i=>i.symbol?.color),s=r.map(i=>i.symbol?.color),l=D(o,s),n=D(o,[...s].reverse());a=t?!(l||n):!l}}return a}return{a:Q,b:Re,c:Oe,d:ve,e:we,f:Me,g:xe,h:T,i:Ne}},"Color","smartMapping/renderers/color","smartMapping/symbology/color","smartMapping/symbology/support/colorRamps",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as N}from"./Y5CHG4IT.js";import{a as L}from"./KSDJFASU.js";import{a as C}from"./RP6LD7CU.js";import e from"./
|
|
2
|
+
import{a as N}from"./Y5CHG4IT.js";import{a as L}from"./KSDJFASU.js";import{a as C}from"./RP6LD7CU.js";import e from"./MESJTWTA.js";import"./POA2XTTK.js";import{a as x}from"./WZFDIC2M.js";import c from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import"./NGXRBJKL.js";import"./ZM64YDWU.js";import{B as y,C as a,D as d,F as p,H as I,g as $,i as o,n as b}from"./23EBTARY.js";import"./QP5UAIC6.js";import"./Z5QPCSUQ.js";import{b as v,f as r}from"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Kd:h,l:u,q:k},{r:P}])=>{var E={stackedType:"stacked-type"},l={topSection:"top-section",sectionLabel:"section-label",list:"list",disabledInfo:"disabled-info",disabledStackingOption:"disabled-stacking-option"},w=$`.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)}.top-section{margin-top:var(--arcgis-charts-config-margin-minor)}.section-label{display:flex;margin-bottom:var(--arcgis-charts-config-margin-major);margin-left:var(--arcgis-charts-config-margin-minor);margin-right: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)}.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)}.disabled-info{margin:auto 1rem;pointer-events:auto}.disabled-info:active{margin:auto 1rem;pointer-events:none}.disabled-stacking-option{pointer-events:none;opacity:var(--calcite-opacity-disabled)}`,S=class extends y{constructor(){super(...arguments),this._messages=x(),this.open=!1,this.seriesNameChange=e=>{if(e.detail!==null&&e.detail!==void 0){let t=e.detail.name;if(this.isNullCategorySelected){let i=this.model.nullCategory;if(i){let s={...i,text:t};this.model.nullCategory=s}}else{let i=this.selectedSeriesIndex;i!==void 0&&i>=0&&this.model.setSeriesName(t,i)}}},this.seriesColorChange=e=>{if(e.detail!==null&&e.detail!==void 0){let{color:t}=e.detail;if(t!==void 0){if(this.isNullCategorySelected){let i=this.model.nullCategory,s=h(i),c=i!==void 0&&s!==void 0?{...i,fillSymbol:{...s,color:t,outline:s.outline&&{...s.outline,color:t}}}:void 0;this.model.nullCategory=c}else{let i=this.selectedSeriesIndex;i!==void 0&&i>=0&&this.model.setSeriesColor(t,i)}this.model.colorMatch=!1}}},this.seriesPopoverClose=e=>{let{selectedSeriesIndex:t}=e.detail;this.selectedSeriesIndex===t&&(this.seriesPopover=C(this.seriesPopover),this.selectedSeriesId=void 0)},this.onModelConfigChange=()=>{this.selectedSeriesId!==void 0&&!this.isNullCategorySelected&&this.selectedSeriesIndex===-1?(this.removeSeriesPopover(),this.selectedSeriesId=void 0):this.seriesPopover&&(this.seriesPopover.selectedSeriesIndex=this.selectedSeriesIndex),this.requestUpdate()},this.seriesOrderResetCounter=0,this.activeColorMatch=!1,this.popoverPlacement="leading",this.arcgisChartsConfigDataChangeError=b()}static{this.properties={seriesOrderResetCounter:16,selectedSeriesId:16,messageOverrides:0,model:0,activeColorMatch:5,popoverPlacement:1}}static{this.styles=w}get selectedSeriesIndex(){return this.selectedSeriesId===void 0?void 0:this.model.getSeriesIndex(this.selectedSeriesId)}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(e){e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("selectedSeriesId")&&this.selectedSeriesChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeSeriesPopover(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,t){t?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}removeSeriesPopover(){this.seriesPopover!==null&&this.seriesPopover!==void 0&&(this.seriesPopover.open=!1,this.seriesPopover=C(this.seriesPopover))}selectedSeriesChange(){this.selectedSeriesIndex!==void 0&&(this.seriesPopover=p(o`<arcgis-charts-config-bar-chart-series-popover .referenceElement=${this.el} .selectedName=${this.selectedSeriesIndex!=null?this.model.getSeriesName(this.selectedSeriesIndex):void 0} .selectedColor=${this.selectedSeriesIndex!=null?this.model.getSeriesColor(this.selectedSeriesIndex):void 0} .placement=${this.popoverPlacement} .selectedSeriesIndex=${this.selectedSeriesIndex!=null?this.selectedSeriesIndex:void 0} .nullCategory=${this.isNullCategorySelected?this.model.nullCategory:void 0} .open=${this.open} @arcgisChartsConfigSeriesPopoverNameChange=${this.seriesNameChange} @arcgisChartsConfigSeriesPopoverColorChange=${this.seriesColorChange} @arcgisChartsConfigPopoverClose=${this.seriesPopoverClose}></arcgis-charts-config-bar-chart-series-popover>`),this.seriesPopover&&!document.body.contains(this.seriesPopover)&&document.body.appendChild(this.seriesPopover))}buildSeriesListItems(){let e=this.model.seriesLength??0,t=Array.from({length:e},(i,s)=>s);return N(t,i=>this.model.getSeriesId(i),i=>{let s=this.model.getSeriesId(i),c=this.model.getSeriesColor(i),g=this.model.getSeriesName(i),m=this.model.chartSubType===k.BarAndLineFromFields?this._messages.series:s,n="#CCCCCC",f="minus-square";if((e>1||!this.activeColorMatch)&&c!==void 0){f="square-f";let[T,M,O,_]=[...c];n=`rgba(${T},${M},${O},${_/255})`}return o`<calcite-list-item .label=${g??s??""} .description=${m} .value=${s} .selected=${this.selectedSeriesId===s} @click=${this.openSeriesPopOver}><calcite-icon .icon=${f} style=${d({color:n})} slot=content-end></calcite-icon></calcite-list-item>`})}buildSeriesList(){return L(this.seriesOrderResetCounter,o`<calcite-list label class=${a(l.list)} drag-enabled selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildSeriesListItems()}</calcite-list>`)}buildNullCategoryUI(){let e=this.model.nullCategory,t=this._messages.nullCategory,i=h(e)?.color??h(u.nullCategory)?.color??u.grayColor,[s,c,g,m]=[...i],n=`rgba(${s},${c},${g},${m/255})`;return o`<calcite-list label class=${a(l.list)} selection-mode=none><calcite-list-item .label=${t} .value=${t} .selected=${this.selectedSeriesId!==void 0&&this.isNullCategorySelected} @click=${this.openSeriesPopOver}><calcite-icon icon=square-f style=${d({color:n})} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}buildMultipleBarTypeList(){let e=this.shouldDisableStacking();return e&&this.model.stackedType!==r.Side&&(this.model.stackedType=r.Side),o`<calcite-list label id=${E.stackedType} class=${a(l.list)} selection-mode=single-persist selection-appearance=border @click=${this.onMultipleBarSelect}><calcite-list-item .label=${this._messages.sideBySide} .value=${r.Side} .selected=${this.model.stackedType===void 0||this.model.stackedType===r.Side}><calcite-icon scale=l icon=graph-bar-side-by-side slot=content-start></calcite-icon></calcite-list-item><calcite-list-item class=${a(e?l.disabledStackingOption:"")} .label=${this._messages.stacked} .value=${r.Stacked} .selected=${this.model.stackedType===r.Stacked}><calcite-icon scale=l icon=graph-bar-stacked slot=content-start></calcite-icon>${e&&o`<calcite-icon class=${a(l.disabledInfo)} slot=content-end icon=information scale=s flip-rtl @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip}></calcite-icon>`||""}</calcite-list-item><calcite-list-item class=${a(e?l.disabledStackingOption:"")} .label=${this._messages.stacked100} .value=${r.Stacked100} .selected=${this.model.stackedType===r.Stacked100}><calcite-icon scale=l icon=graph-bar100-stacked slot=content-start></calcite-icon>${e&&o`<calcite-icon class=${a(l.disabledInfo)} slot=content-end icon=information scale=s flip-rtl @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip}></calcite-icon>`||""}</calcite-list-item></calcite-list>`}resetSeriesOriginal(){this.selectedSeriesId=void 0,this.model.resetSeriesStyling(),this.seriesOrderResetCounter+=1}onMultipleBarSelect(e){if(!this.shouldDisableStacking()){let t=e.target;this.model.stackedType=t.value??t.parentElement.value??""}}onCalciteListOrderChange(e){if(e.detail!==null&&e.detail!==void 0){let{newIndex:t,oldIndex:i}=e.detail;this.model.moveSeries(i??0,t??i??0),this.seriesOrderResetCounter+=1}}openSeriesPopOver(e){e.stopImmediatePropagation(),this.removeSeriesPopover();let t=e.target,i=t.localName==="calcite-list-item"?t:t.parentNode;this.isNullCategorySelected=i.value===this._messages.nullCategory,this.open=this.selectedSeriesId!==i.value,this.selectedSeriesId=this.open?i.value:void 0}createTooltip(e){let t=e.target,i=(this.model.aggregationType===v.NoAggregation?this._messages.noAggStackingDisabled:this._messages.singleStackingDisabled)??"";this.tooltip=p(o`<calcite-tooltip style=${d({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${t} open placement=top>${i}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){P(this.tooltip)}shouldDisableStacking(){return(this.model.seriesLength??0)<=1||this.model.aggregationType===v.NoAggregation}render(){return o`<div class=${`${l.sectionLabel} ${l.topSection}`}>${this._messages.displayMultiSeries}</div>${this.buildMultipleBarTypeList()}<div class=${a(l.sectionLabel)}>${this._messages.series}<calcite-button @click=${this.resetSeriesOriginal} .disabled=${!this.model.resetAvailable()} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button></div>${this.buildSeriesList()}${this.model.nullCategory!==void 0&&this.model.fetchNULLValues?this.buildNullCategoryUI():null}`}};I("arcgis-charts-config-bar-chart-series",S);return S},c,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{d as i}from"./POA2XTTK.js";import a from"./
|
|
2
|
+
import{d as i}from"./POA2XTTK.js";import a from"./QCTVBQL7.js";import"./43DLRSYB.js";import"./KX7KGXKQ.js";import{b as l}from"./NGXRBJKL.js";import"./ZM64YDWU.js";import{B as h,H as c,g as n,i as t}from"./23EBTARY.js";import"./Z5QPCSUQ.js";import"./QVG3TOL4.js";import"./BYSUABOV.js";export default $arcgis.t(([{Ac:u,Da:g,Ha:p,Pc:C,t:d,xa:m,yc:f}])=>{var y=n`:host{overflow-y:auto;overflow-x:hidden;margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,r=class extends h{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let a=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(a)},this.usePopupTemplateFieldsInfo=!1}static{this.properties={layerFieldsInfo:16,model:0,chartData:0,seriesColor:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5}}static{this.styles=y}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(e){let a=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!l(e.get("layer"),this.layer)&&(a=!0),(e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")||e.has("popupTemplateFieldInfosEnabled")&&this.popupTemplateFieldInfosEnabled!==e.get("popupTemplateFieldInfosEnabled"))&&(a=!0),e.has("seriesColor")&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(a=!0),a&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,a){a?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){this.model.colorMatch&&e?.forEach(a=>{g(a)&&e?.get(0)!==void 0&&!l(this.model.binSymbol,a)&&(this.model.binSymbol=a)})}async updateFetchLayerFieldsInfo(e){let a=e??this.model.config,s=this.layer;if(!s){let o=p(a)?a.iLayer:void 0;o&&(s=await f(o))}if(s){await C(s);let o=this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled;this.layerFieldsInfo=d(s)?m({layer:s,popupTemplateFieldInfosEnabled:o,chartType:a?.type}):u(s,o)}}render(){let e;switch(this.page){case i.Data:e=t`<arcgis-charts-config-histogram-data .model=${this.model} .meanValue=${this.chartData?.mean} .medianValue=${this.chartData?.median} .standardDevValue=${this.chartData?.stddev} .minValue=${this.chartData?.min} .maxValue=${this.chartData?.max} .sumValue=${this.chartData?.sum} .nullsValue=${this.chartData?.nulls} .countValue=${this.chartData?.count} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-histogram-data>`;break;case i.Axes:e=t`<arcgis-charts-config-axes .model=${this.model} show-max-y-bound-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-axes>`;break;case i.Guides:e=t`<arcgis-charts-config-guides .model=${this.model} enable-y-axis-guide></arcgis-charts-config-guides>`;break;case i.Format:e=t`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case i.General:e=t`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:e="";break}return e}};c("arcgis-charts-config-histogram",r);return r},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{e as c,m as f}from"./POA2XTTK.js";import a from"./
|
|
2
|
+
import{e as c,m as f}from"./POA2XTTK.js";import a from"./QCTVBQL7.js";import{b as u}from"./KX7KGXKQ.js";import{g as n}from"./QP5UAIC6.js";import{b as r,l as o}from"./QVG3TOL4.js";export default $arcgis.t(([{$b:p,Q:b,fb:N,qc:d}])=>{var L={DebounceTimer:400,SliderTimer:100,PopoverTimer:60,customSortLimit:100},h={style:"decimal",minimumFractionDigits:0,maximumFractionDigits:3},T=[r.Count,r.Sum,r.Average,r.ContinuousPercentile,r.Minimum,r.Maximum,r.NoAggregation],x=[r.Count,r.Sum];function A(e){let t;switch(e){case n.Title:case n.XAxisTitle:case n.YAxisTitle:case n.LegendTitle:{t=c.Title;break}case n.Description:case n.LegendText:{t=c.Text;break}case n.AxisLabels:case n.GuideLabels:case n.DataLabels:{t=c.Label;break}case n.Background:case n.LeaderLines:case n.AxisLines:case n.GridLines:{t=c.Palette;break}}return t}function F(e,t,a){let i=!1,s=typeof e=="string"?Number.parseFloat(e):e,l=typeof t=="string"?Number.parseFloat(t):t,m=typeof a=="string"?Number.parseFloat(a):a;return Number.isNaN(s)||(i=(l===void 0||Number.isNaN(l)||s>=l)&&(m===void 0||Number.isNaN(m)||s<=m)),i}function E(e,t){let a;if(e!==null){let i=typeof e=="string"?Number.parseFloat(e):e;d(i)?a=i:d(t)&&(a=t)}return a===void 0?"":`${a}`}function O(e){let{inputElement:t,status:a}=e;t.status=a}var M={IDLE:"idle",INVALID:"invalid"};function B(e,t){let a="";if(e!==void 0&&!Number.isNaN(e)){let i=N(document.documentElement);a=Intl.NumberFormat(i,t).format(e)}return a}function I(e,t){let a=!1;if(t!==void 0){let i=typeof t=="string"?t.trim():t,s=e.trim();typeof t=="string"?a=i===s||i===b&&s==="":a=i.includes(s)}return a}function S(e){let t;switch(e){case"trailing":t=-200;break;case"leading":t=20;break;default:t=0;break}return t}function w(e){return e===void 0||Number.isNaN(e.r)||Number.isNaN(e.g)||Number.isNaN(e.b)?null:e}var P=e=>{["e","E"].includes(e.key)&&e.preventDefault()},W=e=>{if(e.pickListElement!==void 0){let t=e.pickListElement.selectedItems;e.eventEmitter.emit({contentKind:e.contentKind,value:t.map(a=>a.value)})}};function C(e){let t="solid";switch(e){case u.Dash:t="dashed";break;case u.Dot:t="dotted";break;case u.Solid:default:t="solid";break}return t}function U(e,t){let a=document.createElement("a");a.style.display="none",a.download=t,a.setAttribute("href",e),a.click(),a.remove(),URL.revokeObjectURL(e)}function H(e){return e!=null&&(e.style.removeProperty("opacity"),e.remove()),null}function R(e){let t=!p(e?.config),a=e.xTemporalBinning?.unit,i=e.yTemporalBinning?.unit,s;return t&&a!==void 0&&i!==void 0&&(a===o.HourOfDay&&i===o.DayOfWeek?s=f.WeekByDayOfWeekAndHourOfDay:a===o.DayOfMonth&&i===o.MonthOfYear&&(s=f.YearByMonthAndDayOfMonth)),s}return{a:L,b:h,c:T,d:x,e:A,f:F,g:E,h:O,i:M,j:B,k:I,l:S,m:w,n:P,o:W,p:C,q:U,r:H,s:R}},a)
|