@arcgis/common-components 6.0.0-next.12 → 6.0.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{IECXEZNI.js → 22OC775Z.js} +1 -1
- package/dist/cdn/{LLATF73T.js → 2OMDJUYT.js} +1 -1
- package/dist/cdn/5CQKFXDS.js +2 -0
- package/dist/cdn/{JTQN5KMG.js → 5WWEXHDR.js} +1 -1
- package/dist/cdn/{B33S3YBM.js → 6JKHK66F.js} +1 -1
- package/dist/cdn/{EM4OQXFS.js → 6LRG5YEX.js} +1 -1
- package/dist/cdn/{TXQKK4DJ.js → 72S3MJKW.js} +1 -1
- package/dist/cdn/{XUPA27AW.js → 76HVVNE3.js} +1 -1
- package/dist/cdn/BFFJQ2IG.js +2 -0
- package/dist/cdn/{BCN6LPOG.js → BL4Q6JRN.js} +1 -1
- package/dist/cdn/DAAON2UO.js +3 -0
- package/dist/cdn/{TO3YFXVJ.js → DX3QGPAC.js} +1 -1
- package/dist/cdn/{3AFEXHZ5.js → EFYVPG7M.js} +1 -1
- package/dist/cdn/{IOFMXI5N.js → EKHLAV7L.js} +1 -1
- package/dist/cdn/{735FTIBP.js → ES6WYESD.js} +1 -1
- package/dist/cdn/{OMROUY3L.js → ET27CKKN.js} +1 -1
- package/dist/cdn/{YEFEVEP6.js → ETFRMXNK.js} +1 -1
- package/dist/cdn/F6D3766O.js +2 -0
- package/dist/cdn/{HYFFUYAU.js → HEFF76VU.js} +1 -1
- package/dist/cdn/HKDMFWES.js +8207 -0
- package/dist/cdn/{D4UHHQ35.js → HZO56Z3W.js} +1 -1
- package/dist/cdn/{GDRW3MIZ.js → JV64QIOC.js} +1 -1
- package/dist/cdn/{OIGA7XBZ.js → KMS3AH3W.js} +1 -1
- package/dist/cdn/KYVFCENZ.js +2 -0
- package/dist/cdn/{EB5MDEWF.js → LGD2DXGC.js} +1 -1
- package/dist/cdn/{LNXO5YIS.js → M6MFH7MG.js} +1 -1
- package/dist/cdn/M7BRP53Y.js +2 -0
- package/dist/cdn/{QCUF7B3I.js → MKJ57BCX.js} +1 -1
- package/dist/cdn/{KDCSDIUQ.js → NIMSDZZQ.js} +1 -1
- package/dist/cdn/{7QVNHEMF.js → O4PEZZOX.js} +1 -1
- package/dist/cdn/{MFGUTQRR.js → OAYL3MXB.js} +1 -1
- package/dist/cdn/{X6DNIKWY.js → OKSZVS6W.js} +1 -1
- package/dist/cdn/{34AP2EEB.js → RY2ZJUVG.js} +1 -1
- package/dist/cdn/{CKGWDI7B.js → TBRWMQFM.js} +1 -1
- package/dist/cdn/TJALLRDF.js +2 -0
- package/dist/cdn/{OTWADB4M.js → TJEQHMTU.js} +1 -1
- package/dist/cdn/{HJ3EJZFF.js → TTTO2AVT.js} +1 -1
- package/dist/cdn/TWDJBHNJ.js +2 -0
- package/dist/cdn/{BZFAYVKR.js → W6NRLV34.js} +1 -1
- package/dist/cdn/{IYJAPMC5.js → YWAIH52M.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/sharedCacheDirective.js +74 -0
- package/dist/components/arcgis-html-content/customElement.d.ts +42 -0
- package/dist/components/arcgis-html-content/customElement.js +71 -0
- package/dist/components/arcgis-html-content/index.d.ts +1 -0
- package/dist/components/arcgis-html-content/index.js +1 -0
- package/dist/components/arcgis-toolbar-stack/customElement.js +48 -114
- package/dist/components/arcgis-value-picker/customElement.js +14 -14
- package/dist/components/arcgis-value-picker-combobox/customElement.js +4 -4
- package/dist/components/arcgis-value-picker-label/customElement.js +5 -5
- package/dist/components/arcgis-value-picker-slider/customElement.js +17 -17
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -5
- package/dist/loader.js +1 -0
- package/dist/types/lumina.d.ts +5 -0
- package/dist/types/preact.d.ts +6 -0
- package/dist/types/react.d.ts +7 -0
- package/dist/types/stencil.d.ts +5 -0
- package/dist/utils/sharedCacheDirective.d.ts +68 -0
- package/package.json +5 -5
- package/dist/cdn/5XRYXPOX.js +0 -2
- package/dist/cdn/DR2THZQU.js +0 -8208
- package/dist/cdn/M2J3GPM4.js +0 -2
- package/dist/cdn/M3SFEFPX.js +0 -2
- package/dist/cdn/S4XOD4YS.js +0 -2
- package/dist/cdn/UIBTY5FF.js +0 -2
- package/dist/cdn/ZGYD3GAS.js +0 -2
|
@@ -1,104 +1,38 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { ref as
|
|
4
|
-
import { css as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { useDirection as
|
|
7
|
-
import { s as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
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 {
|
|
2
|
+
import { c as f } from "../../chunks/runtime.js";
|
|
3
|
+
import { ref as v } from "lit/directives/ref.js";
|
|
4
|
+
import { css as y, html as m } from "lit";
|
|
5
|
+
import { LitElement as k, nothing as b } from "@arcgis/lumina";
|
|
6
|
+
import { useDirection as _ } from "@arcgis/lumina/controllers";
|
|
7
|
+
import { s as z, a as L, b as x, c as w } from "../../chunks/toolbar.js";
|
|
8
|
+
import { S as $, s as C } from "../../chunks/sharedCacheDirective.js";
|
|
9
|
+
const R = y`: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}`, A = 8;
|
|
10
|
+
class T extends k {
|
|
77
11
|
constructor() {
|
|
78
|
-
super(), this.#
|
|
12
|
+
super(), this.#t = new ResizeObserver((t) => this._updateMeasurement(t)), this.#a = new MutationObserver(() => this._syncToolbars()), this.#n = _(), this.#e = new $(), 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
13
|
}
|
|
80
14
|
static {
|
|
81
15
|
this.properties = { _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3 };
|
|
82
16
|
}
|
|
83
17
|
static {
|
|
84
|
-
this.styles = [
|
|
18
|
+
this.styles = [R, z, L, x, w];
|
|
85
19
|
}
|
|
86
|
-
#e;
|
|
87
|
-
#i;
|
|
88
20
|
#t;
|
|
89
|
-
#r;
|
|
90
|
-
#o;
|
|
91
21
|
#a;
|
|
22
|
+
#s;
|
|
23
|
+
#n;
|
|
24
|
+
#e;
|
|
25
|
+
#i;
|
|
92
26
|
get effectiveRelativeDirection() {
|
|
93
|
-
const [t, e] = this.relativePosition.split("-"),
|
|
27
|
+
const [t, e] = this.relativePosition.split("-"), i = this.#n;
|
|
94
28
|
switch (e) {
|
|
95
29
|
case "left":
|
|
96
30
|
case "right":
|
|
97
31
|
return `${t}-${e}`;
|
|
98
32
|
case "end":
|
|
99
|
-
return `${t}-${
|
|
33
|
+
return `${t}-${i === "ltr" ? "right" : "left"}`;
|
|
100
34
|
case "start":
|
|
101
|
-
return `${t}-${
|
|
35
|
+
return `${t}-${i === "ltr" ? "left" : "right"}`;
|
|
102
36
|
}
|
|
103
37
|
}
|
|
104
38
|
get layout() {
|
|
@@ -108,47 +42,47 @@ class K extends z {
|
|
|
108
42
|
t !== this._layout && (this._layout = t, this._updateMeasurement());
|
|
109
43
|
}
|
|
110
44
|
connectedCallback() {
|
|
111
|
-
super.connectedCallback(), this._connectMeasurement(this.#
|
|
45
|
+
super.connectedCallback(), this._connectMeasurement(this.#i), this.#a.observe(this.el, { childList: !0 }), this._syncToolbars();
|
|
112
46
|
}
|
|
113
47
|
disconnectedCallback() {
|
|
114
|
-
this.#
|
|
48
|
+
this.#t.disconnect(), this.#a.disconnect(), super.disconnectedCallback();
|
|
115
49
|
}
|
|
116
50
|
_setRulerEl(t) {
|
|
117
|
-
this.#
|
|
51
|
+
this.#i !== t && (this.#i = t, this.isConnected && this._connectMeasurement(t));
|
|
118
52
|
}
|
|
119
53
|
_connectMeasurement(t) {
|
|
120
|
-
this.#
|
|
54
|
+
this.#t.disconnect(), t && (this.#t.observe(t), this._updateMeasurement());
|
|
121
55
|
}
|
|
122
56
|
_updateMeasurement(t) {
|
|
123
|
-
const e = t?.at(0)?.contentRect ?? this.#
|
|
57
|
+
const e = t?.at(0)?.contentRect ?? this.#i?.getBoundingClientRect();
|
|
124
58
|
e && (this._availableLength = this.layout === "horizontal" ? e.width : e.height);
|
|
125
59
|
}
|
|
126
60
|
_syncToolbars() {
|
|
127
|
-
this.#
|
|
128
|
-
const t = Array.from(this.el.children).filter(
|
|
129
|
-
this.#
|
|
61
|
+
this.#s?.abort();
|
|
62
|
+
const t = Array.from(this.el.children).filter(P), e = new AbortController();
|
|
63
|
+
this.#s = e, Promise.all(t.map((i) => i.componentOnReady())).then(() => {
|
|
130
64
|
!this.isConnected || e.signal.aborted || (this._toolbars = t);
|
|
131
65
|
});
|
|
132
66
|
}
|
|
133
67
|
_arrangeToolbarLines(t, e) {
|
|
134
|
-
const
|
|
135
|
-
const d =
|
|
136
|
-
return { toolbar:
|
|
68
|
+
const i = t.map((s) => {
|
|
69
|
+
const d = s.allocate(e, this._availableLength);
|
|
70
|
+
return { toolbar: s, budget: d.reduce((g, p) => g + p.budget, 0) };
|
|
137
71
|
}), a = [];
|
|
138
|
-
let
|
|
139
|
-
for (const
|
|
140
|
-
const d =
|
|
141
|
-
|
|
72
|
+
let o = [], c = 0;
|
|
73
|
+
for (const s of i) {
|
|
74
|
+
const d = c + (o.length === 0 ? 0 : A) + s.budget;
|
|
75
|
+
o.length > 0 && d > this._availableLength ? (a.push(o), o = [s], c = s.budget) : (o.push(s), c = d);
|
|
142
76
|
}
|
|
143
|
-
|
|
144
|
-
const [
|
|
145
|
-
return (
|
|
77
|
+
o.length > 0 && a.push(o);
|
|
78
|
+
const [h, l] = e.relativePosition.split("-"), n = e.layout === "vertical";
|
|
79
|
+
return (n ? l === "right" : h === "bottom") && a.reverse(), (n ? h === "bottom" : l === "right") && a.forEach((s) => s.reverse()), a;
|
|
146
80
|
}
|
|
147
|
-
#
|
|
81
|
+
#o;
|
|
148
82
|
render() {
|
|
149
83
|
const t = this._toolbars;
|
|
150
84
|
if (!t?.length) {
|
|
151
|
-
this.#
|
|
85
|
+
this.#o?.length && (this.#e.moveAllToCache(), this.#o = []);
|
|
152
86
|
return;
|
|
153
87
|
}
|
|
154
88
|
const e = {
|
|
@@ -156,19 +90,19 @@ class K extends z {
|
|
|
156
90
|
relativePosition: this.effectiveRelativeDirection,
|
|
157
91
|
scale: this.scale,
|
|
158
92
|
tooltipAppearance: this.tooltipAppearance
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
const [a,
|
|
162
|
-
return
|
|
93
|
+
}, i = this._arrangeToolbarLines(t, e);
|
|
94
|
+
M(this.#o, i) || (this.#e.moveAllToCache(), this.#o = i.map((l) => l.map(({ toolbar: n }) => n)));
|
|
95
|
+
const [a, o] = e.relativePosition.split("-"), c = this.layout === "vertical" ? a : o, h = this.#e;
|
|
96
|
+
return m`<div class="stack" data-horizontal-position=${o ?? b}><div class="ruler" ${v(this._setRulerEl)}></div><div class="toolbar-stack">${i.map((l) => m`<div class="line" data-alignment=${c ?? b}>${l.map(({ toolbar: n, budget: u }) => C(h, n, n.proxiedRender(e, u, this.toolbarKind)))}</div>`)}</div></div>`;
|
|
163
97
|
}
|
|
164
98
|
}
|
|
165
|
-
function
|
|
166
|
-
return
|
|
99
|
+
function P(r) {
|
|
100
|
+
return r.localName === "arcgis-toolbar";
|
|
167
101
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
102
|
+
function M(r, t) {
|
|
103
|
+
return r?.length === t.length && t.every((e, i) => e.length === r[i].length && e.every(({ toolbar: a }, o) => a === r[i][o]));
|
|
170
104
|
}
|
|
171
|
-
|
|
105
|
+
f("arcgis-toolbar-stack", T);
|
|
172
106
|
export {
|
|
173
|
-
|
|
107
|
+
T as ArcgisToolbarStack
|
|
174
108
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c
|
|
3
|
-
import { LitElement as
|
|
2
|
+
import { c } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as h, createEvent as i, nothing as n, safeClassMap as r } from "@arcgis/lumina";
|
|
4
4
|
import { getSlotAssignedElements as d } from "@arcgis/toolkit/dom/slots";
|
|
5
5
|
import { css as m, html as s } from "lit";
|
|
6
6
|
import { u } from "../../chunks/useT9n.js";
|
|
7
|
-
import { useDirection as
|
|
8
|
-
const g = m`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"])
|
|
9
|
-
class _ extends
|
|
7
|
+
import { useDirection as p, usePropertyChange as y } from "@arcgis/lumina/controllers";
|
|
8
|
+
const g = m`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]){min-block-size:var(--calcite-size-xl)}:host([layout="vertical"]){min-inline-size:var(--calcite-size-xl);calcite-action-bar{min-block-size:min-content}}slot{display:flex;flex:1 1 auto;min-block-size:var(--calcite-size-xl);min-inline-size:0}slot.empty{display:none}.container{display:flex;flex-direction:column;block-size:100%;inline-size:100%;min-block-size:0;min-inline-size:0}.root{display:flex;flex-direction:row;align-items:stretch;flex:1;background-color:var(--calcite-color-foreground-1);min-block-size:0;min-inline-size:0}.root.vertical-slider{flex-direction:column}.root.vertical-slider slot{flex-direction:column}.root.vertical-slider .separator{border-inline-end:none;border-block-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}calcite-action-bar{flex-shrink:0}:host([floating]) .root{border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md));overflow:hidden}calcite-action{align-self:center}:host([layout="vertical"]) calcite-action{margin-block-start:auto}:host([layout="vertical"]) calcite-action:last-of-type{margin-block-end:auto}.separator{border-inline-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}`;
|
|
9
|
+
class _ extends h {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(), this._direction =
|
|
11
|
+
super(), this._direction = p(), this.messages = u({ blocking: !0 }), this._isPlaying = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.floating = !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 = y()("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, floating: 7, hideNextButton: 5, hidePlayButton: 5, hidePreviousButton: 5, icon: 1, label: 1, layout: 3, loop: 5, playRate: 9, state: 32 };
|
|
@@ -69,23 +69,23 @@ class _ extends c {
|
|
|
69
69
|
}, this.playRate);
|
|
70
70
|
}
|
|
71
71
|
_renderActions() {
|
|
72
|
-
const t = this.state === "playing", e = this.layout === "vertical" && this._slottedElement?.localName === "arcgis-value-picker-slider",
|
|
72
|
+
const t = this.state === "playing", e = this.layout === "vertical" && this._slottedElement?.localName === "arcgis-value-picker-slider", l = !this.hidePlayButton && s`<calcite-action alignment=center .disabled=${this.disabled || this._slottedElement && !this._slottedElement.canPlay} .icon=${t ? "pause" : "play"} .text=${t ? this.messages.pause : this.messages.play} title=${(t ? this.messages.pause : this.messages.play) ?? n} @click=${() => {
|
|
73
73
|
if (this._slottedElement && !this._slottedElement.canNext && !this.loop) {
|
|
74
74
|
this._slottedElement.reset(), this.play();
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
t ? this.pause() : this.play();
|
|
78
|
-
}}></calcite-action>` || "",
|
|
79
|
-
return (this._direction === "rtl" && this.layout === "horizontal" || e ? [
|
|
78
|
+
}}></calcite-action>` || "", a = !this.hidePreviousButton && s`<calcite-action alignment=center .disabled=${this.disabled || t || this._slottedElement && !this._slottedElement.canPrevious} .icon=${this.layout === "horizontal" ? "chevron-left" : e ? "chevron-down" : "chevron-up"} .text=${this.messages.previous} title=${this.messages.previous ?? n} @click=${this.previous}></calcite-action>` || "", o = !this.hideNextButton && s`<calcite-action alignment=center .disabled=${this.disabled || t || this._slottedElement && !this._slottedElement.canNext} .icon=${this.layout === "horizontal" ? "chevron-right" : e ? "chevron-up" : "chevron-down"} .text=${this.messages.next} title=${this.messages.next ?? n} @click=${this.next}></calcite-action>` || "";
|
|
79
|
+
return (this._direction === "rtl" && this.layout === "horizontal" || e ? [l, o, a] : [l, a, o]).filter(Boolean);
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
const t = !!this._slottedElement && !this._slottedElement.hidden, e = this._renderActions();
|
|
83
|
-
return s`<div class="container"><div class
|
|
84
|
-
this._handleSlotChange(
|
|
85
|
-
}} class=${
|
|
82
|
+
const t = !!this._slottedElement && !this._slottedElement.hidden, e = this._renderActions(), l = e.length > 0 && t, a = this.layout === "vertical" && this._slottedElement?.localName === "arcgis-value-picker-slider";
|
|
83
|
+
return s`<div class="container"><div class=${r(a ? "root vertical-slider" : "root")}>${e.length > 0 && s`<calcite-action-bar expand-toggle-disabled .layout=${this.layout}>${e}</calcite-action-bar>` || ""}${l && s`<div class="separator"></div>` || ""}<slot @slotchange=${({ currentTarget: o }) => {
|
|
84
|
+
this._handleSlotChange(o);
|
|
85
|
+
}} class=${r(t ? "component-slot" : "empty")}></slot></div></div>`;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
c("arcgis-value-picker", _);
|
|
89
89
|
export {
|
|
90
90
|
_ as ArcgisValuePicker
|
|
91
91
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as l } from "../../chunks/runtime.js";
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { css as
|
|
3
|
+
import { LitElement as n } from "@arcgis/lumina";
|
|
4
|
+
import { css as r, html as a } from "lit";
|
|
5
5
|
import { usePropertyChange as o } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { u as h } from "../../chunks/useT9n.js";
|
|
7
|
-
const u =
|
|
8
|
-
class m extends
|
|
7
|
+
const u = r`:host{align-items:center;display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`;
|
|
8
|
+
class m extends n {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments), this.messages = h({ blocking: !0 }), this.autoDestroyDisabled = !1, this.disabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.arcgisPropertyChange = o()("canNext", "canPlay", "canPrevious", "currentValue");
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as r } from "@arcgis/lumina";
|
|
4
|
-
import { css as n, html as
|
|
5
|
-
import { usePropertyChange as
|
|
6
|
-
const o = n`:host{display:flex;flex:auto;
|
|
4
|
+
import { css as n, html as l } from "lit";
|
|
5
|
+
import { usePropertyChange as c } from "@arcgis/lumina/controllers";
|
|
6
|
+
const o = n`:host{display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding:var(--calcite-space-sm)}:host([disabled]){opacity:var(--calcite-opacity-disabled);pointer-events:none}.container{align-items:center;border:solid var(--calcite-border-width-sm) var(--calcite-color-border-3);display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}.text{color:var(--calcite-color-text-1);flex:auto;font-family:inherit;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--calcite-space-none)}`;
|
|
7
7
|
class h extends r {
|
|
8
8
|
constructor() {
|
|
9
|
-
super(...arguments), this.autoDestroyDisabled = !1, this.disabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.arcgisPropertyChange =
|
|
9
|
+
super(...arguments), this.autoDestroyDisabled = !1, this.disabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.arcgisPropertyChange = c()("canNext", "canPlay", "canPrevious", "currentValue");
|
|
10
10
|
}
|
|
11
11
|
static {
|
|
12
12
|
this.properties = { autoDestroyDisabled: 5, disabled: 7, items: 0, currentValue: 0, canNext: 5, canPlay: 5, canPrevious: 5 };
|
|
@@ -42,7 +42,7 @@ class h extends r {
|
|
|
42
42
|
this.canNext = e < this.items.length - 1, this.canPrevious = e > 0;
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return
|
|
45
|
+
return l`<div class="container"><div class="text">${this.currentValue?.label}</div></div>`;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
a("arcgis-value-picker-label", h);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { css as l, html as
|
|
2
|
+
import { c } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as r } from "@arcgis/lumina";
|
|
4
|
+
import { css as l, html as t } from "lit";
|
|
5
5
|
import { usePropertyChange as n } from "@arcgis/lumina/controllers";
|
|
6
|
-
const h = l`:host{display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}arcgis-slider{flex:auto}arcgis-ticks{--arcgis-ticks-font-size: var(--calcite-font-size--3);--arcgis-ticks-gap: var(--calcite-space-base)}.content-end-stack{display:flex;flex-direction:column;flex:1}.ticks-stack{height:var(--calcite-space-sm);position:relative}.ticks-stack arcgis-ticks{inset:var(--calcite-space-none);position:absolute}.label-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs);--arcgis-ticks-tick-color: transparent}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs)}.major-ticks{--arcgis-ticks-tick-length: var(--calcite-space-sm)}:host([layout="vertical"]){padding-inline:var(--calcite-space-none);
|
|
7
|
-
class o extends
|
|
6
|
+
const h = l`:host{display:flex;flex:auto;inline-size:300px;min-block-size:0;min-inline-size:0;padding-inline:var(--calcite-space-sm)}arcgis-slider{flex:auto}arcgis-ticks{--arcgis-ticks-font-size: var(--calcite-font-size--3);--arcgis-ticks-gap: var(--calcite-space-base)}.content-end-stack{display:flex;flex-direction:column;flex:1}.ticks-stack{height:var(--calcite-space-sm);position:relative}.ticks-stack arcgis-ticks{inset:var(--calcite-space-none);position:absolute}.label-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs);--arcgis-ticks-tick-color: transparent}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-space-2xs)}.major-ticks{--arcgis-ticks-tick-length: var(--calcite-space-sm)}:host([layout="vertical"]){flex-basis:300px;inline-size:var(--calcite-size-xl);padding-inline:var(--calcite-space-none);arcgis-slider:has(.label-ticks){position:relative;inset-inline-end:var(--calcite-space-md-plus)}arcgis-ticks{--arcgis-ticks-gap: var(--calcite-space-sm)}.content-end-stack{position:relative}.ticks-stack{height:100%}.label-ticks{--arcgis-ticks-tick-length: var(--calcite-space-base);inset:var(--calcite-space-none);position:absolute}}`;
|
|
7
|
+
class o extends r {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments), this.autoDestroyDisabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.disabled = !1, this.layout = "horizontal", this.mirrored = !1, this.arcgisPropertyChange = n()("canNext", "canPlay", "canPrevious", "currentValue");
|
|
10
10
|
}
|
|
@@ -23,17 +23,17 @@ class o extends c {
|
|
|
23
23
|
reset() {
|
|
24
24
|
this.currentValue = this._ascending ? this.steps?.at(0) : this.steps?.at(-1);
|
|
25
25
|
}
|
|
26
|
-
step(
|
|
26
|
+
step(s) {
|
|
27
27
|
if (!this.steps || this.currentValue === void 0)
|
|
28
28
|
return;
|
|
29
|
-
const e =
|
|
29
|
+
const e = s === "next" === this._ascending ? 1 : -1, a = this.steps.indexOf(this.currentValue) + e;
|
|
30
30
|
a >= this.steps.length || a < 0 || (this.currentValue = this.steps[a], this._checkState());
|
|
31
31
|
}
|
|
32
32
|
connectedCallback() {
|
|
33
33
|
super.connectedCallback(), this.el.hidden = !0;
|
|
34
34
|
}
|
|
35
|
-
willUpdate(
|
|
36
|
-
|
|
35
|
+
willUpdate(s) {
|
|
36
|
+
s.has("steps") && this.steps?.length && (this.min ??= this.steps[0], this.max ??= this.steps.at(-1)), (s.has("currentValue") || s.has("max")) && this.max !== void 0 && (this.currentValue ??= this.max), this.el.hidden = this.min === void 0 || this.max === void 0 || this.currentValue === void 0, this._checkState();
|
|
37
37
|
}
|
|
38
38
|
_checkState() {
|
|
39
39
|
if (!this.steps?.length) {
|
|
@@ -41,20 +41,20 @@ class o extends c {
|
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
this.canPlay = !0;
|
|
44
|
-
const
|
|
45
|
-
this.canNext = this._ascending ?
|
|
44
|
+
const s = this.steps.findIndex((e) => e === this.currentValue), i = this.steps.length - 1;
|
|
45
|
+
this.canNext = this._ascending ? s < i : s > 0, this.canPrevious = this._ascending ? s > 0 : s < i;
|
|
46
46
|
}
|
|
47
|
-
_handleSliderChange(
|
|
48
|
-
this.currentValue =
|
|
47
|
+
_handleSliderChange(s) {
|
|
48
|
+
this.currentValue = s.currentTarget.values[0], this._checkState();
|
|
49
49
|
}
|
|
50
|
-
_handleSliderInput(
|
|
51
|
-
this.currentValue =
|
|
50
|
+
_handleSliderInput(s) {
|
|
51
|
+
this.currentValue = s.currentTarget.values[0], this._checkState();
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return this.currentValue === void 0 ? null :
|
|
54
|
+
return this.currentValue === void 0 ? null : t`<arcgis-slider .disabled=${this.disabled} .layout=${this.layout} .min=${this.min} .max=${this.max} .steps=${this.steps} .mirrored=${this.mirrored} .values=${[this.currentValue]} @arcgisInput=${(s) => this._handleSliderInput(s)} @arcgisChange=${(s) => this._handleSliderChange(s)}>${(this.majorTicks?.length || this.minorTicks?.length || this.labels?.length) && t`<div slot=content-end class="content-end-stack">${(this.majorTicks?.length || this.minorTicks?.length) && t`<div class="ticks-stack">${this.majorTicks?.length && t`<arcgis-ticks .layout=${this.layout} class="major-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.majorTicks} mode=value></arcgis-ticks>` || ""}${this.minorTicks?.length && t`<arcgis-ticks .layout=${this.layout} class="minor-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.minorTicks} mode=value></arcgis-ticks>` || ""}</div>` || ""}${this.labels?.length && t`<arcgis-ticks .layout=${this.layout} class="label-ticks" .min=${this.min} .max=${this.max} .mirrored=${this.mirrored} .values=${this.labels} mode=value show-labels label-placement=end .labelFormatter=${this.labelFormatter}></arcgis-ticks>` || ""}</div>` || ""}</arcgis-slider>`;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
c("arcgis-value-picker-slider", o);
|
|
58
58
|
export {
|
|
59
59
|
o as ArcgisValuePickerSlider
|
|
60
60
|
};
|