@arcgis/charts-components 5.2.0-next.147 → 5.2.0-next.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{GZAROP4P.js → 257PEDYJ.js} +1 -1
- package/dist/cdn/{IPPQ6AYM.js → 25NUJ5YH.js} +1 -1
- package/dist/cdn/{QGC2DLQ4.js → 3E7JBKUK.js} +1 -1
- package/dist/cdn/{AKG64YBZ.js → 4I2I5IVQ.js} +1 -1
- package/dist/cdn/{3RI6PWDI.js → 4P7L6R6R.js} +1 -1
- package/dist/cdn/{4XK5YE6C.js → 4QXXXWA6.js} +1 -1
- package/dist/cdn/{ZGGFAHQL.js → 5FHRHVMR.js} +1 -1
- package/dist/cdn/{3BRUUROM.js → 5KS2PX57.js} +1 -1
- package/dist/cdn/{FIFXR6OH.js → 5TXHUDP4.js} +1 -1
- package/dist/cdn/{HDUMEWQL.js → 5U44JITQ.js} +1 -1
- package/dist/cdn/{TRTVGVQR.js → 6IOXNE24.js} +1 -1
- package/dist/cdn/{6JSWJHZB.js → 6IYV7IV4.js} +1 -1
- package/dist/cdn/{FM6AHBVU.js → 6OLJQWVE.js} +1 -1
- package/dist/cdn/{MVVC6PKQ.js → 72UQY733.js} +1 -1
- package/dist/cdn/{QFFPKVJF.js → 73GS7B7G.js} +1 -1
- package/dist/cdn/7Q7ES4BZ.js +2 -0
- package/dist/cdn/{Z73I4R5C.js → 7TMJU2RX.js} +1 -1
- package/dist/cdn/{INYPNEFZ.js → ACXDPMZD.js} +1 -1
- package/dist/cdn/{K5H4XE7T.js → AGKYRKW5.js} +1 -1
- package/dist/cdn/{QN2JEZ5D.js → AKOQC2SC.js} +1 -1
- package/dist/cdn/{KUGVL62E.js → B2LCOSXO.js} +1 -1
- package/dist/cdn/{46LRKKNP.js → BH2DGNXG.js} +1 -1
- package/dist/cdn/{GBL2FACR.js → BTDPI3AR.js} +1 -1
- package/dist/cdn/{AQOVEDUP.js → E2IXXH5R.js} +1 -1
- package/dist/cdn/{M7PFJOW7.js → F7VQ6K7S.js} +1 -1
- package/dist/cdn/{MVXG6N2M.js → FAFM7HRN.js} +1 -1
- package/dist/cdn/{HRZK3GLD.js → G63T5MU4.js} +1 -1
- package/dist/cdn/{7IJMKD5M.js → GHAC6H6F.js} +1 -1
- package/dist/cdn/{UUXIIGCK.js → GJUNAKKB.js} +1 -1
- package/dist/cdn/{YB4ZDSSI.js → GQ5T4JIV.js} +1 -1
- package/dist/cdn/H4HQBS46.js +4 -0
- package/dist/cdn/{TQS3LLJX.js → HL3H6U7M.js} +1 -1
- package/dist/cdn/IIYJJRMN.js +2 -0
- package/dist/cdn/{YIYP2ECR.js → IRYTXVTM.js} +1 -1
- package/dist/cdn/{65I7BUS4.js → ITTVEYZH.js} +1 -1
- package/dist/cdn/{N3YF4TVT.js → IVUICF2P.js} +1 -1
- package/dist/cdn/{E66QO3GL.js → JASVY2S5.js} +1 -1
- package/dist/cdn/{YUOEB6DF.js → JIANMLCP.js} +1 -1
- package/dist/cdn/{4VSBIIP2.js → JX7NTVFL.js} +1 -1
- package/dist/cdn/{JMYVXU4O.js → KJFL57RE.js} +1 -1
- package/dist/cdn/{MTAGYPDJ.js → LBMIXS7P.js} +1 -1
- package/dist/cdn/{EU5EYFH2.js → LJ3IPYWK.js} +1 -1
- package/dist/cdn/{VZ64E76N.js → M3EQKFST.js} +1 -1
- package/dist/cdn/{P5RPGI3P.js → MCY2C5IV.js} +1 -1
- package/dist/cdn/{4752WHSR.js → MMPVO6UX.js} +13 -13
- package/dist/cdn/{7DWJIEIJ.js → MOSYGTYS.js} +1 -1
- package/dist/cdn/{CZVLHPR7.js → MSFQI34M.js} +1 -1
- package/dist/cdn/{PNVMXN36.js → NDBNHEEZ.js} +1 -1
- package/dist/cdn/{BOGEJ7J7.js → NVPRRSLO.js} +1 -1
- package/dist/cdn/{C3XMGCU5.js → OKB4GB4J.js} +1 -1
- package/dist/cdn/{ZUYZHJTU.js → OPLY5TWI.js} +1 -1
- package/dist/cdn/{FGNSVA6W.js → PFAQRCVD.js} +1 -1
- package/dist/cdn/{IMSN4JMC.js → PFIVTH6Z.js} +1 -1
- package/dist/cdn/{S2PIPJCQ.js → QAN2SQN2.js} +1 -1
- package/dist/cdn/{7PW4JAXI.js → QBP5QHM5.js} +1 -1
- package/dist/cdn/{2GE65C6S.js → QGHGUVWE.js} +1 -1
- package/dist/cdn/{PU63PVCT.js → QJJRZHVE.js} +1 -1
- package/dist/cdn/{3JVIX4TL.js → QYMY2RNU.js} +1 -1
- package/dist/cdn/{JWGHSOOD.js → R2R6S5K6.js} +1 -1
- package/dist/cdn/{I2FZ2KUR.js → SDMBKMSY.js} +1 -1
- package/dist/cdn/{B3V4VZYM.js → SHG5B5EO.js} +1 -1
- package/dist/cdn/{OOFDTNBW.js → SKN5OMXV.js} +1 -1
- package/dist/cdn/{V32BIR37.js → SLH66QHH.js} +1 -1
- package/dist/cdn/{C2GHXSU5.js → TLCAHGNK.js} +1 -1
- package/dist/cdn/{5JERAZSG.js → TQW7WM4O.js} +1 -1
- package/dist/cdn/{SHQXINAI.js → TRI6WAGM.js} +1 -1
- package/dist/cdn/{BKABNAQM.js → UK2ILVTG.js} +1 -1
- package/dist/cdn/{5PTMLDOB.js → VCKFHB4U.js} +1 -1
- package/dist/cdn/{KMMYG2QX.js → VRVLAPPS.js} +1 -1
- package/dist/cdn/{D3Z4NVKQ.js → VSRAB3LY.js} +1 -1
- package/dist/cdn/{N2DHNIDT.js → VVHVHDWG.js} +1 -1
- package/dist/cdn/W2XIAHGG.js +2 -0
- package/dist/cdn/{7ZDSUAN6.js → WQQUCFW5.js} +1 -1
- package/dist/cdn/{7MBF4226.js → WZIPMTG5.js} +1 -1
- package/dist/cdn/{BDUTHXO4.js → XKKO432P.js} +1 -1
- package/dist/cdn/{KVHAU3R7.js → XOZZXRKR.js} +1 -1
- package/dist/cdn/{4BM25G3S.js → XWYYPCI6.js} +1 -1
- package/dist/cdn/YOAS5HJU.js +2 -0
- package/dist/cdn/{YM5SNR26.js → YR2QJZ5S.js} +1 -1
- package/dist/cdn/{HMHWVIF2.js → YRHDWCLS.js} +1 -1
- package/dist/cdn/{WK4FA5IO.js → ZP2Y7KD7.js} +1 -1
- package/dist/cdn/{CEZ2VRFW.js → ZUMDTFHS.js} +1 -1
- package/dist/cdn/{H4GILMDJ.js → ZY2X4X6T.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/box-plot-data.js +68 -67
- package/dist/chunks/box-plot-model.js +4 -1
- package/dist/chunks/index.js +955 -943
- package/dist/chunks/pie-chart-model.js +9 -6
- package/dist/chunks/serial-chart-data.js +283 -282
- package/dist/chunks/serial-chart-model.js +4 -1
- package/dist/components/arcgis-chart/customElement.js +1292 -1291
- package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +54 -52
- package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +105 -103
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/model/box-plot-model/box-plot-model.d.ts +6 -2
- package/dist/model/pie-chart-model/pie-chart-model.d.ts +6 -2
- package/dist/model/serial-chart-model/serial-chart-model.d.ts +6 -2
- package/dist/utils/data/categorical-data/index.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cdn/2CZEJ5DR.js +0 -2
- package/dist/cdn/EEN4U5XM.js +0 -2
- package/dist/cdn/EYEWINUB.js +0 -4
- package/dist/cdn/VPADWNW7.js +0 -2
- package/dist/cdn/YOUVPC2K.js +0 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as w } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as I } from "lit/directives/keyed.js";
|
|
4
|
-
import { isEqual as
|
|
5
|
-
import { repeat as
|
|
6
|
-
import { B as a, a as
|
|
7
|
-
import { d as
|
|
8
|
-
import { b as
|
|
4
|
+
import { isEqual as B } from "es-toolkit/compat";
|
|
5
|
+
import { repeat as E } from "lit/directives/repeat.js";
|
|
6
|
+
import { B as a, a as b } from "../../chunks/interfaces.js";
|
|
7
|
+
import { d as u, a as d, r as O, b as P } from "../../chunks/store.js";
|
|
8
|
+
import { b as S } from "../../chunks/chart-ui-utils.js";
|
|
9
9
|
import { u as F } from "../../chunks/useT9n.js";
|
|
10
10
|
import { css as _, html as n, nothing as N } from "lit";
|
|
11
11
|
import { createRef as c, ref as m } from "lit/directives/ref.js";
|
|
12
|
-
import { LitElement as U, createEvent as
|
|
13
|
-
import { u as
|
|
12
|
+
import { LitElement as U, createEvent as C, safeClassMap as l, renderElement as V } from "@arcgis/lumina";
|
|
13
|
+
import { u as A, c5 as M, B as $, c6 as z, C as K, r as L, x, b4 as R, c7 as H } from "../../chunks/index.js";
|
|
14
14
|
import { x as j } from "../../chunks/data.js";
|
|
15
15
|
import { J as q, K as W } from "../../chunks/index2.js";
|
|
16
16
|
import { r as Z } from "../../chunks/popover-ui-utils.js";
|
|
17
|
-
import { d as h, e as
|
|
18
|
-
import { S as
|
|
17
|
+
import { d as h, e as k, a as v, h as f } from "../../chunks/chart-object-literals.js";
|
|
18
|
+
import { S as y } from "../../chunks/common.js";
|
|
19
19
|
const r = {
|
|
20
20
|
label: "label",
|
|
21
21
|
fieldList: "field-list",
|
|
@@ -36,32 +36,26 @@ class J extends U {
|
|
|
36
36
|
const { contentKind: t } = e.detail, i = [...e.detail.value];
|
|
37
37
|
switch (t) {
|
|
38
38
|
case a.aggregation:
|
|
39
|
-
|
|
39
|
+
u(d), this.model.aggregationType = i[0] !== h.NoAggregation ? i[0] : h.NoAggregation;
|
|
40
40
|
break;
|
|
41
41
|
case a.category: {
|
|
42
|
-
|
|
42
|
+
u(d);
|
|
43
43
|
const s = i[0]?.trim() || "";
|
|
44
|
-
|
|
45
|
-
const o = await this.updateCustomSortProps();
|
|
46
|
-
this.model.orderByList = o, this.sortOrderResetCounter += 1;
|
|
47
|
-
}
|
|
44
|
+
this.model.xAxisField = s;
|
|
48
45
|
break;
|
|
49
46
|
}
|
|
50
47
|
case a.numericFields:
|
|
51
|
-
|
|
52
|
-
const s = await this.updateCustomSortProps();
|
|
53
|
-
this.model.orderByList = s, this.sortOrderResetCounter += 1;
|
|
54
|
-
}
|
|
48
|
+
u(d), this.model.numericFields = i, (this.model.numericFields ?? []).length > 0 && this.model.aggregationType === h.Count && this.model.numericFields[0] !== A(this.model.layer).idField && (this.model.aggregationType = h.Sum);
|
|
55
49
|
break;
|
|
56
50
|
case a.splitByField: {
|
|
57
|
-
|
|
51
|
+
u(d);
|
|
58
52
|
const s = i[0]?.trim() || "";
|
|
59
53
|
this.model.splitByField = s, this.model.colorMatch = !0;
|
|
60
54
|
break;
|
|
61
55
|
}
|
|
62
56
|
case a.sortOrder: {
|
|
63
57
|
const s = i[0];
|
|
64
|
-
if (s ===
|
|
58
|
+
if (s === y.customSort) {
|
|
65
59
|
const o = await this.updateCustomSortProps();
|
|
66
60
|
this.model.setDataSortOrder(s, o);
|
|
67
61
|
} else
|
|
@@ -86,9 +80,16 @@ class J extends U {
|
|
|
86
80
|
this.removeBarChartDataPopover(), this.requestUpdate();
|
|
87
81
|
}, this.onModelConfigChange = () => {
|
|
88
82
|
this.requestUpdate();
|
|
83
|
+
}, this.onModelDataChange = async () => {
|
|
84
|
+
if (this.model.getDataSortOrder() === y.customSort) {
|
|
85
|
+
const e = await this.updateCustomSortProps();
|
|
86
|
+
this.model.orderByList = e, this.sortOrderResetCounter += 1;
|
|
87
|
+
} else
|
|
88
|
+
await this.updateCustomSortDisabled();
|
|
89
|
+
this.requestUpdate();
|
|
89
90
|
}, this.popoverClose = (e) => {
|
|
90
91
|
this.barChartPopover === e?.target && this.removeBarChartDataPopover();
|
|
91
|
-
}, this.selectedCustomSortItemId = "", this.sortOrderResetCounter = 0, this.layerFieldsInfo = [], this.open = !1, this.arcgisChartsConfigBarChartDataNumericFieldValidate =
|
|
92
|
+
}, this.selectedCustomSortItemId = "", this.sortOrderResetCounter = 0, this.layerFieldsInfo = [], this.open = !1, this.arcgisChartsConfigBarChartDataNumericFieldValidate = C(), this.arcgisChartsConfigCustomizedTimeInterval = C(), this.arcgisChartsConfigDataChangeError = C(), this.arcgisChartsConfigResetTimeInterval = C();
|
|
92
93
|
}
|
|
93
94
|
static {
|
|
94
95
|
this.properties = { selectedCustomSortItemId: 16, aggregationLabel: 16, timeAggregationLabel: 16, disableSplitBy: 16, sortOrderResetCounter: 16, messageOverrides: 0, model: 0, layerFieldsInfo: 0, open: 5 };
|
|
@@ -97,18 +98,18 @@ class J extends U {
|
|
|
97
98
|
this.styles = G;
|
|
98
99
|
}
|
|
99
100
|
load() {
|
|
100
|
-
this.modelChange(this.model), this.onModelConfigChange(), this.
|
|
101
|
+
this.modelChange(this.model), this.onModelConfigChange(), this.updateCustomSortProps();
|
|
101
102
|
}
|
|
102
103
|
willUpdate(e) {
|
|
103
|
-
e.has("model") && this.modelChange(this.model, e.get("model")), this.aggregationLabel = q(this.model.aggregationType, this.commonStrings)
|
|
104
|
+
e.has("model") && this.modelChange(this.model, e.get("model")), this.aggregationLabel = q(this.model.aggregationType, this.commonStrings);
|
|
104
105
|
const t = this.model.timeAggregationType;
|
|
105
|
-
t !== void 0 && (this.timeAggregationLabel = W(t, this.commonStrings)), this.disableSplitBy = this.model.numericFields.length > 1 || this.model.xAxisField === "" || this.model.xAxisField ===
|
|
106
|
+
t !== void 0 && (this.timeAggregationLabel = W(t, this.commonStrings)), this.disableSplitBy = this.model.numericFields.length > 1 || this.model.xAxisField === "" || this.model.xAxisField === M;
|
|
106
107
|
}
|
|
107
108
|
disconnectedCallback() {
|
|
108
|
-
super.disconnectedCallback(), this.removeBarChartDataPopover(), this.model.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
109
|
+
super.disconnectedCallback(), this.removeBarChartDataPopover(), this.model.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), this.model.removeEventListener("arcgisChartsModelDataChange", this.onModelDataChange);
|
|
109
110
|
}
|
|
110
111
|
modelChange(e, t) {
|
|
111
|
-
t?.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), e?.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
112
|
+
t?.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), t?.removeEventListener("arcgisChartsModelDataChange", this.onModelDataChange), e?.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), e?.addEventListener("arcgisChartsModelDataChange", this.onModelDataChange);
|
|
112
113
|
}
|
|
113
114
|
onCalciteListOrderChange(e) {
|
|
114
115
|
if (e.detail !== null && e.detail !== void 0) {
|
|
@@ -131,7 +132,7 @@ class J extends U {
|
|
|
131
132
|
const { id: t } = e.target;
|
|
132
133
|
let i = this.model.orderByList.length;
|
|
133
134
|
const s = this.model.orderByList.indexOf(this.selectedCustomSortItemId);
|
|
134
|
-
t ===
|
|
135
|
+
t === b.Up ? i = s - 1 : t === b.Down && (i = s + 1), s >= 0 && i >= 0 && i < this.model.orderByList.length && (this.model.moveCustomSortValuesInOrderByList(s, i), this.sortOrderResetCounter += 1);
|
|
135
136
|
}
|
|
136
137
|
onEnableTimeBinningChange(e) {
|
|
137
138
|
const t = e.target.checked;
|
|
@@ -144,8 +145,8 @@ class J extends U {
|
|
|
144
145
|
this.popoverClose(e), this.model.resetTimeInterval !== void 0 && (this.model.resetTimeInterval(), this.arcgisChartsConfigResetTimeInterval.emit());
|
|
145
146
|
}
|
|
146
147
|
buildCustomSortListItems() {
|
|
147
|
-
return
|
|
148
|
-
const i =
|
|
148
|
+
return E(this.model.orderByList, (t) => t, (t) => {
|
|
149
|
+
const i = z(this.layerFieldsInfo, t), o = this.model.nullCategory !== void 0 && t.trim() === K.nullCategory?.text?.trim();
|
|
149
150
|
return n`<calcite-list-item id=${t ?? N} .label=${t} .closed=${o} .description=${i} .value=${t} .selected=${this.selectedCustomSortItemId === t} @calciteListItemSelect=${this.onCustomSortItemSelected} @calciteListItemSortHandleBeforeOpen=${this.onCustomSortItemSortHandleBeforeOpen}><calcite-icon slot=content-end></calcite-icon></calcite-list-item>`;
|
|
150
151
|
});
|
|
151
152
|
}
|
|
@@ -169,10 +170,7 @@ class J extends U {
|
|
|
169
170
|
}
|
|
170
171
|
async onRemoveNumericField(e) {
|
|
171
172
|
const t = e.target.value;
|
|
172
|
-
|
|
173
|
-
const i = await this.updateCustomSortProps();
|
|
174
|
-
this.model.orderByList = i, this.sortOrderResetCounter += 1;
|
|
175
|
-
}
|
|
173
|
+
u(d), this.model.numericFields = this.model.numericFields.filter((i) => i !== t);
|
|
176
174
|
}
|
|
177
175
|
onIntervalAlignmentSelect(e) {
|
|
178
176
|
this.intervalAlignmentElement.value && !this.intervalAlignmentElement.value.disabled && (this.contentKind = a.intervalAlignment, this.setupPopover(e));
|
|
@@ -198,19 +196,23 @@ class J extends U {
|
|
|
198
196
|
async updateCustomSortProps() {
|
|
199
197
|
const e = await this.model.getCustomSortValues();
|
|
200
198
|
this.originalCustomSortLabels = [...e];
|
|
201
|
-
const t = e.length >
|
|
202
|
-
return t && (this.sortOrderElement.value && (this.sortOrderElement.value.label = this._messages.xAxisAsc), this.model.setDataSortOrder(
|
|
199
|
+
const t = e.length > S.customSortLimit;
|
|
200
|
+
return t && (this.sortOrderElement.value && (this.sortOrderElement.value.label = this._messages.xAxisAsc), this.model.setDataSortOrder(y.xAxisAsc)), this.isCustomSortDisabled = t, e;
|
|
201
|
+
}
|
|
202
|
+
async updateCustomSortDisabled() {
|
|
203
|
+
const e = await this.model.getCustomSortValues(S.customSortLimit + 1);
|
|
204
|
+
this.isCustomSortDisabled = e.length > S.customSortLimit;
|
|
203
205
|
}
|
|
204
206
|
setupPopover(e) {
|
|
205
207
|
e.stopImmediatePropagation(), this.removeBarChartDataPopover();
|
|
206
208
|
const t = {
|
|
207
209
|
size: this.model.temporalBinningSize ?? 1,
|
|
208
|
-
unit: this.model.temporalBinningUnit ??
|
|
210
|
+
unit: this.model.temporalBinningUnit ?? k.Second
|
|
209
211
|
};
|
|
210
|
-
let i, s, o,
|
|
212
|
+
let i, s, o, g = !1, p = !1;
|
|
211
213
|
switch (this.contentKind) {
|
|
212
214
|
case a.aggregation:
|
|
213
|
-
i = this.aggregationElement.value, s = this._messages.aggregationHeader,
|
|
215
|
+
i = this.aggregationElement.value, s = this._messages.aggregationHeader, g = L(this.model.config.series ?? []) === x.BarAndLineFromFields, o = this.model.aggregationType;
|
|
214
216
|
break;
|
|
215
217
|
case a.category:
|
|
216
218
|
i = this.categoryElement.value, s = this._messages.categoryHeader, o = this.model.xAxisField;
|
|
@@ -222,7 +224,7 @@ class J extends U {
|
|
|
222
224
|
i = this.splitByFieldElement.value, s = this._messages.splitByFieldHeader, o = this.model.splitByField;
|
|
223
225
|
break;
|
|
224
226
|
case a.sortOrder:
|
|
225
|
-
i = this.sortOrderElement.value, s = this._messages.sortOrderHeader, o = this.model.getDataSortOrder(),
|
|
227
|
+
i = this.sortOrderElement.value, s = this._messages.sortOrderHeader, o = this.model.getDataSortOrder(), p = this.isCustomSortDisabled;
|
|
226
228
|
break;
|
|
227
229
|
case a.interval:
|
|
228
230
|
i = this.intervalElement.value, s = this._messages.editInterval, o = t;
|
|
@@ -231,7 +233,7 @@ class J extends U {
|
|
|
231
233
|
i = this.intervalAlignmentElement.value, s = this._messages.intervalAlignment, o = this.model.timeAggregationType ?? "";
|
|
232
234
|
break;
|
|
233
235
|
}
|
|
234
|
-
this.barChartPopover = V(n`<arcgis-charts-config-bar-chart-popover .headingTitle=${s} .referenceElement=${i} open .contentKind=${this.contentKind} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${o} .isCustomSortDisabled=${
|
|
236
|
+
this.barChartPopover = V(n`<arcgis-charts-config-bar-chart-popover .headingTitle=${s} .referenceElement=${i} open .contentKind=${this.contentKind} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${o} .isCustomSortDisabled=${p} .isNoAggregationDisabled=${g} @arcgisChartsConfigBarChartDataPopoverChange=${this.onBarChartDataChange} @arcgisChartsConfigPopoverClose=${this.popoverClose}></arcgis-charts-config-bar-chart-popover>`), !document.body.contains(this.barChartPopover) && this.barChartPopover !== null && document.body.appendChild(this.barChartPopover);
|
|
235
237
|
}
|
|
236
238
|
removeBarChartDataPopover() {
|
|
237
239
|
this.barChartPopover !== null && (this.barChartPopover.open = !1, this.barChartPopover = Z(this.barChartPopover));
|
|
@@ -247,7 +249,7 @@ class J extends U {
|
|
|
247
249
|
}
|
|
248
250
|
shouldShowTimeBinning() {
|
|
249
251
|
const e = this.layerFieldsInfo.find((i) => i.name === this.model.xAxisField), t = this.model.aggregationType !== h.NoAggregation;
|
|
250
|
-
return e !== void 0 &&
|
|
252
|
+
return e !== void 0 && R(e) && t;
|
|
251
253
|
}
|
|
252
254
|
renderSorting() {
|
|
253
255
|
return n`<arcgis-charts-config-field-picker .disabled=${this.model.getAxisValueFormat(0)?.type === v.DateAxisFormat} .label=${this.model.getAxisValueFormat(0)?.type === v.DateAxisFormat ? this._messages.xAxisAsc : this._messages[this.model.getDataSortOrder()]} @click=${this.onSortOrderSelect} ${m(this.sortOrderElement)}></arcgis-charts-config-field-picker>`;
|
|
@@ -264,38 +266,38 @@ class J extends U {
|
|
|
264
266
|
return n`<arcgis-charts-config-field-picker .label=${e} .disabled=${this.disableSplitBy} @click=${this.onSplitBySelect} ${m(this.splitByFieldElement)}></arcgis-charts-config-field-picker>`;
|
|
265
267
|
}
|
|
266
268
|
renderNumericFields(e) {
|
|
267
|
-
const t =
|
|
269
|
+
const t = A(this.model.layer).idField, i = [];
|
|
268
270
|
for (const s of e)
|
|
269
271
|
s !== t && i.push(this.buildNumericFieldItem(s));
|
|
270
272
|
return n`<calcite-list label class=${l(r.fieldList)} ${m(this.numericFieldsElement)}>${i}</calcite-list>`;
|
|
271
273
|
}
|
|
272
274
|
renderCustomSortUI() {
|
|
273
275
|
const e = this.model.getDataSortOrder(), t = this.model.getAxisValueFormat(0)?.type, i = this.model.orderByList.indexOf(this.selectedCustomSortItemId);
|
|
274
|
-
return t === v.CategoryAxisFormat && e ===
|
|
276
|
+
return t === v.CategoryAxisFormat && e === y.customSort && !this.isCustomSortDisabled ? n`<calcite-label class=${l(r.label)}><div class=${l(r.customSortButtons)}><div><calcite-button appearance=transparent .disabled=${i === 0 || i === -1 || this.selectedCustomSortItemId.trim() === ""} icon-start=arrow-bold-up id=${b.Up} kind=neutral scale=s @click=${this.onCustomSortItemMoved}></calcite-button><calcite-button appearance=transparent .disabled=${i === -1 || i === this.model.orderByList.length - 1 || this.selectedCustomSortItemId.trim() === ""} icon-start=arrow-bold-down id=${b.Down} kind=neutral scale=s @click=${this.onCustomSortItemMoved}></calcite-button></div><calcite-button @click=${this.resetToOriginalCustomSortLabels} .disabled=${B(this.model.orderByList, this.originalCustomSortLabels)} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button></div>${L(this.model.config.series ?? []) === x.BarAndLineFromFields ? this._messages.values : this._messages.category}${this.buildCustomSortList()}</calcite-label>` : null;
|
|
275
277
|
}
|
|
276
278
|
renderInterval() {
|
|
277
|
-
const e = (this.model.temporalBinningSize ?? 0) <= 0, t = this.model.temporalBinningSize ?? "", i = H(this.model.temporalBinningUnit ??
|
|
279
|
+
const e = (this.model.temporalBinningSize ?? 0) <= 0, t = this.model.temporalBinningSize ?? "", i = H(this.model.temporalBinningUnit ?? k.Second, this._messages) ?? "", s = P(d), o = {
|
|
278
280
|
size: this.model.temporalBinningSize,
|
|
279
281
|
unit: this.model.temporalBinningUnit
|
|
280
|
-
},
|
|
282
|
+
}, g = B(o, s);
|
|
281
283
|
return [
|
|
282
284
|
n`<calcite-list label selection-appearance=border class=${l(r.intervalContainer)}><calcite-list-item .value=${e ? "" : `${t} ${i}`} .label=${e ? "" : `${t} ${i}`} @click=${e ? () => {
|
|
283
285
|
} : this.onIntervalSelect} ${m(this.intervalElement)}><calcite-icon slot=content-end icon=pencil></calcite-icon></calcite-list-item></calcite-list>`,
|
|
284
|
-
n`<div class=${l(r.linkContainer)}><calcite-button .disabled=${
|
|
286
|
+
n`<div class=${l(r.linkContainer)}><calcite-button .disabled=${g} appearance=transparent scale=s icon-end=reset @click=${this.resetTimeIntervalOriginal}>${this._messages.reset}</calcite-button></div>`
|
|
285
287
|
];
|
|
286
288
|
}
|
|
287
289
|
renderIntervalAlignment() {
|
|
288
290
|
return n`<arcgis-charts-config-field-picker .label=${this.timeAggregationLabel} @click=${this.onIntervalAlignmentSelect} ${m(this.intervalAlignmentElement)}></arcgis-charts-config-field-picker>`;
|
|
289
291
|
}
|
|
290
292
|
renderEmptyBins() {
|
|
291
|
-
return n`<calcite-radio-button-group name=empty-bins layout=vertical @calciteRadioButtonGroupChange=${this.onNullPolicyChange}><calcite-label layout=inline><calcite-radio-button .value=${
|
|
293
|
+
return n`<calcite-radio-button-group name=empty-bins layout=vertical @calciteRadioButtonGroupChange=${this.onNullPolicyChange}><calcite-label layout=inline><calcite-radio-button .value=${f.Zero} .checked=${this.model.nullPolicy === f.Zero}></calcite-radio-button>${this._messages.treatAsZero}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${f.Null} .checked=${this.model.nullPolicy === f.Null}></calcite-radio-button>${this._messages.treatAsNull}</calcite-label></calcite-radio-button-group>`;
|
|
292
294
|
}
|
|
293
295
|
render() {
|
|
294
|
-
const e = this.renderAggregation(), t = this.renderCategory(), i = this.renderSplitBy(), s = this.renderSorting(), o = this.renderNumericFields([...this.model.numericFields ?? []]),
|
|
295
|
-
return n`<calcite-label class=${l(r.label)}>${this._messages.category}${t}</calcite-label><calcite-label class=${l(r.label)}>${this._messages.aggregation}${e}</calcite-label><calcite-label class=${l(r.label)}>${this._messages.numericFields}${o}</calcite-label><div class=${l(r.fab)}><calcite-fab appearance=outline-fill kind=neutral scale=m .label=${this._messages.selectNumericFields} text-enabled .text=${this._messages.selectNumericFields} icon=plus @click=${this.onAddNumericFields}></calcite-fab></div><calcite-label class=${l(r.label)}><span class=${l(this.disableSplitBy ? r.dimText : "")}>${this._messages.splitBy}</span>${i}</calcite-label><div .hidden=${!this.shouldShowTimeBinning()}><h3 class=${l(r.timeBinningHeader)}>${this._messages.timeBinningOptions}</h3><calcite-label class=${l(r.label)} layout=inline-space-between>${this._messages.enableTemporalBinning}<calcite-switch .checked=${this.model.binTemporalData} @calciteSwitchChange=${this.onEnableTimeBinningChange} ${m(this.enableTimeBinningSwitch)}></calcite-switch></calcite-label><div .hidden=${!this.model.binTemporalData || !this.shouldShowTimeBinning()}><calcite-label class=${l(r.label)}>${this._messages.interval}${
|
|
296
|
+
const e = this.renderAggregation(), t = this.renderCategory(), i = this.renderSplitBy(), s = this.renderSorting(), o = this.renderNumericFields([...this.model.numericFields ?? []]), g = this.renderCustomSortUI(), p = this.renderInterval(), T = this.renderIntervalAlignment(), D = this.renderEmptyBins();
|
|
297
|
+
return n`<calcite-label class=${l(r.label)}>${this._messages.category}${t}</calcite-label><calcite-label class=${l(r.label)}>${this._messages.aggregation}${e}</calcite-label><calcite-label class=${l(r.label)}>${this._messages.numericFields}${o}</calcite-label><div class=${l(r.fab)}><calcite-fab appearance=outline-fill kind=neutral scale=m .label=${this._messages.selectNumericFields} text-enabled .text=${this._messages.selectNumericFields} icon=plus @click=${this.onAddNumericFields}></calcite-fab></div><calcite-label class=${l(r.label)}><span class=${l(this.disableSplitBy ? r.dimText : "")}>${this._messages.splitBy}</span>${i}</calcite-label><div .hidden=${!this.shouldShowTimeBinning()}><h3 class=${l(r.timeBinningHeader)}>${this._messages.timeBinningOptions}</h3><calcite-label class=${l(r.label)} layout=inline-space-between>${this._messages.enableTemporalBinning}<calcite-switch .checked=${this.model.binTemporalData} @calciteSwitchChange=${this.onEnableTimeBinningChange} ${m(this.enableTimeBinningSwitch)}></calcite-switch></calcite-label><div .hidden=${!this.model.binTemporalData || !this.shouldShowTimeBinning()}><calcite-label class=${l(r.label)}>${this._messages.interval}${p}</calcite-label><calcite-label class=${l(r.label)}>${this._messages.intervalAlignment}${T}</calcite-label><calcite-label class=${l(r.label)} layout=inline-space-between>${this._messages.trimIncompleteInterval}<calcite-switch .checked=${this.model.trimIncompleteTimeInterval} @calciteSwitchChange=${this.onTrimIncompleteIntervalChange}></calcite-switch></calcite-label>${this.model.aggregationType !== h.Count ? n`<calcite-label class=${l(r.label)}>${this._messages.emptyBins}${D}</calcite-label>` : null}</div></div><calcite-label class=${l(r.label)} layout=inline-space-between>${this._messages.treatNullAsCategory}<calcite-switch .checked=${this.model.fetchNULLValues} @calciteSwitchChange=${this.onTreatNullAsCategoryChange}></calcite-switch></calcite-label><calcite-label class=${l(r.label)} layout=inline-space-between>${this._messages.showDataLabels}<calcite-switch .checked=${this.model.dataLabelsVisibility} @calciteSwitchChange=${this.onShowDataLabelsChange}></calcite-switch></calcite-label><calcite-label class=${l(this.model.getAxisValueFormat(0)?.type === v.DateAxisFormat ? r.disabledLabel : r.label)}>${this._messages.sortOrder}${s}</calcite-label>${g}`;
|
|
296
298
|
}
|
|
297
299
|
}
|
|
298
|
-
|
|
300
|
+
w("arcgis-charts-config-bar-chart-data", J);
|
|
299
301
|
export {
|
|
300
302
|
J as ArcgisChartsConfigBarChartData
|
|
301
303
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as b } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as f } from "lit/directives/keyed.js";
|
|
4
|
-
import { isEqual as
|
|
5
|
-
import { repeat as
|
|
6
|
-
import { b as l, a as
|
|
7
|
-
import { d as
|
|
8
|
-
import { b as
|
|
9
|
-
import { u as
|
|
10
|
-
import { css as
|
|
11
|
-
import { createRef as
|
|
12
|
-
import { LitElement as B, createEvent as
|
|
13
|
-
import { x as
|
|
14
|
-
import { B as
|
|
4
|
+
import { isEqual as y } from "es-toolkit/compat";
|
|
5
|
+
import { repeat as S } from "lit/directives/repeat.js";
|
|
6
|
+
import { b as l, a as c } from "../../chunks/interfaces.js";
|
|
7
|
+
import { d as v, a as $ } from "../../chunks/store.js";
|
|
8
|
+
import { b as g } from "../../chunks/chart-ui-utils.js";
|
|
9
|
+
import { u as x } from "../../chunks/useT9n.js";
|
|
10
|
+
import { css as F, nothing as I, html as a } from "lit";
|
|
11
|
+
import { createRef as d, ref as m } from "lit/directives/ref.js";
|
|
12
|
+
import { LitElement as B, createEvent as L, safeClassMap as o, renderElement as P } from "@arcgis/lumina";
|
|
13
|
+
import { x as O } from "../../chunks/data.js";
|
|
14
|
+
import { B as h } from "../../chunks/common.js";
|
|
15
15
|
import { l as u } from "../../chunks/index2.js";
|
|
16
|
-
import { c6 as w, B as
|
|
17
|
-
import { r as
|
|
16
|
+
import { c6 as w, B as p } from "../../chunks/index.js";
|
|
17
|
+
import { r as C } from "../../chunks/popover-ui-utils.js";
|
|
18
18
|
import { a as k } from "../../chunks/chart-object-literals.js";
|
|
19
19
|
const r = {
|
|
20
20
|
label: "label",
|
|
@@ -23,33 +23,34 @@ const r = {
|
|
|
23
23
|
dimText: "dim-text",
|
|
24
24
|
list: "list",
|
|
25
25
|
customSortButtons: "custom-sort-buttons"
|
|
26
|
-
}, D =
|
|
26
|
+
}, D = F`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label,.disabled-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}.field-list{max-height:50vh;overflow-y:auto}.disabled-label{pointer-events:none}.fab{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:1.5rem;justify-content:center}.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);max-height:400px;overflow-y:auto}.custom-sort-buttons{display:flex;justify-content:space-between;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size-0)}`;
|
|
27
27
|
class E extends B {
|
|
28
28
|
constructor() {
|
|
29
|
-
super(...arguments), this._messages =
|
|
29
|
+
super(...arguments), this._messages = x(), this.boxPlotPopover = null, this.categoryElement = d(), this.numericFieldsElement = d(), this.splitByFieldElement = d(), this.sortOrderElement = d(), this.originalCustomSortLabels = [], this.isCustomSortDisabled = !1, this.onModelConfigChange = () => {
|
|
30
30
|
this.requestUpdate();
|
|
31
|
-
}, this.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
}, this.onModelDataChange = async () => {
|
|
32
|
+
if (this.model.getDataSortOrder() === h.customSort) {
|
|
33
|
+
const e = await this.updateCustomSortProps();
|
|
34
|
+
this.model.orderByList = e, this.sortOrderResetCounter += 1;
|
|
35
|
+
} else
|
|
36
|
+
await this.updateCustomSortDisabled();
|
|
37
|
+
this.requestUpdate();
|
|
38
|
+
}, this.popoverClose = (e) => {
|
|
39
|
+
this.boxPlotPopover === e?.target && (this.boxPlotPopover = C(this.boxPlotPopover));
|
|
40
|
+
}, this.onBoxPlotDataChange = async (e) => {
|
|
34
41
|
try {
|
|
35
|
-
if (
|
|
36
|
-
const { contentKind:
|
|
37
|
-
switch (
|
|
42
|
+
if (e.detail !== null && e.detail?.value !== void 0) {
|
|
43
|
+
const { contentKind: t } = e.detail, s = [...e.detail.value];
|
|
44
|
+
switch (v($), t) {
|
|
38
45
|
case l.category: {
|
|
39
46
|
const i = s[0]?.trim() || u;
|
|
40
|
-
|
|
41
|
-
const n = await this.updateCustomSortProps();
|
|
42
|
-
this.model.orderByList = n, this.sortOrderResetCounter += 1;
|
|
43
|
-
}
|
|
47
|
+
this.model.category = i;
|
|
44
48
|
break;
|
|
45
49
|
}
|
|
46
50
|
case l.numericFields: {
|
|
47
51
|
this.model.numericFields = s;
|
|
48
52
|
const i = s.length > 1;
|
|
49
|
-
|
|
50
|
-
const n = await this.updateCustomSortProps();
|
|
51
|
-
this.model.orderByList = n, this.sortOrderResetCounter += 1;
|
|
52
|
-
}
|
|
53
|
+
this.model.standardizeValues = i;
|
|
53
54
|
break;
|
|
54
55
|
}
|
|
55
56
|
case l.splitByField: {
|
|
@@ -60,7 +61,7 @@ class E extends B {
|
|
|
60
61
|
case l.sortOrder:
|
|
61
62
|
{
|
|
62
63
|
const i = s[0];
|
|
63
|
-
if (i ===
|
|
64
|
+
if (i === h.customSort) {
|
|
64
65
|
const n = await this.updateCustomSortProps();
|
|
65
66
|
this.model.setDataSortOrder(i, n);
|
|
66
67
|
} else
|
|
@@ -72,11 +73,11 @@ class E extends B {
|
|
|
72
73
|
break;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
} catch (
|
|
76
|
-
throw
|
|
76
|
+
} catch (t) {
|
|
77
|
+
throw t instanceof Error && this.arcgisChartsConfigDataChangeError.emit({ error: t, model: this.model }), t;
|
|
77
78
|
}
|
|
78
79
|
this.requestUpdate();
|
|
79
|
-
}, this.selectedCustomSortItemId = "", this.sortOrderResetCounter = 0, this.layerFieldsInfo = [], this.arcgisChartsConfigDataChangeError =
|
|
80
|
+
}, this.selectedCustomSortItemId = "", this.sortOrderResetCounter = 0, this.layerFieldsInfo = [], this.arcgisChartsConfigDataChangeError = L();
|
|
80
81
|
}
|
|
81
82
|
static {
|
|
82
83
|
this.properties = { selectedCustomSortItemId: 16, sortOrderResetCounter: 16, messageOverrides: 0, model: 0, layerFieldsInfo: 0 };
|
|
@@ -85,134 +86,135 @@ class E extends B {
|
|
|
85
86
|
this.styles = D;
|
|
86
87
|
}
|
|
87
88
|
load() {
|
|
88
|
-
this.modelChange(this.model), this.onModelConfigChange(), this.
|
|
89
|
+
this.modelChange(this.model), this.onModelConfigChange(), this.updateCustomSortProps();
|
|
89
90
|
}
|
|
90
|
-
willUpdate(
|
|
91
|
-
|
|
91
|
+
willUpdate(e) {
|
|
92
|
+
e.has("model") && this.modelChange(this.model, e.get("model")), this.disableSplitBy = this.model.numericFields.length === 0 || this.model.numericFields.length > 1 && this.model.category !== u;
|
|
92
93
|
}
|
|
93
94
|
disconnectedCallback() {
|
|
94
|
-
super.disconnectedCallback(), this.boxPlotPopover =
|
|
95
|
+
super.disconnectedCallback(), this.boxPlotPopover = C(this.boxPlotPopover), this.model.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), this.model.removeEventListener("arcgisChartsModelDataChange", this.onModelDataChange);
|
|
95
96
|
}
|
|
96
|
-
modelChange(
|
|
97
|
-
|
|
97
|
+
modelChange(e, t) {
|
|
98
|
+
t?.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), t?.removeEventListener("arcgisChartsModelDataChange", this.onModelDataChange), e?.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), e?.addEventListener("arcgisChartsModelDataChange", this.onModelDataChange);
|
|
98
99
|
}
|
|
99
|
-
onCalciteListOrderChange(
|
|
100
|
-
if (
|
|
101
|
-
const { newIndex:
|
|
102
|
-
this.model.moveCustomSortValuesInOrderByList(s ?? 0,
|
|
100
|
+
onCalciteListOrderChange(e) {
|
|
101
|
+
if (e.detail !== null && e.detail !== void 0) {
|
|
102
|
+
const { newIndex: t, oldIndex: s } = e.detail;
|
|
103
|
+
this.model.moveCustomSortValuesInOrderByList(s ?? 0, t ?? s ?? 0);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
onCustomSortItemSelected(
|
|
106
|
-
const { id:
|
|
107
|
-
this.selectedCustomSortItemId = this.selectedCustomSortItemId ===
|
|
106
|
+
onCustomSortItemSelected(e) {
|
|
107
|
+
const { id: t } = e.target;
|
|
108
|
+
this.selectedCustomSortItemId = this.selectedCustomSortItemId === t ? "" : t;
|
|
108
109
|
}
|
|
109
|
-
onCustomSortListClick(
|
|
110
|
-
|
|
110
|
+
onCustomSortListClick(e) {
|
|
111
|
+
e.preventDefault();
|
|
111
112
|
}
|
|
112
|
-
onCustomSortItemMoved(
|
|
113
|
-
const { id:
|
|
113
|
+
onCustomSortItemMoved(e) {
|
|
114
|
+
const { id: t } = e.target;
|
|
114
115
|
let s = this.model.orderByList.length;
|
|
115
116
|
const i = this.model.orderByList.indexOf(this.selectedCustomSortItemId);
|
|
116
|
-
|
|
117
|
+
t === c.Up ? s = i - 1 : t === c.Down && (s = i + 1), i >= 0 && s >= 0 && s < this.model.orderByList.length && this.model.moveCustomSortValuesInOrderByList(i, s);
|
|
117
118
|
}
|
|
118
119
|
buildCustomSortListItems() {
|
|
119
|
-
return
|
|
120
|
-
const s = w(this.layerFieldsInfo,
|
|
121
|
-
return a`<calcite-list-item id=${
|
|
120
|
+
return S(this.model.orderByList, (t) => t, (t) => {
|
|
121
|
+
const s = w(this.layerFieldsInfo, t);
|
|
122
|
+
return a`<calcite-list-item id=${t ?? I} .label=${t ?? ""} .description=${s} .value=${t} .selected=${this.selectedCustomSortItemId === t} @calciteListItemSelect=${this.onCustomSortItemSelected}><calcite-icon slot=content-end></calcite-icon></calcite-list-item>`;
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
buildCustomSortList() {
|
|
125
126
|
return f(this.sortOrderResetCounter, a`<calcite-list label class=${o(r.list)} drag-enabled selection-mode=single selection-appearance=border @click=${this.onCustomSortListClick} @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildCustomSortListItems()}</calcite-list>`);
|
|
126
127
|
}
|
|
127
|
-
buildNumericFieldItem(
|
|
128
|
-
return f(
|
|
128
|
+
buildNumericFieldItem(e) {
|
|
129
|
+
return f(e, a`<calcite-list-item .label=${p(this.layerFieldsInfo, e)} .value=${e} closable @calciteListItemClose=${this.onRemoveNumericField}></calcite-list-item>`);
|
|
129
130
|
}
|
|
130
|
-
onCategorySelect(
|
|
131
|
-
this.categoryElement.value && !this.categoryElement.value.disabled && (this.contentKind = l.category, this.setupPopover(
|
|
131
|
+
onCategorySelect(e) {
|
|
132
|
+
this.categoryElement.value && !this.categoryElement.value.disabled && (this.contentKind = l.category, this.setupPopover(e));
|
|
132
133
|
}
|
|
133
|
-
async onRemoveNumericField(
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const s = await this.updateCustomSortProps();
|
|
137
|
-
this.model.orderByList = s, this.sortOrderResetCounter += 1;
|
|
138
|
-
}
|
|
134
|
+
async onRemoveNumericField(e) {
|
|
135
|
+
const t = e.target.value;
|
|
136
|
+
this.model.numericFields = this.model.numericFields.filter((s) => s !== t), this.model.numericFields.length === 0 && this.model.resetConfig();
|
|
139
137
|
}
|
|
140
138
|
async updateCustomSortProps() {
|
|
141
|
-
const
|
|
142
|
-
this.originalCustomSortLabels = [...
|
|
143
|
-
const
|
|
144
|
-
return
|
|
139
|
+
const e = await this.model.getCustomSortValues();
|
|
140
|
+
this.originalCustomSortLabels = [...e];
|
|
141
|
+
const t = e.length > g.customSortLimit;
|
|
142
|
+
return t && (this.sortOrderElement.value && (this.sortOrderElement.value.label = this._messages.xAxisAsc), this.model.setDataSortOrder(h.xAxisAsc)), this.isCustomSortDisabled = t, e;
|
|
143
|
+
}
|
|
144
|
+
async updateCustomSortDisabled() {
|
|
145
|
+
const e = await this.model.getCustomSortValues(g.customSortLimit + 1);
|
|
146
|
+
this.isCustomSortDisabled = e.length > g.customSortLimit;
|
|
145
147
|
}
|
|
146
|
-
onStandardizeValuesChange(
|
|
147
|
-
this.model.standardizeValues =
|
|
148
|
+
onStandardizeValuesChange(e) {
|
|
149
|
+
this.model.standardizeValues = e.target.checked;
|
|
148
150
|
}
|
|
149
|
-
onShowOutliersChange(
|
|
150
|
-
this.model.showOutliers =
|
|
151
|
+
onShowOutliersChange(e) {
|
|
152
|
+
this.model.showOutliers = e.target.checked;
|
|
151
153
|
}
|
|
152
|
-
onSplitBySelect(
|
|
153
|
-
this.splitByFieldElement.value && !this.splitByFieldElement.value.disabled && (this.contentKind = l.splitByField, this.setupPopover(
|
|
154
|
+
onSplitBySelect(e) {
|
|
155
|
+
this.splitByFieldElement.value && !this.splitByFieldElement.value.disabled && (this.contentKind = l.splitByField, this.setupPopover(e));
|
|
154
156
|
}
|
|
155
|
-
onSortOrderSelect(
|
|
156
|
-
this.contentKind = l.sortOrder, this.setupPopover(
|
|
157
|
+
onSortOrderSelect(e) {
|
|
158
|
+
this.contentKind = l.sortOrder, this.setupPopover(e);
|
|
157
159
|
}
|
|
158
|
-
setupPopover(
|
|
159
|
-
|
|
160
|
-
let
|
|
160
|
+
setupPopover(e) {
|
|
161
|
+
e.stopImmediatePropagation(), this.boxPlotPopover = C(this.boxPlotPopover);
|
|
162
|
+
let t, s, i, n = !1;
|
|
161
163
|
switch (this.contentKind) {
|
|
162
164
|
case l.category:
|
|
163
|
-
|
|
165
|
+
t = this.categoryElement.value, s = this._messages.categoryHeader, i = this.model.category === u ? "" : this.model.category;
|
|
164
166
|
break;
|
|
165
167
|
case l.numericFields:
|
|
166
|
-
|
|
168
|
+
t = this.numericFieldsElement.value, s = this._messages.numericFieldsHeader, i = this.model.numericFields;
|
|
167
169
|
break;
|
|
168
170
|
case l.splitByField:
|
|
169
|
-
|
|
171
|
+
t = this.splitByFieldElement.value, s = this._messages.splitByFieldHeader, i = this.model.splitByField;
|
|
170
172
|
break;
|
|
171
173
|
case l.sortOrder:
|
|
172
|
-
|
|
174
|
+
t = this.sortOrderElement.value, s = this._messages.selectSortOrder, i = this.model.getDataSortOrder(), n = this.isCustomSortDisabled;
|
|
173
175
|
break;
|
|
174
176
|
}
|
|
175
|
-
this.boxPlotPopover =
|
|
177
|
+
this.boxPlotPopover = P(a`<arcgis-charts-config-box-plot-popover .headingTitle=${s} .referenceElement=${t} open .contentKind=${this.contentKind} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${i} .isCustomSortDisabled=${n} @arcgisChartsConfigBoxPlotDataPopoverChange=${this.onBoxPlotDataChange} @arcgisChartsConfigPopoverClose=${this.popoverClose}></arcgis-charts-config-box-plot-popover>`), !document.body.contains(this.boxPlotPopover) && this.boxPlotPopover !== null && document.body.appendChild(this.boxPlotPopover);
|
|
176
178
|
}
|
|
177
|
-
onAddNumericFields(
|
|
178
|
-
this.contentKind = l.numericFields, this.setupPopover(
|
|
179
|
+
onAddNumericFields(e) {
|
|
180
|
+
this.contentKind = l.numericFields, this.setupPopover(e);
|
|
179
181
|
}
|
|
180
182
|
getCorrectedSplitByValue() {
|
|
181
|
-
return this.model.splitByField?.trim() === "" ? "" :
|
|
183
|
+
return this.model.splitByField?.trim() === "" ? "" : p(this.layerFieldsInfo, this.model.splitByField);
|
|
182
184
|
}
|
|
183
185
|
getCorrectedCategoryValue() {
|
|
184
|
-
return
|
|
186
|
+
return O({
|
|
185
187
|
fieldName: this.model.category,
|
|
186
188
|
fieldList: this.layerFieldsInfo
|
|
187
|
-
}) ? "" :
|
|
189
|
+
}) ? "" : p(this.layerFieldsInfo, this.model.category);
|
|
188
190
|
}
|
|
189
191
|
resetToOriginalCustomSortLabels() {
|
|
190
192
|
this.selectedCustomSortItemId = "", this.model.orderByList = [...this.originalCustomSortLabels], this.sortOrderResetCounter += 1;
|
|
191
193
|
}
|
|
192
194
|
renderCustomSortUI() {
|
|
193
|
-
const
|
|
194
|
-
return
|
|
195
|
+
const e = this.model.getDataSortOrder(), t = this.model.getAxisValueFormat(0)?.type, s = this.model.orderByList.indexOf(this.selectedCustomSortItemId);
|
|
196
|
+
return t === k.CategoryAxisFormat && e === h.customSort && !this.isCustomSortDisabled ? a`<calcite-label class=${o(r.label)}><div class=${o(r.customSortButtons)}><div><calcite-button appearance=transparent .disabled=${s === 0 || s === -1 || this.selectedCustomSortItemId.trim() === ""} icon-start=arrow-bold-up id=${c.Up} kind=neutral scale=s @click=${this.onCustomSortItemMoved}></calcite-button><calcite-button appearance=transparent .disabled=${s === -1 || s === this.model.orderByList.length - 1 || this.selectedCustomSortItemId.trim() === ""} icon-start=arrow-bold-down id=${c.Down} kind=neutral scale=s @click=${this.onCustomSortItemMoved}></calcite-button></div><calcite-button @click=${this.resetToOriginalCustomSortLabels} .disabled=${y(this.model.orderByList, this.originalCustomSortLabels)} appearance=transparent icon-end=reset>${this._messages.reset}</calcite-button></div>${this.model.category === u ? this._messages.values : this._messages.category}${this.buildCustomSortList()}</calcite-label>` : null;
|
|
195
197
|
}
|
|
196
|
-
renderNumericFields(
|
|
197
|
-
const
|
|
198
|
-
for (const s of
|
|
199
|
-
|
|
200
|
-
return a`<calcite-list label class=${o(r.fieldList)} ${
|
|
198
|
+
renderNumericFields(e) {
|
|
199
|
+
const t = [];
|
|
200
|
+
for (const s of e)
|
|
201
|
+
t.push(this.buildNumericFieldItem(s));
|
|
202
|
+
return a`<calcite-list label class=${o(r.fieldList)} ${m(this.numericFieldsElement)}>${t}</calcite-list>`;
|
|
201
203
|
}
|
|
202
204
|
renderCategory() {
|
|
203
|
-
const
|
|
204
|
-
return a`<arcgis-charts-config-field-picker .label=${
|
|
205
|
+
const e = this.getCorrectedCategoryValue(), t = this.model.numericFields.length === 0 || (this.model.numericFields ?? []).length > 1 && this.model.splitByField !== "";
|
|
206
|
+
return a`<arcgis-charts-config-field-picker .label=${e} .disabled=${t} @click=${this.onCategorySelect} ${m(this.categoryElement)}></arcgis-charts-config-field-picker>`;
|
|
205
207
|
}
|
|
206
208
|
renderSplitBy() {
|
|
207
|
-
const
|
|
208
|
-
return a`<arcgis-charts-config-field-picker .label=${
|
|
209
|
+
const e = this.getCorrectedSplitByValue();
|
|
210
|
+
return a`<arcgis-charts-config-field-picker .label=${e} .disabled=${this.disableSplitBy} @click=${this.onSplitBySelect} ${m(this.splitByFieldElement)}></arcgis-charts-config-field-picker>`;
|
|
209
211
|
}
|
|
210
212
|
renderSorting() {
|
|
211
|
-
return a`<arcgis-charts-config-field-picker .label=${this._messages[this.model.getDataSortOrder()]} @click=${this.onSortOrderSelect} ${
|
|
213
|
+
return a`<arcgis-charts-config-field-picker .label=${this._messages[this.model.getDataSortOrder()]} @click=${this.onSortOrderSelect} ${m(this.sortOrderElement)}></arcgis-charts-config-field-picker>`;
|
|
212
214
|
}
|
|
213
215
|
render() {
|
|
214
|
-
const
|
|
215
|
-
return a`<calcite-label class=${o(r.label)}>${this._messages.numericFields}${
|
|
216
|
+
const e = this.renderCategory(), t = this.renderNumericFields([...this.model.numericFields ?? []]), s = this.renderSplitBy(), i = this.renderSorting(), n = this.renderCustomSortUI();
|
|
217
|
+
return a`<calcite-label class=${o(r.label)}>${this._messages.numericFields}${t}</calcite-label><div class=${o(r.fab)}><calcite-fab appearance=outline-fill kind=neutral scale=m .label=${this._messages.selectNumericFields} text-enabled .text=${this._messages.selectNumericFields} icon=plus @click=${this.onAddNumericFields}></calcite-fab></div><calcite-label class=${o(r.label)}><div>${this._messages.category} <span class=${o(r.dimText)}>(${this._messages.optional})</span></div>${e}</calcite-label><calcite-label class=${o(r.label)}><div class=${o(this.disableSplitBy ? r.dimText : "")}>${this._messages.splitBy} <span class=${o(r.dimText)}>(${this._messages.optional})</span></div>${s}</calcite-label><div>${(this.model.numericFields ?? []).length > 1 ? a`<calcite-label class=${o(r.label)} layout=inline-space-between>${this._messages.standardizeValues}<calcite-switch .checked=${this.model.standardizeValues} @calciteSwitchChange=${this.onStandardizeValuesChange}></calcite-switch></calcite-label>` : null}</div><calcite-label class=${o(r.label)} layout=inline-space-between>${this._messages.showOutliers}<calcite-switch .checked=${this.model.showOutliers} @calciteSwitchChange=${this.onShowOutliersChange}></calcite-switch></calcite-label><calcite-label class=${o(r.label)}>${this._messages.sortOrder}${i}</calcite-label>${n}`;
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
b("arcgis-charts-config-box-plot-data", E);
|