@arcgis/charts-components 5.1.0-next.0 → 5.1.0-next.1
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/{I4JPIKWZ.js → 2FVGG2EI.js} +1 -1
- package/dist/cdn/{Z3ATQCGU.js → 2TSZGBRW.js} +1 -1
- package/dist/cdn/{N7QH3COK.js → 3DSUDPMW.js} +1 -1
- package/dist/cdn/{4OI742MI.js → 3H63O632.js} +1 -1
- package/dist/cdn/{VPF4DANX.js → 3VYTY4CH.js} +1 -1
- package/dist/cdn/{F7EELFJY.js → 46NT4YQ5.js} +1 -1
- package/dist/cdn/{4SDMBWIH.js → 4NQ4FOPA.js} +1 -1
- package/dist/cdn/{GUN4GTO3.js → 4ONBF7EX.js} +1 -1
- package/dist/cdn/4XC2ZKSZ.js +2 -0
- package/dist/cdn/527DICLD.js +2 -0
- package/dist/cdn/{6AMFQCS7.js → 54S7WK2Q.js} +1 -1
- package/dist/cdn/{IMMCY2GO.js → 5F7P2IRB.js} +1 -1
- package/dist/cdn/{I45WQ4BL.js → 5GIBJIKZ.js} +1 -1
- package/dist/cdn/{YBWIUGMX.js → 5RFEFP2G.js} +1 -1
- package/dist/cdn/{VLDV4SLC.js → 6HU6FAC6.js} +1 -1
- package/dist/cdn/{H2ZHJTT5.js → 6MUSVNGM.js} +1 -1
- package/dist/cdn/{B227HROY.js → 6WQPKBUS.js} +1 -1
- package/dist/cdn/734N3Q42.js +2 -0
- package/dist/cdn/{5UWCB534.js → 7GVHJYQ4.js} +1 -1
- package/dist/cdn/{RREICBPO.js → 7J7IYWG7.js} +19 -19
- package/dist/cdn/{PGRROSLP.js → 7OIBIDJX.js} +1 -1
- package/dist/cdn/{MFY2WNGC.js → 7SSRNOEZ.js} +1 -1
- package/dist/cdn/A43B7S7N.js +2 -0
- package/dist/cdn/{YFQBIEH6.js → AT5TLS5G.js} +1 -1
- package/dist/cdn/B6AQ5E4L.js +2 -0
- package/dist/cdn/{GB3TK5D3.js → BJPCRXMJ.js} +1 -1
- package/dist/cdn/BUTXND3Y.js +2 -0
- package/dist/cdn/{2BIDUUM3.js → BW44TT3O.js} +1 -1
- package/dist/cdn/{UPWTKME3.js → CKOTQVMD.js} +1 -1
- package/dist/cdn/{TCKWKRVQ.js → CLZB5JAL.js} +1 -1
- package/dist/cdn/{MAYX7C4V.js → D5EFLFGK.js} +1 -1
- package/dist/cdn/DFSUGOC2.js +2 -0
- package/dist/cdn/{7XB4DP2Y.js → DGBFUPHF.js} +1 -1
- package/dist/cdn/DGTF5KBL.js +2 -0
- package/dist/cdn/{7TA3GQ2P.js → DLWGXLTP.js} +1 -1
- package/dist/cdn/{VQGWUSUK.js → EGTQDORP.js} +1 -1
- package/dist/cdn/{RBLN6H3R.js → ESHE4EJO.js} +1 -1
- package/dist/cdn/{XVD4CGMV.js → EVWSDR7F.js} +1 -1
- package/dist/cdn/{YP55GB27.js → F7YBMSC7.js} +1 -1
- package/dist/cdn/{C3QBGU3R.js → FVHKQX4O.js} +1 -1
- package/dist/cdn/{ZMTNSPCX.js → G2EFW5BS.js} +1 -1
- package/dist/cdn/{ACIPSEQP.js → GS4YJSDV.js} +1 -1
- package/dist/cdn/{UVEAGNF2.js → GTMWPA5J.js} +1 -1
- package/dist/cdn/{XAWIW6KZ.js → GU6JH3VZ.js} +3 -3
- package/dist/cdn/{JYAZY7C6.js → GWYSKUDT.js} +1 -1
- package/dist/cdn/{T6J2NNJR.js → HAJ2VWEU.js} +1 -1
- package/dist/cdn/{GV3FPWSE.js → HI6AE5XG.js} +1 -1
- package/dist/cdn/IHPHZSVH.js +2 -0
- package/dist/cdn/{OKE67HPM.js → ITVP53KT.js} +1 -1
- package/dist/cdn/JDUDNQNC.js +2 -0
- package/dist/cdn/{NZKAMZX6.js → JLC5Q7Y2.js} +1 -1
- package/dist/cdn/{CSMPPQK6.js → JQFKP5BO.js} +1 -1
- package/dist/cdn/{4YGTK6R4.js → KBCK3TOS.js} +1 -1
- package/dist/cdn/{OBF3ZYVJ.js → KKUG22EI.js} +1 -1
- package/dist/cdn/{AE43AFN2.js → KZ7WEJMS.js} +1 -1
- package/dist/cdn/LA5QA6QE.js +2 -0
- package/dist/cdn/{7OIBV6LX.js → M6U6FZYV.js} +1 -1
- package/dist/cdn/{5SBX2OSZ.js → NO66QM4U.js} +1 -1
- package/dist/cdn/{YHXUQR6R.js → NP2HK66D.js} +1 -1
- package/dist/cdn/{ITMPO5LO.js → NRBBCJMI.js} +1 -1
- package/dist/cdn/ODSBX4UB.js +2 -0
- package/dist/cdn/{Z5OGHBTB.js → OFNVRKLL.js} +1 -1
- package/dist/cdn/{OLGKBPS4.js → OH623XHQ.js} +1 -1
- package/dist/cdn/OOYDYFQL.js +2 -0
- package/dist/cdn/{VCDTXXBB.js → PQQQPD6E.js} +1 -1
- package/dist/cdn/{N5LXTC5F.js → QBDBBEMO.js} +1 -1
- package/dist/cdn/{RESJUXIH.js → QES24ZNV.js} +1 -1
- package/dist/cdn/QGBDD3VP.js +2 -0
- package/dist/cdn/{FGQCHT3Y.js → QITSU7UB.js} +1 -1
- package/dist/cdn/{XPATRR6S.js → R65NAU4T.js} +1 -1
- package/dist/cdn/{CGRJSESJ.js → R6PSD7B7.js} +1 -1
- package/dist/cdn/{CF4MUKBD.js → RBW7HCYN.js} +1 -1
- package/dist/cdn/{E4Z7JPW7.js → RHEU3VW6.js} +1 -1
- package/dist/cdn/ROJ67ATL.js +2 -0
- package/dist/cdn/{E2XSIMND.js → RVDUQNQH.js} +1 -1
- package/dist/cdn/{ILN66JCQ.js → S6IN2PJK.js} +1 -1
- package/dist/cdn/{UR4SN4J4.js → SBBG2LAI.js} +1 -1
- package/dist/cdn/{3KIKTBU4.js → SM5V7JW4.js} +1 -1
- package/dist/cdn/{SGOQQYBY.js → SPAXIJWK.js} +1 -1
- package/dist/cdn/{UKLAAPT4.js → STULUM25.js} +1 -1
- package/dist/cdn/{L7BKIZJN.js → UJ3X5GAK.js} +1 -1
- package/dist/cdn/{EOT7WEOM.js → UUYAX5P7.js} +1 -1
- package/dist/cdn/{NKTG3HYP.js → VCBEQAWJ.js} +1 -1
- package/dist/cdn/{INA4MWOS.js → VFC4KZRP.js} +1 -1
- package/dist/cdn/{DSCSQG33.js → VMAJ5W4A.js} +1 -1
- package/dist/cdn/{7HHTWL5X.js → W32EPRL3.js} +1 -1
- package/dist/cdn/{JEOHGL3P.js → W7THVT7Z.js} +1 -1
- package/dist/cdn/WHQ6EWYY.js +2 -0
- package/dist/cdn/{WZJQSJPK.js → XINBF3UQ.js} +1 -1
- package/dist/cdn/{V3NRWE2B.js → XRYZYAL4.js} +1 -1
- package/dist/cdn/{UNGIAYCA.js → XYKNQZFD.js} +1 -1
- package/dist/cdn/{CCBSYUDL.js → Y3U6VC3K.js} +1 -1
- package/dist/cdn/{O3LWVBLQ.js → YBSBFAGE.js} +1 -1
- package/dist/cdn/{A2TYB4C2.js → YQC2FUWM.js} +1 -1
- package/dist/cdn/{7F454N3C.js → Z4B2NHJI.js} +2 -2
- package/dist/cdn/{TW7SDPY6.js → ZTF5EW2C.js} +1 -1
- package/dist/cdn/{HOPCZKQO.js → ZYEUKPGT.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/action-bar-utils.js +9 -8
- package/dist/chunks/box-plot-data.js +1 -1
- package/dist/chunks/chart-ui-utils.js +52 -48
- package/dist/chunks/chart-ui-utils2.js +1 -1
- package/dist/chunks/class-breaks.js +159 -94
- package/dist/chunks/data.js +10 -9
- package/dist/chunks/heat-chart-model.js +83 -66
- package/dist/chunks/index.js +117 -109
- package/dist/chunks/model-setter.js +1 -1
- package/dist/chunks/model-with-guides.js +7 -6
- package/dist/chunks/pie-chart-data.js +1 -1
- package/dist/chunks/radar-chart-model.js +9 -9
- package/dist/chunks/serial-chart-data.js +315 -306
- package/dist/chunks/serial-chart-model.js +4 -4
- package/dist/chunks/web-component-utils.js +32 -32
- package/dist/components/arcgis-chart/customElement.d.ts +1 -1
- package/dist/components/arcgis-chart/customElement.js +845 -842
- package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +1 -0
- package/dist/components/arcgis-charts-config-create-flow/customElement.js +120 -112
- package/dist/components/arcgis-charts-config-guide/customElement.js +1 -0
- package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +111 -101
- package/dist/components/arcgis-charts-config-heat-chart-data/index.js +2 -0
- package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +28 -15
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/model/heat-chart-model/heat-chart-model.d.ts +7 -0
- package/dist/utils/ui/chart-ui-utils.d.ts +6 -3
- package/package.json +4 -4
- package/dist/cdn/BJJLSSQL.js +0 -2
- package/dist/cdn/CSHLYYDR.js +0 -2
- package/dist/cdn/DISBHZRX.js +0 -2
- package/dist/cdn/FGQ6QTNI.js +0 -2
- package/dist/cdn/FIBU5QUG.js +0 -2
- package/dist/cdn/GRFJADFY.js +0 -2
- package/dist/cdn/MMVAIEM3.js +0 -2
- package/dist/cdn/OFZOPSWX.js +0 -2
- package/dist/cdn/OQA4LU5O.js +0 -2
- package/dist/cdn/OX34MEOD.js +0 -2
- package/dist/cdn/T6HUC3X4.js +0 -2
- package/dist/cdn/W2Z3VO3C.js +0 -2
- package/dist/cdn/WI7OSEXJ.js +0 -2
- package/dist/cdn/WQS6NQUO.js +0 -2
- package/dist/cdn/YWRPXNSI.js +0 -2
- package/dist/cdn/ZARMIUOQ.js +0 -2
|
@@ -15,6 +15,7 @@ import "@arcgis/core/time/TimeExtent.js";
|
|
|
15
15
|
import "@arcgis/core/core/promiseUtils.js";
|
|
16
16
|
import "@arcgis/core/request.js";
|
|
17
17
|
import "@arcgis/toolkit/dom";
|
|
18
|
+
import "@arcgis/core/intl.js";
|
|
18
19
|
import { r as U } from "../../chunks/popover-ui-utils.js";
|
|
19
20
|
import { S as d } from "../../chunks/common.js";
|
|
20
21
|
import { repeat as V } from "lit/directives/repeat.js";
|
|
@@ -46,54 +46,54 @@ const m = {
|
|
|
46
46
|
tab: "tab"
|
|
47
47
|
};
|
|
48
48
|
function B(p, e) {
|
|
49
|
-
const
|
|
49
|
+
const a = /* @__PURE__ */ new Set();
|
|
50
50
|
let t = e;
|
|
51
|
-
return p?.forEach((
|
|
52
|
-
const o =
|
|
53
|
-
(
|
|
51
|
+
return p?.forEach((i, s) => {
|
|
52
|
+
const o = i.chartId;
|
|
53
|
+
(a.has(o) || o === void 0 || o === "") && (i.chartId = `Chart_${Date.now()}_${s}`, e === o && (t = i.chartId)), a.add(o);
|
|
54
54
|
}), t;
|
|
55
55
|
}
|
|
56
|
-
function se(p, e,
|
|
57
|
-
return p?.filter((t) => F(
|
|
56
|
+
function se(p, e, a) {
|
|
57
|
+
return p?.filter((t) => F(a, t.config) && t.layer?.id === e) ?? [];
|
|
58
58
|
}
|
|
59
59
|
function re(p) {
|
|
60
|
-
const { modelList: e, layerList:
|
|
60
|
+
const { modelList: e, layerList: a, activeLayerId: t, disableEditing: i } = p, s = /* @__PURE__ */ new Map();
|
|
61
61
|
return e?.forEach((o) => {
|
|
62
62
|
const n = o.layer;
|
|
63
63
|
n && s.set(n.id, n);
|
|
64
|
-
}),
|
|
64
|
+
}), i || a.forEach((o) => s.set(o.id, o)), Array.from(s.values()).filter((o) => !t || o.id === t);
|
|
65
65
|
}
|
|
66
66
|
function oe(p, e) {
|
|
67
|
-
p.forEach((
|
|
67
|
+
p.forEach((a) => {
|
|
68
68
|
e.forEach((t) => {
|
|
69
|
-
|
|
69
|
+
a?.id === t.layer?.id && E(a, t);
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function E(p, e) {
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const t = [...
|
|
74
|
+
const a = p;
|
|
75
|
+
if (a) {
|
|
76
|
+
const t = [...a?.charts ?? []], i = t?.findIndex((o) => o.id === e.chartId);
|
|
77
77
|
let s = !1;
|
|
78
|
-
|
|
78
|
+
i !== void 0 && i > -1 ? (s = !w(t[i], e.config), t[i] = e.config) : a && !D(e.config) && (s = !0, t.push(e.config)), s && (a.charts = t);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
function le(p, e) {
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
const t = [...
|
|
85
|
-
|
|
82
|
+
const a = p;
|
|
83
|
+
if (a) {
|
|
84
|
+
const t = [...a.charts ?? []], i = t.findIndex((s) => s.id === e);
|
|
85
|
+
i > -1 && (t.splice(i, 1), a.charts = t);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
function ne(p, e) {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
let t = [...
|
|
89
|
+
const a = p;
|
|
90
|
+
if (a) {
|
|
91
|
+
let t = [...a.charts ?? []];
|
|
92
92
|
t = k({
|
|
93
93
|
arrayA: t,
|
|
94
|
-
arrayB: e.map((
|
|
95
|
-
getKey: (
|
|
96
|
-
}),
|
|
94
|
+
arrayB: e.map((i) => i.config),
|
|
95
|
+
getKey: (i) => i.id ?? i.title?.content.text ?? ""
|
|
96
|
+
}), a.charts = t;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
const ce = j`:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`;
|
|
@@ -108,28 +108,28 @@ class he extends X {
|
|
|
108
108
|
r.ScatterSeries,
|
|
109
109
|
r.HeatSeries
|
|
110
110
|
], this._messages = P(), this.commonStrings = P({ name: "common", blocking: !0 }), this.chartDataProcessComplete = (e) => {
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
111
|
+
const a = e, { chartData: t, model: i } = a.detail, s = this.getModel(this.selectedChartId);
|
|
112
|
+
if (i?.isSameChartAs(s))
|
|
113
113
|
switch (s?.chartType) {
|
|
114
114
|
case r.HistogramSeries:
|
|
115
|
-
this.chartData = t,
|
|
115
|
+
this.chartData = t, i && (i.dataStore.chartData = t);
|
|
116
116
|
break;
|
|
117
117
|
case r.PieSeries: {
|
|
118
|
-
this.chartData = t,
|
|
118
|
+
this.chartData = t, i && (i.dataStore.chartData = t);
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
121
|
case r.ScatterSeries: {
|
|
122
|
-
const n = t, { dataItems: c, r2:
|
|
123
|
-
let C =
|
|
124
|
-
Number.isFinite(
|
|
122
|
+
const n = t, { dataItems: c, r2: u, aggregated: g } = n;
|
|
123
|
+
let C = u;
|
|
124
|
+
Number.isFinite(u) || (C = void 0), this.r2 = C, _(i) && (i.dataStore.r2 = C, i.dataStore.aggregated = g, g && (i.additionalTooltipField = void 0)), this.calculatedDataMinMaxBounds = this.getDataExtent(c), i && (i.dataStore.calculatedDataMinMaxBounds = this.calculatedDataMinMaxBounds);
|
|
125
125
|
break;
|
|
126
126
|
}
|
|
127
127
|
case r.LineSeries:
|
|
128
128
|
case r.BarSeries: {
|
|
129
129
|
const { dataItems: n, timeIntervalInfo: c } = t;
|
|
130
|
-
if ((S(s) || b(s) && s.binTemporalData) && (c?.size !== void 0 && s.temporalBinningSize !== c?.size && (s.temporalBinningSize = c?.size), c?.unit !== void 0 && s.temporalBinningUnit !== c?.unit && c?.unit !== W.Quarter && (s.temporalBinningUnit = c?.unit), c?.size !== void 0 && c?.unit !== void 0 && Q(x, { size: c.size, unit: c.unit })), this.calculatedDataMinMaxBounds = this.getDataExtent(n),
|
|
131
|
-
const
|
|
132
|
-
|
|
130
|
+
if ((S(s) || b(s) && s.binTemporalData) && (c?.size !== void 0 && s.temporalBinningSize !== c?.size && (s.temporalBinningSize = c?.size), c?.unit !== void 0 && s.temporalBinningUnit !== c?.unit && c?.unit !== W.Quarter && (s.temporalBinningUnit = c?.unit), c?.size !== void 0 && c?.unit !== void 0 && Q(x, { size: c.size, unit: c.unit })), this.calculatedDataMinMaxBounds = this.getDataExtent(n), i && (i.dataStore.calculatedDataMinMaxBounds = this.calculatedDataMinMaxBounds), b(s)) {
|
|
131
|
+
const u = s.xAxisField, g = n.some((A) => A[u] === null), C = s.nullCategory;
|
|
132
|
+
g && C === void 0 && (s.nullCategory = z.nullCategory);
|
|
133
133
|
}
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
@@ -139,7 +139,7 @@ class he extends X {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}, this.chartAxesMinMaxChange = (e) => {
|
|
142
|
-
const
|
|
142
|
+
const a = e, { bounds: t, model: i } = a.detail, s = this.getModel(this.selectedChartId), o = i?.isSameChartAs(s), n = s?.chartType;
|
|
143
143
|
if (o)
|
|
144
144
|
switch (n) {
|
|
145
145
|
case r.BarSeries:
|
|
@@ -147,57 +147,57 @@ class he extends X {
|
|
|
147
147
|
case r.LineSeries:
|
|
148
148
|
case r.HistogramSeries:
|
|
149
149
|
case r.ScatterSeries:
|
|
150
|
-
this.calculatedMinMaxBounds = t,
|
|
150
|
+
this.calculatedMinMaxBounds = t, i && (i.dataStore.calculatedMinMaxBounds = t), this.updateAxesBoundsInAppState(t);
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
}, this.chartSeriesColorChange = (e) => {
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
154
|
+
const a = e, { data: t, model: i } = a.detail, s = this.getModel(this.selectedChartId);
|
|
155
|
+
if (i?.isSameChartAs(s))
|
|
156
156
|
switch (s?.chartType) {
|
|
157
157
|
case r.BarSeries:
|
|
158
158
|
case r.BoxPlotSeries:
|
|
159
159
|
case r.LineSeries:
|
|
160
160
|
case r.HistogramSeries:
|
|
161
|
-
this.seriesColor = t,
|
|
161
|
+
this.seriesColor = t, i && (i.dataStore.seriesColor = t);
|
|
162
162
|
break;
|
|
163
163
|
case r.PieSeries: {
|
|
164
164
|
const n = /* @__PURE__ */ new Map([[0, t]]);
|
|
165
|
-
this.seriesColor = n,
|
|
165
|
+
this.seriesColor = n, i && (i.dataStore.seriesColor = n);
|
|
166
166
|
break;
|
|
167
167
|
}
|
|
168
168
|
case r.ScatterSeries:
|
|
169
169
|
}
|
|
170
170
|
}, this.chartNoRenderPropChange = (e) => {
|
|
171
|
-
const
|
|
171
|
+
const a = e, { propName: t, value: i, model: s } = a.detail, o = this.modelList.find((n) => s?.isSameChartAs(n));
|
|
172
172
|
if (o)
|
|
173
173
|
switch (t) {
|
|
174
174
|
case "rotation":
|
|
175
|
-
typeof
|
|
175
|
+
typeof i == "boolean" && H(o) && (o.rotatedState = i);
|
|
176
176
|
break;
|
|
177
177
|
case "legendPosition":
|
|
178
|
-
typeof
|
|
178
|
+
typeof i == "string" && v(o) && (o.legendPosition = i);
|
|
179
179
|
break;
|
|
180
180
|
case "legendVisibility":
|
|
181
|
-
typeof
|
|
181
|
+
typeof i == "boolean" && v(o) && (o.legendVisibility = i);
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
184
|
}, this.chartLegendItemVisibilityChange = (e) => {
|
|
185
|
-
const
|
|
185
|
+
const a = e, { legendItemVisibility: t, model: i } = a.detail, s = this.modelList.find((o) => i?.isSameChartAs(o));
|
|
186
186
|
s?.setSeriesVisibility(t), T(s) && ((s.getMinBound(1) === null || Number.isNaN(s.getMinBound(1))) && s.setMinBound(null, 1), (s.getMaxBound(1) === null || Number.isNaN(s.getMaxBound(1))) && s.setMaxBound(null, 1), S(s) && ((s.getMinBound(0) === null || Number.isNaN(s.getMinBound(0))) && s.setMinBound(null, 0), (s.getMaxBound(0) === null || Number.isNaN(s.getMaxBound(0))) && s.setMaxBound(null, 0)));
|
|
187
187
|
}, this.onSelectChartTypeChange = (e) => {
|
|
188
188
|
this.currentChartTypeText = "", this.calculatedDataMinMaxBounds = void 0, this.calculatedMinMaxBounds = void 0, this.removeSelectChartTypePopover();
|
|
189
|
-
const { selectedModelType:
|
|
190
|
-
|
|
189
|
+
const { selectedModelType: a, layerId: t } = e.target;
|
|
190
|
+
a !== void 0 && (this.allowChartSyncing = !0, this.arcgisChartsConfigNewChart.emit({
|
|
191
191
|
key: "key",
|
|
192
|
-
chartType:
|
|
192
|
+
chartType: a,
|
|
193
193
|
layerId: t
|
|
194
194
|
}));
|
|
195
195
|
}, this.onAddChartClose = () => {
|
|
196
196
|
this.removeSelectChartTypePopover();
|
|
197
197
|
}, this.onModelConfigChange = (e) => {
|
|
198
198
|
if (this.syncChartsToLayers && this.allowChartSyncing) {
|
|
199
|
-
const
|
|
200
|
-
E(
|
|
199
|
+
const a = e.target;
|
|
200
|
+
E(a?.layer, a);
|
|
201
201
|
}
|
|
202
202
|
this.requestUpdate();
|
|
203
203
|
}, this.allowChartSyncing = !1, this.currentChartTypeText = "", this.modelList = [], this.layerList = [], this.disableEditing = !1, this.syncChartsToLayers = !1, this.panelNumber = 0, this.arcgisChartsConfigChartViewChartClose = y(), this.arcgisChartsConfigModelListChange = y(), this.arcgisChartsConfigNewChart = y(), this.arcgisChartsConfigPanelNumberChange = y(), this.arcgisChartsConfigSelectedChartChange = y(), this.addChartEventListeners(), this.listen("arcgisChartsConfigModelListReorder", this.modelListReorderChangeListener);
|
|
@@ -223,57 +223,65 @@ class he extends X {
|
|
|
223
223
|
super.disconnectedCallback(), this.clearPartialModels(), this.removeSelectChartTypePopover();
|
|
224
224
|
}
|
|
225
225
|
modelListReorderChangeListener(e) {
|
|
226
|
-
const { modelList:
|
|
226
|
+
const { modelList: a } = e.detail;
|
|
227
227
|
if (this.modelList = k({
|
|
228
228
|
arrayA: this.modelList,
|
|
229
|
-
arrayB:
|
|
229
|
+
arrayB: a,
|
|
230
230
|
getKey: (t) => t.chartId ?? t.titleText ?? ""
|
|
231
231
|
}), this.syncChartsToLayers) {
|
|
232
|
-
const t =
|
|
232
|
+
const t = a.find((i) => i.layer?.id !== void 0)?.layer?.id;
|
|
233
233
|
if (t) {
|
|
234
|
-
const
|
|
235
|
-
|
|
234
|
+
const i = this.layerList.find((s) => s.id.toString() === t);
|
|
235
|
+
i && ne(i, a);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
async layerListChange() {
|
|
240
|
-
const e = [],
|
|
241
|
-
let t = [...this.modelList.filter((
|
|
242
|
-
for (let
|
|
243
|
-
if (
|
|
244
|
-
const n = await
|
|
240
|
+
const e = [], a = this.layerList.map((i) => i.id.toString());
|
|
241
|
+
let t = [...this.modelList.filter((i) => a.includes(i.layer?.id ?? ""))];
|
|
242
|
+
for (let i of this.layerList ?? []) {
|
|
243
|
+
if (i.type === "sublayer") {
|
|
244
|
+
const n = await i.createFeatureLayer();
|
|
245
245
|
if (!n)
|
|
246
246
|
continue;
|
|
247
|
-
|
|
247
|
+
i = n;
|
|
248
248
|
}
|
|
249
|
-
const o =
|
|
249
|
+
const o = i.charts;
|
|
250
250
|
for (const n of o ?? []) {
|
|
251
251
|
const c = await U({
|
|
252
|
-
layer:
|
|
252
|
+
layer: i,
|
|
253
253
|
config: n
|
|
254
254
|
});
|
|
255
255
|
c !== void 0 && e.push(c);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
B(e), e.forEach((
|
|
259
|
-
t.find((o) => o.isSameChartAs(
|
|
260
|
-
}), t = t.filter((
|
|
261
|
-
}
|
|
262
|
-
modelListChange(e,
|
|
263
|
-
this.selectedChartId = B(e, this.selectedChartId),
|
|
264
|
-
|
|
265
|
-
}), e.forEach((
|
|
266
|
-
|
|
258
|
+
B(e), e.forEach((i) => {
|
|
259
|
+
t.find((o) => o.isSameChartAs(i)) === void 0 && t.push(i);
|
|
260
|
+
}), t = t.filter((i) => !O(i.config)), this.modelList = t;
|
|
261
|
+
}
|
|
262
|
+
modelListChange(e, a) {
|
|
263
|
+
this.selectedChartId = B(e, this.selectedChartId), a?.forEach((i) => {
|
|
264
|
+
i.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
265
|
+
}), e.forEach((i) => {
|
|
266
|
+
i.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
267
267
|
});
|
|
268
268
|
const t = this.getModel(this.selectedChartId);
|
|
269
|
-
this.currentChartTypeText = t?.chartType !== void 0 ? L(
|
|
269
|
+
this.currentChartTypeText = t?.chartType !== void 0 ? L({
|
|
270
|
+
chartType: t.chartType,
|
|
271
|
+
commonStrings: this.commonStrings,
|
|
272
|
+
config: t.config
|
|
273
|
+
}) : "", this.syncChartsToLayers && this.allowChartSyncing && oe(this.layerList, e), this.arcgisChartsConfigModelListChange.emit({ modelList: e });
|
|
270
274
|
}
|
|
271
275
|
selectedChartIdChange(e) {
|
|
272
276
|
this.selectedChartId === void 0 && (this.panelNumber = 0), this.selectedPanel = l.Data;
|
|
273
|
-
const
|
|
274
|
-
this.setEventBasedPropsFromModelData(
|
|
277
|
+
const a = this.getModel(e);
|
|
278
|
+
this.setEventBasedPropsFromModelData(a), this.currentChartTypeText = a?.chartType !== void 0 ? L({
|
|
279
|
+
chartType: a.chartType,
|
|
280
|
+
commonStrings: this.commonStrings,
|
|
281
|
+
config: a.config
|
|
282
|
+
}) : "", e !== void 0 && e !== x.selectedChartId && (x.selectedChartId = e), this.allowChartSyncing = !0, this.arcgisChartsConfigSelectedChartChange.emit({
|
|
275
283
|
key: "key",
|
|
276
|
-
model:
|
|
284
|
+
model: a
|
|
277
285
|
});
|
|
278
286
|
}
|
|
279
287
|
panelNumberChange(e) {
|
|
@@ -283,13 +291,13 @@ class he extends X {
|
|
|
283
291
|
this.listenOn(document, f.DataProcessComplete, this.chartDataProcessComplete), this.listenOn(document, f.AxesMinMaxChange, this.chartAxesMinMaxChange), this.listenOn(document, f.SeriesColorChange, this.chartSeriesColorChange), this.listenOn(document, f.NoRenderPropChange, this.chartNoRenderPropChange), this.listenOn(document, f.LegendItemVisibilityChange, this.chartLegendItemVisibilityChange);
|
|
284
292
|
}
|
|
285
293
|
getDataExtent(e) {
|
|
286
|
-
const
|
|
294
|
+
const a = this.getModel(this.selectedChartId)?.config;
|
|
287
295
|
let t = [];
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
chartConfig:
|
|
296
|
+
if (a !== void 0 && e !== void 0) {
|
|
297
|
+
const i = R({
|
|
298
|
+
chartConfig: a,
|
|
291
299
|
chartData: e
|
|
292
|
-
}), { minY: s, maxY: o, minX: n, maxX: c } =
|
|
300
|
+
}), { minY: s, maxY: o, minX: n, maxX: c } = i;
|
|
293
301
|
t = [
|
|
294
302
|
{ isXAxis: !0, minimum: n, maximum: c },
|
|
295
303
|
{ isXAxis: !1, minimum: s, maximum: o }
|
|
@@ -298,42 +306,42 @@ class he extends X {
|
|
|
298
306
|
return t;
|
|
299
307
|
}
|
|
300
308
|
updateAxesBoundsInAppState(e) {
|
|
301
|
-
e?.forEach((
|
|
302
|
-
const { isXAxis: t, maximum:
|
|
309
|
+
e?.forEach((a) => {
|
|
310
|
+
const { isXAxis: t, maximum: i, minimum: s } = a, o = this.getModel(this.selectedChartId);
|
|
303
311
|
if (o !== void 0 && T(o) && this.selectedChartId !== void 0) {
|
|
304
312
|
const n = new ae(o, t), c = J({
|
|
305
313
|
chartId: this.selectedChartId,
|
|
306
314
|
isXAxis: t,
|
|
307
315
|
isLogarithmic: n.getLogarithmic()
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
defaultMinBound:
|
|
316
|
+
}), u = x.chartAxesBoundDataMap;
|
|
317
|
+
u[this.selectedChartId] === void 0 && (u[this.selectedChartId] = {});
|
|
318
|
+
const g = u[this.selectedChartId]?.[c], C = {
|
|
319
|
+
defaultMinBound: g?.defaultMinBound === g?.currMinBound ? s : g?.defaultMinBound,
|
|
312
320
|
currMinBound: s,
|
|
313
|
-
defaultMaxBound:
|
|
314
|
-
currMaxBound:
|
|
321
|
+
defaultMaxBound: g?.defaultMaxBound === g?.currMaxBound ? i : g?.defaultMaxBound,
|
|
322
|
+
currMaxBound: i
|
|
315
323
|
};
|
|
316
|
-
!w(
|
|
324
|
+
!w(g, C) && this.selectedChartId !== void 0 && u?.[this.selectedChartId] !== void 0 && (u[this.selectedChartId][c] = C);
|
|
317
325
|
}
|
|
318
326
|
});
|
|
319
327
|
}
|
|
320
328
|
getPlacement() {
|
|
321
329
|
let e;
|
|
322
|
-
return this.popoverPlacement !== void 0 ? e = this.popoverPlacement : e = this.modelList?.filter((
|
|
330
|
+
return this.popoverPlacement !== void 0 ? e = this.popoverPlacement : e = this.modelList?.filter((i) => F(te, i.config)).length <= 2 ? "bottom" : "top", e;
|
|
323
331
|
}
|
|
324
332
|
onBackFlow() {
|
|
325
333
|
this.panelNumber -= 1;
|
|
326
334
|
}
|
|
327
335
|
onAddChartClick(e) {
|
|
328
|
-
const { referenceElement:
|
|
329
|
-
this.setupSelectChartTypePopover(
|
|
336
|
+
const { referenceElement: a, layerId: t } = e.detail;
|
|
337
|
+
this.setupSelectChartTypePopover(a, t);
|
|
330
338
|
}
|
|
331
|
-
setupSelectChartTypePopover(e,
|
|
339
|
+
setupSelectChartTypePopover(e, a) {
|
|
332
340
|
const t = this.getPlacement();
|
|
333
|
-
this.removeSelectChartTypePopover(), this.selectChartTypePopover = I(h`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${
|
|
341
|
+
this.removeSelectChartTypePopover(), this.selectChartTypePopover = I(h`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${a} .popoverPlacement=${t} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`), !document.body.contains(this.selectChartTypePopover) && this.selectChartTypePopover !== null && document.body.appendChild(this.selectChartTypePopover);
|
|
334
342
|
}
|
|
335
343
|
getModel(e) {
|
|
336
|
-
return this.modelList?.find((
|
|
344
|
+
return this.modelList?.find((a) => a.chartId === e);
|
|
337
345
|
}
|
|
338
346
|
removeSelectChartTypePopover() {
|
|
339
347
|
this.selectChartTypePopover !== void 0 && (this.selectChartTypePopover?.remove(), this.selectChartTypePopover = G(this.selectChartTypePopover));
|
|
@@ -342,10 +350,10 @@ class he extends X {
|
|
|
342
350
|
this.modelList = this.modelList.filter((e) => !D(e.config));
|
|
343
351
|
}
|
|
344
352
|
onViewChartDelete(e) {
|
|
345
|
-
const { chartId:
|
|
346
|
-
if (
|
|
347
|
-
const t = this.modelList.find((s) => s.chartId ===
|
|
348
|
-
this.modelList = [...this.modelList.filter((s) => s.chartId !==
|
|
353
|
+
const { chartId: a } = e.detail;
|
|
354
|
+
if (a !== void 0) {
|
|
355
|
+
const t = this.modelList.find((s) => s.chartId === a), i = this.layerList.find((s) => s.id === t?.layer?.id);
|
|
356
|
+
this.modelList = [...this.modelList.filter((s) => s.chartId !== a)], i && this.syncChartsToLayers && this.allowChartSyncing && le(i, a);
|
|
349
357
|
}
|
|
350
358
|
}
|
|
351
359
|
onViewChartsSelect(e) {
|
|
@@ -364,9 +372,9 @@ class he extends X {
|
|
|
364
372
|
this.chartData = e?.dataStore.chartData, this.r2 = e?.dataStore.r2, this.seriesColor = e?.dataStore.seriesColor, this.calculatedMinMaxBounds = e?.dataStore.calculatedMinMaxBounds, this.calculatedDataMinMaxBounds = e?.dataStore.calculatedDataMinMaxBounds;
|
|
365
373
|
}
|
|
366
374
|
createTooltip(e) {
|
|
367
|
-
const
|
|
375
|
+
const a = e.target;
|
|
368
376
|
let t = "";
|
|
369
|
-
switch (
|
|
377
|
+
switch (a.icon) {
|
|
370
378
|
case "configure":
|
|
371
379
|
t = this._messages.data ?? "";
|
|
372
380
|
break;
|
|
@@ -394,7 +402,7 @@ class he extends X {
|
|
|
394
402
|
t = "";
|
|
395
403
|
break;
|
|
396
404
|
}
|
|
397
|
-
this.tooltip = I(h`<calcite-tooltip style=${K({ opacity: 1, zIndex: "var(--calcite-floating-ui-z-index)" })} .referenceElement=${
|
|
405
|
+
this.tooltip = I(h`<calcite-tooltip style=${K({ opacity: 1, zIndex: "var(--calcite-floating-ui-z-index)" })} .referenceElement=${a} open placement=top>${t}</calcite-tooltip>`), document.body.appendChild(this.tooltip);
|
|
398
406
|
}
|
|
399
407
|
destroyTooltip() {
|
|
400
408
|
ie(this.tooltip);
|
|
@@ -406,7 +414,7 @@ class he extends X {
|
|
|
406
414
|
activeLayerId: this.activeLayerId,
|
|
407
415
|
disableEditing: this.disableEditing
|
|
408
416
|
});
|
|
409
|
-
return V(e, (
|
|
417
|
+
return V(e, (a) => a.id, (a) => h`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId !== void 0} .modelList=${se(this.modelList, a.id.toString(), this.supportedChartTypes)} .selectedChartId=${this.selectedChartId ?? ""} .layer=${a} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`);
|
|
410
418
|
}
|
|
411
419
|
render() {
|
|
412
420
|
return this.open !== !1 ? h`<calcite-flow>${$("charts-list", h`<calcite-flow-item .selected=${this.panelNumber === 0 || this.disableEditing} .heading=${this.headerTitle ?? this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${Y(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.renderTabs()}</calcite-flow>` : null;
|
|
@@ -437,30 +445,30 @@ class he extends X {
|
|
|
437
445
|
}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>` : null}${this.renderChartUIComponent()}</calcite-flow-item>`);
|
|
438
446
|
}
|
|
439
447
|
renderChartUIComponent() {
|
|
440
|
-
const e = this.getModel(this.selectedChartId),
|
|
448
|
+
const e = this.getModel(this.selectedChartId), a = e?.layer;
|
|
441
449
|
let t = null;
|
|
442
450
|
if (e !== void 0 && !this.disableEditing)
|
|
443
451
|
switch (e?.chartType) {
|
|
444
452
|
case r.BarSeries:
|
|
445
|
-
t = h`<arcgis-charts-config-bar-chart class=${d(m.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${
|
|
453
|
+
t = h`<arcgis-charts-config-bar-chart class=${d(m.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel ?? l.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;
|
|
446
454
|
break;
|
|
447
455
|
case r.LineSeries:
|
|
448
|
-
t = h`<arcgis-charts-config-line-chart class=${d(m.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${
|
|
456
|
+
t = h`<arcgis-charts-config-line-chart class=${d(m.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel ?? l.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;
|
|
449
457
|
break;
|
|
450
458
|
case r.PieSeries:
|
|
451
|
-
t = h`<arcgis-charts-config-pie-chart class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${
|
|
459
|
+
t = h`<arcgis-charts-config-pie-chart class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .chartData=${this.chartData} .page=${this.selectedPanel ?? l.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;
|
|
452
460
|
break;
|
|
453
461
|
case r.HistogramSeries:
|
|
454
|
-
t = h`<arcgis-charts-config-histogram class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${
|
|
462
|
+
t = h`<arcgis-charts-config-histogram class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel ?? l.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;
|
|
455
463
|
break;
|
|
456
464
|
case r.ScatterSeries:
|
|
457
|
-
t = h`<arcgis-charts-config-scatter-plot class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${
|
|
465
|
+
t = h`<arcgis-charts-config-scatter-plot class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel ?? l.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;
|
|
458
466
|
break;
|
|
459
467
|
case r.BoxPlotSeries:
|
|
460
|
-
t = h`<arcgis-charts-config-box-plot class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${
|
|
468
|
+
t = h`<arcgis-charts-config-box-plot class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel ?? l.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;
|
|
461
469
|
break;
|
|
462
470
|
case r.HeatSeries:
|
|
463
|
-
t = h`<arcgis-charts-config-heat-chart class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .chartData=${this.chartData} .layer=${
|
|
471
|
+
t = h`<arcgis-charts-config-heat-chart class=${d(m.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .chartData=${this.chartData} .layer=${a} .page=${this.selectedPanel ?? l.Data}></arcgis-charts-config-heat-chart>`;
|
|
464
472
|
break;
|
|
465
473
|
}
|
|
466
474
|
return t;
|
|
@@ -17,6 +17,7 @@ import "@arcgis/core/time/TimeExtent.js";
|
|
|
17
17
|
import "@arcgis/core/core/promiseUtils.js";
|
|
18
18
|
import "@arcgis/core/request.js";
|
|
19
19
|
import { c as g, b as O } from "../../chunks/index4.js";
|
|
20
|
+
import "@arcgis/core/intl.js";
|
|
20
21
|
import { r as V } from "../../chunks/popover-ui-utils.js";
|
|
21
22
|
import { m as G, d as W, g as U, h as L, U as S } from "../../chunks/chart-ui-utils2.js";
|
|
22
23
|
import { d as M } from "../../chunks/default.js";
|