@arcgis/charts-components 5.2.0-next.60 → 5.2.0-next.61
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/{JBFVGQSP.js → 46PXO7ZC.js} +1 -1
- package/dist/cdn/{5MPXETTU.js → 4ITNOJXC.js} +1 -1
- package/dist/cdn/{QTSF2LK7.js → 5JXEO4VE.js} +1 -1
- package/dist/cdn/{XM2GVJT3.js → DQXO7PWX.js} +1 -1
- package/dist/cdn/FHBCVW5T.js +2 -0
- package/dist/cdn/{ZLXYBOM3.js → JUON3AJY.js} +1 -1
- package/dist/cdn/LIBE4XVH.js +2 -0
- package/dist/cdn/MI6AKTXQ.js +2 -0
- package/dist/cdn/MPGHOXLW.js +2 -0
- package/dist/cdn/MU6ZYADT.js +2 -0
- package/dist/cdn/ONKEO3Z2.js +2 -0
- package/dist/cdn/{BXBY6D2F.js → OT7PLFBK.js} +1 -1
- package/dist/cdn/PBO5VH6A.js +2 -0
- package/dist/cdn/{6DOANSRL.js → Q5OFF4FE.js} +1 -1
- package/dist/cdn/{5EYVH3PA.js → TQYJM66E.js} +1 -1
- package/dist/cdn/{Z3LGGHZN.js → TU3LYEK3.js} +1 -1
- package/dist/cdn/TVG7KD3H.js +2 -0
- package/dist/cdn/{A36KQ6YP.js → VM4XLVMS.js} +1 -1
- package/dist/cdn/VPYL3RVN.js +2 -0
- package/dist/cdn/WSL76GA5.js +2 -0
- package/dist/cdn/{Y2WHHAAA.js → X3S4M6JL.js} +1 -1
- package/dist/cdn/XV4LD73L.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/bar-chart-model.js +10 -10
- package/dist/chunks/box-plot-data.js +271 -279
- package/dist/chunks/box-plot-model.js +161 -146
- package/dist/chunks/chart-model.js +1 -1
- package/dist/chunks/combo-bar-line-chart-model.js +12 -12
- package/dist/chunks/gauge-model.js +1 -1
- package/dist/chunks/heat-chart-model.js +25 -25
- package/dist/chunks/histogram-model.js +1 -1
- package/dist/chunks/line-chart-model.js +11 -11
- package/dist/chunks/model-with-x-guides.js +5 -5
- package/dist/chunks/model-with-y-guides.js +33 -48
- package/dist/chunks/pie-chart-data.js +165 -189
- package/dist/chunks/pie-chart-model.js +9 -9
- package/dist/chunks/radar-chart-model.js +7 -7
- package/dist/chunks/scatterplot-model.js +1 -1
- package/dist/chunks/serial-chart-data.js +745 -769
- package/dist/chunks/serial-chart-model.js +19 -11
- package/dist/chunks/utils.js +9 -9
- package/dist/chunks/x-bounds.js +1 -1
- package/dist/components/arcgis-chart/customElement.d.ts +53 -11
- package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +67 -68
- package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +5 -5
- 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/model/box-plot-model/box-plot-model.d.ts +7 -1
- package/dist/model/heat-chart-model/heat-chart-model.d.ts +20 -0
- package/dist/model/mixins/model-with-multi-axes.d.ts +61 -98
- package/dist/model/serial-chart-model/serial-chart-model.d.ts +12 -1
- package/package.json +3 -3
- package/dist/cdn/3UHXOKCR.js +0 -2
- package/dist/cdn/6PIQ2O5S.js +0 -2
- package/dist/cdn/7CMQGTU6.js +0 -2
- package/dist/cdn/EBSQRCQQ.js +0 -2
- package/dist/cdn/EDVN42ME.js +0 -2
- package/dist/cdn/H2EMIJME.js +0 -2
- package/dist/cdn/JEVWE6ER.js +0 -2
- package/dist/cdn/O3DJD5IR.js +0 -2
- package/dist/cdn/V5W5LNFT.js +0 -2
- package/dist/cdn/XKZ44LA2.js +0 -2
- package/dist/cdn/YVSZN6IH.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { isEqual as D } from "lodash-es";
|
|
3
|
-
import { q as
|
|
4
|
-
import { bd as
|
|
3
|
+
import { q as b, u, r as h } from "./chart-object-literals.js";
|
|
4
|
+
import { bd as I, bs as v, k as p, ap as M } from "./index2.js";
|
|
5
5
|
import { i as P } from "./index4.js";
|
|
6
6
|
import { C as O } from "./chart-model.js";
|
|
7
7
|
import { m as o } from "./model-setter.js";
|
|
@@ -15,24 +15,24 @@ import { W as ge, c as ce, d as fe } from "./generate-x-axis-title.js";
|
|
|
15
15
|
import { W as he, a as pe } from "./x-bounds.js";
|
|
16
16
|
import { W as me } from "./data-labels-symbol.js";
|
|
17
17
|
import { W as de } from "./rotated-state.js";
|
|
18
|
-
import { g as W, u as ye, s as T,
|
|
18
|
+
import { g as W, u as ye, s as T, h as ue, j as Se, k as _e, f as xe } from "./utils.js";
|
|
19
19
|
import { d as F, e as B, a as Te } from "./data.js";
|
|
20
|
-
import { B as Fe, Z as Be, x as Ce, a4 as Ae, a2 as
|
|
20
|
+
import { B as Fe, Z as Be, x as Ce, a4 as Ae, a2 as be } from "./index.js";
|
|
21
21
|
import { s as L } from "./series-types.js";
|
|
22
22
|
const C = (s, e) => e.series?.[s].assignToSecondValueAxis ?? !1, A = (s) => {
|
|
23
23
|
const { assign: e, seriesIndex: i, config: t, commonStrings: r } = s;
|
|
24
24
|
e && t.axes !== void 0 && !t.axes?.[2] && (t.axes[2] = Ce(r, u.BarSeries)[1]), t.series && t.series.forEach((a, g) => {
|
|
25
25
|
g === i ? a.assignToSecondValueAxis = e : g !== i && a?.assignToSecondValueAxis !== !0 && (a.assignToSecondValueAxis = !1);
|
|
26
26
|
}), t.axes?.[2] && !t.series.some((a) => a.assignToSecondValueAxis) && t.axes.splice(2, 1);
|
|
27
|
-
},
|
|
27
|
+
}, Ie = (s, e) => e.series?.[s]?.name, ve = (s, e, i) => {
|
|
28
28
|
i.series?.[e] && (i.series[e].name = s);
|
|
29
29
|
}, Oe = (s, e) => {
|
|
30
30
|
const i = e.series?.[s];
|
|
31
31
|
let t;
|
|
32
|
-
return
|
|
32
|
+
return I(i) ? t = i.fillSymbol?.color : v(i) && (t = i.lineSymbol?.color), t;
|
|
33
33
|
}, We = (s, e, i) => {
|
|
34
34
|
const t = i.series?.[e];
|
|
35
|
-
t && (
|
|
35
|
+
t && (I(t) ? t.fillSymbol = {
|
|
36
36
|
...Fe(e),
|
|
37
37
|
...t.fillSymbol,
|
|
38
38
|
color: s
|
|
@@ -45,7 +45,7 @@ const C = (s, e) => e.series?.[s].assignToSecondValueAxis ?? !1, A = (s) => {
|
|
|
45
45
|
e.series?.sort(
|
|
46
46
|
(i, t) => s.findIndex((r) => i.id === r) - s.findIndex((r) => t.id === r)
|
|
47
47
|
);
|
|
48
|
-
}, Me = (s) => s.stackedType ??
|
|
48
|
+
}, Me = (s) => s.stackedType ?? b.Side, Pe = (s) => {
|
|
49
49
|
const { newStackedType: e, config: i, layerInfo: t, commonStrings: r } = s;
|
|
50
50
|
if (i.stackedType = e, t !== void 0) {
|
|
51
51
|
const a = W({
|
|
@@ -57,7 +57,7 @@ const C = (s, e) => e.series?.[s].assignToSecondValueAxis ?? !1, A = (s) => {
|
|
|
57
57
|
});
|
|
58
58
|
ye(i, 1, a);
|
|
59
59
|
}
|
|
60
|
-
i.axes?.[1] && (e ===
|
|
60
|
+
i.axes?.[1] && (e === b.Stacked100 ? i.axes[1].valueFormat = Ae() : i.axes[1].valueFormat = be()), T({ config: i, value: null, axisIndex: 1, isMax: !1 }), T({ config: i, value: null, axisIndex: 1, isMax: !0 });
|
|
61
61
|
}, Ve = (s) => {
|
|
62
62
|
const e = {};
|
|
63
63
|
return s.series.forEach((i) => {
|
|
@@ -277,10 +277,18 @@ class n extends O {
|
|
|
277
277
|
}
|
|
278
278
|
/**
|
|
279
279
|
* Updates the series based on the layer filter.
|
|
280
|
+
*
|
|
281
|
+
* @deprecated since 5.2. Use {@link model/serial-chart-model/serial-chart-model#rebuildSeries rebuildSeries} instead.
|
|
280
282
|
*/
|
|
281
283
|
updateSeriesFromLayerFilter() {
|
|
282
284
|
this.layerInfo !== void 0 && m(this.getBuildNewSeriesProps());
|
|
283
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Rebuilds the series based on the current configuration.
|
|
288
|
+
*/
|
|
289
|
+
async rebuildSeries() {
|
|
290
|
+
await this.processSeriesRebuild("rebuildSeries");
|
|
291
|
+
}
|
|
284
292
|
/**
|
|
285
293
|
* Whether temporal binning is enabled for all series in the config.
|
|
286
294
|
*
|
|
@@ -303,7 +311,7 @@ class n extends O {
|
|
|
303
311
|
* @param seriesIndex - The index of the series.
|
|
304
312
|
*/
|
|
305
313
|
getSeriesName(e) {
|
|
306
|
-
return
|
|
314
|
+
return Ie(e, this._config);
|
|
307
315
|
}
|
|
308
316
|
setSeriesName(e, i) {
|
|
309
317
|
ve(e, i, this._config);
|
|
@@ -523,6 +531,6 @@ xe(n, Xe);
|
|
|
523
531
|
export {
|
|
524
532
|
n as S,
|
|
525
533
|
ve as a,
|
|
526
|
-
|
|
534
|
+
Ie as g,
|
|
527
535
|
We as s
|
|
528
536
|
};
|
package/dist/chunks/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ import { substitute as b } from "@arcgis/core/intl.js";
|
|
|
3
3
|
import { w as C, H as j, M as q, T as k, F as M, x as W } from "./index.js";
|
|
4
4
|
import { g as $ } from "./series-types.js";
|
|
5
5
|
import { l as E, d as S, q as U, D as H } from "./index3.js";
|
|
6
|
-
import { bw as K, ap as I, ag as P, h as O,
|
|
6
|
+
import { bw as K, ap as I, ag as P, h as O, cr as L, cs as V, aJ as X, a6 as h } from "./index2.js";
|
|
7
7
|
import { q as R, u as f, r as A, p as G } from "./chart-object-literals.js";
|
|
8
8
|
import { d as T } from "./type-guards.js";
|
|
9
9
|
function se(s, e, i) {
|
|
@@ -102,12 +102,12 @@ async function xe(s) {
|
|
|
102
102
|
};
|
|
103
103
|
let p = "";
|
|
104
104
|
o?.length === 0 ? p = I(i).idField : o && ([p] = o);
|
|
105
|
-
let y = i ? T(i) ? await
|
|
105
|
+
let y = i ? T(i) ? await L({
|
|
106
106
|
layer: i,
|
|
107
107
|
category: e?.series[0].x ?? "",
|
|
108
108
|
splitByField: a
|
|
109
109
|
}) : Array.from(
|
|
110
|
-
(await
|
|
110
|
+
(await V({
|
|
111
111
|
queryObject: i,
|
|
112
112
|
category: e?.series[0].x ?? "",
|
|
113
113
|
splitByField: a,
|
|
@@ -167,7 +167,7 @@ async function Fe(s) {
|
|
|
167
167
|
geometry: i?.dataFilters?.geometry
|
|
168
168
|
};
|
|
169
169
|
let n;
|
|
170
|
-
return T(r) ? n = (await
|
|
170
|
+
return T(r) ? n = (await L({
|
|
171
171
|
layer: r,
|
|
172
172
|
category: t,
|
|
173
173
|
fetchNullValues: u
|
|
@@ -179,7 +179,7 @@ async function Fe(s) {
|
|
|
179
179
|
fieldValue: l
|
|
180
180
|
}) ?? l;
|
|
181
181
|
}) : n = // fetch unique category values asynchronously
|
|
182
|
-
Array.from((await
|
|
182
|
+
Array.from((await V({ queryObject: r, category: t, queryConfig: g, errorStrings: a })).keys()).map(
|
|
183
183
|
(x) => {
|
|
184
184
|
const l = String(x);
|
|
185
185
|
return h({
|
|
@@ -199,12 +199,12 @@ export {
|
|
|
199
199
|
Fe as c,
|
|
200
200
|
ne as d,
|
|
201
201
|
le as e,
|
|
202
|
-
|
|
202
|
+
pe as f,
|
|
203
203
|
ae as g,
|
|
204
|
-
|
|
204
|
+
ye as h,
|
|
205
205
|
Ae as i,
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
me as j,
|
|
207
|
+
xe as k,
|
|
208
208
|
re as l,
|
|
209
209
|
v as m,
|
|
210
210
|
de as n,
|
package/dist/chunks/x-bounds.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ai as S, M as L, T as b, a0 as T } from "./index.js";
|
|
|
8
8
|
import { M as C, bF as M, bE as X } from "./index2.js";
|
|
9
9
|
import { m as a, C as f } from "./model-setter.js";
|
|
10
10
|
import { e as B, f as A } from "./utils2.js";
|
|
11
|
-
import { l as p, s as y,
|
|
11
|
+
import { l as p, s as y, f as O } from "./utils.js";
|
|
12
12
|
const P = (t) => {
|
|
13
13
|
for (const e of t.axes ?? [])
|
|
14
14
|
for (const i of e?.guides ?? [])
|
|
@@ -830,7 +830,8 @@ export abstract class ArcgisChart extends LitElement {
|
|
|
830
830
|
*/
|
|
831
831
|
accessor filterByExtent: boolean;
|
|
832
832
|
/**
|
|
833
|
-
* When `true`,
|
|
833
|
+
* When `true`, the chart uses the current selection as a data filter and renders only selected elements instead of rendering the full dataset with selection styling.
|
|
834
|
+
* Axis bounds, time binning intervals will be computed based on the selected elements only.
|
|
834
835
|
*
|
|
835
836
|
* **Note**: Not applicable to gauges or charts configured with imagery layers.
|
|
836
837
|
*
|
|
@@ -838,7 +839,7 @@ export abstract class ArcgisChart extends LitElement {
|
|
|
838
839
|
*/
|
|
839
840
|
accessor filterBySelection: boolean;
|
|
840
841
|
/**
|
|
841
|
-
* When `true`,
|
|
842
|
+
* When `true`, chart queries are constrained to the current map view extent. The chart refreshes as the view extent changes, and the axis bounds or other derived values are recalculated from the view extent data.
|
|
842
843
|
*
|
|
843
844
|
* @default false
|
|
844
845
|
*/
|
|
@@ -846,12 +847,35 @@ export abstract class ArcgisChart extends LitElement {
|
|
|
846
847
|
/**
|
|
847
848
|
* Callback function used to format the gauge inner label. If the returned string contains HTML tags they will be interpreted as such.
|
|
848
849
|
*
|
|
850
|
+
* @example
|
|
851
|
+
* ```ts
|
|
852
|
+
* // Render a centered custom gauge label with the value formatted to 2 decimal places.
|
|
853
|
+
* chartElement.gaugeInnerLabelFormatter = (value) => {
|
|
854
|
+
* return `<div style="text-align: center;"><u>Custom gauge inner label: </u><br /><b>${Number(value).toFixed(2)}</b></div>`;
|
|
855
|
+
* };
|
|
856
|
+
* ```
|
|
857
|
+
*
|
|
858
|
+
* 
|
|
859
|
+
*
|
|
849
860
|
* **Note**: Applicable to gauges only.
|
|
850
861
|
*/
|
|
851
862
|
accessor gaugeInnerLabelFormatter: GaugeInnerLabelFormatCallback | undefined;
|
|
852
863
|
/**
|
|
853
864
|
* Callback function used to format the axes guides tooltip. If the returned string contains HTML tags they will be interpreted as such.
|
|
854
865
|
*
|
|
866
|
+
* @example
|
|
867
|
+
* ```ts
|
|
868
|
+
* // Render a custom tooltip with the guide's start and end values.
|
|
869
|
+
* chartElement.guideTooltipFormatter = (guide) => {
|
|
870
|
+
* return `
|
|
871
|
+
* <u>Custom guide tooltip</u><br />
|
|
872
|
+
* Range: <b>${guide.start} - ${guide.end}</b>
|
|
873
|
+
* `;
|
|
874
|
+
* };
|
|
875
|
+
* ```
|
|
876
|
+
*
|
|
877
|
+
* 
|
|
878
|
+
*
|
|
855
879
|
* **Note**: Not applicable to pie charts.
|
|
856
880
|
*/
|
|
857
881
|
accessor guideTooltipFormatter: GuideTooltipFormatCallback | undefined;
|
|
@@ -915,18 +939,18 @@ export abstract class ArcgisChart extends LitElement {
|
|
|
915
939
|
*/
|
|
916
940
|
accessor ignoreSmoothRenderingLimit: boolean;
|
|
917
941
|
/**
|
|
918
|
-
*
|
|
942
|
+
* When `true`, it signals the queries to ignore the view's extent, whether an additional geometry filter is provided or not.
|
|
919
943
|
*
|
|
920
|
-
*
|
|
921
|
-
* geometry passed through the model (`component.model.dataFilters`) or the runtime filters (`component.runtimeDataFilters`).
|
|
944
|
+
* This property will be effective when the component's [view](https://developers.arcgis.com/javascript/latest/references/charts-components/components/arcgis-chart/#view) property is provided or when the [layer](https://developers.arcgis.com/javascript/latest/references/charts-components/components/arcgis-chart/#layer) property is set to [`FeatureLayerView`](/references/core/views/layers/FeatureLayerView/).
|
|
922
945
|
*
|
|
923
|
-
*
|
|
946
|
+
* By default the queries made by the chart will consider the view's extent as the unique geometry filter applicable. This implies ignoring any
|
|
947
|
+
* geometry filters passed through the [model](https://developers.arcgis.com/javascript/latest/references/charts-components/components/arcgis-chart/#model) or the [runtimeDataFilters](https://developers.arcgis.com/javascript/latest/references/charts-components/components/arcgis-chart/#runtimeDataFilters) properties.
|
|
924
948
|
*
|
|
925
949
|
* @default false
|
|
926
950
|
*/
|
|
927
951
|
accessor ignoreViewExtent: boolean;
|
|
928
952
|
/**
|
|
929
|
-
*
|
|
953
|
+
* When `true`, all interactions such as zooming and selection are disabled on the chart. The chart will be rendered in a read-only state.
|
|
930
954
|
*
|
|
931
955
|
* @default false
|
|
932
956
|
*/
|
|
@@ -953,9 +977,10 @@ export abstract class ArcgisChart extends LitElement {
|
|
|
953
977
|
/**
|
|
954
978
|
* Layer item ID associated with the chart to be rendered. Can be used in conjunction with the `chartIndex` property. If `layerItemId` is set without `chartIndex`, the first chart in the layer will be rendered.
|
|
955
979
|
*
|
|
956
|
-
* The layer item ID can be found in the URL of the layer's item page on ArcGIS Online or Enterprise.
|
|
980
|
+
* The layer item ID can be found in the URL of the layer's item page on ArcGIS Online or Enterprise.
|
|
981
|
+
* For example, in the URL `https://www.arcgis.com/home/item.html?id=8871626e970a4f3e9d6113ec63a92f2f`, the layer item ID is `8871626e970a4f3e9d6113ec63a92f2f`.
|
|
957
982
|
*
|
|
958
|
-
* Supported
|
|
983
|
+
* Supported layer types include: [`FeatureLayer`](/references/core/layers/FeatureLayer), [`SubtypeSublayer`](/references/core/layers/support/SubtypeSublayer), [`ImageryLayer`](/references/core/layers/ImageryLayer), [`ImageryTileLayer`](/references/core/layers/ImageryTileLayer) and [`WCSLayer`](/references/core/layers/WCSLayer).
|
|
959
984
|
*
|
|
960
985
|
* @example
|
|
961
986
|
* ```html
|
|
@@ -981,8 +1006,25 @@ export abstract class ArcgisChart extends LitElement {
|
|
|
981
1006
|
*/
|
|
982
1007
|
accessor legendPosition: WebChartLegendPositions | undefined;
|
|
983
1008
|
/**
|
|
984
|
-
*
|
|
985
|
-
*
|
|
1009
|
+
* When the pie chart label contains either a numeric value or a percentage (which can be set through the
|
|
1010
|
+
* [setDisplayNumericValue](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#setDisplayNumericValue) and
|
|
1011
|
+
* [setDisplayPercentage](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#setDisplayPercentage) methods from the pie chart model), this property
|
|
1012
|
+
* can be used to format the numeric value and/or percentage. If the returned string contains HTML tags they will be interpreted as such.
|
|
1013
|
+
*
|
|
1014
|
+
* @example
|
|
1015
|
+
* ```ts
|
|
1016
|
+
* // Set the pie chart model to display both numeric value and percentage.
|
|
1017
|
+
* pieChartModel.setDisplayNumericValue(true);
|
|
1018
|
+
* pieChartModel.setDisplayPercentage(true);
|
|
1019
|
+
*
|
|
1020
|
+
* // Render the numeric value and percentage in bold and italic respectively, with 2 decimal places.
|
|
1021
|
+
* chartElement.legendValueLabelFormatter = (value, percentage) => {
|
|
1022
|
+
* const formatTo2Decimals = (input) => Number(input).toFixed(2);
|
|
1023
|
+
* return `<strong><u>${formatTo2Decimals(value)}</u></strong> (<em>${formatTo2Decimals(percentage)}%</em>)`;
|
|
1024
|
+
* };
|
|
1025
|
+
* ```
|
|
1026
|
+
*
|
|
1027
|
+
* 
|
|
986
1028
|
*
|
|
987
1029
|
* **Note**: Applicable to pie charts only.
|
|
988
1030
|
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as L } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as f } from "lit/directives/keyed.js";
|
|
4
|
-
import { debounce as
|
|
5
|
-
import { b as
|
|
6
|
-
import { u as
|
|
7
|
-
import { css as
|
|
4
|
+
import { debounce as $, isEmpty as E, toNumber as x } from "lodash-es";
|
|
5
|
+
import { b as C, a as N, s as p } from "../../chunks/chart-ui-utils2.js";
|
|
6
|
+
import { u as _ } from "../../chunks/useT9n.js";
|
|
7
|
+
import { css as G, html as d, nothing as z } from "lit";
|
|
8
8
|
import { createRef as m, ref as g } from "lit/directives/ref.js";
|
|
9
|
-
import { LitElement as
|
|
9
|
+
import { LitElement as w, renderElement as S, safeStyleMap as u, safeClassMap as s } from "@arcgis/lumina";
|
|
10
10
|
import { b as h } from "../../chunks/common.js";
|
|
11
11
|
import { aA as I, aB as y } from "../../chunks/index.js";
|
|
12
12
|
import { r as P } from "../../chunks/popover-ui-utils.js";
|
|
13
|
-
import { i as
|
|
13
|
+
import { i as M } from "../../chunks/rest-js-object-literals.js";
|
|
14
14
|
const a = {
|
|
15
15
|
sectionLabel: "section-label",
|
|
16
16
|
label: "label",
|
|
@@ -20,46 +20,50 @@ const a = {
|
|
|
20
20
|
sliderInputContainer: "slider-input-container",
|
|
21
21
|
groupingLabelContainer: "grouping-label-container",
|
|
22
22
|
numberInput: "number-input"
|
|
23
|
-
},
|
|
24
|
-
class
|
|
23
|
+
}, 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{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)}`;
|
|
24
|
+
class D extends w {
|
|
25
25
|
constructor() {
|
|
26
|
-
super(...arguments), this._messages =
|
|
26
|
+
super(...arguments), this._messages = _(), this.slicesPopover = null, this.donutSizeSliderElement = m(), this.groupingThresholdElement = m(), this.groupingThresholdSliderElement = m(), this.labelCharacterLimitElement = m(), this.decimalPlacesElement = m(), this.open = !1, this.onDonutSizeSliderChange = $(() => {
|
|
27
27
|
this.donutSizeSliderElement.value && Number.isInteger(this.donutSizeSliderElement.value?.value) && (this.model.innerRadiusSize = this.donutSizeSliderElement.value.value ?? I);
|
|
28
|
-
},
|
|
28
|
+
}, C.SliderTimer), this.onGroupingThresholdSliderChange = $(() => {
|
|
29
29
|
const e = this.groupingThresholdSliderElement.value?.value;
|
|
30
30
|
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;
|
|
31
|
-
},
|
|
31
|
+
}, C.SliderTimer), this.sliceNameChange = (e) => {
|
|
32
32
|
if (e.detail !== null || e.detail !== void 0) {
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const i = e.detail?.name, l = this.model.slices?.findIndex((r) => r.sliceId === this.selectedSliceId), t = this.model.sliceGrouping;
|
|
34
|
+
l != null && l >= 0 ? this.model.setSliceName(i, l) : t?.sliceId === this.selectedSliceId && t !== void 0 && (this.model.sliceGrouping = {
|
|
35
35
|
...t,
|
|
36
|
-
label:
|
|
36
|
+
label: i
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
}, this.sliceColorChange = (e) => {
|
|
40
40
|
if (e.detail !== null && e.detail !== void 0) {
|
|
41
|
-
const { color:
|
|
42
|
-
|
|
41
|
+
const { color: i } = e.detail, l = this.model.slices?.findIndex((r) => r.sliceId === this.selectedSliceId), t = this.model.sliceGrouping;
|
|
42
|
+
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 = {
|
|
43
43
|
...t,
|
|
44
44
|
fillSymbol: {
|
|
45
45
|
...t.fillSymbol,
|
|
46
|
-
type:
|
|
47
|
-
color:
|
|
46
|
+
type: M.SFS,
|
|
47
|
+
color: i
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}, this.slicesPopoverClose = (e) => {
|
|
52
|
-
const { selectedSliceId:
|
|
53
|
-
|
|
52
|
+
const { selectedSliceId: i } = e.detail;
|
|
53
|
+
i === this.selectedSliceId && (this.selectedSliceId = void 0, this.slicesPopover = P(this.slicesPopover));
|
|
54
54
|
}, this.onModelConfigChange = () => {
|
|
55
55
|
this.requestUpdate();
|
|
56
|
-
}, this.
|
|
56
|
+
}, this.onGroupingThresholdChange = $(() => {
|
|
57
|
+
const e = this.groupingThresholdElement.value?.value ?? "";
|
|
58
|
+
let i = Number.parseInt(e);
|
|
59
|
+
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));
|
|
60
|
+
}, C.DebounceTimer), this.popoverPlacement = "leading";
|
|
57
61
|
}
|
|
58
62
|
static {
|
|
59
63
|
this.properties = { selectedSliceId: 16, messageOverrides: 0, model: 0, popoverPlacement: 1, chartData: 0 };
|
|
60
64
|
}
|
|
61
65
|
static {
|
|
62
|
-
this.styles =
|
|
66
|
+
this.styles = k;
|
|
63
67
|
}
|
|
64
68
|
load() {
|
|
65
69
|
this.modelChange(this.model), this.onModelConfigChange();
|
|
@@ -70,114 +74,109 @@ class k extends z {
|
|
|
70
74
|
disconnectedCallback() {
|
|
71
75
|
super.disconnectedCallback(), this.removeSlicesPopover(), this.model.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
72
76
|
}
|
|
73
|
-
modelChange(e,
|
|
74
|
-
|
|
77
|
+
modelChange(e, i) {
|
|
78
|
+
i?.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), e?.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
75
79
|
}
|
|
76
80
|
selectedSliceIdChange() {
|
|
77
81
|
if (!E(this.selectedSliceId)) {
|
|
78
|
-
const e = this.model.slices,
|
|
79
|
-
let
|
|
80
|
-
if (this.selectedSliceId ===
|
|
81
|
-
|
|
82
|
+
const e = this.model.slices, i = this.model.sliceGrouping;
|
|
83
|
+
let l, t;
|
|
84
|
+
if (this.selectedSliceId === i?.sliceId)
|
|
85
|
+
l = i?.label, t = i?.fillSymbol?.color;
|
|
82
86
|
else if (e !== void 0) {
|
|
83
87
|
const r = e.findIndex((n) => n.sliceId === this.selectedSliceId);
|
|
84
|
-
|
|
88
|
+
l = this.model.getSliceName(r), t = this.model.getSliceColor(r);
|
|
85
89
|
}
|
|
86
|
-
this.slicesPopover = S(d`<arcgis-charts-config-pie-chart-slices-popover .referenceElement=${this.el} .placement=${this.popoverPlacement} .open=${this.open} .selectedSliceId=${this.selectedSliceId} .selectedName=${
|
|
90
|
+
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);
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
removeSlicesPopover() {
|
|
90
94
|
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));
|
|
91
95
|
}
|
|
92
96
|
buildSliceListItem() {
|
|
93
|
-
let e = "#CCCCCC",
|
|
94
|
-
const
|
|
97
|
+
let e = "#CCCCCC", i = "minus-square";
|
|
98
|
+
const l = [];
|
|
95
99
|
let t = this.model.slices;
|
|
96
100
|
const r = this.chartData?.dataItems;
|
|
97
101
|
r && (t = t?.filter((o) => r?.findIndex((c) => c.arcgis_charts_slice_id === o.sliceId) !== -1)), t?.forEach((o) => {
|
|
98
102
|
if (o.fillSymbol?.color !== void 0) {
|
|
99
|
-
|
|
100
|
-
const [c, b, v,
|
|
101
|
-
e = `rgba(${c},${b},${v},${
|
|
103
|
+
i = "square-f";
|
|
104
|
+
const [c, b, v, T] = [...o.fillSymbol.color];
|
|
105
|
+
e = `rgba(${c},${b},${v},${T / 255})`;
|
|
102
106
|
}
|
|
103
107
|
if (o !== void 0 && !this.model.groupedSliceIds.includes(o.sliceId)) {
|
|
104
108
|
let c = o.sliceId;
|
|
105
|
-
c === y.emptySliceId ? c = this._messages.emptySlice ?? "" : c === y.nullSliceId && (c = this._messages.nullSlice ?? ""),
|
|
109
|
+
c === y.emptySliceId ? c = this._messages.emptySlice ?? "" : c === y.nullSliceId && (c = this._messages.nullSlice ?? ""), l?.push(f(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=${u({ color: e })}></calcite-icon></calcite-list-item>`));
|
|
106
110
|
}
|
|
107
111
|
});
|
|
108
112
|
const n = this.model.sliceGrouping;
|
|
109
113
|
if (n?.fillSymbol?.color !== void 0) {
|
|
110
|
-
|
|
114
|
+
i = "square-f";
|
|
111
115
|
const [o, c, b, v] = [...n.fillSymbol.color];
|
|
112
116
|
e = `rgba(${o},${c},${b},${v / 255})`;
|
|
113
117
|
}
|
|
114
|
-
return this.model.groupedSliceIds.length > 0 &&
|
|
118
|
+
return this.model.groupedSliceIds.length > 0 && l?.push(f(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=${u({ color: e })}></calcite-icon></calcite-list-item>`)), l;
|
|
115
119
|
}
|
|
116
120
|
buildGroupedSlicesListItem() {
|
|
117
|
-
let e = "#CCCCCC",
|
|
118
|
-
const
|
|
121
|
+
let e = "#CCCCCC", i = "minus-square";
|
|
122
|
+
const l = [];
|
|
119
123
|
return this.model.slices?.forEach((t) => {
|
|
120
124
|
if (t.fillSymbol?.color !== void 0) {
|
|
121
|
-
|
|
125
|
+
i = "square-f";
|
|
122
126
|
const [r, n, o, c] = [...t.fillSymbol.color];
|
|
123
127
|
e = `rgba(${r},${n},${o},${c / 255})`;
|
|
124
128
|
}
|
|
125
|
-
t !== void 0 && this.model.groupedSliceIds.includes(t.sliceId) &&
|
|
126
|
-
}),
|
|
129
|
+
t !== void 0 && this.model.groupedSliceIds.includes(t.sliceId) && l?.push(f(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=${u({ color: e })}></calcite-icon></calcite-list-item>`));
|
|
130
|
+
}), l;
|
|
127
131
|
}
|
|
128
132
|
buildSliceList() {
|
|
129
|
-
return d`<calcite-list label class=${s(a.sliceList)} selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildSliceListItem()}</calcite-list>`;
|
|
133
|
+
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>`;
|
|
130
134
|
}
|
|
131
135
|
buildGroupedSliceList() {
|
|
132
|
-
return d`<calcite-list label class=${s(a.sliceList)} selection-mode=single selection-appearance=border @calciteListOrderChange=${this.onCalciteListOrderChange}>${this.buildGroupedSlicesListItem()}</calcite-list>`;
|
|
133
|
-
}
|
|
134
|
-
onGroupingThresholdChange(e) {
|
|
135
|
-
const l = e.target.value;
|
|
136
|
-
let i = Number.parseInt(l);
|
|
137
|
-
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));
|
|
136
|
+
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>`;
|
|
138
137
|
}
|
|
139
138
|
onLabelCharacterLimitChange(e) {
|
|
140
|
-
const
|
|
141
|
-
let
|
|
142
|
-
|
|
139
|
+
const i = e.target.value;
|
|
140
|
+
let l = Number.parseInt(i);
|
|
141
|
+
l < 1 && (l = 1), Number.isNaN(l) ? this.model.labelCharacterLimit = null : (this.labelCharacterLimitElement.value && (this.labelCharacterLimitElement.value.value = l.toString()), this.model.labelCharacterLimit = l);
|
|
143
142
|
}
|
|
144
143
|
onDecimalPlacesChange(e) {
|
|
145
|
-
const
|
|
146
|
-
let
|
|
147
|
-
|
|
144
|
+
const i = e.target.value;
|
|
145
|
+
let l = Number.parseInt(i);
|
|
146
|
+
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);
|
|
148
147
|
}
|
|
149
148
|
onDisplayTypeChange(e) {
|
|
150
|
-
const
|
|
151
|
-
this.model.displayType =
|
|
149
|
+
const i = e.target.selectedItem;
|
|
150
|
+
this.model.displayType = i?.value;
|
|
152
151
|
}
|
|
153
152
|
resetSlicesOriginal() {
|
|
154
153
|
this.selectedSliceId = void 0, this.model.colorMatch = !0, this.model.resetSlices();
|
|
155
154
|
}
|
|
156
155
|
onCalciteListOrderChange(e) {
|
|
157
156
|
if (e.detail !== null && e.detail !== void 0) {
|
|
158
|
-
const { newIndex:
|
|
159
|
-
this.model.moveSeries(
|
|
157
|
+
const { newIndex: i, oldIndex: l } = e.detail;
|
|
158
|
+
this.model.moveSeries(l ?? 0, i ?? l ?? 0);
|
|
160
159
|
}
|
|
161
160
|
}
|
|
162
161
|
openSlicesPopover(e) {
|
|
163
162
|
e.stopImmediatePropagation(), this.removeSlicesPopover();
|
|
164
|
-
const
|
|
165
|
-
|
|
163
|
+
const i = e.target, l = i.localName === "calcite-list-item" ? i : i.parentNode;
|
|
164
|
+
l.value === this.model.sliceGrouping?.sliceId ? this.selectedSliceId = this.model.sliceGrouping?.sliceId : this.selectedSliceId = l.value, this.open = !0;
|
|
166
165
|
}
|
|
167
166
|
createTooltip(e) {
|
|
168
|
-
const
|
|
169
|
-
this.tooltip = S(d`<calcite-tooltip style=${u({ opacity: 1, zIndex: "var(--calcite-floating-ui-z-index)" })} .referenceElement=${
|
|
167
|
+
const i = e.currentTarget;
|
|
168
|
+
this.tooltip = S(d`<calcite-tooltip style=${u({ 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);
|
|
170
169
|
}
|
|
171
170
|
destroyTooltip() {
|
|
172
171
|
N(this.tooltip);
|
|
173
172
|
}
|
|
174
173
|
render() {
|
|
175
|
-
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.innerRadiusSize ?? I} @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 @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip}></calcite-icon></div><div class=${s(a.sliderInputContainer)}><calcite-slider min=0 max=50 step=1 snap .value=${x(p(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=${p(this.model.groupingThreshold ?? 0)} @calciteInputInput=${this.onGroupingThresholdChange} @click=${(e) => {
|
|
174
|
+
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.innerRadiusSize ?? I} @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 ?? "" ?? z} @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=50 step=1 snap .value=${x(p(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=${p(this.model.groupingThreshold ?? 0)} @calciteInputInput=${this.onGroupingThresholdChange} @click=${(e) => {
|
|
176
175
|
e.stopPropagation();
|
|
177
176
|
}} ${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=${p(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=${p(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()}`;
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
|
-
|
|
179
|
+
L("arcgis-charts-config-pie-chart-slices", D);
|
|
181
180
|
export {
|
|
182
|
-
|
|
181
|
+
D as ArcgisChartsConfigPieChartSlices
|
|
183
182
|
};
|
|
@@ -3,7 +3,7 @@ import { c as n } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css as p, html as h } from "lit";
|
|
4
4
|
import { u as m } from "../../chunks/useT9n.js";
|
|
5
5
|
import { createRef as d, ref as g } from "lit/directives/ref.js";
|
|
6
|
-
import { LitElement as C, createEvent as
|
|
6
|
+
import { LitElement as C, createEvent as s, safeClassMap as r } from "@arcgis/lumina";
|
|
7
7
|
import { e as v } from "../../chunks/popover-ui-utils.js";
|
|
8
8
|
import { aF as f } from "../../chunks/index.js";
|
|
9
9
|
const c = {
|
|
@@ -11,7 +11,7 @@ const c = {
|
|
|
11
11
|
}, u = p`.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{overflow-y:auto;width:min-content}.panel-children-container{display:flex}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.panel-children-container{padding:0 1rem;margin-top:1rem}`;
|
|
12
12
|
class y extends C {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this._messages = m(), this.popoverElement = d(), this.selectedSliceId = "", this.open = !1, this.arcgisChartsConfigPopoverClose =
|
|
14
|
+
super(...arguments), this._messages = m(), this.popoverElement = d(), this.selectedSliceId = "", this.open = !1, this.arcgisChartsConfigPopoverClose = s(), this.arcgisChartsConfigSlicesPopoverColorChange = s(), this.arcgisChartsConfigSlicesPopoverNameChange = s();
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
17
|
this.properties = { messageOverrides: 0, referenceElement: 0, selectedName: 1, selectedColor: 0, selectedSliceId: 1, placement: 1, open: 5 };
|
|
@@ -35,12 +35,12 @@ class y extends C {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
colorChange(e) {
|
|
38
|
-
const t = e instanceof CustomEvent ? e.detail : e, [
|
|
39
|
-
this.selectedColor = [
|
|
38
|
+
const t = e instanceof CustomEvent ? e.detail : e, [i, o, a] = t, l = f * 255;
|
|
39
|
+
this.selectedColor = [i, o, a, l], this.arcgisChartsConfigSlicesPopoverColorChange.emit({ color: [i, o, a, l] });
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
const e = this.selectedColor !== void 0 ? [...this.selectedColor] : void 0;
|
|
43
|
-
return h`<div><calcite-popover .referenceElement=${this.referenceElement ?? document.body} .placement=${this.placement} @calcitePopoverClose=${this.closePopover} .open=${this.open} label auto-close ${g(this.popoverElement)}><calcite-panel .heading=${this._messages.sliceStyle} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div class=${r(c.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${this.selectedName} @calciteInputInput=${this.sliceNameChange}></calcite-input></calcite-label></div><div class=${r(c.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></calcite-panel></calcite-popover></div>`;
|
|
43
|
+
return h`<div><calcite-popover .referenceElement=${this.referenceElement ?? document.body} .placement=${this.placement} @calcitePopoverClose=${this.closePopover} .open=${this.open} .label=${this._messages.sliceStyle ?? ""} auto-close ${g(this.popoverElement)}><calcite-panel .heading=${this._messages.sliceStyle} closable .closed=${!this.open} @calcitePanelClose=${this.closePopover}><div class=${r(c.panelChildrenContainer)}><calcite-label>${this._messages.label}<calcite-input type=text .value=${this.selectedName} @calciteInputInput=${this.sliceNameChange}></calcite-input></calcite-label></div><div class=${r(c.panelChildrenContainer)}><arcgis-charts-config-colors .heading=${this._messages.symbolColor} .rgba=${e} @arcgisColorSelect=${this.colorChange}></arcgis-charts-config-colors></div></calcite-panel></calcite-popover></div>`;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
n("arcgis-charts-config-pie-chart-slices-popover", y);
|