@arcgis/common-components 5.2.0-next.6 → 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/README.md +2 -2
- package/dist/cdn/4S3TDYPJ.js +2 -0
- package/dist/cdn/5HXH344K.js +2 -0
- package/dist/cdn/6DGHVYTV.js +2 -0
- package/dist/cdn/7SJH7FOK.js +2 -0
- package/dist/cdn/ADYTRVI3.js +2 -0
- package/dist/cdn/BMAH7QBK.js +2 -0
- package/dist/cdn/{232BH3SJ.js → BOSIIV32.js} +1 -1
- package/dist/cdn/DFDXMCOB.js +2 -0
- package/dist/cdn/DWUHV2MR.js +2 -0
- package/dist/cdn/EJYLPUWU.js +2 -0
- package/dist/cdn/G3IYOM43.js +2 -0
- package/dist/cdn/HY65JC4L.js +2 -0
- package/dist/cdn/I6VYJHWH.js +2 -0
- package/dist/cdn/J2J3YRCY.js +2 -0
- package/dist/cdn/JZRBBRRT.js +2 -0
- package/dist/cdn/L5RQNCAS.js +2 -0
- package/dist/cdn/NNP2GXAL.js +2 -0
- package/dist/cdn/{OOBX2C2L.js → PECTYCLV.js} +1 -1
- package/dist/cdn/PFBJ5AAH.js +2 -0
- package/dist/cdn/PMV2N3L3.js +2 -0
- package/dist/cdn/{YVCGEEMG.js → SQL3PEL7.js} +1 -1
- package/dist/cdn/T62KUQBN.js +2 -0
- package/dist/cdn/{YG4PY2H3.js → TJ7PO6GP.js} +1 -1
- package/dist/cdn/TTH3HGVV.js +2 -0
- package/dist/cdn/TWW63D32.js +2 -0
- package/dist/cdn/UI52HM3O.js +2 -0
- package/dist/cdn/WLDOB2AM.js +2 -0
- package/dist/cdn/{MINFRX4Y.js → XCIAOWMG.js} +1 -1
- package/dist/cdn/{6XE5JNJ7.js → XG35NKST.js} +3 -3
- package/dist/cdn/{WJ3TYWP2.js → XRQOTHR7.js} +1 -1
- package/dist/cdn/Z5QBBHLD.js +2 -0
- 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/layer-utils.js +52 -40
- package/dist/chunks/locale.js +14 -6
- 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.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 +245 -213
- 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 +43 -51
- 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 +292 -0
- package/dist/components/arcgis-slider-field/customElement.js +375 -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-unique-values-list/customElement.js +26 -26
- 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 +60 -0
- package/dist/loader.js +11 -5
- package/dist/types/lumina.d.ts +46 -1
- package/dist/types/preact.d.ts +52 -1
- package/dist/types/react.d.ts +58 -1
- package/dist/types/stencil.d.ts +46 -1
- package/package.json +5 -5
- 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/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/VUQJROFR.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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { formatNumber as
|
|
6
|
-
const
|
|
2
|
+
import { c as M } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as C, html as h } from "lit";
|
|
4
|
+
import { LitElement as F, createEvent as L, safeClassMap as o, nothing as y, safeStyleMap as m } from "@arcgis/lumina";
|
|
5
|
+
import { formatNumber as T } from "@arcgis/core/intl.js";
|
|
6
|
+
const c = {
|
|
7
7
|
container: "container",
|
|
8
8
|
ticksContainer: "ticks-container",
|
|
9
9
|
labelsContainer: "labels-container",
|
|
@@ -11,131 +11,152 @@ const n = {
|
|
|
11
11
|
tickMin: "tick--min",
|
|
12
12
|
tickMax: "tick--max",
|
|
13
13
|
tickLabel: "tick-label",
|
|
14
|
+
tickLabelFocused: "tick-label--focused",
|
|
15
|
+
tickLabelText: "tick-label-text",
|
|
14
16
|
baseline: "baseline"
|
|
15
|
-
},
|
|
16
|
-
class
|
|
17
|
+
}, z = C`:host{display:flex;--arcgis-ticks-font-size: var(--calcite-font-size--2);--arcgis-ticks-font-weight: var(--calcite-font-weight-medium);--arcgis-ticks-gap: 1em;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-transform: translateX(-50%);--arcgis-ticks-tick-width: .125rem}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--arcgis-ticks-font-weight);font-size:var(--arcgis-ticks-font-size);line-height:1em;position:relative;user-select:none;word-wrap:normal;word-break:normal}.baseline{background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick{position:absolute;background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick-label{position:absolute;text-align:var(--arcgis-ticks-label-text-align, center);width:var(--arcgis-ticks-label-width, var(--labels-container-width, "auto"))}.tick-label-text:hover{text-decoration:underline}.tick-label-text{display:inline-block;line-height:1}.tick-label--focused .tick-label-text{outline:2px solid var(--calcite-color-focus, var(--calcite-color-brand));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:dir(rtl){.tick-label{direction:rtl}}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:var(--arcgis-ticks-tick-width);height:var(--arcgis-ticks-tick-length);transform:var(--arcgis-ticks-tick-transform)}.tick-label{transform:translate(-50%)}.tick--min{transform:unset}.tick--max{transform:translate(-100%)}}:host([layout="vertical"]){.ticks-container{width:var(--arcgis-ticks-tick-length)}.labels-container{width:var(--labels-container-width)}.tick{width:var(--arcgis-ticks-tick-length);height:var(--arcgis-ticks-tick-width);transform:translateY(50%)}.tick-label{text-align:right;transform:translateY(50%)}.tick--min{transform:unset}.tick--max{transform:translateY(100%)}}:host([layout="horizontal"][mirrored]){.tick,.tick-label{transform:translate(50%)}.tick--min{transform:unset}.tick--max{transform:translate(100%)}}:host([layout="vertical"][mirrored]){.tick,.tick-label{transform:translateY(-50%)}.tick--min{transform:unset}.tick--max{transform:translateY(-100%)}}:host([layout="horizontal"][label-placement="start"]){.container{flex-direction:column;justify-content:flex-end}.labels-container{margin-bottom:var(--arcgis-ticks-gap)}}:host([layout="horizontal"][label-placement="end"]){.container{flex-direction:column-reverse;justify-content:flex-end}.labels-container{margin-top:var(--arcgis-ticks-gap)}}:host([layout="vertical"][label-placement="start"]){.container{flex-direction:row;justify-content:flex-end}:dir(ltr){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right}}:dir(rtl){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left;unicode-bidi:plaintext}}}:host([layout="vertical"][label-placement="end"]){.container{flex-direction:row-reverse;justify-content:flex-end}:dir(ltr){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left}}:dir(rtl){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right;unicode-bidi:plaintext}}}:host([interactive]){pointer-events:none;.tick,.tick-label{pointer-events:auto;cursor:pointer}.tick:focus{background-color:var(--calcite-color-brand);outline:2px solid var(--calcite-color-focus, var(--calcite-color-brand));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}`;
|
|
18
|
+
class A extends F {
|
|
17
19
|
constructor() {
|
|
18
|
-
super(...arguments), this._formatValue = (
|
|
20
|
+
super(...arguments), this._formatValue = (t) => T(t, this._formatOptions), this._activeTick = null, this._formatOptions = {
|
|
19
21
|
style: "decimal",
|
|
20
22
|
useGrouping: !0,
|
|
21
23
|
minimumFractionDigits: 0,
|
|
22
24
|
maximumFractionDigits: 2
|
|
23
|
-
}, this.interactive = !1, this.interpolationExponent = 0, this.labelPlacement = "end", this.layout = "horizontal", this.max = 100, this.min = 0, this.mirrored = !1, this.mode = "count", this.showLabels = !1, this.showBaseline = !1, this.values = [], this.arcgisTickClick =
|
|
25
|
+
}, this.interactive = !1, this.interpolationExponent = 0, this.labelPlacement = "end", this.layout = "horizontal", this.max = 100, this.min = 0, this.mirrored = !1, this.mode = "count", this.showLabels = !1, this.showBaseline = !1, this.values = [], this.arcgisTickClick = L({ cancelable: !1 });
|
|
24
26
|
}
|
|
25
27
|
static {
|
|
26
|
-
this.properties = { _formatOptions: 16, interactive: 7, interpolationExponent: 9, labelFormatter: 0, labelPlacement: 3, layout: 3, max: 9, min: 9, mirrored: 7, mode: 1, showLabels: 5, showBaseline: 5, values: [9, { converter: {
|
|
27
|
-
fromAttribute(
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
28
|
+
this.properties = { _activeTick: 16, _formatOptions: 16, interactive: 7, interpolationExponent: 9, labelFormatter: 0, labelPlacement: 3, layout: 3, max: 9, min: 9, mirrored: 7, mode: 1, showLabels: 5, showBaseline: 5, values: [9, { converter: {
|
|
29
|
+
fromAttribute(t) {
|
|
30
|
+
if (t.includes(","))
|
|
31
|
+
return t.split(",").filter((e) => e.trim() !== "").map(parseFloat).filter((e) => Number.isFinite(e));
|
|
30
32
|
{
|
|
31
|
-
const
|
|
32
|
-
return Number.isFinite(
|
|
33
|
+
const e = parseFloat(t);
|
|
34
|
+
return Number.isFinite(e) ? [e] : [];
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
} }] };
|
|
36
38
|
}
|
|
37
39
|
static {
|
|
38
|
-
this.styles =
|
|
40
|
+
this.styles = z;
|
|
39
41
|
}
|
|
40
42
|
updated() {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
const t = this.renderRoot.querySelector(`.${c.labelsContainer}`);
|
|
44
|
+
if (t) {
|
|
45
|
+
t.style.removeProperty("--labels-container-width"), t.style.removeProperty("--labels-container-height");
|
|
46
|
+
let e = 0, i = 0;
|
|
47
|
+
for (const a of this.renderRoot.querySelectorAll(`.${c.tickLabel}`)) {
|
|
48
|
+
const r = a.getBoundingClientRect();
|
|
49
|
+
e = Math.max(e, r.width), i = Math.max(i, r.height);
|
|
47
50
|
}
|
|
48
|
-
|
|
51
|
+
e = Math.ceil(e), i = Math.ceil(i), e && i && (t.style.setProperty("--labels-container-width", `${e}px`), t.style.setProperty("--labels-container-height", `${i}px`));
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
|
-
|
|
54
|
+
_handleBlur() {
|
|
55
|
+
this._activeTick = null;
|
|
56
|
+
}
|
|
57
|
+
_handleClick(t) {
|
|
52
58
|
if (!this.interactive)
|
|
53
59
|
return;
|
|
54
|
-
const i =
|
|
60
|
+
const i = t.currentTarget.dataset.value;
|
|
55
61
|
i && this.arcgisTickClick.emit({ value: Number(i) });
|
|
56
62
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
_handleFocus(t) {
|
|
64
|
+
this._activeTick = t.currentTarget.dataset.value ?? null;
|
|
65
|
+
}
|
|
66
|
+
_handleKeyDown(t) {
|
|
67
|
+
t.key === "Enter" && this._handleClick(t);
|
|
68
|
+
}
|
|
69
|
+
_handleMouseDown(t) {
|
|
70
|
+
this.interactive && t.preventDefault();
|
|
71
|
+
}
|
|
72
|
+
_internalLabelFormatter(t) {
|
|
73
|
+
const e = this.labelFormatter;
|
|
74
|
+
if (!e)
|
|
75
|
+
return this._formatValue(t);
|
|
76
|
+
const i = e(t, this._formatValue);
|
|
77
|
+
return i ?? this._formatValue(t);
|
|
63
78
|
}
|
|
64
79
|
render() {
|
|
65
|
-
return
|
|
80
|
+
return h`<div class=${o(c.container)} touch-action=none>${this._renderContent()}${this._renderBaseline()}</div>`;
|
|
66
81
|
}
|
|
67
82
|
_renderContent() {
|
|
68
|
-
const { interpolationExponent:
|
|
69
|
-
for (const [
|
|
70
|
-
const p = { [
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
83
|
+
const { interpolationExponent: t, max: e, min: i, mode: a, values: r, layout: n, mirrored: s, showLabels: w, interactive: k } = this, g = [], v = [];
|
|
84
|
+
for (const [f, d] of P(a, i, e, t, r)) {
|
|
85
|
+
const p = { [n === "horizontal" ? s ? "right" : "left" : s ? "top" : "bottom"]: `${f}%` }, $ = {
|
|
86
|
+
[c.tick]: !0,
|
|
87
|
+
[c.tickMin]: f === 0,
|
|
88
|
+
[c.tickMax]: f === 100
|
|
74
89
|
};
|
|
75
|
-
|
|
90
|
+
if (g.push(h`<div class=${o($)} .role=${k ? "button" : void 0} .ariaLabel=${k ? this._internalLabelFormatter(d) : void 0} style=${m(p)} data-value=${d ?? y} .tabIndex=${k ? 0 : -1} @blur=${this._handleBlur} @click=${this._handleClick} @focus=${this._handleFocus} @keydown=${this._handleKeyDown} @mousedown=${this._handleMouseDown}></div>`), w) {
|
|
91
|
+
const _ = {
|
|
92
|
+
[c.tickLabel]: !0,
|
|
93
|
+
[c.tickLabelFocused]: this._activeTick === String(d)
|
|
94
|
+
};
|
|
95
|
+
v.push(h`<div class=${o(_)} style=${m(p)} data-value=${d ?? y} @click=${this._handleClick}><span class=${o(c.tickLabelText)}>${this._internalLabelFormatter(d)}</span></div>`);
|
|
96
|
+
}
|
|
76
97
|
}
|
|
77
|
-
return [
|
|
98
|
+
return [h`<div class=${o(c.labelsContainer)}>${v}</div>`, h`<div class=${o(c.ticksContainer)}>${g}</div>`];
|
|
78
99
|
}
|
|
79
100
|
_renderBaseline() {
|
|
80
|
-
const { showBaseline:
|
|
81
|
-
return
|
|
82
|
-
[
|
|
83
|
-
[
|
|
101
|
+
const { showBaseline: t, layout: e } = this;
|
|
102
|
+
return t && h`<div class=${o(c.baseline)} style=${m({
|
|
103
|
+
[e === "horizontal" ? "width" : "height"]: "100%",
|
|
104
|
+
[e === "horizontal" ? "height" : "width"]: "0.125rem"
|
|
84
105
|
})}></div>` || "";
|
|
85
106
|
}
|
|
86
107
|
}
|
|
87
|
-
function*
|
|
88
|
-
switch (
|
|
108
|
+
function* P(l, t, e, i, a) {
|
|
109
|
+
switch (l) {
|
|
89
110
|
case "value": {
|
|
90
|
-
const
|
|
91
|
-
for (const
|
|
92
|
-
const
|
|
93
|
-
|
|
111
|
+
const r = Array.isArray(a) ? a : [a];
|
|
112
|
+
for (const n of r) {
|
|
113
|
+
const s = B(t, e, n, i) * 100;
|
|
114
|
+
s >= 0 && s <= 100 && (yield [s, n]);
|
|
94
115
|
}
|
|
95
116
|
break;
|
|
96
117
|
}
|
|
97
118
|
case "percent": {
|
|
98
|
-
if (Array.isArray(
|
|
99
|
-
for (const
|
|
100
|
-
|
|
101
|
-
else if (
|
|
102
|
-
for (let
|
|
103
|
-
yield [
|
|
119
|
+
if (Array.isArray(a))
|
|
120
|
+
for (const r of a)
|
|
121
|
+
r >= 0 && r <= 100 && (yield [r, u(t, e, r / 100, i)]);
|
|
122
|
+
else if (a > 0)
|
|
123
|
+
for (let r = 0; r <= 100; r += a)
|
|
124
|
+
yield [r, u(t, e, r / 100, i)];
|
|
104
125
|
break;
|
|
105
126
|
}
|
|
106
127
|
case "count": {
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
yield [50,
|
|
128
|
+
const r = Array.isArray(a) ? a[0] : a;
|
|
129
|
+
if (r <= 1)
|
|
130
|
+
yield [50, u(t, e, 0.5, i)];
|
|
110
131
|
else
|
|
111
|
-
for (let
|
|
112
|
-
const
|
|
113
|
-
yield [
|
|
132
|
+
for (let n = 0; n < r; n++) {
|
|
133
|
+
const s = n * 100 / (r - 1);
|
|
134
|
+
yield [s, u(t, e, s / 100, i)];
|
|
114
135
|
}
|
|
115
136
|
break;
|
|
116
137
|
}
|
|
117
138
|
}
|
|
118
139
|
}
|
|
119
|
-
function
|
|
120
|
-
return
|
|
140
|
+
function b(l, t, e) {
|
|
141
|
+
return e < l ? l : e > t ? t : e;
|
|
121
142
|
}
|
|
122
|
-
function
|
|
123
|
-
return
|
|
143
|
+
function x(l, t, e) {
|
|
144
|
+
return l + (t - l) * e;
|
|
124
145
|
}
|
|
125
|
-
function
|
|
126
|
-
let
|
|
127
|
-
if (
|
|
128
|
-
return
|
|
129
|
-
const
|
|
130
|
-
return
|
|
146
|
+
function B(l, t, e, i = 0) {
|
|
147
|
+
let a = (e - l) / (t - l);
|
|
148
|
+
if (a = b(0, 1, a), Math.abs(i) < 1e-9)
|
|
149
|
+
return a;
|
|
150
|
+
const r = 1 + Math.expm1(i) * a;
|
|
151
|
+
return a = Math.log(r) / i, b(0, 1, a);
|
|
131
152
|
}
|
|
132
|
-
function
|
|
133
|
-
if (
|
|
134
|
-
return
|
|
135
|
-
const
|
|
136
|
-
return
|
|
153
|
+
function u(l, t, e, i = 0) {
|
|
154
|
+
if (e = b(0, 1, e), Math.abs(i) < 1e-9)
|
|
155
|
+
return x(l, t, e);
|
|
156
|
+
const a = Math.expm1(i * e) / Math.expm1(i);
|
|
157
|
+
return x(l, t, a);
|
|
137
158
|
}
|
|
138
|
-
|
|
159
|
+
M("arcgis-ticks", A);
|
|
139
160
|
export {
|
|
140
|
-
|
|
161
|
+
A as ArcgisTicks
|
|
141
162
|
};
|
|
@@ -6,10 +6,10 @@ import { LitElement as K, createEvent as I } from "@arcgis/lumina";
|
|
|
6
6
|
import { Task as Q } from "@lit/task";
|
|
7
7
|
import { createRef as X, ref as L } from "lit/directives/ref.js";
|
|
8
8
|
import { log as D, composeMissingPropertyMessage as N } from "@arcgis/toolkit/log";
|
|
9
|
-
import { formatDate as F, convertDateFormatToIntlOptions as
|
|
9
|
+
import { formatDate as F, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as U, formatNumber as te } from "@arcgis/core/intl.js";
|
|
10
10
|
import ie from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
11
11
|
import { clone as O } from "@arcgis/core/core/lang.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as E, i as h } from "../../chunks/general.js";
|
|
13
13
|
import { f as S, e as z, k as B, d as Z } from "../../chunks/layer-utils.js";
|
|
14
14
|
import { u as se } from "../../chunks/useT9n.js";
|
|
15
15
|
function k(i) {
|
|
@@ -21,38 +21,38 @@ function R(i) {
|
|
|
21
21
|
function ne(i, e, s) {
|
|
22
22
|
let t;
|
|
23
23
|
return e === "unknown" ? t = F(i, {
|
|
24
|
-
|
|
24
|
+
...$("short-date-short-time"),
|
|
25
25
|
timeZone: "utc",
|
|
26
26
|
timeZoneName: "shortOffset"
|
|
27
27
|
}) : t = F(i, {
|
|
28
|
-
|
|
28
|
+
...$("short-date-short-time"),
|
|
29
29
|
timeZone: e
|
|
30
30
|
}), t;
|
|
31
31
|
}
|
|
32
32
|
function oe(i) {
|
|
33
|
-
return i ? Y(i,
|
|
33
|
+
return i ? Y(i, $("short-date")) : "";
|
|
34
34
|
}
|
|
35
35
|
function ae(i) {
|
|
36
36
|
let e;
|
|
37
|
-
return typeof i == "string" ? e = ee(i,
|
|
38
|
-
|
|
37
|
+
return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = F(i, {
|
|
38
|
+
...$("long-time"),
|
|
39
39
|
timeZone: "utc"
|
|
40
40
|
}), e;
|
|
41
41
|
}
|
|
42
42
|
function le(i, e) {
|
|
43
43
|
return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? U(i, {
|
|
44
|
-
|
|
44
|
+
...$("short-date-short-time"),
|
|
45
45
|
timeZone: "utc",
|
|
46
46
|
timeZoneName: "shortOffset"
|
|
47
47
|
}) : U(i, {
|
|
48
|
-
|
|
48
|
+
...$("short-date-short-time"),
|
|
49
49
|
timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
|
|
50
50
|
}) : e && "timeZone" in e && e.timeZone === "unknown" ? F(i, {
|
|
51
|
-
|
|
51
|
+
...$("short-date-short-time"),
|
|
52
52
|
timeZone: "utc",
|
|
53
53
|
timeZoneName: "shortOffset"
|
|
54
54
|
}) : F(i, {
|
|
55
|
-
|
|
55
|
+
...$("short-date-short-time"),
|
|
56
56
|
timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -60,7 +60,7 @@ function A(i, e, s) {
|
|
|
60
60
|
if (!S(i) && !z(i) && !B(i) && !Z(i))
|
|
61
61
|
return;
|
|
62
62
|
let t;
|
|
63
|
-
return
|
|
63
|
+
return E(i, s).fields.forEach((p) => {
|
|
64
64
|
const a = p.name, r = "domain" in p ? p.domain : void 0;
|
|
65
65
|
if (!Z(i) && i.subtypeField === a) {
|
|
66
66
|
let c;
|
|
@@ -107,7 +107,7 @@ function A(i, e, s) {
|
|
|
107
107
|
}
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function T(i, e) {
|
|
111
111
|
const s = e;
|
|
112
112
|
if (s) {
|
|
113
113
|
let t = "";
|
|
@@ -151,7 +151,7 @@ class ue extends K {
|
|
|
151
151
|
const u = h(e) && h(s) || h(t);
|
|
152
152
|
if (!h(t) && !h(e) && !h(s) ? D("error", this, N("uniqueValues")) : h(t) || (h(e) || D("error", this, N("layer")), h(s) || D("error", this, N("fieldName"))), h(e) && h(s)) {
|
|
153
153
|
const { visualizationSource: p } = this;
|
|
154
|
-
if (!
|
|
154
|
+
if (!E(e, p).fields?.filter((c) => c.name === s))
|
|
155
155
|
throw D("error", this, "Field could not be found."), new Error();
|
|
156
156
|
}
|
|
157
157
|
if (!u)
|
|
@@ -185,7 +185,7 @@ class ue extends K {
|
|
|
185
185
|
this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
|
|
186
186
|
}
|
|
187
187
|
async processProps() {
|
|
188
|
-
const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ?
|
|
188
|
+
const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ? E(e, u) : void 0)?.fields?.filter((r) => r.name === s)?.[0];
|
|
189
189
|
if (h(this.uniqueValues))
|
|
190
190
|
this.fieldInfo = {
|
|
191
191
|
layerField: a,
|
|
@@ -260,20 +260,20 @@ class ue extends K {
|
|
|
260
260
|
if (!l?.length)
|
|
261
261
|
return "";
|
|
262
262
|
const g = n ? ["small-integer", "big-integer", "integer", "single", "double", "long", "oid"].includes(n) : !1, v = n ? ["date", "date-only", "time-only"].includes(n) : !1, _ = (y) => {
|
|
263
|
-
y.sort((
|
|
263
|
+
y.sort((m, f) => m.count <= f.count ? 1 : -1);
|
|
264
264
|
}, M = (y) => {
|
|
265
|
-
const
|
|
266
|
-
y.sort((
|
|
267
|
-
if (
|
|
268
|
-
return (typeof
|
|
265
|
+
const m = c?.length;
|
|
266
|
+
y.sort((f, b) => {
|
|
267
|
+
if (!m && g)
|
|
268
|
+
return (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value) - (typeof b.value == "string" ? Number.parseFloat(b.value) : b.value);
|
|
269
269
|
{
|
|
270
|
-
const q =
|
|
270
|
+
const q = m ? T(f.value, c) : f.label ?? f.value, V = m ? T(b.value, c) : b.label ?? b.value;
|
|
271
271
|
return `${q}`.startsWith("_") ? 1 : `${V}`.startsWith("_") ? -1 : `${q}`.localeCompare(`${V}`);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
|
-
}, P = (y,
|
|
275
|
-
y.sort((
|
|
276
|
-
const q =
|
|
274
|
+
}, P = (y, m) => {
|
|
275
|
+
y.sort((f, b) => {
|
|
276
|
+
const q = m?.indexOf(f.value) ?? -1, V = m?.indexOf(b.value) ?? -1;
|
|
277
277
|
return q === V || q > -1 && V > -1 ? 0 : q > V ? -1 : 1;
|
|
278
278
|
});
|
|
279
279
|
};
|
|
@@ -281,7 +281,7 @@ class ue extends K {
|
|
|
281
281
|
const W = l.map((y) => this.renderUniqueValue(y));
|
|
282
282
|
let x;
|
|
283
283
|
return d && !p && (x = w`<div class="unique-values-content-list-msg">${r.errors.tooManyUniqueValues}</div>`), w`<div class="container"><calcite-list .label=${r.values} class="popover-unique-list" .filterEnabled=${l.length >= a} .selectionMode=${u ? "multiple" : "single"} .filterPlaceholder=${r.searchValues} @calciteListChange=${(y) => {
|
|
284
|
-
let m = y.
|
|
284
|
+
let m = y.currentTarget.selectedItems.map((f) => f.value);
|
|
285
285
|
!c && n === "date-only" ? m = m?.map((f) => R(f)) : !c && n === "time-only" ? m = m?.map((f) => k(f)) : n && ["date", "oid", "small-integer", "big-integer", "integer", "long"].includes(n) ? m = m?.map((f) => Number.parseInt(f)) : n && ["single", "double"].includes(n) && (m = m?.map((f) => Number.parseFloat(f))), !this.isSameLists(m, this.selectedValues) && (this.selectedValues = m, this.arcgisChange.emit(m));
|
|
286
286
|
}} @calciteListFilter=${() => {
|
|
287
287
|
this.dropdownNode.value && (this.dropdownNode.value.disabled = this.listNode.filteredItems.length < 4);
|
|
@@ -295,7 +295,7 @@ class ue extends K {
|
|
|
295
295
|
return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${L(this.dropdownNode)}><calcite-action slot=trigger .label=${u.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t === "count" || !h(t)} data-value=count>${u.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? u.sortAscending : u.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${u.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
|
|
296
296
|
}
|
|
297
297
|
renderUniqueValue(e) {
|
|
298
|
-
const { selectedValues: s, initialRender: t, view: u, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: r, uniqueValueInfos: c, simpleType: l } = p, d = u && "timeZone" in u && u.timeZone || "system", o = r?.length ?
|
|
298
|
+
const { selectedValues: s, initialRender: t, view: u, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: r, uniqueValueInfos: c, simpleType: l } = p, d = u && "timeZone" in u && u.timeZone || "system", o = r?.length ? T(e.value, r) : l === "date" ? ne(e.value, d) : l === "date-only" ? oe(e.value) : l === "time-only" ? ae(e.value) : l === "timestamp-offset" ? le(e.value, u) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(r?.length ? e.value : R(e.value)) : l === "time-only" ? s.includes(r?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
|
|
299
299
|
return J(`list-item_${e.value}`, w`<calcite-list-item .label=${`${o}`} .value=${`${e.value}`} .selected=${n}>${h(e.count) && (c.length > 200 && !t || c.length <= 200) ? w`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
|
|
300
300
|
}
|
|
301
301
|
}
|