@arcgis/common-components 5.2.0-next.7 → 5.2.0-next.71
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/README.md +2 -2
- package/dist/cdn/27EUJ42B.js +2 -0
- package/dist/cdn/{OOBX2C2L.js → 4XUU4OUP.js} +1 -1
- package/dist/cdn/A4KQMXWW.js +2 -0
- package/dist/cdn/ACW3B44H.js +2 -0
- package/dist/cdn/AJJMK7ZT.js +2 -0
- package/dist/cdn/{MINFRX4Y.js → B7ORUBJS.js} +1 -1
- package/dist/cdn/BAMLORLB.js +2 -0
- package/dist/cdn/CRQPVTKI.js +2 -0
- package/dist/cdn/DHC2LUQ2.js +2 -0
- package/dist/cdn/DZ6EM67E.js +2 -0
- package/dist/cdn/EGEAKIAD.js +2 -0
- package/dist/cdn/HP3DHL2Q.js +2 -0
- package/dist/cdn/ILCKIZB7.js +2 -0
- package/dist/cdn/ILQGAJMU.js +2 -0
- package/dist/cdn/L6PNCJWB.js +2 -0
- package/dist/cdn/{6XE5JNJ7.js → M7GRLXXP.js} +3 -3
- package/dist/cdn/M7LOQA5N.js +2 -0
- package/dist/cdn/{YG4PY2H3.js → MU3XP7TW.js} +1 -1
- package/dist/cdn/N3NWNVDF.js +2 -0
- package/dist/cdn/NSZAGPYW.js +2 -0
- package/dist/cdn/{YVCGEEMG.js → NWD6VRJ3.js} +1 -1
- package/dist/cdn/NZVGCVVU.js +2 -0
- package/dist/cdn/{WJ3TYWP2.js → O3W35LFP.js} +1 -1
- package/dist/cdn/PMV2N3L3.js +2 -0
- package/dist/cdn/PRJM53Y4.js +2 -0
- package/dist/cdn/PRS7WL5D.js +2 -0
- package/dist/cdn/PWYX2MLC.js +2 -0
- package/dist/cdn/QH3LDC7I.js +2 -0
- package/dist/cdn/QHSBMU6L.js +2 -0
- package/dist/cdn/QSPFNHZ6.js +2 -0
- package/dist/cdn/TWW63D32.js +2 -0
- package/dist/cdn/UJMJOA5M.js +2 -0
- package/dist/cdn/UQYWVAV5.js +2 -0
- package/dist/cdn/VCZLD7ZT.js +2 -0
- package/dist/cdn/VDZ3DCU7.js +2 -0
- package/dist/cdn/VOBBBIYC.js +2 -0
- package/dist/cdn/X2G4GAGR.js +2 -0
- package/dist/cdn/XGVHA4YP.js +2 -0
- package/dist/cdn/XJLIKZFY.js +2 -0
- package/dist/cdn/Z5QBBHLD.js +2 -0
- package/dist/cdn/{232BH3SJ.js → ZRJT3BTV.js} +1 -1
- package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/element-reference-controller.js +17 -0
- package/dist/chunks/layer-utils.js +52 -40
- package/dist/chunks/locale.js +14 -6
- package/dist/chunks/utils.js +69 -0
- package/dist/chunks/utils2.js +20 -0
- package/dist/chunks/utils3.js +7 -0
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +2 -2
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
- package/dist/components/arcgis-color-input/customElement.js +6 -6
- package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.js +246 -216
- package/dist/components/arcgis-field-info/index.js +1 -0
- package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
- package/dist/components/arcgis-field-pick-list/customElement.js +54 -62
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
- package/dist/components/arcgis-histogram/customElement.d.ts +30 -0
- package/dist/components/arcgis-histogram/customElement.js +103 -90
- package/dist/components/arcgis-picker-input/customElement.d.ts +6 -2
- package/dist/components/arcgis-picker-input/customElement.js +7 -7
- package/dist/components/arcgis-slider/customElement.d.ts +4 -3
- package/dist/components/arcgis-slider/customElement.js +308 -288
- package/dist/components/arcgis-slider-field/customElement.d.ts +298 -0
- package/dist/components/arcgis-slider-field/customElement.js +378 -0
- package/dist/components/arcgis-slider-field/index.d.ts +1 -0
- package/dist/components/arcgis-slider-field/index.js +2 -0
- package/dist/components/arcgis-ticks/customElement.js +100 -79
- package/dist/components/arcgis-toolbar/customElement.d.ts +47 -0
- package/dist/components/arcgis-toolbar/customElement.js +82 -0
- package/dist/components/arcgis-toolbar/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar/index.js +2 -0
- package/dist/components/arcgis-toolbar/types.d.ts +10 -0
- package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
- package/dist/components/arcgis-toolbar-action/customElement.js +57 -0
- package/dist/components/arcgis-toolbar-action/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-action/index.js +3 -0
- package/dist/components/arcgis-toolbar-group/customElement.d.ts +38 -0
- package/dist/components/arcgis-toolbar-group/customElement.js +47 -0
- package/dist/components/arcgis-toolbar-group/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-group/index.js +2 -0
- package/dist/components/arcgis-toolbar-item/customElement.d.ts +83 -0
- package/dist/components/arcgis-toolbar-item/customElement.js +42 -0
- package/dist/components/arcgis-toolbar-item/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-item/index.js +4 -0
- package/dist/components/arcgis-toolbar-more-button/customElement.d.ts +52 -0
- package/dist/components/arcgis-toolbar-more-button/customElement.js +68 -0
- package/dist/components/arcgis-toolbar-more-button/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-more-button/index.js +6 -0
- package/dist/components/arcgis-toolbar-split-button/customElement.d.ts +51 -0
- package/dist/components/arcgis-toolbar-split-button/customElement.js +66 -0
- package/dist/components/arcgis-toolbar-split-button/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-split-button/index.js +6 -0
- package/dist/components/arcgis-unique-values-list/customElement.js +115 -95
- package/dist/components/arcgis-value-picker/customElement.d.ts +377 -0
- package/dist/components/arcgis-value-picker/customElement.js +87 -0
- package/dist/components/arcgis-value-picker/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker/index.js +3 -0
- package/dist/components/arcgis-value-picker/types.d.ts +69 -0
- package/dist/components/arcgis-value-picker-collection/customElement.d.ts +113 -0
- package/dist/components/arcgis-value-picker-collection/customElement.js +43 -0
- package/dist/components/arcgis-value-picker-collection/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-collection/index.js +1 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.d.ts +90 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.js +55 -0
- package/dist/components/arcgis-value-picker-combobox/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-combobox/index.js +3 -0
- package/dist/components/arcgis-value-picker-label/customElement.d.ts +81 -0
- package/dist/components/arcgis-value-picker-label/customElement.js +51 -0
- package/dist/components/arcgis-value-picker-label/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-label/index.js +1 -0
- package/dist/components/arcgis-value-picker-slider/customElement.d.ts +173 -0
- package/dist/components/arcgis-value-picker-slider/customElement.js +60 -0
- package/dist/components/arcgis-value-picker-slider/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-slider/index.js +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +96 -0
- package/dist/loader.js +17 -5
- package/dist/types/lumina.d.ts +79 -1
- package/dist/types/preact.d.ts +91 -1
- package/dist/types/react.d.ts +103 -1
- package/dist/types/stencil.d.ts +79 -1
- package/package.json +4 -4
- package/dist/cdn/2MN6S2HH.js +0 -2
- package/dist/cdn/4BJYJUMR.js +0 -2
- package/dist/cdn/5I5ODGDD.js +0 -2
- package/dist/cdn/AGGCAE6P.js +0 -2
- package/dist/cdn/BDF4ZLUF.js +0 -2
- package/dist/cdn/DDXCI6RK.js +0 -2
- package/dist/cdn/F45Q3BRT.js +0 -2
- package/dist/cdn/GEWXC2ZR.js +0 -2
- package/dist/cdn/HWEOBUAY.js +0 -2
- package/dist/cdn/IRIB5DXG.js +0 -2
- package/dist/cdn/KPJCYYYQ.js +0 -2
- package/dist/cdn/NKMDS2IH.js +0 -2
- package/dist/cdn/ORSF6IOL.js +0 -2
- package/dist/cdn/QEW7H22O.js +0 -2
- package/dist/cdn/UMIMGOKS.js +0 -2
- package/dist/cdn/YSXFXVP6.js +0 -2
- package/dist/cdn/YVWFGK4M.js +0 -2
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
- /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
- /package/dist/chunks/{commonFunctions.js → general.js} +0 -0
|
@@ -2,59 +2,61 @@
|
|
|
2
2
|
import { c as M } from "../../chunks/runtime.js";
|
|
3
3
|
import { u as k } from "../../chunks/useT9n.js";
|
|
4
4
|
import { substitute as E } from "@arcgis/core/intl.js";
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { css as
|
|
7
|
-
import { g as
|
|
8
|
-
const
|
|
9
|
-
function S(t,
|
|
10
|
-
const [s, a] =
|
|
11
|
-
if (!t || a === 0 || s === 0 || n == null ||
|
|
5
|
+
import { LitElement as F, nothing as h, safeStyleMap as x, safeClassMap as I } from "@arcgis/lumina";
|
|
6
|
+
import { css as O, html as y, svg as d } from "lit";
|
|
7
|
+
import { g as R } from "../../chunks/locale.js";
|
|
8
|
+
const z = O`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr;width:100%;height:100%}.svg{display:block;width:100%;height:100%}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;
|
|
9
|
+
function S(t, i, n, e, r) {
|
|
10
|
+
const [s, a] = r;
|
|
11
|
+
if (!t || a === 0 || s === 0 || n == null || i == null)
|
|
12
12
|
return null;
|
|
13
|
-
const o = n -
|
|
13
|
+
const o = n - i, l = (t.length > 1 ? t[t.length - 1].maxValue - t[0].minValue : 0) / o, [u, g] = e === "vertical" ? [a * l, s] : [a, s * l], p = t ? t.map((m) => m.count) : [], f = Math.max(...p);
|
|
14
14
|
return t.map((m) => {
|
|
15
|
-
const [
|
|
16
|
-
return [
|
|
15
|
+
const [b, $] = e === "vertical" ? [u / t.length, f !== 0 ? m.count / f * g : 0] : [f !== 0 ? m.count / f * u : 0, g / t.length], { maxValue: C } = m, v = n - C, [L, _] = e === "vertical" ? [0, v * (a / o)] : [s - $ - v * (s / o), a - b];
|
|
16
|
+
return [L, _, $, b];
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function B(t,
|
|
20
|
-
const
|
|
21
|
-
return t != null &&
|
|
19
|
+
function B(t, i, n, e, r, s) {
|
|
20
|
+
const a = [];
|
|
21
|
+
return t != null && a.push({
|
|
22
22
|
value: t,
|
|
23
23
|
symbol: "x̄",
|
|
24
24
|
lineClass: "average-data-line"
|
|
25
|
-
}),
|
|
25
|
+
}), i != null && e != null && r != null && a.push(
|
|
26
|
+
...G(e, r, i, n, t)
|
|
27
|
+
), s && a.push(...s), a;
|
|
26
28
|
}
|
|
27
|
-
function N(t,
|
|
29
|
+
function N(t, i, n, e, r) {
|
|
28
30
|
if (n == null)
|
|
29
31
|
return [0, 0, 0, 0];
|
|
30
|
-
const s = Math.round((
|
|
31
|
-
if (
|
|
32
|
-
let
|
|
33
|
-
return
|
|
32
|
+
const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
|
|
33
|
+
if (i === "vertical") {
|
|
34
|
+
let l = o - s * o || 1;
|
|
35
|
+
return l = Math.round(l) + 0.5, [0, "100%", l, l];
|
|
34
36
|
}
|
|
35
|
-
let
|
|
36
|
-
return
|
|
37
|
+
let c = s * a || 1;
|
|
38
|
+
return c = Math.round(c) + 0.5, [c, c, "100%", 0];
|
|
37
39
|
}
|
|
38
|
-
function P(t,
|
|
40
|
+
function P(t, i, n, e, r) {
|
|
39
41
|
if (n == null)
|
|
40
42
|
return [0, 0];
|
|
41
|
-
const s = Math.round((
|
|
42
|
-
return
|
|
43
|
+
const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
|
|
44
|
+
return i === "vertical" ? [a, o - s * o] : [0, s * a];
|
|
43
45
|
}
|
|
44
|
-
function T(t,
|
|
46
|
+
function T(t, i, n) {
|
|
45
47
|
if (!t || t.length === 0)
|
|
46
48
|
return null;
|
|
47
|
-
if (
|
|
48
|
-
const e = t.map((
|
|
49
|
-
...
|
|
50
|
-
color: w(
|
|
49
|
+
if (V(t)) {
|
|
50
|
+
const e = t.map((r) => ({
|
|
51
|
+
...r,
|
|
52
|
+
color: w(r.color ?? n)
|
|
51
53
|
}));
|
|
52
54
|
return e.unshift({
|
|
53
|
-
color:
|
|
55
|
+
color: i,
|
|
54
56
|
minValue: Number.NEGATIVE_INFINITY,
|
|
55
57
|
maxValue: e[0].minValue
|
|
56
58
|
}), e.push({
|
|
57
|
-
color:
|
|
59
|
+
color: i,
|
|
58
60
|
minValue: e[e.length - 1].maxValue,
|
|
59
61
|
maxValue: Number.POSITIVE_INFINITY
|
|
60
62
|
}), e;
|
|
@@ -64,45 +66,45 @@ function T(t, r, n) {
|
|
|
64
66
|
color: w(e.color ?? n)
|
|
65
67
|
}));
|
|
66
68
|
}
|
|
67
|
-
function A(t,
|
|
69
|
+
function A(t, i, n, e) {
|
|
68
70
|
if (!t || t.length === 0)
|
|
69
71
|
return n;
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
72
|
+
if (V(t)) {
|
|
73
|
+
const r = H(t, i);
|
|
74
|
+
if (r.length === 0)
|
|
73
75
|
return n;
|
|
74
76
|
if (e) {
|
|
75
|
-
const { color: s = n, weight: a } =
|
|
76
|
-
return `color-mix(in srgb, ${s} ${a /
|
|
77
|
+
const { color: s = n, weight: a } = r[0], { color: o = n, weight: c } = r[1] ?? r[0], l = a + c;
|
|
78
|
+
return `color-mix(in srgb, ${s} ${a / l * 100}%, ${o} ${c / l * 100}%)`;
|
|
77
79
|
}
|
|
78
|
-
return
|
|
80
|
+
return r[0].color ?? n;
|
|
79
81
|
}
|
|
80
|
-
return W(t,
|
|
82
|
+
return W(t, i);
|
|
81
83
|
}
|
|
82
|
-
function H(t,
|
|
84
|
+
function H(t, i) {
|
|
83
85
|
const n = [];
|
|
84
86
|
for (const e of t) {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
+
const r = Math.max(0, Math.min(i.maxValue, e.maxValue) - Math.max(i.minValue, e.minValue));
|
|
88
|
+
r > 0 && n.push({ color: e.color, weight: r });
|
|
87
89
|
}
|
|
88
|
-
return n.sort((e,
|
|
90
|
+
return n.sort((e, r) => r.weight - e.weight);
|
|
89
91
|
}
|
|
90
|
-
function W(t,
|
|
91
|
-
const n = (
|
|
92
|
+
function W(t, i) {
|
|
93
|
+
const n = (i.maxValue - i.minValue) / 2 + i.minValue;
|
|
92
94
|
if (n > t[t.length - 1].value)
|
|
93
95
|
return t[t.length - 1].color;
|
|
94
96
|
for (let e = 0; e < t.length - 1; e++) {
|
|
95
|
-
const
|
|
96
|
-
if (n <=
|
|
97
|
-
return
|
|
97
|
+
const r = t[e], s = t[e + 1];
|
|
98
|
+
if (n <= r.value)
|
|
99
|
+
return r.color;
|
|
98
100
|
if (n < s.value) {
|
|
99
|
-
const a = (n -
|
|
100
|
-
return `color-mix(in srgb, ${
|
|
101
|
+
const a = (n - r.value) / (s.value - r.value) * 100;
|
|
102
|
+
return `color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`;
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
return t[t.length - 1].color;
|
|
104
106
|
}
|
|
105
|
-
function
|
|
107
|
+
function V(t) {
|
|
106
108
|
return t[0] != null && "minValue" in t[0];
|
|
107
109
|
}
|
|
108
110
|
function w(t) {
|
|
@@ -110,76 +112,87 @@ function w(t) {
|
|
|
110
112
|
return t;
|
|
111
113
|
if (Array.isArray(t))
|
|
112
114
|
return `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3] ?? 1})`;
|
|
113
|
-
const { r, g: n, b: e, a:
|
|
114
|
-
return `rgba(${
|
|
115
|
+
const { r: i, g: n, b: e, a: r = 1 } = t;
|
|
116
|
+
return `rgba(${i}, ${n}, ${e}, ${r})`;
|
|
115
117
|
}
|
|
116
|
-
function G(t,
|
|
117
|
-
const
|
|
118
|
-
return Y(n, e
|
|
119
|
-
const l =
|
|
118
|
+
function G(t, i, n, e, r) {
|
|
119
|
+
const s = 0.06 * (i - t);
|
|
120
|
+
return Y(n, e, r).map((a, o, c) => {
|
|
121
|
+
const l = c.length / 2, u = a > r ? "+" : "-", g = o >= l ? o - l + 1 : l - o;
|
|
120
122
|
return {
|
|
121
|
-
symbol: `${
|
|
122
|
-
value:
|
|
123
|
+
symbol: `${u}${g === 1 ? "" : g}σ`,
|
|
124
|
+
value: a
|
|
123
125
|
};
|
|
124
|
-
});
|
|
126
|
+
}).filter(({ value: a }) => Math.abs(r - a) > s);
|
|
125
127
|
}
|
|
126
|
-
function Y(t,
|
|
127
|
-
if (
|
|
128
|
+
function Y(t, i, n) {
|
|
129
|
+
if (n == null || t == null)
|
|
128
130
|
return [];
|
|
129
|
-
const
|
|
130
|
-
for (let
|
|
131
|
-
|
|
132
|
-
return
|
|
131
|
+
const e = i, r = [];
|
|
132
|
+
for (let s = e * -1; s <= e; s++)
|
|
133
|
+
s !== 0 && r.push(n + s * t);
|
|
134
|
+
return r;
|
|
133
135
|
}
|
|
134
|
-
const
|
|
135
|
-
class j extends
|
|
136
|
+
const D = "var(--arcgis-histogram-bar-color)", U = "var(--arcgis-histogram-stop-color)";
|
|
137
|
+
class j extends F {
|
|
136
138
|
constructor() {
|
|
137
|
-
super(...arguments), this._messages = k(), this._normalizedStops = null, this
|
|
139
|
+
super(...arguments), this._messages = k(), this._normalizedStops = null, this.#t = (i, n) => {
|
|
140
|
+
const e = (r) => R(this._messages._lang, this._numberFormatterOptions).format(r);
|
|
141
|
+
return this.labelFormatter?.(i, n, e) ?? e(i);
|
|
142
|
+
}, this._numberFormatterOptions = {
|
|
138
143
|
maximumFractionDigits: 2
|
|
139
|
-
}, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1;
|
|
144
|
+
}, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1, this.standardDeviationCount = 1;
|
|
140
145
|
}
|
|
141
146
|
static {
|
|
142
|
-
this.properties = { containerDimensions: 16, colorStops: 0, icon: 3, average: 11, messageOverrides: 0, standardDeviation: 11, bins: 0, dataLines: 0, label: 1, layout: 3, max: 11, min: 11, colorBlendingEnabled: 5 };
|
|
147
|
+
this.properties = { containerDimensions: 16, colorStops: 0, icon: 3, labelFormatter: 0, average: 11, messageOverrides: 0, standardDeviation: 11, bins: 0, dataLines: 0, label: 1, layout: 3, max: 11, min: 11, colorBlendingEnabled: 5, standardDeviationCount: 9 };
|
|
143
148
|
}
|
|
144
149
|
static {
|
|
145
|
-
this.styles =
|
|
150
|
+
this.styles = z;
|
|
146
151
|
}
|
|
152
|
+
#t;
|
|
147
153
|
loaded() {
|
|
148
|
-
const
|
|
149
|
-
for (const s of
|
|
154
|
+
const i = new ResizeObserver((r) => {
|
|
155
|
+
for (const s of r) {
|
|
150
156
|
const { width: a, height: o } = s.contentRect;
|
|
151
157
|
this.containerDimensions = [a, o];
|
|
152
158
|
}
|
|
153
159
|
}), { width: n, height: e } = this.el.getBoundingClientRect();
|
|
154
|
-
this.containerDimensions = [n, e],
|
|
160
|
+
this.containerDimensions = [n, e], i.observe(this.el);
|
|
155
161
|
}
|
|
156
|
-
willUpdate(
|
|
157
|
-
|
|
162
|
+
willUpdate(i) {
|
|
163
|
+
i.has("colorStops") && (this._normalizedStops = T(this.colorStops, D, U));
|
|
158
164
|
}
|
|
159
165
|
render() {
|
|
160
|
-
const { label:
|
|
161
|
-
return y`<div role=img .ariaLabel=${
|
|
166
|
+
const { label: i } = this;
|
|
167
|
+
return y`<div role=img .ariaLabel=${i ?? void 0} class="content">${this._renderContent()}</div>`;
|
|
162
168
|
}
|
|
163
169
|
_renderContent() {
|
|
164
|
-
const { containerDimensions: [
|
|
165
|
-
|
|
170
|
+
const { containerDimensions: [i, n] } = this, e = "bg-fill", r = i ? [
|
|
171
|
+
d`<defs><clipPath id=${e}><rect height=${n ?? h} width=${i ?? h} x=0 y=0 /></clipPath></defs>`,
|
|
172
|
+
d`<g style=${x({ clipPath: `url(#${e})` })}><g>${this._renderBars()}</g></g>`,
|
|
173
|
+
d`<g>${this._renderLines()}</g>`
|
|
174
|
+
] : [];
|
|
175
|
+
return y`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${r}</svg>`;
|
|
166
176
|
}
|
|
167
177
|
_renderBars() {
|
|
168
|
-
const { bins:
|
|
169
|
-
return !e || !
|
|
170
|
-
const [a, o,
|
|
171
|
-
return
|
|
172
|
-
fill: A(this._normalizedStops, u,
|
|
173
|
-
})} .ariaLabel=${g} data-index=${s ?? h} height=${
|
|
178
|
+
const { bins: i, _messages: n } = this, e = S(this.bins, this.min, this.max, this.layout, this.containerDimensions);
|
|
179
|
+
return !e || !i ? null : e.map((r, s) => {
|
|
180
|
+
const [a, o, c, l] = r, u = i[s], g = n?.barLabel ? E(n.barLabel, u) : "";
|
|
181
|
+
return d`<rect style=${x({
|
|
182
|
+
fill: A(this._normalizedStops, u, D, this.colorBlendingEnabled)
|
|
183
|
+
})} .ariaLabel=${g} data-index=${s ?? h} height=${l ?? h} role=img shape-rendering=crispEdges stroke-width=0 width=${c ?? h} x=${a ?? h} y=${o ?? h} />`;
|
|
174
184
|
});
|
|
175
185
|
}
|
|
176
186
|
_renderLines() {
|
|
177
|
-
return B(this.average, this.standardDeviation, this.min, this.max, this.dataLines)?.map((n) => q({ dataLine: n, containerDimensions: this.containerDimensions, layout: this.layout, min: this.min, max: this.max, labelFormatter: this
|
|
187
|
+
return B(this.average, this.standardDeviation, this.standardDeviationCount, this.min, this.max, this.dataLines)?.map((n) => q({ dataLine: n, containerDimensions: this.containerDimensions, layout: this.layout, min: this.min, max: this.max, labelFormatter: this.#t }));
|
|
178
188
|
}
|
|
179
189
|
}
|
|
180
190
|
const q = (t) => {
|
|
181
|
-
const { containerDimensions:
|
|
182
|
-
|
|
191
|
+
const { containerDimensions: i, layout: n, min: e, max: r, dataLine: s, labelFormatter: a } = t, o = r != null && e != null ? r - e : 0, [c, l, u, g] = N(i, n, e, o, s.value), [p, f] = P(i, n, e, o, s.value), m = "symbol" in s ? [
|
|
192
|
+
d`<tspan class="data-line-symbol">${s.symbol}</tspan>`,
|
|
193
|
+
d`<tspan>${a(s.value, s.lineClass === "average-data-line" ? "average" : "standard-deviation")}</tspan>`
|
|
194
|
+
] : s.label, b = "lineClass" in s && s.lineClass ? s.lineClass : "data-line";
|
|
195
|
+
return d`<g><title>${s.value}</title><line class=${I(b)} shape-rendering=crispEdges x1=${c ?? h} x2=${l ?? h} y1=${u ?? h} y2=${g ?? h} /><text class="label" text-anchor=end transform=${(n === "horizontal" ? "rotate(270)" : void 0) ?? h} x=${p ?? h} y=${f - 2}>${m}</text></g>`;
|
|
183
196
|
};
|
|
184
197
|
M("arcgis-histogram", j);
|
|
185
198
|
export {
|
|
@@ -29,8 +29,12 @@ export abstract class ArcgisPickerInput extends LitElement {
|
|
|
29
29
|
accessor label: string;
|
|
30
30
|
/** Convenience prop to specify common popover props. */
|
|
31
31
|
accessor popoverProps: PopoverProps | undefined;
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Close the component.
|
|
34
|
+
*
|
|
35
|
+
* @param options
|
|
36
|
+
*/
|
|
37
|
+
close(options?: { focus: boolean; }): Promise<void>;
|
|
34
38
|
/** Set focus on the component. */
|
|
35
39
|
setFocus(): Promise<void>;
|
|
36
40
|
/** Emitted when the component has been closed. */
|
|
@@ -14,8 +14,8 @@ class d extends a {
|
|
|
14
14
|
static {
|
|
15
15
|
this.styles = p;
|
|
16
16
|
}
|
|
17
|
-
async close() {
|
|
18
|
-
this.onPopoverClose();
|
|
17
|
+
async close(e) {
|
|
18
|
+
this.onPopoverClose(e);
|
|
19
19
|
}
|
|
20
20
|
async setFocus() {
|
|
21
21
|
this.buttonEl?.focus();
|
|
@@ -30,16 +30,16 @@ class d extends a {
|
|
|
30
30
|
this.panelEl.value.closed = !1, this.arcgisPopoverOpen.emit(), e.stopPropagation();
|
|
31
31
|
}
|
|
32
32
|
handlePopoverKeyUp({ key: e }) {
|
|
33
|
-
e === "Escape" && this.onPopoverClose();
|
|
33
|
+
e === "Escape" && this.onPopoverClose({ focus: !0 });
|
|
34
34
|
}
|
|
35
35
|
onPopoverOpen(e) {
|
|
36
36
|
this.open && (e.composedPath().includes(this.el) || (this.open = !1));
|
|
37
37
|
}
|
|
38
|
-
onPopoverClose() {
|
|
39
|
-
this.open = !1, this.arcgisPopoverClose.emit(), setTimeout(() => this.buttonEl?.focus(), 300);
|
|
38
|
+
onPopoverClose(e) {
|
|
39
|
+
this.open = !1, this.arcgisPopoverClose.emit(), e?.focus && setTimeout(() => this.buttonEl?.focus(), 300);
|
|
40
40
|
}
|
|
41
41
|
handlePanelClose(e) {
|
|
42
|
-
e.stopPropagation(), this.onPopoverClose();
|
|
42
|
+
e.stopPropagation(), this.onPopoverClose({ focus: !0 });
|
|
43
43
|
}
|
|
44
44
|
handleButtonClick() {
|
|
45
45
|
this.open = !this.open, this.open && setTimeout(() => {
|
|
@@ -48,7 +48,7 @@ class d extends a {
|
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
50
|
const { popoverProps: e } = this;
|
|
51
|
-
return o`<calcite-popover pointer-disabled trigger-disabled @keyup=${this.handlePopoverKeyUp} .label=${this.label} .offsetDistance=${e?.offsetDistance ?? 0} .offsetSkidding=${e?.offsetSkidding ?? 0} .flipDisabled=${e?.flipDisabled ?? !1} .open=${this.disabled ? !1 : this.open} .overlayPositioning=${e?.overlayPositioning ?? "fixed"} .placement=${e?.placement ?? "bottom"} @calcitePopoverOpen=${this.handlePopoverOpen} @calcitePopoverClose=${(s) => s.stopPropagation()} .referenceElement=${e?.refElement ?? this.previewContainerEl}><calcite-panel closable .heading=${this.heading} style=${r(e?.maxHeight ? { maxHeight: e.maxHeight } : void 0)} @calcitePanelClose=${this.handlePanelClose} ${t(this.panelEl)}><slot name=content></slot><calcite-button appearance=solid slot=footer width=full .label=${this.intlDone} @click=${this.onPopoverClose}>${this.intlDone}</calcite-button></calcite-panel></calcite-popover><div class="container"><div class="preview" ${t(this.setPreviewContainerRef)}><button .disabled=${this.disabled} @click=${this.handleButtonClick} type=button .ariaLabel=${this.label} ${t(this.setButtonRef)}><slot name=preview></slot>${this.iconEnd ? o`<calcite-icon .icon=${this.iconEnd} scale=s></calcite-icon>` : null}</button></div><slot name=content-end></slot></div>`;
|
|
51
|
+
return o`<calcite-popover pointer-disabled trigger-disabled @keyup=${this.handlePopoverKeyUp} .label=${this.label} .offsetDistance=${e?.offsetDistance ?? 0} .offsetSkidding=${e?.offsetSkidding ?? 0} .flipDisabled=${e?.flipDisabled ?? !1} .open=${this.disabled ? !1 : this.open} .overlayPositioning=${e?.overlayPositioning ?? "fixed"} .placement=${e?.placement ?? "bottom"} @calcitePopoverOpen=${this.handlePopoverOpen} @calcitePopoverClose=${(s) => s.stopPropagation()} .referenceElement=${e?.refElement ?? this.previewContainerEl}><calcite-panel closable .heading=${this.heading} style=${r(e?.maxHeight ? { maxHeight: e.maxHeight } : void 0)} @calcitePanelClose=${this.handlePanelClose} ${t(this.panelEl)}><slot name=content></slot><calcite-button appearance=solid slot=footer width=full .label=${this.intlDone} @click=${() => this.onPopoverClose({ focus: !0 })}>${this.intlDone}</calcite-button></calcite-panel></calcite-popover><div class="container"><div class="preview" ${t(this.setPreviewContainerRef)}><button .disabled=${this.disabled} @click=${this.handleButtonClick} type=button .ariaLabel=${this.label} ${t(this.setButtonRef)}><slot name=preview></slot>${this.iconEnd ? o`<calcite-icon .icon=${this.iconEnd} scale=s></calcite-icon>` : null}</button></div><slot name=content-end></slot></div>`;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
n("arcgis-picker-input", d);
|
|
@@ -74,12 +74,13 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
74
74
|
*/
|
|
75
75
|
accessor disabled: boolean;
|
|
76
76
|
/**
|
|
77
|
-
* Controls where the filled segment is displayed on the track
|
|
78
|
-
*
|
|
77
|
+
* Controls where the filled segment is displayed on the track. Single-thumb sliders may only display the fill on the `start` or `end` segments, which
|
|
78
|
+
* represent the range of values up to, and range of values past the slider thumb. Range sliders with two or more thumbs may only display
|
|
79
|
+
* the fill on the `between` or `not-between` segments, which represent the range between the min and max thumbs, and the range outside the min and max thumbs.
|
|
79
80
|
*
|
|
80
81
|
* @default "start"
|
|
81
82
|
*/
|
|
82
|
-
accessor fillPlacement: "end" | "none" | "start";
|
|
83
|
+
accessor fillPlacement: "between" | "end" | "none" | "not-between" | "start";
|
|
83
84
|
/**
|
|
84
85
|
* Sets the maximum value of the slider's displayed range.
|
|
85
86
|
* When specified, the slider track is scaled from [fullRangeMin](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMin) to `fullRangeMax`, while
|