@arcgis/common-components 5.2.0-next.11 → 5.2.0-next.110
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/cdn/24BY6E4U.js +2 -0
- package/dist/cdn/{MCZBUYS5.js → 26TPKYHY.js} +2 -2
- package/dist/cdn/2P3QKSBJ.js +2 -0
- package/dist/cdn/3ENYIWMV.js +2 -0
- package/dist/cdn/3YTGG7RF.js +2 -0
- package/dist/cdn/{VQLI4IE7.js → 6YKEQTXQ.js} +2 -2
- package/dist/cdn/{L5RMOAO3.js → 73AR55J2.js} +2 -2
- package/dist/cdn/746MUQGB.js +2 -0
- package/dist/cdn/{Y5Y7IXOV.js → 74MDECVO.js} +1 -1
- package/dist/cdn/AHWD5KV4.js +2 -0
- package/dist/cdn/ALOLCOFN.js +2 -0
- package/dist/cdn/B2QFPLR5.js +2 -0
- package/dist/cdn/{WEKRF34E.js → B6QUU35R.js} +2 -2
- package/dist/cdn/BGN6KRHS.js +2 -0
- package/dist/cdn/BQD6UQIB.js +2 -0
- package/dist/cdn/{JLPZ3OR2.js → BSSCT4Z5.js} +2 -2
- package/dist/cdn/CT3ZUD4C.js +2 -0
- package/dist/cdn/D2RCMLMS.js +2 -0
- package/dist/cdn/{5KS7T5BY.js → D2YGEFGL.js} +2 -2
- package/dist/cdn/DICEO27I.js +2 -0
- package/dist/cdn/{ECNI2A4K.js → E4NVOXNZ.js} +1 -1
- package/dist/cdn/{GVOQ2CB7.js → EY5CL247.js} +2 -2
- package/dist/cdn/EZH7L65E.js +2 -0
- package/dist/cdn/{LKUOAV7B.js → F2XLHROQ.js} +2 -2
- package/dist/cdn/F3UPNSY4.js +2 -0
- package/dist/cdn/F7ZMTKDL.js +2 -0
- package/dist/cdn/GAXWOAWM.js +2 -0
- package/dist/cdn/GV62Q7D7.js +2 -0
- package/dist/cdn/H4MYODDU.js +2 -0
- package/dist/cdn/{OBIWQRXY.js → IUQEF23H.js} +2 -2
- package/dist/cdn/KIWPQY6T.js +4 -0
- package/dist/cdn/KMWJCWRS.js +2 -0
- package/dist/cdn/{L2JNUMXB.js → KOQXEMEM.js} +2 -2
- package/dist/cdn/LE43VGSR.js +2 -0
- package/dist/cdn/NMDESY3T.js +2 -0
- package/dist/cdn/NXUTEL5Q.js +2 -0
- package/dist/cdn/P3DCEHGK.js +2 -0
- package/dist/cdn/P6IUT6XO.js +2 -0
- package/dist/cdn/P7I4EXSU.js +2 -0
- package/dist/cdn/Q7STPO4U.js +2 -0
- package/dist/cdn/QJJFF4PI.js +2 -0
- package/dist/cdn/{4W7JZPB6.js → SHMWZ2AY.js} +2 -2
- package/dist/cdn/{3P53QRGS.js → ST5VEH7P.js} +2 -2
- package/dist/cdn/U2K7ABGL.js +2 -0
- package/dist/cdn/VIUFXHPL.js +2 -0
- package/dist/cdn/{UGWLCTVM.js → YJTI6KPW.js} +1 -1
- package/dist/cdn/{XRARFMJ7.js → ZBSOCWIQ.js} +2 -2
- package/dist/cdn/{3V5M7OHL.js → ZZGYCYHP.js} +4 -4
- package/dist/cdn/assets/field-pick-list/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/slider-field/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/slider-histogram-range/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/element-reference-controller.js +19 -0
- package/dist/chunks/{commonFunctions.js → general.js} +1 -1
- package/dist/chunks/internal-types.js +1 -1
- package/dist/chunks/layer-utils.js +53 -41
- package/dist/chunks/locale.js +15 -7
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/strategies.js +287 -0
- package/dist/chunks/toolbar.js +9 -0
- package/dist/chunks/types.js +16 -0
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +59 -0
- package/dist/chunks/utils2.js +20 -0
- package/dist/chunks/utils3.js +7 -0
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +23 -0
- package/dist/components/arcgis-ckeditor5/customElement.js +3 -3
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +2 -2
- package/dist/components/arcgis-color-input/customElement.d.ts +2 -1
- package/dist/components/arcgis-color-input/customElement.js +2 -2
- package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +23 -0
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +2 -2
- package/dist/components/arcgis-coordinate-system-picker-tree/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.d.ts +1 -1
- package/dist/components/arcgis-field-info/customElement.js +249 -226
- 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.d.ts +15 -12
- package/dist/components/arcgis-field-pick-list/customElement.js +206 -123
- package/dist/components/arcgis-field-pick-list/index.js +4 -3
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
- package/dist/components/arcgis-histogram/customElement.d.ts +39 -2
- package/dist/components/arcgis-histogram/customElement.js +106 -91
- package/dist/components/arcgis-label-input/customElement.js +19 -15
- package/dist/components/arcgis-picker-input/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
- package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
- package/dist/components/arcgis-slider/customElement.d.ts +11 -3
- package/dist/components/arcgis-slider/customElement.js +372 -349
- package/dist/components/arcgis-slider-field/customElement.d.ts +298 -0
- package/dist/components/arcgis-slider-field/customElement.js +96 -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-slider-histogram-range/customElement.d.ts +390 -0
- package/dist/components/arcgis-slider-histogram-range/customElement.js +120 -0
- package/dist/components/arcgis-slider-histogram-range/index.d.ts +1 -0
- package/dist/components/arcgis-slider-histogram-range/index.js +3 -0
- package/dist/components/arcgis-slider-histogram-range/types.d.ts +6 -0
- package/dist/components/arcgis-slider-input/customElement.js +1 -1
- package/dist/components/arcgis-ticks/customElement.d.ts +11 -3
- package/dist/components/arcgis-ticks/customElement.js +101 -80
- package/dist/components/arcgis-toolbar/customElement.d.ts +67 -0
- package/dist/components/arcgis-toolbar/customElement.js +108 -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 +41 -0
- package/dist/components/arcgis-toolbar-action/customElement.d.ts +97 -0
- package/dist/components/arcgis-toolbar-action/customElement.js +52 -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 +48 -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 +67 -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-toolbar-stack/customElement.d.ts +48 -0
- package/dist/components/arcgis-toolbar-stack/customElement.js +174 -0
- package/dist/components/arcgis-toolbar-stack/index.d.ts +1 -0
- package/dist/components/arcgis-toolbar-stack/index.js +1 -0
- package/dist/components/arcgis-unique-values-list/customElement.js +116 -96
- package/dist/components/arcgis-value-picker/customElement.js +6 -6
- package/dist/components/arcgis-value-picker-collection/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-combobox/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-label/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-slider/customElement.js +1 -1
- 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 +62 -0
- package/dist/index.js +3 -1
- package/dist/loader.js +14 -5
- package/dist/types/lumina.d.ts +58 -2
- package/dist/types/preact.d.ts +67 -2
- package/dist/types/react.d.ts +76 -2
- package/dist/types/stencil.d.ts +60 -4
- package/dist/utils/types.d.ts +14 -1
- package/package.json +6 -6
- package/dist/cdn/2XA6O2MP.js +0 -2
- package/dist/cdn/4BJYJUMR.js +0 -2
- package/dist/cdn/5U5NQ3F5.js +0 -2
- package/dist/cdn/77HZGUSC.js +0 -2
- package/dist/cdn/A3CISHRB.js +0 -2
- package/dist/cdn/AFBKMYU6.js +0 -4
- package/dist/cdn/IUJ4ILLQ.js +0 -2
- package/dist/cdn/JPD7Z3MB.js +0 -2
- package/dist/cdn/LB7I345F.js +0 -2
- package/dist/cdn/LBD3GPSD.js +0 -2
- package/dist/cdn/MCH3WQ4X.js +0 -2
- package/dist/cdn/N7C4DINF.js +0 -2
- package/dist/cdn/NKMDS2IH.js +0 -2
- package/dist/cdn/PSITQBDP.js +0 -2
- package/dist/cdn/TXYPZ6MB.js +0 -2
- package/dist/cdn/WLYFLEI6.js +0 -2
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import { c as k } from "../../chunks/runtime.js";
|
|
3
|
+
import { ref as _ } from "lit/directives/ref.js";
|
|
4
|
+
import { css as C, render as w, nothing as P, html as p } from "lit";
|
|
5
|
+
import { LitElement as z, nothing as v } from "@arcgis/lumina";
|
|
6
|
+
import { useDirection as L } from "@arcgis/lumina/controllers";
|
|
7
|
+
import { s as x, a as T, b as $, c as A } from "../../chunks/toolbar.js";
|
|
8
|
+
import { AsyncDirective as R } from "lit/async-directive.js";
|
|
9
|
+
import { directive as M, PartType as D } from "lit/directive.js";
|
|
10
|
+
import { getCommittedValue as u, clearPart as E, insertPart as b, setCommittedValue as f } from "lit/directive-helpers.js";
|
|
11
|
+
const V = C`:host{--calcite-internal-animation-timing-slow: 0}.toolbar-stack{align-items:stretch;display:flex;max-inline-size:min(100cqw,100vw);max-block-size:min(100cqh,100vh);min-inline-size:0;min-block-size:0;gap:8px}.stack{display:flex}.stack[data-horizontal-position=right]{justify-content:right}.stack[data-horizontal-position=left]{justify-content:left}.line{display:flex;flex:none;gap:8px}:host([layout="vertical"]) .line{flex-direction:column;max-height:min(100cqh - var(--arcgis-internal-attribution-space-top) - 2 * var(--calcite-space-lg),100vh - 2 * var(--calcite-space-lg))}:host([layout="horizontal"]) .line{flex-direction:row}.line[data-alignment=top]{justify-content:flex-start}.line[data-alignment=bottom]{justify-content:flex-end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{flex-direction:row}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%;calcite-action-bar{min-width:auto}}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%;calcite-action-bar{min-height:auto}}:host([toolbar-kind="floating"]) .toolbar-shadow-wrapper{box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));min-inline-size:0;min-block-size:0}`;
|
|
12
|
+
class j {
|
|
13
|
+
constructor(t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set()) {
|
|
14
|
+
this.cachedParts = t, this.directives = e;
|
|
15
|
+
}
|
|
16
|
+
moveAllToCache() {
|
|
17
|
+
for (const t of this.directives)
|
|
18
|
+
t.moveToCache();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
class S extends R {
|
|
22
|
+
#e;
|
|
23
|
+
#i;
|
|
24
|
+
#t;
|
|
25
|
+
constructor(t) {
|
|
26
|
+
if (super(t), t.type !== D.CHILD)
|
|
27
|
+
throw new Error("sharedCache() can only be used in child expressions");
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @param _store Shared store backing this and other caching directives with the shared cache
|
|
31
|
+
* @param _key Uniquely identifies the element being rendered
|
|
32
|
+
* @param value The content to render
|
|
33
|
+
*/
|
|
34
|
+
render(t, e, o) {
|
|
35
|
+
return [o];
|
|
36
|
+
}
|
|
37
|
+
update(t, [e, o, a]) {
|
|
38
|
+
this.#t !== e && (this.#t && this.#t.directives.delete(this), e.directives.add(this), this.#t = e), this.#e = t, this.#i = o;
|
|
39
|
+
const i = e.cachedParts.get(o), s = i ? u(i).pop() : void 0;
|
|
40
|
+
return s && (E(t), b(t, void 0, s), f(t, [s])), this.render(e, o, a);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* During the update phase, a toolbar may need to be pulled from the cache in a situation
|
|
44
|
+
* where it was still on the page from the previous render.
|
|
45
|
+
*
|
|
46
|
+
* To work around this problem, during parent component render phase a pre-caching
|
|
47
|
+
* step moves all cacheable elements into the cache. This is the method called by
|
|
48
|
+
* that pre-caching step.
|
|
49
|
+
*
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
moveToCache() {
|
|
53
|
+
const t = this.#e, e = this.#t;
|
|
54
|
+
if (!t || !e)
|
|
55
|
+
return;
|
|
56
|
+
const a = u(t).pop();
|
|
57
|
+
if (!a)
|
|
58
|
+
return;
|
|
59
|
+
let i = e.cachedParts.get(this.#i);
|
|
60
|
+
if (!i) {
|
|
61
|
+
const c = document.createDocumentFragment();
|
|
62
|
+
i = w(P, c), e.cachedParts.set(this.#i, i);
|
|
63
|
+
}
|
|
64
|
+
if (u(i).length > 0)
|
|
65
|
+
throw new Error("sharedCache() keys must be unique");
|
|
66
|
+
f(i, [a]), b(i, void 0, a);
|
|
67
|
+
}
|
|
68
|
+
disconnected() {
|
|
69
|
+
this.#t?.directives.delete(this);
|
|
70
|
+
}
|
|
71
|
+
reconnected() {
|
|
72
|
+
this.#t?.directives.add(this);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const q = M(S), O = 8;
|
|
76
|
+
class K extends z {
|
|
77
|
+
constructor() {
|
|
78
|
+
super(), this.#e = new ResizeObserver((t) => this._updateMeasurement(t)), this.#i = new MutationObserver(() => this._syncToolbars()), this.#r = L(), this.#o = new j(), this._layout = "horizontal", this._availableLength = 0, this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
|
|
79
|
+
}
|
|
80
|
+
static {
|
|
81
|
+
this.properties = { _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3 };
|
|
82
|
+
}
|
|
83
|
+
static {
|
|
84
|
+
this.styles = [V, x, T, $, A];
|
|
85
|
+
}
|
|
86
|
+
#e;
|
|
87
|
+
#i;
|
|
88
|
+
#t;
|
|
89
|
+
#r;
|
|
90
|
+
#o;
|
|
91
|
+
#a;
|
|
92
|
+
get effectiveRelativeDirection() {
|
|
93
|
+
const [t, e] = this.relativePosition.split("-"), o = this.#r;
|
|
94
|
+
switch (e) {
|
|
95
|
+
case "left":
|
|
96
|
+
case "right":
|
|
97
|
+
return `${t}-${e}`;
|
|
98
|
+
case "end":
|
|
99
|
+
return `${t}-${o === "ltr" ? "right" : "left"}`;
|
|
100
|
+
case "start":
|
|
101
|
+
return `${t}-${o === "ltr" ? "left" : "right"}`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
get layout() {
|
|
105
|
+
return this._layout;
|
|
106
|
+
}
|
|
107
|
+
set layout(t) {
|
|
108
|
+
t !== this._layout && (this._layout = t, this._updateMeasurement());
|
|
109
|
+
}
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
super.connectedCallback(), this._connectMeasurement(this.#a), this.#i.observe(this.el, { childList: !0 }), this._syncToolbars();
|
|
112
|
+
}
|
|
113
|
+
disconnectedCallback() {
|
|
114
|
+
this.#e.disconnect(), this.#i.disconnect(), super.disconnectedCallback();
|
|
115
|
+
}
|
|
116
|
+
_setRulerEl(t) {
|
|
117
|
+
this.#a !== t && (this.#a = t, this.isConnected && this._connectMeasurement(t));
|
|
118
|
+
}
|
|
119
|
+
_connectMeasurement(t) {
|
|
120
|
+
this.#e.disconnect(), t && (this.#e.observe(t), this._updateMeasurement());
|
|
121
|
+
}
|
|
122
|
+
_updateMeasurement(t) {
|
|
123
|
+
const e = t?.at(0)?.contentRect ?? this.#a?.getBoundingClientRect();
|
|
124
|
+
e && (this._availableLength = this.layout === "horizontal" ? e.width : e.height);
|
|
125
|
+
}
|
|
126
|
+
_syncToolbars() {
|
|
127
|
+
this.#t?.abort();
|
|
128
|
+
const t = Array.from(this.el.children).filter(W), e = new AbortController();
|
|
129
|
+
this.#t = e, Promise.all(t.map((o) => o.componentOnReady())).then(() => {
|
|
130
|
+
!this.isConnected || e.signal.aborted || (this._toolbars = t);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
_arrangeToolbarLines(t, e) {
|
|
134
|
+
const o = t.map((r) => {
|
|
135
|
+
const d = r.allocate(e, this._availableLength);
|
|
136
|
+
return { toolbar: r, budget: d.reduce((g, y) => g + y.budget, 0) };
|
|
137
|
+
}), a = [];
|
|
138
|
+
let i = [], s = 0;
|
|
139
|
+
for (const r of o) {
|
|
140
|
+
const d = s + (i.length === 0 ? 0 : O) + r.budget;
|
|
141
|
+
i.length > 0 && d > this._availableLength ? (a.push(i), i = [r], s = r.budget) : (i.push(r), s = d);
|
|
142
|
+
}
|
|
143
|
+
i.length > 0 && a.push(i);
|
|
144
|
+
const [c, h] = e.relativePosition.split("-"), l = e.layout === "vertical";
|
|
145
|
+
return (l ? h === "right" : c === "bottom") && a.reverse(), (l ? c === "bottom" : h === "right") && a.forEach((r) => r.reverse()), a;
|
|
146
|
+
}
|
|
147
|
+
#s;
|
|
148
|
+
render() {
|
|
149
|
+
const t = this._toolbars;
|
|
150
|
+
if (!t?.length) {
|
|
151
|
+
this.#s?.length && (this.#o.moveAllToCache(), this.#s = []);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const e = {
|
|
155
|
+
layout: this.layout,
|
|
156
|
+
relativePosition: this.effectiveRelativeDirection,
|
|
157
|
+
scale: this.scale,
|
|
158
|
+
tooltipAppearance: this.tooltipAppearance
|
|
159
|
+
}, o = this._arrangeToolbarLines(t, e);
|
|
160
|
+
U(this.#s, o) || (this.#o.moveAllToCache(), this.#s = o.map((h) => h.map(({ toolbar: l }) => l)));
|
|
161
|
+
const [a, i] = e.relativePosition.split("-"), s = this.layout === "vertical" ? a : i, c = this.#o;
|
|
162
|
+
return p`<div class="stack" data-horizontal-position=${i ?? v}><div class="ruler" ${_(this._setRulerEl)}></div><div class="toolbar-stack">${o.map((h) => p`<div class="line" data-alignment=${s ?? v}>${h.map(({ toolbar: l, budget: m }) => q(c, l, l.proxiedRender(e, m, this.toolbarKind)))}</div>`)}</div></div>`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function W(n) {
|
|
166
|
+
return n.localName === "arcgis-toolbar";
|
|
167
|
+
}
|
|
168
|
+
function U(n, t) {
|
|
169
|
+
return n?.length === t.length && t.every((e, o) => e.length === n[o].length && e.every(({ toolbar: a }, i) => a === n[o][i]));
|
|
170
|
+
}
|
|
171
|
+
k("arcgis-toolbar-stack", K);
|
|
172
|
+
export {
|
|
173
|
+
K as ArcgisToolbarStack
|
|
174
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { createRef as X, ref as
|
|
8
|
-
import { log as
|
|
9
|
-
import { formatDate as
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
|
+
import { c as P } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as G } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as J, createEvent as T } from "@arcgis/lumina";
|
|
5
|
+
import { Task as K } from "@lit/task";
|
|
6
|
+
import { css as Q, html as F } from "lit";
|
|
7
|
+
import { createRef as X, ref as E } from "lit/directives/ref.js";
|
|
8
|
+
import { log as S, composeMissingPropertyMessage as Z } from "@arcgis/toolkit/log";
|
|
9
|
+
import { formatDate as D, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as z, formatNumber as te } from "@arcgis/core/intl.js";
|
|
10
10
|
import ie from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import * as se from "@arcgis/core/core/reactiveUtils.js";
|
|
12
|
+
import { clone as I } from "@arcgis/core/core/lang.js";
|
|
13
|
+
import { g as O, i as h } from "../../chunks/general.js";
|
|
14
|
+
import { f as w, e as L, k as A, d as N } from "../../chunks/layer-utils.js";
|
|
15
|
+
import { u as ne } from "../../chunks/useT9n.js";
|
|
15
16
|
function k(i) {
|
|
16
17
|
return (/* @__PURE__ */ new Date(`1970-01-01T${i}Z`)).getTime();
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function B(i) {
|
|
19
20
|
return (/* @__PURE__ */ new Date(`${i} 00:00:00`)).getTime();
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function oe(i, e, s) {
|
|
22
23
|
let t;
|
|
23
|
-
return e === "unknown" ? t =
|
|
24
|
-
|
|
24
|
+
return e === "unknown" ? t = D(i, {
|
|
25
|
+
...$("short-date-short-time"),
|
|
25
26
|
timeZone: "utc",
|
|
26
27
|
timeZoneName: "shortOffset"
|
|
27
|
-
}) : t =
|
|
28
|
-
|
|
28
|
+
}) : t = D(i, {
|
|
29
|
+
...$("short-date-short-time"),
|
|
29
30
|
timeZone: e
|
|
30
31
|
}), t;
|
|
31
32
|
}
|
|
32
|
-
function oe(i) {
|
|
33
|
-
return i ? Y(i, b("short-date")) : "";
|
|
34
|
-
}
|
|
35
33
|
function ae(i) {
|
|
34
|
+
return i ? Y(i, $("short-date")) : "";
|
|
35
|
+
}
|
|
36
|
+
function le(i) {
|
|
36
37
|
let e;
|
|
37
|
-
return typeof i == "string" ? e = ee(i,
|
|
38
|
-
|
|
38
|
+
return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = D(i, {
|
|
39
|
+
...$("long-time"),
|
|
39
40
|
timeZone: "utc"
|
|
40
41
|
}), e;
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ?
|
|
44
|
-
|
|
43
|
+
function re(i, e) {
|
|
44
|
+
return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? z(i, {
|
|
45
|
+
...$("short-date-short-time"),
|
|
45
46
|
timeZone: "utc",
|
|
46
47
|
timeZoneName: "shortOffset"
|
|
47
|
-
}) :
|
|
48
|
-
|
|
48
|
+
}) : z(i, {
|
|
49
|
+
...$("short-date-short-time"),
|
|
49
50
|
timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
|
|
50
|
-
}) : e && "timeZone" in e && e.timeZone === "unknown" ?
|
|
51
|
-
|
|
51
|
+
}) : e && "timeZone" in e && e.timeZone === "unknown" ? D(i, {
|
|
52
|
+
...$("short-date-short-time"),
|
|
52
53
|
timeZone: "utc",
|
|
53
54
|
timeZoneName: "shortOffset"
|
|
54
|
-
}) :
|
|
55
|
-
|
|
55
|
+
}) : D(i, {
|
|
56
|
+
...$("short-date-short-time"),
|
|
56
57
|
timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
if (!
|
|
60
|
+
function R(i, e, s) {
|
|
61
|
+
if (!w(i) && !L(i) && !A(i) && !N(i))
|
|
61
62
|
return;
|
|
62
63
|
let t;
|
|
63
|
-
return
|
|
64
|
-
const a = p.name,
|
|
65
|
-
if (!
|
|
64
|
+
return O(i, s).fields.forEach((p) => {
|
|
65
|
+
const a = p.name, u = "domain" in p ? p.domain : void 0;
|
|
66
|
+
if (!N(i) && i.subtypeField === a) {
|
|
66
67
|
let c;
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
A(i) || w(i) ? c = i.subtypes : c = i.parent.subtypes, c.forEach((l) => {
|
|
69
|
+
L(i) && i.subtypeCode !== l.code || (e.name === a && (t = t || [], t.push({ code: l.code, name: l.name })), l.domains && Object.keys(l.domains).forEach((d) => {
|
|
69
70
|
if (e.name === d) {
|
|
70
71
|
const o = l.domains[d];
|
|
71
72
|
o?.type === "coded-value" && o?.codedValues && o.codedValues.forEach((n) => {
|
|
@@ -78,9 +79,9 @@ function A(i, e, s) {
|
|
|
78
79
|
}));
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
if (e.name === a && (
|
|
82
|
-
const c =
|
|
83
|
-
|
|
82
|
+
if (e.name === a && (w(i) || N(i))) {
|
|
83
|
+
const c = w(i) ? i.typeIdField : void 0, l = w(i) ? i.types : void 0;
|
|
84
|
+
w(i) && c && l ? (c === a ? t = l.map(
|
|
84
85
|
(d) => (
|
|
85
86
|
// fake coded Values
|
|
86
87
|
{
|
|
@@ -90,29 +91,29 @@ function A(i, e, s) {
|
|
|
90
91
|
)
|
|
91
92
|
) : (t = t || [], l.forEach((d) => {
|
|
92
93
|
if (!d.domains?.[a] || d.domains[a].type === "inherited") {
|
|
93
|
-
const o =
|
|
94
|
+
const o = u;
|
|
94
95
|
o?.codedValues && o.codedValues.forEach((n) => {
|
|
95
96
|
let g = !1;
|
|
96
97
|
t.forEach((v) => {
|
|
97
98
|
v.code === n.code && (g = !0, `| ${v.name} |`.includes(`| ${n.name} |`) || (v.name += ` | ${n.name}`));
|
|
98
|
-
}), g || t.push(
|
|
99
|
+
}), g || t.push(I(n));
|
|
99
100
|
});
|
|
100
101
|
} else d.domains?.[a]?.codedValues && d.domains[a].codedValues.forEach((o) => {
|
|
101
102
|
let n = !1;
|
|
102
103
|
t.forEach((g) => {
|
|
103
104
|
g.code === o.code && (n = !0, `| ${g.name} |`.includes(`| ${o.name} |`) || (g.name += ` | ${o.name}`));
|
|
104
|
-
}), n || t.push(
|
|
105
|
+
}), n || t.push(I(o));
|
|
105
106
|
});
|
|
106
|
-
})), !t?.length &&
|
|
107
|
+
})), !t?.length && u?.codedValues && (t = I(u.codedValues))) : u?.codedValues && (t = u.codedValues);
|
|
107
108
|
}
|
|
108
109
|
}), t;
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
+
function x(i, e) {
|
|
111
112
|
const s = e;
|
|
112
113
|
if (s) {
|
|
113
114
|
let t = "";
|
|
114
|
-
for (let
|
|
115
|
-
const p = s[
|
|
115
|
+
for (let r = 0; r < s.length; r++) {
|
|
116
|
+
const p = s[r];
|
|
116
117
|
p.code == i && (t += (t.length ? " | " : "") + p.name);
|
|
117
118
|
}
|
|
118
119
|
return t.length || (t = `${i}`), t;
|
|
@@ -122,7 +123,7 @@ function E(i, e) {
|
|
|
122
123
|
function C(i) {
|
|
123
124
|
return ["small-integer", "big-integer", "integer", "single", "double", "long"].includes(i.type);
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function H(i) {
|
|
126
127
|
switch (i.type) {
|
|
127
128
|
case "small-integer":
|
|
128
129
|
case "big-integer":
|
|
@@ -143,33 +144,33 @@ function j(i) {
|
|
|
143
144
|
return i.type;
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
|
-
const
|
|
147
|
-
class
|
|
147
|
+
const ue = Q`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`;
|
|
148
|
+
class ce extends J {
|
|
148
149
|
constructor() {
|
|
149
|
-
super(...arguments), this.dropdownNode = X(), this._messages =
|
|
150
|
+
super(...arguments), this.dropdownNode = X(), this.initialized = !1, this._messages = ne({ blocking: !0 }), this._propWatcherTask = new K(this, {
|
|
150
151
|
task: async ([e, s, t]) => {
|
|
151
|
-
const
|
|
152
|
-
if (!h(t) && !h(e) && !h(s) ?
|
|
152
|
+
const r = h(e) && h(s) || h(t);
|
|
153
|
+
if (!h(t) && !h(e) && !h(s) ? S("error", this, Z("uniqueValues")) : h(t) || (h(e) || S("error", this, Z("layer")), h(s) || S("error", this, Z("fieldName"))), h(e) && h(s)) {
|
|
153
154
|
const { visualizationSource: p } = this;
|
|
154
|
-
if (!
|
|
155
|
-
throw
|
|
155
|
+
if (!O(e, p).fields?.filter((c) => c.name === s))
|
|
156
|
+
throw S("error", this, "Field could not be found."), new Error();
|
|
156
157
|
}
|
|
157
|
-
if (!
|
|
158
|
+
if (!r)
|
|
158
159
|
throw new Error();
|
|
159
|
-
await this.processProps();
|
|
160
|
+
await this.processProps(), this._propWatcherTask.autoRun = !1;
|
|
160
161
|
},
|
|
161
162
|
args: () => [
|
|
162
163
|
this.layer,
|
|
163
164
|
this.fieldName,
|
|
164
165
|
this.uniqueValues
|
|
165
166
|
]
|
|
166
|
-
}), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange =
|
|
167
|
+
}), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = T(), this.arcgisSortByChange = T(), this.arcgisLoad = T();
|
|
167
168
|
}
|
|
168
169
|
static {
|
|
169
170
|
this.properties = { initialRender: 16, view: 0, layer: 0, visualizationSource: 1, fieldName: 1, uniqueValues: 0, numberFormatOptions: 0, selectedValues: 0, sortBy: 1, multiple: 5, partialUniqueValues: 5, showFilterLength: 9, maxHeight: 9 };
|
|
170
171
|
}
|
|
171
172
|
static {
|
|
172
|
-
this.styles =
|
|
173
|
+
this.styles = ue;
|
|
173
174
|
}
|
|
174
175
|
async setFocus() {
|
|
175
176
|
this.listNode?.setFocus();
|
|
@@ -184,48 +185,62 @@ class ue extends K {
|
|
|
184
185
|
loaded() {
|
|
185
186
|
this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
|
|
186
187
|
}
|
|
188
|
+
willUpdate(e) {
|
|
189
|
+
this.initialized && (e.has("layer") || e.has("visualizationSource") || e.has("fieldName") || e.has("uniqueValues")) && this.processProps().then(() => this.requestUpdate()), e.has("maxHeight") && this.maxHeight && this.listNode?.setAttribute("style", `max-height: ${this.maxHeight || 400}px`);
|
|
190
|
+
}
|
|
187
191
|
async processProps() {
|
|
188
|
-
const { layer: e, fieldName: s, view: t, visualizationSource:
|
|
192
|
+
const { layer: e, fieldName: s, view: t, visualizationSource: r } = this, a = (e ? O(e, r) : void 0)?.fields?.filter((u) => u.name === s)?.[0];
|
|
193
|
+
if (!a) {
|
|
194
|
+
S("error", this, `Field '${s}' not found in layer`), this.fieldInfo = {
|
|
195
|
+
layerField: a,
|
|
196
|
+
fieldDomains: void 0,
|
|
197
|
+
simpleType: void 0,
|
|
198
|
+
partialUniqueValues: !1,
|
|
199
|
+
uniqueValueInfos: []
|
|
200
|
+
};
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
189
203
|
if (h(this.uniqueValues))
|
|
190
204
|
this.fieldInfo = {
|
|
191
205
|
layerField: a,
|
|
192
|
-
fieldDomains: e && a ?
|
|
193
|
-
simpleType: e && a ?
|
|
206
|
+
fieldDomains: e && a ? R(e, a, r) : void 0,
|
|
207
|
+
simpleType: e && a ? H(a) : void 0,
|
|
194
208
|
partialUniqueValues: this.partialUniqueValues ?? !1,
|
|
195
209
|
uniqueValueInfos: this.uniqueValues
|
|
196
210
|
}, this.arcgisLoad.emit();
|
|
197
211
|
else if (e && a) {
|
|
198
212
|
this.fieldInfo = {
|
|
199
213
|
layerField: a,
|
|
200
|
-
fieldDomains:
|
|
201
|
-
simpleType:
|
|
214
|
+
fieldDomains: R(e, a, r),
|
|
215
|
+
simpleType: H(a),
|
|
202
216
|
partialUniqueValues: !1
|
|
203
217
|
};
|
|
204
|
-
const { fieldInfo:
|
|
218
|
+
const { fieldInfo: u } = this;
|
|
205
219
|
try {
|
|
206
220
|
const c = await ie({
|
|
207
221
|
layer: e,
|
|
208
222
|
view: t,
|
|
209
223
|
field: s,
|
|
210
224
|
sqlWhere: "definitionExpression" in e ? e.definitionExpression ?? void 0 : void 0,
|
|
211
|
-
forBinning:
|
|
225
|
+
forBinning: r === "feature-reduction"
|
|
212
226
|
}), l = C(a), d = c.uniqueValueInfos.filter((o) => h(o.value) ? a.type === "string" && !l || a.type === "guid" ? o.value !== "<Null>" && `${o.value}`.trim() !== "" : (C(a) || a.type === "oid" || l, o.value !== "<Null>" && o.value !== "") : !1);
|
|
213
|
-
d.sort((o, n) => o.count > n.count ? -1 : o.count < n.count ? 1 : 0),
|
|
227
|
+
d.sort((o, n) => o.count > n.count ? -1 : o.count < n.count ? 1 : 0), u.fieldDomains?.length && u.fieldDomains.forEach((o) => {
|
|
214
228
|
d.find((n) => n.value === o.code) || d.push({
|
|
215
229
|
value: o.code,
|
|
216
230
|
count: 0
|
|
217
231
|
});
|
|
218
|
-
}),
|
|
232
|
+
}), u.uniqueValueInfos = d, u.partialUniqueValues = c.uniqueValueInfos.length === 2e3, this.initialized || this.arcgisLoad.emit(), this.setUpTimeZoneHandle(), this.initialized = !0;
|
|
219
233
|
} catch (c) {
|
|
220
|
-
if (
|
|
234
|
+
if (S("error", this, `uniqueValues() - ${c.message}`), this.hasFieldDomains(u)) {
|
|
221
235
|
const d = [];
|
|
222
|
-
|
|
236
|
+
u.fieldDomains.forEach((o) => {
|
|
223
237
|
d.find((n) => n.value === o.code) || d.push({
|
|
224
238
|
value: o.code,
|
|
225
239
|
count: void 0
|
|
226
240
|
});
|
|
227
241
|
});
|
|
228
242
|
}
|
|
243
|
+
this.initialized = !0;
|
|
229
244
|
}
|
|
230
245
|
setTimeout(() => {
|
|
231
246
|
this.initialRender = !1, this.listNode?.setFocus();
|
|
@@ -240,6 +255,11 @@ class ue extends K {
|
|
|
240
255
|
const t = e.currentTarget.selectedItems?.[0].getAttribute("data-value");
|
|
241
256
|
this.sortBy = t || void 0, this.arcgisSortByChange.emit(t || void 0);
|
|
242
257
|
}
|
|
258
|
+
setUpTimeZoneHandle() {
|
|
259
|
+
this.timeZoneHandle?.remove();
|
|
260
|
+
const { view: e, fieldInfo: s } = this;
|
|
261
|
+
s.simpleType && ["date", "timestamp-offset"].includes(s.simpleType) && (this.timeZoneHandle = se.watch(() => e?.timeZone, () => this.requestUpdate()));
|
|
262
|
+
}
|
|
243
263
|
isSameLists(e, s) {
|
|
244
264
|
if (!e && !s)
|
|
245
265
|
return !0;
|
|
@@ -256,50 +276,50 @@ class ue extends K {
|
|
|
256
276
|
render() {
|
|
257
277
|
return this._propWatcherTask.render({
|
|
258
278
|
complete: () => {
|
|
259
|
-
const { fieldInfo: e, selectedValues: s, sortBy: t, multiple:
|
|
279
|
+
const { fieldInfo: e, selectedValues: s, sortBy: t, multiple: r, initialRender: p, showFilterLength: a, _messages: u } = this, { fieldDomains: c, uniqueValueInfos: l, partialUniqueValues: d, layerField: o } = e, n = o?.type;
|
|
260
280
|
if (!l?.length)
|
|
261
281
|
return "";
|
|
262
282
|
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((
|
|
264
|
-
},
|
|
265
|
-
const
|
|
266
|
-
y.sort((
|
|
267
|
-
if (
|
|
268
|
-
return (typeof
|
|
283
|
+
y.sort((m, f) => m.count <= f.count ? 1 : -1);
|
|
284
|
+
}, j = (y) => {
|
|
285
|
+
const m = c?.length;
|
|
286
|
+
y.sort((f, b) => {
|
|
287
|
+
if (!m && g)
|
|
288
|
+
return (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value) - (typeof b.value == "string" ? Number.parseFloat(b.value) : b.value);
|
|
269
289
|
{
|
|
270
|
-
const q =
|
|
290
|
+
const q = m ? x(f.value, c) : f.label ?? f.value, V = m ? x(b.value, c) : b.label ?? b.value;
|
|
271
291
|
return `${q}`.startsWith("_") ? 1 : `${V}`.startsWith("_") ? -1 : `${q}`.localeCompare(`${V}`);
|
|
272
292
|
}
|
|
273
293
|
});
|
|
274
|
-
},
|
|
275
|
-
y.sort((
|
|
276
|
-
const q =
|
|
294
|
+
}, M = (y, m) => {
|
|
295
|
+
y.sort((f, b) => {
|
|
296
|
+
const q = m?.indexOf(f.value) ?? -1, V = m?.indexOf(b.value) ?? -1;
|
|
277
297
|
return q === V || q > -1 && V > -1 ? 0 : q > V ? -1 : 1;
|
|
278
298
|
});
|
|
279
299
|
};
|
|
280
|
-
|
|
300
|
+
j(l), !t || t === "count" ? _(l) : t === "selected" && M(l, s);
|
|
281
301
|
const W = l.map((y) => this.renderUniqueValue(y));
|
|
282
|
-
let
|
|
283
|
-
return d && !p && (
|
|
284
|
-
let m = y.
|
|
285
|
-
!c && n === "date-only" ? m = m?.map((f) =>
|
|
302
|
+
let U;
|
|
303
|
+
return d && !p && (U = F`<div class="unique-values-content-list-msg">${u.errors.tooManyUniqueValues}</div>`), F`<div class="container"><calcite-list .label=${u.values} class="popover-unique-list" .filterEnabled=${l.length >= a} .selectionMode=${r ? "multiple" : "single"} .filterPlaceholder=${u.searchValues} @calciteListChange=${(y) => {
|
|
304
|
+
let m = y.currentTarget.selectedItems.map((f) => f.value);
|
|
305
|
+
!c && n === "date-only" ? m = m?.map((f) => B(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
306
|
}} @calciteListFilter=${() => {
|
|
287
307
|
this.dropdownNode.value && (this.dropdownNode.value.disabled = this.listNode.filteredItems.length < 4);
|
|
288
|
-
}} ${
|
|
308
|
+
}} ${E(this.setListRef)}>${l.length >= a && !p ? this.renderSort(g, v) : null}${W}</calcite-list>${U}</div>`;
|
|
289
309
|
},
|
|
290
310
|
error: () => ""
|
|
291
311
|
});
|
|
292
312
|
}
|
|
293
313
|
renderSort(e, s) {
|
|
294
|
-
const { sortBy: t, _messages:
|
|
295
|
-
return
|
|
314
|
+
const { sortBy: t, _messages: r } = this;
|
|
315
|
+
return F`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(this.dropdownNode)}><calcite-action slot=trigger .label=${r.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>${r.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? r.sortAscending : r.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${r.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
|
|
296
316
|
}
|
|
297
317
|
renderUniqueValue(e) {
|
|
298
|
-
const { selectedValues: s, initialRender: t, view:
|
|
299
|
-
return
|
|
318
|
+
const { selectedValues: s, initialRender: t, view: r, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: u, uniqueValueInfos: c, simpleType: l } = p, d = r && "timeZone" in r && r.timeZone || "system", o = u?.length ? x(e.value, u) : l === "date" ? oe(e.value, d) : l === "date-only" ? ae(e.value) : l === "time-only" ? le(e.value) : l === "timestamp-offset" ? re(e.value, r) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(u?.length ? e.value : B(e.value)) : l === "time-only" ? s.includes(u?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
|
|
319
|
+
return G(`list-item_${e.value}`, F`<calcite-list-item .label=${`${o}`} .value=${`${e.value}`} .selected=${n}>${h(e.count) && (c.length > 200 && !t || c.length <= 200) ? F`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
|
|
300
320
|
}
|
|
301
321
|
}
|
|
302
|
-
|
|
322
|
+
P("arcgis-unique-values-list", ce);
|
|
303
323
|
export {
|
|
304
|
-
|
|
324
|
+
ce as ArcgisUniqueValuesList
|
|
305
325
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as o } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as n, createEvent as i, nothing as l, safeClassMap as h } from "@arcgis/lumina";
|
|
4
|
-
import { getSlotAssignedElements as r } from "@arcgis/toolkit/dom";
|
|
4
|
+
import { getSlotAssignedElements as r } from "@arcgis/toolkit/dom/slots";
|
|
5
5
|
import { css as c, html as s } from "lit";
|
|
6
6
|
import { u as d } from "../../chunks/useT9n.js";
|
|
7
7
|
import { usePropertyChange as m } from "@arcgis/lumina/controllers";
|
|
8
8
|
const p = c`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]) slot{min-inline-size:300px;min-block-size:48px}:host([layout="vertical"]) slot{min-inline-size:300px;min-block-size:144px}slot{display:flex}slot.empty{display:none}.container{display:flex;flex-direction:column;background-color:var(--calcite-color-foreground-1)}.root{display:flex;flex-direction:row;align-items:stretch}calcite-action{width:var(--calcite-font-line-height-fixed-4xl);height:var(--calcite-font-line-height-fixed-4xl)}calcite-action-bar{--calcite-action-bar-items-space: var(--calcite-space-none);--calcite-spacing-sm: var(--calcite-space-none);background-color:var(--calcite-color-foreground-1)}.separator{border-inline-end:solid 1px var(--calcite-color-border-3);width:1px}`;
|
|
9
9
|
class u extends n {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(), this.messages = d({ blocking: !0 }), this._isPlaying = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.hideNextButton = !1, this.hidePlayButton = !1, this.hidePreviousButton = !1, this.icon = "list-rectangle", this.label = "", this.layout = "horizontal", this.loop = !1, this.playRate = 1e3, this.
|
|
11
|
+
super(), this.messages = d({ blocking: !0 }), this._isPlaying = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.hideNextButton = !1, this.hidePlayButton = !1, this.hidePreviousButton = !1, this.icon = "list-rectangle", this.label = "", this.layout = "horizontal", this.loop = !1, this.playRate = 1e3, this.arcgisAnimate = i(), this.arcgisNext = i(), this.arcgisPause = i(), this.arcgisPlay = i(), this.arcgisPrevious = i(), this.arcgisPropertyChange = m()("layout", "loop", "playRate", "state"), this.arcgisSlottedElementChange = i(), this.listen("arcgisPropertyChange", () => this.requestUpdate());
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.properties = { _isPlaying: 16, _slottedElement: 16, autoDestroyDisabled: 5, disabled: 5, hideNextButton: 5, hidePlayButton: 5, hidePreviousButton: 5, icon: 1, label: 1, layout: 3, loop: 5, playRate: 9, state: 32 };
|
|
@@ -34,12 +34,12 @@ class u extends n {
|
|
|
34
34
|
previous() {
|
|
35
35
|
this.arcgisPrevious.emit(), this._slottedElement?.canPrevious && this._slottedElement.step("previous");
|
|
36
36
|
}
|
|
37
|
-
disconnectedCallback() {
|
|
38
|
-
super.disconnectedCallback(), this._isPlaying && this.pause();
|
|
39
|
-
}
|
|
40
37
|
willUpdate(t) {
|
|
41
38
|
t.has("layout") && this._isElementWithLayout(this._slottedElement) && (this._slottedElement.layout = this.layout), t.has("disabled") && this._isElementWithDisabled(this._slottedElement) && (this._slottedElement.disabled = this.disabled);
|
|
42
39
|
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
super.disconnectedCallback(), this._isPlaying && this.pause();
|
|
42
|
+
}
|
|
43
43
|
_handleSlotChange(t) {
|
|
44
44
|
const [e] = r(t);
|
|
45
45
|
this._slottedElement = e, this.arcgisSlottedElementChange.emit({ slottedElement: e }), !e && this._isPlaying && this.pause(), this._isElementWithLayout(e) && (e.layout = this.layout), this._isElementWithDisabled(e) && (e.disabled = this.disabled), this._isElementWithComponentOnReady(e) && e.componentOnReady().then(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as s } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as i } from "@arcgis/lumina";
|
|
4
4
|
import { usePropertyChange as a } from "@arcgis/lumina/controllers";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as l } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as r } from "@arcgis/lumina";
|
|
4
4
|
import { css as n, html as a } from "lit";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as r } from "@arcgis/lumina";
|
|
4
4
|
import { css as n, html as c } from "lit";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as r } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as c } from "@arcgis/lumina";
|
|
4
4
|
import { css as l, html as s } from "lit";
|