@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
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { createClassBreaksRenderer as
|
|
4
|
-
import { getSchemes as
|
|
5
|
-
import * as
|
|
6
|
-
import { LitElement as
|
|
7
|
-
import { css as
|
|
8
|
-
import { createRef as
|
|
9
|
-
import { isEqual as F, cloneDeep as
|
|
10
|
-
import { bK as
|
|
11
|
-
import { u as
|
|
12
|
-
import { d as i, W as
|
|
13
|
-
import { H as
|
|
2
|
+
import { c as A } from "../../chunks/runtime.js";
|
|
3
|
+
import { createClassBreaksRenderer as E } from "@arcgis/core/smartMapping/renderers/color.js";
|
|
4
|
+
import { getSchemes as I } from "@arcgis/core/smartMapping/symbology/color.js";
|
|
5
|
+
import * as M from "@arcgis/core/smartMapping/symbology/support/colorRamps.js";
|
|
6
|
+
import { LitElement as P, createEvent as w, renderElement as _, safeClassMap as r, safeStyleMap as v } from "@arcgis/lumina";
|
|
7
|
+
import { css as O, html as n } from "lit";
|
|
8
|
+
import { createRef as p, ref as g } from "lit/directives/ref.js";
|
|
9
|
+
import { isEqual as F, cloneDeep as H, parseInt as L, camelCase as N } from "lodash-es";
|
|
10
|
+
import { bK as U, Z as W, br as V, dl as K, ax as k, cY as $, d7 as q, di as z, ay as C } from "../../chunks/index.js";
|
|
11
|
+
import { u as B } from "../../chunks/useT9n.js";
|
|
12
|
+
import { d as i, W as x } from "../../chunks/interfaces.js";
|
|
13
|
+
import { H as j } from "../../chunks/common.js";
|
|
14
14
|
import "@arcgis/toolkit/type";
|
|
15
|
-
import {
|
|
16
|
-
import { f as
|
|
17
|
-
import { x as
|
|
18
|
-
import { i as
|
|
19
|
-
import "@arcgis/toolkit/intl";
|
|
20
|
-
import "luxon";
|
|
15
|
+
import { j as u, W as h, a as y, v as b, l as R, u as X, m as f } from "../../chunks/series-types.js";
|
|
16
|
+
import { f as Z, j as Y } from "../../chunks/rest-js-object-literals.js";
|
|
17
|
+
import { x as G } from "../../chunks/data.js";
|
|
18
|
+
import { i as J } from "../../chunks/utils.js";
|
|
19
|
+
import { getElementLocale as Q, normalizeLocale as ee, defaultLocale as ae } from "@arcgis/toolkit/intl";
|
|
20
|
+
import { DateTime as te } from "luxon";
|
|
21
21
|
import "d3-array";
|
|
22
22
|
import "@arcgis/core/intl.js";
|
|
23
23
|
import "@arcgis/core/layers/support/FeatureFilter.js";
|
|
@@ -31,21 +31,21 @@ import "@arcgis/core/rest/support/AttributeBinsQuery.js";
|
|
|
31
31
|
import "@arcgis/core/rest/support/StatisticDefinition.js";
|
|
32
32
|
import "@arcgis/core/time/TimeExtent.js";
|
|
33
33
|
import "@arcgis/core/core/promiseUtils.js";
|
|
34
|
-
import { b as
|
|
34
|
+
import { b as se } from "../../chunks/index3.js";
|
|
35
35
|
import "@arcgis/toolkit/dom";
|
|
36
|
-
import { r as
|
|
37
|
-
import { j as
|
|
38
|
-
import { g as
|
|
39
|
-
const
|
|
36
|
+
import { r as le } from "../../chunks/popover-ui-utils.js";
|
|
37
|
+
import { j as T, s as ie } from "../../chunks/chart-ui-utils2.js";
|
|
38
|
+
import { g as oe, e as re, p as S, c as ne, i as ce } from "../../chunks/class-breaks.js";
|
|
39
|
+
const he = O`.hide{display:none}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}.color-ramp{width:100%;height:20px;overflow:hidden;border-radius:0}.color-ramp-segment{height:100%;display:inline-block}.list{margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}.accordion{margin-top:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}`, c = {
|
|
40
40
|
label: "label",
|
|
41
41
|
colorRamp: "color-ramp",
|
|
42
42
|
colorRampSegment: "color-ramp-segment",
|
|
43
43
|
list: "list",
|
|
44
44
|
accordion: "accordion"
|
|
45
45
|
};
|
|
46
|
-
class
|
|
46
|
+
class me extends P {
|
|
47
47
|
constructor() {
|
|
48
|
-
super(...arguments), this._messages =
|
|
48
|
+
super(...arguments), this._messages = B(), this.commonStrings = B({ name: "common", blocking: !0 }), this.heatChartPopover = null, this.xAxisFieldElement = p(), this.aggregationElement = p(), this.numericFieldsElement = p(), this.calendarTypeElement = p(), this.calendarViewTypeElement = p(), this.classBreakMethodElement = p(), this.nullElement = p(), this.breaksCountElement = p(), this.colorSchemeElement = p(), this.onHeatChartDataPopoverChange = async (e) => {
|
|
49
49
|
try {
|
|
50
50
|
if (e.detail?.value !== void 0) {
|
|
51
51
|
const { contentKind: a } = e.detail, t = e.detail.value;
|
|
@@ -54,43 +54,43 @@ class se extends E {
|
|
|
54
54
|
this.model.aggregationType = t;
|
|
55
55
|
break;
|
|
56
56
|
case i.xAxisField:
|
|
57
|
-
this.model.xAxisField = t, this.setDefaultPropertiesForCalendarHeatChart()
|
|
57
|
+
this.model.xAxisField = t, this.setDefaultPropertiesForCalendarHeatChart();
|
|
58
58
|
break;
|
|
59
59
|
case i.numericFields:
|
|
60
|
-
this.model.numericFields = [t.trim() || ""], (this.model.numericFields ?? []).length > 0 && this.model.aggregationType ===
|
|
60
|
+
this.model.numericFields = [t.trim() || ""], (this.model.numericFields ?? []).length > 0 && this.model.aggregationType === y.Count && this.model.numericFields[0] !== U(this.model.layer).idField && (this.model.aggregationType = y.Sum);
|
|
61
61
|
break;
|
|
62
62
|
case i.calendarType: {
|
|
63
63
|
switch (t) {
|
|
64
|
-
case
|
|
64
|
+
case x.YearByMonthAndDayOfMonth: {
|
|
65
65
|
const s = {
|
|
66
|
-
type:
|
|
67
|
-
unit:
|
|
66
|
+
type: h.CalendarDateParts,
|
|
67
|
+
unit: u.DayOfMonth
|
|
68
68
|
}, l = {
|
|
69
|
-
type:
|
|
70
|
-
unit:
|
|
69
|
+
type: h.CalendarDateParts,
|
|
70
|
+
unit: u.MonthOfYear
|
|
71
71
|
};
|
|
72
72
|
this.model.xTemporalBinning = s, this.model.setAxisValueFormat(0, {
|
|
73
|
-
type:
|
|
73
|
+
type: h.DateAxisFormat,
|
|
74
74
|
intlOptions: { day: "2-digit" }
|
|
75
75
|
}), this.model.yTemporalBinning = l, this.model.setAxisValueFormat(1, {
|
|
76
|
-
type:
|
|
76
|
+
type: h.DateAxisFormat,
|
|
77
77
|
intlOptions: { month: "short" }
|
|
78
78
|
});
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
|
-
case
|
|
81
|
+
case x.WeekByDayOfWeekAndHourOfDay: {
|
|
82
82
|
const s = {
|
|
83
|
-
type:
|
|
84
|
-
unit:
|
|
83
|
+
type: h.CalendarDateParts,
|
|
84
|
+
unit: u.HourOfDay
|
|
85
85
|
}, l = {
|
|
86
|
-
type:
|
|
87
|
-
unit:
|
|
88
|
-
};
|
|
89
|
-
this.model.xTemporalBinning = s, this.model.setAxisValueFormat(0, {
|
|
90
|
-
type:
|
|
86
|
+
type: h.CalendarDateParts,
|
|
87
|
+
unit: u.DayOfWeek
|
|
88
|
+
}, { lang: o } = Q(this.el ?? document.documentElement), m = ee(o), d = te.local().setLocale(o).startOf("week", { useLocaleWeeks: m !== ae }).weekday;
|
|
89
|
+
this.model.firstDayOfWeek = d, this.model.xTemporalBinning = s, this.model.setAxisValueFormat(0, {
|
|
90
|
+
type: h.DateAxisFormat,
|
|
91
91
|
intlOptions: { hour: "numeric", hour12: !0 }
|
|
92
92
|
}), this.model.yTemporalBinning = l, this.model.setAxisValueFormat(1, {
|
|
93
|
-
type:
|
|
93
|
+
type: h.DateAxisFormat,
|
|
94
94
|
intlOptions: { weekday: "short" }
|
|
95
95
|
});
|
|
96
96
|
break;
|
|
@@ -105,7 +105,7 @@ class se extends E {
|
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
107
|
case i.classBreakMethod: {
|
|
108
|
-
this.model.classificationMethod = t, this.
|
|
108
|
+
this.model.classificationMethod = t, this.updateChartRenderer = !0;
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
default:
|
|
@@ -119,7 +119,7 @@ class se extends E {
|
|
|
119
119
|
}, this.popoverClose = (e) => {
|
|
120
120
|
this.heatChartPopover === e?.target && this.removeHeatChartDataPopover();
|
|
121
121
|
}, this.onModelConfigChange = () => {
|
|
122
|
-
|
|
122
|
+
W(this.model?.config) && (this.selectedColorRamp = this.availableColorRamps[0]), this.requestUpdate();
|
|
123
123
|
}, this.allColorRamps = [], this.onColorRampSelection = (e) => {
|
|
124
124
|
const { ramp: a, isFlipped: t } = e.detail;
|
|
125
125
|
this.isFlipped = t, F(this.selectedColorRamp, a) || (this.selectedColorRamp = a, this.updateChartRenderer = !0, this.updateClassBreaksColor = !0, this.generateAndUpdateClassBreaks());
|
|
@@ -139,20 +139,20 @@ class se extends E {
|
|
|
139
139
|
...t,
|
|
140
140
|
symbol: {
|
|
141
141
|
...t?.symbol,
|
|
142
|
-
type:
|
|
142
|
+
type: Z.SFS,
|
|
143
143
|
color: a,
|
|
144
144
|
outline: t?.symbol?.outline && { ...t.symbol.outline, color: a }
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
this.model.emptyCell = s;
|
|
148
148
|
}
|
|
149
|
-
}, this.availableColorRamps = [], this.updateChartRenderer = !1, this.layerFieldsInfo = [], this.arcgisChartsConfigDataChangeError =
|
|
149
|
+
}, this.isFlipped = !1, this.availableColorRamps = [], this.updateChartRenderer = !1, this.layerFieldsInfo = [], this.arcgisChartsConfigDataChangeError = w();
|
|
150
150
|
}
|
|
151
151
|
static {
|
|
152
152
|
this.properties = { availableColorRamps: 16, aggregationLabel: 16, selectedColorRamp: 16, updateChartRenderer: 16, messageOverrides: 0, model: 0, layerFieldsInfo: 0, open: 5, chartData: 0 };
|
|
153
153
|
}
|
|
154
154
|
static {
|
|
155
|
-
this.styles =
|
|
155
|
+
this.styles = he;
|
|
156
156
|
}
|
|
157
157
|
connectedCallback() {
|
|
158
158
|
super.connectedCallback(), this.loadColorRampFromArcGIS();
|
|
@@ -161,7 +161,7 @@ class se extends E {
|
|
|
161
161
|
this.modelChange(this.model), this.onModelConfigChange();
|
|
162
162
|
}
|
|
163
163
|
willUpdate(e) {
|
|
164
|
-
e.has("model") && this.modelChange(this.model, e.get("model")), this.aggregationLabel =
|
|
164
|
+
e.has("model") && this.modelChange(this.model, e.get("model")), this.aggregationLabel = V(this.model.aggregationType, this.commonStrings), e.has("chartData") && (this.updateChartRenderer = this.model.chartRenderer === void 0 || K(this.model.chartRenderer) === Y.ClassBreaks);
|
|
165
165
|
}
|
|
166
166
|
updated(e) {
|
|
167
167
|
e.has("updateChartRenderer") && this.updateChartRenderer && this.generateAndUpdateClassBreaks();
|
|
@@ -170,12 +170,12 @@ class se extends E {
|
|
|
170
170
|
super.disconnectedCallback(), this.model.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
171
171
|
}
|
|
172
172
|
loadColorRampFromArcGIS() {
|
|
173
|
-
const e =
|
|
173
|
+
const e = M.all();
|
|
174
174
|
this.allColorRamps = e, this.availableColorRamps = this.allColorRamps;
|
|
175
175
|
}
|
|
176
176
|
generateColorsForExistingBreaks(e) {
|
|
177
177
|
const a = this.model.breaksCount;
|
|
178
|
-
return
|
|
178
|
+
return oe({
|
|
179
179
|
numberOfClassBreaks: a,
|
|
180
180
|
selectedColorRamp: e,
|
|
181
181
|
colorRamp: this.model.chartRenderer?.classBreakInfos?.map((s) => s.symbol?.color),
|
|
@@ -183,44 +183,44 @@ class se extends E {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
normalizeClassBreakInfosForCompare(e, a) {
|
|
186
|
-
return (e ?? []).map(({ classMinValue: t, classMaxValue: s, label: l, symbol:
|
|
186
|
+
return (e ?? []).map(({ classMinValue: t, classMaxValue: s, label: l, symbol: o }) => ({
|
|
187
187
|
classMinValue: t,
|
|
188
188
|
classMaxValue: s,
|
|
189
189
|
label: l,
|
|
190
|
-
symbol: a ? void 0 :
|
|
190
|
+
symbol: a ? void 0 : o
|
|
191
191
|
}));
|
|
192
192
|
}
|
|
193
193
|
async generateAndUpdateClassBreaks() {
|
|
194
194
|
let e = [];
|
|
195
|
-
if (this.model.classificationMethod ===
|
|
196
|
-
e =
|
|
195
|
+
if (this.model.classificationMethod === b.manual && this.model.chartRenderer?.classBreakInfos.length > 0 && this.selectedColorRamp) {
|
|
196
|
+
e = H(this.model.chartRenderer?.classBreakInfos) ?? [];
|
|
197
197
|
const s = this.generateColorsForExistingBreaks(this.selectedColorRamp);
|
|
198
198
|
for (let l = 0; l < e.length && l < s.length; l++)
|
|
199
199
|
e[l].symbol && (e[l].symbol.color = s[l]);
|
|
200
|
-
} else if (this.model.classificationMethod !==
|
|
201
|
-
const s = await
|
|
200
|
+
} else if (this.model.classificationMethod !== b.manual && this.chartData) {
|
|
201
|
+
const s = await se({
|
|
202
202
|
categoryField: this.model?.xAxisField?.[0] ?? "",
|
|
203
|
-
categoryType:
|
|
204
|
-
numericFields: [
|
|
203
|
+
categoryType: h.DateAxisFormat,
|
|
204
|
+
numericFields: [k.valueField],
|
|
205
205
|
inlineData: this.chartData
|
|
206
206
|
});
|
|
207
207
|
if (s.layer && this.model.layer) {
|
|
208
|
-
const
|
|
208
|
+
const o = I({
|
|
209
209
|
geometryType: "point",
|
|
210
210
|
theme: "high-to-low"
|
|
211
|
-
})?.primaryScheme,
|
|
211
|
+
})?.primaryScheme, m = await E({
|
|
212
212
|
layer: s.layer,
|
|
213
|
-
field:
|
|
213
|
+
field: k.valueField,
|
|
214
214
|
classificationMethod: this.model.classificationMethod,
|
|
215
215
|
numClasses: this.model.breaksCount,
|
|
216
|
-
colorScheme:
|
|
216
|
+
colorScheme: o
|
|
217
217
|
});
|
|
218
|
-
e =
|
|
219
|
-
classBreaksRendererResult:
|
|
218
|
+
e = re({
|
|
219
|
+
classBreaksRendererResult: m,
|
|
220
220
|
numberOfClassBreaks: this.model.breaksCount,
|
|
221
|
-
selectedColorRamp: this.selectedColorRamp,
|
|
221
|
+
selectedColorRamp: this.selectedColorRamp ?? S(this.model.chartRenderer?.classBreakInfos, this.availableColorRamps),
|
|
222
222
|
// use the color ramp only if the `selectedColorRamp` was not modified by the color ramp popover
|
|
223
|
-
colorRamp: this.updateClassBreaksColor ? void 0 : this.model.chartRenderer?.classBreakInfos?.map((
|
|
223
|
+
colorRamp: this.updateClassBreaksColor ? void 0 : this.model.chartRenderer?.classBreakInfos?.map((d) => d.symbol?.color),
|
|
224
224
|
isFlipped: this.isFlipped
|
|
225
225
|
});
|
|
226
226
|
}
|
|
@@ -229,7 +229,7 @@ class se extends E {
|
|
|
229
229
|
this.updateChartRenderer && t && (this.model.chartRenderer = {
|
|
230
230
|
type: "classBreaks",
|
|
231
231
|
// TODO (heat-chart) use the correct type
|
|
232
|
-
field:
|
|
232
|
+
field: k.valueField,
|
|
233
233
|
classBreakInfos: e
|
|
234
234
|
}), this.updateChartRenderer = !1, this.updateClassBreaksColor = !1;
|
|
235
235
|
}
|
|
@@ -237,7 +237,7 @@ class se extends E {
|
|
|
237
237
|
a?.removeEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange), e?.addEventListener("arcgisChartsModelConfigChange", this.onModelConfigChange);
|
|
238
238
|
}
|
|
239
239
|
getCorrectedXAxisFieldValue() {
|
|
240
|
-
return
|
|
240
|
+
return G({
|
|
241
241
|
fieldName: this.model.xAxisField,
|
|
242
242
|
fieldList: this.layerFieldsInfo
|
|
243
243
|
}) ? "" : $(this.layerFieldsInfo, this.model.xAxisField);
|
|
@@ -258,8 +258,8 @@ class se extends E {
|
|
|
258
258
|
this.contentKind = i.colorScheme, this.setupPopover(e);
|
|
259
259
|
}
|
|
260
260
|
onBreaksCountChange(e) {
|
|
261
|
-
let a =
|
|
262
|
-
a <
|
|
261
|
+
let a = L(e.target.value);
|
|
262
|
+
a < C.min ? a = C.min : a > C.max && (a = C.max), q(a) && (this.breaksCountElement.value && (this.breaksCountElement.value.value = a.toString()), this.model.breaksCount = a, this.updateChartRenderer = !0);
|
|
263
263
|
}
|
|
264
264
|
onAggregationSelect(e) {
|
|
265
265
|
this.contentKind = i.aggregation, this.setupPopover(e);
|
|
@@ -271,9 +271,12 @@ class se extends E {
|
|
|
271
271
|
const a = e.target.checked;
|
|
272
272
|
this.model.includeLeapDay = a;
|
|
273
273
|
}
|
|
274
|
+
onNullPolicyChange(e) {
|
|
275
|
+
this.model.nullPolicy = e.target.selectedItem.value;
|
|
276
|
+
}
|
|
274
277
|
setupPopover(e) {
|
|
275
278
|
e.stopImmediatePropagation(), this.removeHeatChartDataPopover();
|
|
276
|
-
let a, t, s;
|
|
279
|
+
let a, t, s, l = this.isFlipped;
|
|
277
280
|
switch (this.contentKind) {
|
|
278
281
|
case i.aggregation:
|
|
279
282
|
a = this.aggregationElement.value, t = this._messages.aggregationHeader, s = this.model.aggregationType;
|
|
@@ -285,7 +288,7 @@ class se extends E {
|
|
|
285
288
|
a = this.numericFieldsElement.value, t = this._messages.numericField, s = this.model.numericFields?.[0];
|
|
286
289
|
break;
|
|
287
290
|
case i.calendarType:
|
|
288
|
-
a = this.calendarTypeElement.value, t = this._messages.calendarType, s =
|
|
291
|
+
a = this.calendarTypeElement.value, t = this._messages.calendarType, s = T(this.model);
|
|
289
292
|
break;
|
|
290
293
|
case i.calendarViewType:
|
|
291
294
|
a = this.calendarViewTypeElement.value, t = this._messages.viewType, s = this.model.viewType;
|
|
@@ -294,53 +297,57 @@ class se extends E {
|
|
|
294
297
|
a = this.classBreakMethodElement.value, t = this._messages.method, s = this.model.classificationMethod;
|
|
295
298
|
break;
|
|
296
299
|
case i.colorScheme:
|
|
297
|
-
a = this.colorSchemeElement.value, t = this._messages.colorScheme
|
|
300
|
+
a = this.colorSchemeElement.value, t = this._messages.colorScheme;
|
|
301
|
+
const o = S(this.model.chartRenderer?.classBreakInfos, this.availableColorRamps);
|
|
302
|
+
s = this.selectedColorRamp?.name ?? o?.name;
|
|
303
|
+
const m = o ? o.colorsForClassBreaks.find((d) => d.numClasses === this.model.breaksCount)?.colors : void 0;
|
|
304
|
+
l = m ? ce(m, this.model.chartRenderer?.classBreakInfos) : l;
|
|
298
305
|
break;
|
|
299
306
|
case i.null:
|
|
300
307
|
a = e.target, t = this._messages.null;
|
|
301
308
|
break;
|
|
302
309
|
}
|
|
303
|
-
this.heatChartPopover =
|
|
310
|
+
this.heatChartPopover = _(n`<arcgis-charts-config-heat-chart-popover .headingTitle=${t} .referenceElement=${a} open .contentKind=${this.contentKind} .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${s} @arcgisChartsConfigHeatChartDataPopoverChange=${this.onHeatChartDataPopoverChange} @arcgisChartsConfigPopoverClose=${this.popoverClose} .colorRamps=${this.availableColorRamps} @arcgisChartsConfigHeatChartColorRampChange=${this.onColorRampSelection} @arcgisChartsConfigPopoverEmptyCellColorChange=${this.onEmptyCellColorChange} @arcgisChartsConfigPopoverEmptyCellNameChange=${this.onEmptyCellNameChange} .isFlipped=${l}></arcgis-charts-config-heat-chart-popover>`), !document.body.contains(this.heatChartPopover) && this.heatChartPopover !== null && document.body.appendChild(this.heatChartPopover);
|
|
304
311
|
}
|
|
305
312
|
removeHeatChartDataPopover() {
|
|
306
|
-
this.heatChartPopover !== null && (this.heatChartPopover.open = !1, this.heatChartPopover =
|
|
313
|
+
this.heatChartPopover !== null && (this.heatChartPopover.open = !1, this.heatChartPopover = le(this.heatChartPopover));
|
|
307
314
|
}
|
|
308
315
|
setDefaultPropertiesForCalendarHeatChart() {
|
|
309
|
-
if (!
|
|
310
|
-
if (this.model.yAxisField = this.model.xAxisField, this.model.setYAxisSortOrder(
|
|
316
|
+
if (!J(this.model?.config)) {
|
|
317
|
+
if (this.model.yAxisField = this.model.xAxisField, this.model.setYAxisSortOrder(j.Desc), this.model.xTemporalBinning === void 0) {
|
|
311
318
|
const e = {
|
|
312
|
-
type:
|
|
313
|
-
unit:
|
|
319
|
+
type: h.CalendarDateParts,
|
|
320
|
+
unit: u.DayOfMonth
|
|
314
321
|
};
|
|
315
322
|
this.model.xTemporalBinning = e;
|
|
316
323
|
}
|
|
317
324
|
if (this.model.yTemporalBinning === void 0) {
|
|
318
325
|
const e = {
|
|
319
|
-
type:
|
|
320
|
-
unit:
|
|
326
|
+
type: h.CalendarDateParts,
|
|
327
|
+
unit: u.MonthOfYear
|
|
321
328
|
};
|
|
322
|
-
this.model.yTemporalBinning = e, this.model.setAxisValueFormat(1, { type:
|
|
329
|
+
this.model.yTemporalBinning = e, this.model.setAxisValueFormat(1, { type: h.DateAxisFormat, intlOptions: { month: "short" } });
|
|
323
330
|
}
|
|
324
|
-
this.model.viewType =
|
|
331
|
+
this.model.classificationMethod === void 0 && (this.model.classificationMethod = b.naturalBreaks), this.model.heatRulesType !== R.Renderer && (this.model.heatRulesType = R.Renderer), this.model.viewType === void 0 && (this.model.viewType = X.singleCalendarView), (this.model.aggregationType === y.Count || this.model.aggregationType === y.Sum) && this.model.nullPolicy !== f.Zero && (this.model.nullPolicy = f.Zero);
|
|
325
332
|
}
|
|
326
333
|
}
|
|
327
334
|
renderXAxisFieldSelect() {
|
|
328
335
|
const e = this.getCorrectedXAxisFieldValue();
|
|
329
|
-
return
|
|
336
|
+
return n`<arcgis-charts-config-field-select .label=${e} @click=${this.onXAxisFieldSelect} ${g(this.xAxisFieldElement)}></arcgis-charts-config-field-select>`;
|
|
330
337
|
}
|
|
331
338
|
renderAggregation() {
|
|
332
|
-
return
|
|
339
|
+
return n`<arcgis-charts-config-field-select .label=${this.model.aggregationType === y.NoAggregation ? this._messages.noAggregation : this.aggregationLabel} @click=${this.onAggregationSelect} ${g(this.aggregationElement)}></arcgis-charts-config-field-select>`;
|
|
333
340
|
}
|
|
334
341
|
renderNumericFieldsSelect() {
|
|
335
342
|
const e = this.model.numericFields?.[0] === this.model.layer?.objectIdField ? "" : $(this.layerFieldsInfo, this.model.numericFields?.[0]);
|
|
336
|
-
return
|
|
343
|
+
return n`<arcgis-charts-config-field-select .label=${e} @click=${this.onNumericFieldSelect} ${g(this.numericFieldsElement)}></arcgis-charts-config-field-select>`;
|
|
337
344
|
}
|
|
338
345
|
renderCalendarTypeSelect() {
|
|
339
|
-
const e =
|
|
346
|
+
const e = T(this.model) ?? "", a = {
|
|
340
347
|
weekByDayOfWeekAndHourOfDay: this._messages.weekByDayOfWeekAndHourOfDay,
|
|
341
348
|
yearByMonthAndDayOfMonth: this._messages.yearByMonthAndDayOfMonth
|
|
342
349
|
}, t = e ? a[e] ?? "" : "";
|
|
343
|
-
return
|
|
350
|
+
return n`<arcgis-charts-config-field-select .label=${t} @click=${this.onCalendarTypeSelect} ${g(this.calendarTypeElement)}></arcgis-charts-config-field-select>`;
|
|
344
351
|
}
|
|
345
352
|
renderClassBreakMethodSelect() {
|
|
346
353
|
const e = {
|
|
@@ -348,30 +355,33 @@ class se extends E {
|
|
|
348
355
|
manual: this._messages.classBreaksMethod?.manual,
|
|
349
356
|
naturalBreaks: this._messages.classBreaksMethod?.naturalBreaks,
|
|
350
357
|
quantile: this._messages.classBreaksMethod?.quantile
|
|
351
|
-
}, a = this.model.classificationMethod ? e[
|
|
352
|
-
return
|
|
358
|
+
}, a = this.model.classificationMethod ? e[N(this.model.classificationMethod)] ?? "" : "";
|
|
359
|
+
return n`<arcgis-charts-config-field-select .label=${a} @click=${this.onClassBreakMethodSelect} ${g(this.classBreakMethodElement)}></arcgis-charts-config-field-select>`;
|
|
353
360
|
}
|
|
354
361
|
renderColorRampSelect() {
|
|
355
362
|
const e = this.model.chartRenderer?.classBreakInfos?.map((a) => {
|
|
356
|
-
const t = a !== void 0 ?
|
|
357
|
-
return
|
|
363
|
+
const t = a !== void 0 ? ne(a.symbol.color) : "#FFFFFF";
|
|
364
|
+
return n`<div class=${r(c.colorRampSegment)} style=${v({ backgroundColor: t, width: `${100 / this.model.breaksCount}%` })}></div>`;
|
|
358
365
|
});
|
|
359
|
-
return
|
|
366
|
+
return n`<arcgis-charts-config-field-select label @click=${this.onColorSchemeSelect} ${g(this.colorSchemeElement)}><div slot=fieldSelectSlot class=${r(c.colorRamp)}>${e}</div></arcgis-charts-config-field-select>`;
|
|
360
367
|
}
|
|
361
368
|
renderClassBreaksTable() {
|
|
362
369
|
const e = this.model.chartRenderer?.classBreakInfos ?? [];
|
|
363
|
-
return
|
|
370
|
+
return n`<calcite-table caption="Simple table"><calcite-table-row slot=table-header><calcite-table-header .heading=${this._messages.symbol}></calcite-table-header><calcite-table-header .heading=${this._messages.upperValue}></calcite-table-header></calcite-table-row>${e.map((a) => n`<calcite-table-row><calcite-table-cell><calcite-swatch label scale=m .color=${`rgba(${a.symbol.color?.[0]}, ${a.symbol.color?.[1]}, ${a.symbol.color?.[2]}, ${a.symbol.color?.[3] / 255})`}></calcite-swatch></calcite-table-cell><calcite-table-cell>${a.label}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`;
|
|
364
371
|
}
|
|
365
372
|
renderNullUI() {
|
|
366
|
-
const e = this.model.emptyCell, a = this._messages.null, t = e?.symbol?.color ??
|
|
367
|
-
return
|
|
373
|
+
const e = this.model.emptyCell, a = this._messages.null, t = e?.symbol?.color ?? z.grayColor, [s, l, o, m] = [...t], d = `rgba(${s},${l},${o},${m / 255})`;
|
|
374
|
+
return n`<calcite-list label class=${r(c.list)} selection-mode=none ${g(this.nullElement)}><calcite-list-item .label=${a} .value=${a} @calciteListItemSelect=${this.onNullSelect}><calcite-icon icon=square-f style=${v({ color: d })} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`;
|
|
375
|
+
}
|
|
376
|
+
renderEmptyBins() {
|
|
377
|
+
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>`;
|
|
368
378
|
}
|
|
369
379
|
render() {
|
|
370
|
-
const e = this.renderXAxisFieldSelect(), a = this.renderAggregation(), t = this.renderNumericFieldsSelect(), s = this.renderCalendarTypeSelect(), l = this.renderClassBreakMethodSelect(),
|
|
371
|
-
return
|
|
380
|
+
const e = this.renderXAxisFieldSelect(), a = this.renderAggregation(), t = this.renderNumericFieldsSelect(), s = this.renderCalendarTypeSelect(), l = this.renderClassBreakMethodSelect(), o = this.renderColorRampSelect(), m = this.renderClassBreaksTable(), d = this.renderNullUI(), D = this.renderEmptyBins();
|
|
381
|
+
return n`<calcite-label class=${r(c.label)}>${this._messages.dateRequired}${e}</calcite-label><calcite-label class=${r(c.label)}>${this._messages.calendarType}${s}</calcite-label><calcite-label class=${r(c.label)}>${this._messages.aggregation}${a}</calcite-label><calcite-label class=${r(c.label)}>${this._messages.numericField}${t}</calcite-label><calcite-label class=${r(c.label)}>${this._messages.method}${l}</calcite-label><calcite-label class=${r(c.label)}>${this._messages.numberOfClasses}<calcite-input type=number .min=${C.min} .max=${C.max} .disabled=${this.model.classificationMethod === void 0 || this.model.classificationMethod === b.manual} step=1 .value=${ie(this.model.breaksCount, 5)} @calciteInputInput=${this.onBreaksCountChange} ${g(this.breaksCountElement)}></calcite-input></calcite-label><calcite-label class=${r(c.label)}>${this._messages.colorScheme}${o}</calcite-label>${d}<calcite-accordion class=${r(c.accordion)} appearance=transparent selection-mode=single><calcite-accordion-item .heading=${this._messages.classBreaks}>${m}</calcite-accordion-item></calcite-accordion><calcite-label class=${r(c.label)}>${this._messages.emptyBins}${D}</calcite-label><calcite-label class=${r(c.label)} layout=inline-space-between>${this._messages.includeLeapDay}<calcite-switch .checked=${this.model.includeLeapDay} @calciteSwitchChange=${this.onIncludeLeapDayChange}></calcite-switch></calcite-label>`;
|
|
372
382
|
}
|
|
373
383
|
}
|
|
374
|
-
|
|
384
|
+
A("arcgis-charts-config-heat-chart-data", me);
|
|
375
385
|
export {
|
|
376
|
-
|
|
386
|
+
me as ArcgisChartsConfigHeatChartData
|
|
377
387
|
};
|
|
@@ -8,7 +8,9 @@ import "@esri/calcite-components/components/calcite-swatch";
|
|
|
8
8
|
import "@esri/calcite-components/components/calcite-list";
|
|
9
9
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
10
10
|
import "@esri/calcite-components/components/calcite-icon";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-radio-button-group";
|
|
11
12
|
import "@esri/calcite-components/components/calcite-label";
|
|
13
|
+
import "@esri/calcite-components/components/calcite-radio-button";
|
|
12
14
|
import "@esri/calcite-components/components/calcite-input";
|
|
13
15
|
import "@esri/calcite-components/components/calcite-accordion";
|
|
14
16
|
import "@esri/calcite-components/components/calcite-accordion-item";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as w } from "../../chunks/runtime.js";
|
|
3
3
|
import { repeat as d } from "lit/directives/repeat.js";
|
|
4
|
-
import { css as
|
|
5
|
-
import { keyed as
|
|
6
|
-
import
|
|
4
|
+
import { css as F, html as l } from "lit";
|
|
5
|
+
import { keyed as f } from "lit/directives/keyed.js";
|
|
6
|
+
import L from "@arcgis/core/Color.js";
|
|
7
7
|
import { LitElement as P, createEvent as h, safeClassMap as r, nothing as g, safeStyleMap as S } from "@arcgis/lumina";
|
|
8
|
-
import { createRef as
|
|
8
|
+
import { createRef as u, ref as p } from "lit/directives/ref.js";
|
|
9
9
|
import { isEqual as A } from "lodash-es";
|
|
10
|
-
import { br as D, cY as E, bM as _, bL as M, di as b, ap as
|
|
10
|
+
import { br as D, cY as E, bM as _, bL as M, di as b, ap as N } from "../../chunks/index.js";
|
|
11
11
|
import { u as v } from "../../chunks/useT9n.js";
|
|
12
12
|
import { d as c, W as $ } from "../../chunks/interfaces.js";
|
|
13
13
|
import "@arcgis/toolkit/type";
|
|
14
|
-
import { a as
|
|
14
|
+
import { a as B, u as y, v as C } from "../../chunks/series-types.js";
|
|
15
15
|
import { R as H } from "../../chunks/rest-js-object-literals.js";
|
|
16
16
|
import "@arcgis/toolkit/intl";
|
|
17
17
|
import "luxon";
|
|
@@ -35,7 +35,7 @@ import "@arcgis/toolkit/dom";
|
|
|
35
35
|
import { e as O } from "../../chunks/popover-ui-utils.js";
|
|
36
36
|
import { b as x, a as k, c as m } from "../../chunks/chart-ui-utils2.js";
|
|
37
37
|
import { C as R, a as I } from "../../chunks/class-breaks.js";
|
|
38
|
-
const j =
|
|
38
|
+
const j = F`.hide{display:none}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.name{display:flex;flex-direction:column;margin:.5rem;padding:.5rem;background:#fff;min-width:250px}.header{margin:0;font-weight:bolder}.pick-list-item-label{font-size:small}.panel{max-height:60vh}.color-ramp-popover{display:flex;flex-direction:column;gap:.75rem;min-width:320px;max-width:480px}.color-ramp-toolbar{display:flex;gap:.5rem;align-items:center;padding:5px 5px 0}.ramp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.5rem;max-height:300px;overflow:auto;padding:.25rem}.ramp-item{display:flex;flex-direction:column;border:1px solid var(--calcite-color-foreground-3);background:var(--calcite-color-foreground-1);cursor:pointer;box-shadow:inset 0 0 0 1px transparent;transition:box-shadow .12s;border-radius:2px;min-height:56px;padding:4px}.ramp-item:hover{box-shadow:inset 0 0 0 1px var(--calcite-color-foreground-3)}.ramp-name{font-size:.625rem;line-height:1;padding:2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-3)}.ramp-item.selected{background-color:var(--calcite-color-brand)!important;border-color:var(--calcite-color-brand)!important;outline:2px solid var(--calcite-color-brand)!important;color:var(--calcite-color-foreground-1)}.ramp-item.selected .ramp-name{color:var(--calcite-color-foreground-1)}.ramp-item.selected .ramp-strip{box-shadow:none;border:none}.ramp-strips{display:flex;flex:1;height:28px;width:100%;overflow:hidden}.ramp-strip{flex:1;min-width:0}.ramp-strip-fallback{background:repeating-linear-gradient(45deg,var(--calcite-color-foreground-3) 0,var(--calcite-color-foreground-3) 5px,var(--calcite-color-foreground-2) 5px,var(--calcite-color-foreground-2) 10px)}.ramp-empty{grid-column:1/-1;font-size:.75rem;color:var(--calcite-color-text-3)}.panel-children-container{display:flex;padding:0 1rem;margin-top:1rem}.panel-children-container calcite-label{flex:1 1 0px;display:flex;width:0px}.color-ramp-popover-footer{display:flex;padding:.5rem}.color-ramp-popover-footer calcite-button{flex:1}`, s = {
|
|
39
39
|
jsAppFlyout: "js-app-flyout",
|
|
40
40
|
name: "bar-chart-data-popover",
|
|
41
41
|
header: "header",
|
|
@@ -55,10 +55,10 @@ const j = L`.hide{display:none}.am5-html-container{z-index:101!important}.am5-la
|
|
|
55
55
|
};
|
|
56
56
|
class q extends P {
|
|
57
57
|
constructor() {
|
|
58
|
-
super(...arguments), this._messages = v(), this.commonStrings = v({ name: "common", blocking: !0 }), this.picklist =
|
|
58
|
+
super(...arguments), this._messages = v(), this.commonStrings = v({ name: "common", blocking: !0 }), this.picklist = u(), this.popoverElement = u(), this.placement = "leading", this.offsetDistance = -200, this.availableColorRamps = [], this.selectedCategory = R.all, this.aggregationLabels = [], this.isFlipped = !1, this.layerFieldsInfo = [], this.arcgisChartsConfigHeatChartColorRampChange = h(), this.arcgisChartsConfigHeatChartDataPopoverChange = h(), this.arcgisChartsConfigPopoverClose = h(), this.arcgisChartsConfigPopoverEmptyCellColorChange = h(), this.arcgisChartsConfigPopoverEmptyCellNameChange = h();
|
|
59
59
|
}
|
|
60
60
|
static {
|
|
61
|
-
this.properties = { availableColorRamps: 16, selectedColorRampName: 16, selectedCategory: 16,
|
|
61
|
+
this.properties = { availableColorRamps: 16, selectedColorRampName: 16, selectedCategory: 16, aggregationLabels: 16, isFlipped: 5, model: 0, messageOverrides: 0, headingTitle: 1, referenceElement: 0, open: 5, contentKind: 1, layerFieldsInfo: 0, selectedContent: 1, colorRamps: 0 };
|
|
62
62
|
}
|
|
63
63
|
static {
|
|
64
64
|
this.styles = j;
|
|
@@ -78,16 +78,16 @@ class q extends P {
|
|
|
78
78
|
}, k.PopoverTimer);
|
|
79
79
|
}
|
|
80
80
|
buildAggregationListItems() {
|
|
81
|
-
return d(x.filter((e) => e !==
|
|
81
|
+
return d(x.filter((e) => e !== B.NoAggregation), (e) => e, (e, t) => l`<calcite-list-item .label=${this.aggregationLabels[t]} .value=${e} .selected=${m(e, this.selectedContent)}></calcite-list-item>`);
|
|
82
82
|
}
|
|
83
83
|
buildPickListItem(e) {
|
|
84
|
-
return
|
|
84
|
+
return f(e.name, l`<calcite-list-item .label=${E(this.layerFieldsInfo, e.name)} .value=${e.name} .selected=${m(e.name, this.selectedContent)}></calcite-list-item>`);
|
|
85
85
|
}
|
|
86
86
|
buildPickListItems(e) {
|
|
87
87
|
const t = this.layerFieldsInfo?.length ?? 0, a = [];
|
|
88
88
|
switch (e) {
|
|
89
89
|
case c.numericFields: {
|
|
90
|
-
const i =
|
|
90
|
+
const i = f(" ", l`<calcite-list-item label=" " value=" " .selected=${m("", this.selectedContent)}></calcite-list-item>`);
|
|
91
91
|
a.push(i);
|
|
92
92
|
for (let o = 0; o < t; o += 1) {
|
|
93
93
|
const n = this.layerFieldsInfo?.[o];
|
|
@@ -134,7 +134,7 @@ class q extends P {
|
|
|
134
134
|
let t = "#000000";
|
|
135
135
|
try {
|
|
136
136
|
if (e) {
|
|
137
|
-
if (e instanceof
|
|
137
|
+
if (e instanceof L) {
|
|
138
138
|
const a = e.toHex();
|
|
139
139
|
typeof a == "string" && a.length && (t = a);
|
|
140
140
|
} else if (Array.isArray(e)) {
|
|
@@ -155,7 +155,20 @@ class q extends P {
|
|
|
155
155
|
i && (this.selectedCategory = i);
|
|
156
156
|
}
|
|
157
157
|
onFlipAll() {
|
|
158
|
-
this.isFlipped = !this.isFlipped
|
|
158
|
+
if (this.isFlipped = !this.isFlipped, this.selectedColorRampName) {
|
|
159
|
+
const e = this.availableColorRamps.find((t) => t.name === this.selectedColorRampName);
|
|
160
|
+
if (e) {
|
|
161
|
+
const t = {
|
|
162
|
+
...e,
|
|
163
|
+
colors: this.getRampColors(e)
|
|
164
|
+
};
|
|
165
|
+
this.arcgisChartsConfigHeatChartColorRampChange.emit({
|
|
166
|
+
rampName: e.name,
|
|
167
|
+
ramp: t,
|
|
168
|
+
isFlipped: this.isFlipped
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
159
172
|
}
|
|
160
173
|
onRampSelect(e) {
|
|
161
174
|
this.selectedColorRampName = e.name;
|
|
@@ -171,7 +184,7 @@ class q extends P {
|
|
|
171
184
|
this.model.emptyCellText !== t && (this.model.emptyCellText = t, this.arcgisChartsConfigPopoverEmptyCellNameChange.emit({ name: t }));
|
|
172
185
|
}
|
|
173
186
|
colorChange(e) {
|
|
174
|
-
const t = e instanceof CustomEvent ? e.detail : e, [a, i, o] = t, n =
|
|
187
|
+
const t = e instanceof CustomEvent ? e.detail : e, [a, i, o] = t, n = N * 255;
|
|
175
188
|
this.arcgisChartsConfigPopoverEmptyCellColorChange.emit({ color: [a, i, o, n] });
|
|
176
189
|
}
|
|
177
190
|
renderAggregationType() {
|