@arcgis/common-components 5.2.0-next.106 → 5.2.0-next.108
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/{IXISGCNR.js → 2JQ6OEBP.js} +2 -2
- package/dist/cdn/{JLF6J4PV.js → 2ZQLPGO6.js} +2 -2
- package/dist/cdn/{BQCBHDME.js → 34O5NI3L.js} +2 -2
- package/dist/cdn/{CKBWHADN.js → 3KVQXK6I.js} +2 -2
- package/dist/cdn/{H4B7RWSC.js → 3KZKOKL3.js} +2 -2
- package/dist/cdn/{27EUJ42B.js → 3YTGG7RF.js} +2 -2
- package/dist/cdn/{FCIUMZTZ.js → 44GHRHDT.js} +2 -2
- package/dist/cdn/46YOWKVP.js +2 -0
- package/dist/cdn/4Z3W4SLN.js +2 -0
- package/dist/cdn/{EXBLSHSY.js → 5I46DP72.js} +2 -2
- package/dist/cdn/{HPNII7DL.js → 6G2BA5R6.js} +2 -2
- package/dist/cdn/{CEXP5DLE.js → 73LCJZI5.js} +2 -2
- package/dist/cdn/{Y5Y7IXOV.js → 74MDECVO.js} +1 -1
- package/dist/cdn/AHWD5KV4.js +2 -0
- package/dist/cdn/B2QFPLR5.js +2 -0
- package/dist/cdn/{WJZHHIWO.js → DLOQSM4T.js} +2 -2
- package/dist/cdn/{L6V3WKUI.js → E4CBJIXT.js} +2 -2
- package/dist/cdn/{XEK22IDA.js → E4NVOXNZ.js} +1 -1
- package/dist/cdn/EWHSIDUL.js +2 -0
- package/dist/cdn/{AY6QNI6M.js → FH6M3L5Q.js} +2 -2
- package/dist/cdn/FMIYRWWD.js +2 -0
- package/dist/cdn/{RYAF2CEQ.js → G2DVIZZJ.js} +2 -2
- package/dist/cdn/{WOZ7IPPQ.js → GB5FMYCZ.js} +2 -2
- package/dist/cdn/GPRF6QZC.js +2 -0
- package/dist/cdn/{NQRDB6LM.js → GQBGVIQF.js} +2 -2
- package/dist/cdn/{J6YVJVSN.js → GQCIBJZF.js} +2 -2
- package/dist/cdn/{7XSCHHGO.js → IBJHDNP3.js} +2 -2
- package/dist/cdn/{H7JRH53Q.js → ISCASG7C.js} +2 -2
- package/dist/cdn/{4TZVXSQZ.js → LE43VGSR.js} +2 -2
- package/dist/cdn/LRG23IGC.js +2 -0
- package/dist/cdn/{PMV2N3L3.js → NMDESY3T.js} +1 -1
- package/dist/cdn/O2DY73RF.js +2 -0
- package/dist/cdn/OHMQBUUM.js +2 -0
- package/dist/cdn/{OADKJRMQ.js → OVOUEXKG.js} +2 -2
- package/dist/cdn/{Z5QBBHLD.js → P3DCEHGK.js} +1 -1
- package/dist/cdn/{7CY3QEZW.js → QH4CFJEJ.js} +2 -2
- package/dist/cdn/{TWW63D32.js → QJJFF4PI.js} +1 -1
- package/dist/cdn/{H66SBHKJ.js → QKRBQ2F5.js} +2 -2
- package/dist/cdn/{VJDK62KV.js → RT25KW2T.js} +2 -2
- package/dist/cdn/RZEJ56RX.js +2 -0
- package/dist/cdn/S3XLEJSQ.js +2 -0
- package/dist/cdn/SBVCJDLD.js +2 -0
- package/dist/cdn/{4D7RVA5N.js → UIHTW6OA.js} +2 -2
- package/dist/cdn/UIKQQY3N.js +2 -0
- package/dist/cdn/{LLKF5IUE.js → UWHPPNTE.js} +2 -2
- package/dist/cdn/VIBCKXUC.js +2 -0
- package/dist/cdn/{4DL4CQMD.js → WUGJFP7P.js} +2 -2
- package/dist/cdn/{UGWLCTVM.js → YJTI6KPW.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/element-reference-controller.js +8 -6
- package/dist/chunks/general.js +1 -1
- package/dist/chunks/internal-types.js +1 -1
- package/dist/chunks/layer-utils.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/strategies.js +1 -1
- 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 +18 -28
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +4 -4
- package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- 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 +73 -80
- package/dist/components/arcgis-field-pick-list/customElement.d.ts +7 -7
- package/dist/components/arcgis-field-pick-list/customElement.js +49 -45
- package/dist/components/arcgis-histogram/customElement.js +1 -1
- package/dist/components/arcgis-label-input/customElement.js +1 -1
- 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.js +1 -1
- package/dist/components/arcgis-slider-field/customElement.js +1 -1
- package/dist/components/arcgis-slider-histogram-range/customElement.js +1 -1
- package/dist/components/arcgis-slider-input/customElement.js +1 -1
- package/dist/components/arcgis-ticks/customElement.js +1 -1
- package/dist/components/arcgis-toolbar/customElement.d.ts +26 -6
- package/dist/components/arcgis-toolbar/customElement.js +61 -35
- package/dist/components/arcgis-toolbar/types.d.ts +32 -1
- package/dist/components/arcgis-toolbar-action/customElement.d.ts +1 -1
- package/dist/components/arcgis-toolbar-action/customElement.js +17 -22
- package/dist/components/arcgis-toolbar-group/customElement.js +18 -17
- package/dist/components/arcgis-toolbar-item/customElement.d.ts +1 -1
- package/dist/components/arcgis-toolbar-item/customElement.js +7 -7
- package/dist/components/arcgis-toolbar-more-button/customElement.js +8 -8
- package/dist/components/arcgis-toolbar-split-button/customElement.js +16 -15
- 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 +3 -3
- package/dist/components/arcgis-value-picker/customElement.js +1 -1
- 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.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -1
- package/dist/loader.js +3 -2
- 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/package.json +4 -4
- package/dist/cdn/4S7M7IP7.js +0 -2
- package/dist/cdn/A2QOOQYR.js +0 -2
- package/dist/cdn/DM57UJMG.js +0 -2
- package/dist/cdn/EO2W4XX2.js +0 -2
- package/dist/cdn/HBTHCFTX.js +0 -2
- package/dist/cdn/K2W2X3P7.js +0 -2
- package/dist/cdn/NUJU53OQ.js +0 -2
- package/dist/cdn/RBBKKELV.js +0 -2
- package/dist/cdn/RYTUSPBA.js +0 -2
- package/dist/cdn/SM5735TW.js +0 -2
- package/dist/cdn/VCZLD7ZT.js +0 -2
- package/dist/cdn/VOBBBIYC.js +0 -2
- package/dist/cdn/XPZQ4XIH.js +0 -2
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as p } from "../../chunks/runtime.js";
|
|
3
3
|
import { ref as u } from "lit/directives/ref.js";
|
|
4
|
-
import { css as g, html as
|
|
5
|
-
import {
|
|
4
|
+
import { css as g, html as o } from "lit";
|
|
5
|
+
import { keyed as f } from "lit/directives/keyed.js";
|
|
6
|
+
import { LitElement as b, createEvent as l, nothing as s, safeClassMap as _ } from "@arcgis/lumina";
|
|
6
7
|
import { W as r } from "../../chunks/utils.js";
|
|
7
|
-
import { g as
|
|
8
|
+
import { g as $ } from "../../chunks/utils2.js";
|
|
8
9
|
const v = g`:host([text-enabled][data-layout="vertical"]){.interaction-container>button{flex-direction:column;>.text-container{writing-mode:vertical-lr}}}`;
|
|
9
|
-
class
|
|
10
|
+
class x extends b {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments), this.#e = (t) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this._measureAction(), this.#t ??= new ResizeObserver((e) => {
|
|
18
|
-
!this.textEnabled || !this._element || this._measureAction(e);
|
|
19
|
-
}), this.#t.observe(t), t.componentOnReady().then(() => {
|
|
20
|
-
!this.isConnected || this._element !== t || (this._hydratedElement = t, t.shadowRoot?.adoptedStyleSheets.push(v.styleSheet));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
13
|
+
t !== this._element && (this.#t?.disconnect(), this._element = t, this._hydratedElement = void 0, this.isConnected && this.arcgisRenderedActionChanged.emit({ element: t }), t && (this._measureAction(), this.#t ??= new ResizeObserver((e) => {
|
|
14
|
+
!this.textEnabled || !this._element || this._measureAction(e);
|
|
15
|
+
}), this.#t.observe(t), t.componentOnReady().then(() => {
|
|
16
|
+
!this.isConnected || this._element !== t || (this._hydratedElement = t, t.shadowRoot?.adoptedStyleSheets.push(v.styleSheet));
|
|
17
|
+
})));
|
|
23
18
|
}, this._measuredWidth = 0, this._measuredHeight = 0, this.active = !1, this.tooltipText = "", this.labelText = "", this.disabled = !1, this.loading = !1, this.indicator = !1, this.textEnabled = !1, this.appearance = "transparent", this.iconFlipRtl = !1, this.arcgisRenderedActionChanged = l(), this.arcgisToolbarItemSelected = l();
|
|
24
19
|
}
|
|
25
20
|
static {
|
|
@@ -31,12 +26,12 @@ class $ extends f {
|
|
|
31
26
|
return this._element;
|
|
32
27
|
}
|
|
33
28
|
measure({ layout: t, scale: e }) {
|
|
34
|
-
const a = r.actionPadding[e], i = r.action[e],
|
|
35
|
-
return [Math.max(i,
|
|
29
|
+
const a = r.actionPadding[e], i = r.action[e], n = t === "horizontal" ? this._measuredWidth : this._measuredHeight;
|
|
30
|
+
return [Math.max(i, n) + a];
|
|
36
31
|
}
|
|
37
32
|
proxiedRender(t) {
|
|
38
|
-
const { tooltipAppearance: e, scale: a } = t, i = this.tooltipText || this.labelText,
|
|
39
|
-
return
|
|
33
|
+
const { tooltipAppearance: e, scale: a } = t, i = this.tooltipText || this.labelText, n = this._hydratedElement, c = e !== "native" && !!i && n, d = e === "calcite-dark" ? "calcite-mode-dark" : void 0, h = $(t);
|
|
34
|
+
return o`${f(this, o`<calcite-action .active=${this.active} data-appearance=${this.appearance ?? s} data-kind=${this.kind ?? s} data-layout=${t.layout ?? s} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .indicator=${this.indicator} .label=${i} .loading=${this.loading} @click=${(m) => this._handleActionClick(m)} .scale=${a} .text=${this.labelText} .textEnabled=${this.textEnabled} title=${(e === "native" ? i : void 0) ?? s} ${u(this.#e)}></calcite-action>`)}${c ? o`<calcite-tooltip class=${_(d)} overlay-positioning=fixed .placement=${h} .referenceElement=${n} .scale=${a}><span>${i}</span></calcite-tooltip>` : void 0}`;
|
|
40
35
|
}
|
|
41
36
|
disconnectedCallback() {
|
|
42
37
|
this.#t?.disconnect(), super.disconnectedCallback();
|
|
@@ -51,7 +46,7 @@ class $ extends f {
|
|
|
51
46
|
e && (this._measuredWidth = Math.round(e.width), this._measuredHeight = Math.round(e.height));
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
|
-
p("arcgis-toolbar-action",
|
|
49
|
+
p("arcgis-toolbar-action", x);
|
|
55
50
|
export {
|
|
56
|
-
|
|
51
|
+
x as ArcgisToolbarAction
|
|
57
52
|
};
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as d } from "../../chunks/runtime.js";
|
|
3
3
|
import { html as p } from "lit";
|
|
4
4
|
import { LitElement as u, nothing as h } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
5
|
+
import { W as i, a as m } from "../../chunks/utils.js";
|
|
6
|
+
import { L as g, i as b } from "../../chunks/types.js";
|
|
6
7
|
import { u as f } from "../../chunks/utils2.js";
|
|
7
8
|
class C extends u {
|
|
8
9
|
constructor() {
|
|
9
|
-
super(...arguments), this.#e = new MutationObserver(() => this.#
|
|
10
|
+
super(...arguments), this.#e = new MutationObserver(() => this.#t()), this.preferEndSlot = !1, this.priority = g.Default;
|
|
10
11
|
}
|
|
11
12
|
static {
|
|
12
13
|
this.properties = { _children: 16, preferEndSlot: 5, priority: 9 };
|
|
13
14
|
}
|
|
14
|
-
#
|
|
15
|
+
#r;
|
|
15
16
|
#e;
|
|
16
17
|
measure(e) {
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
18
|
+
const r = this._children;
|
|
19
|
+
if (!r?.length)
|
|
19
20
|
return [0];
|
|
20
|
-
const o = i.groupSeparator + i.groupPadding[e.scale], n =
|
|
21
|
-
return f(n.map((
|
|
21
|
+
const o = i.groupSeparator + i.groupPadding[e.scale], n = r.map((t) => t.measure(e)).reduce((t, s) => t.flatMap((a) => s.map((c) => a + c)), [0]);
|
|
22
|
+
return f(n.map((t) => o + t));
|
|
22
23
|
}
|
|
23
|
-
proxiedRender(e,
|
|
24
|
+
proxiedRender(e, r) {
|
|
24
25
|
const o = this._children;
|
|
25
26
|
if (!o)
|
|
26
27
|
return;
|
|
27
|
-
const l = this.preferEndSlot ? "actions-end" : void 0, n =
|
|
28
|
-
return p`<calcite-action-group .scale=${e.scale} .layout=${e.layout} slot=${l ?? h}>${
|
|
28
|
+
const l = this.preferEndSlot ? "actions-end" : void 0, n = r - i.groupPadding[e.scale] - i.groupSeparator, t = m(o, e, n);
|
|
29
|
+
return p`<calcite-action-group .scale=${e.scale} .layout=${e.layout} slot=${l ?? h}>${t.map(({ group: s, budget: a }) => s.proxiedRender(e, a))}</calcite-action-group>`;
|
|
29
30
|
}
|
|
30
31
|
connectedCallback() {
|
|
31
|
-
super.connectedCallback(), this.#e.observe(this.el, { childList: !0 }), this.#
|
|
32
|
+
super.connectedCallback(), this.#e.observe(this.el, { childList: !0 }), this.#t();
|
|
32
33
|
}
|
|
33
34
|
disconnectedCallback() {
|
|
34
35
|
this.#e.disconnect(), super.disconnectedCallback();
|
|
35
36
|
}
|
|
36
|
-
#
|
|
37
|
-
this.#
|
|
38
|
-
const e = Array.from(this.el.children).filter(b),
|
|
39
|
-
this.#
|
|
40
|
-
!this.isConnected ||
|
|
37
|
+
#t() {
|
|
38
|
+
this.#r?.abort();
|
|
39
|
+
const e = Array.from(this.el.children).filter(b), r = new AbortController();
|
|
40
|
+
this.#r = r, Promise.all(e.map((o) => o.componentOnReady())).then(() => {
|
|
41
|
+
!this.isConnected || r.signal.aborted || (this._children = e);
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -33,7 +33,7 @@ export abstract class ArcgisToolbarItem extends LitElement {
|
|
|
33
33
|
*/
|
|
34
34
|
accessor disabled: boolean;
|
|
35
35
|
/**
|
|
36
|
-
* The icon to show in the rendered action. For best user experience, this should not be
|
|
36
|
+
* The icon to show in the rendered action. For best user experience, this should not be omitted.
|
|
37
37
|
*
|
|
38
38
|
* @default "question-mark"
|
|
39
39
|
*/
|
|
@@ -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 p } from "../../chunks/runtime.js";
|
|
3
3
|
import { html as n } from "lit";
|
|
4
4
|
import { ref as f } from "lit/directives/ref.js";
|
|
5
|
-
import { LitElement as $, createEvent as
|
|
5
|
+
import { LitElement as $, createEvent as v, nothing as c, safeClassMap as g } from "@arcgis/lumina";
|
|
6
6
|
import { W as s } from "../../chunks/utils.js";
|
|
7
7
|
import { E as b } from "../../chunks/element-reference-controller.js";
|
|
8
8
|
import { g as u } from "../../chunks/utils2.js";
|
|
9
9
|
class x extends $ {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this._active = !1, this._elementReferenceController = new b(this), this.icon = "question-mark", this.tooltipText = "", this.labelText = "", this.disabled = !1, this.loading = !1, this.iconFlipRtl = !1, this.arcgisItemSelected =
|
|
11
|
+
super(...arguments), this._active = !1, this._elementReferenceController = new b(this), this.icon = "question-mark", this.tooltipText = "", this.labelText = "", this.disabled = !1, this.loading = !1, this.iconFlipRtl = !1, this.arcgisItemSelected = v();
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.properties = { icon: 3, lastActivated: 0, active: 7, tooltipText: 1, labelText: 3, disabled: 7, loading: 7, iconFlipRtl: 7, actionElement: 32 };
|
|
@@ -26,14 +26,14 @@ class x extends $ {
|
|
|
26
26
|
return [s.action[t] + s.actionPadding[t]];
|
|
27
27
|
}
|
|
28
28
|
proxiedRender(t, i, r) {
|
|
29
|
-
const l = t.tooltipAppearance, a = this._elementReferenceController.element,
|
|
30
|
-
return i === "dropdown-item" ? n`<calcite-dropdown-item .disabled=${this.disabled} icon-start=${this.icon ?? c} .iconFlipRtl=${this.iconFlipRtl ? "both" : void 0} .label=${e} @click=${(o) => this._handleDropdownItemClick(o)} .selected=${this.active || r} title=${e ?? c}>${this.labelText}</calcite-dropdown-item>` : n`<calcite-action .active=${this.active} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .label=${e} .loading=${this.loading} @click=${(o) => this._handleActionClick(o)} .scale=${t.scale} .text=${this.labelText} .textEnabled=${i === "expanded-action"} title=${(l === "native" ? e : void 0) ?? c} ${f(this._elementReferenceController.ref)}></calcite-action>${
|
|
29
|
+
const l = t.tooltipAppearance, a = this._elementReferenceController.element, d = l !== "native" && i === "collapsed-action", m = l === "calcite-dark" ? "calcite-mode-dark" : void 0, h = u(t), e = this.tooltipText || this.labelText;
|
|
30
|
+
return i === "dropdown-item" ? n`<calcite-dropdown-item .disabled=${this.disabled} icon-start=${this.icon ?? c} .iconFlipRtl=${this.iconFlipRtl ? "both" : void 0} .label=${e} @click=${(o) => this._handleDropdownItemClick(o)} .selected=${this.active || r} title=${e ?? c}>${this.labelText}</calcite-dropdown-item>` : n`<calcite-action .active=${this.active} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .label=${e} .loading=${this.loading} @click=${(o) => this._handleActionClick(o)} .scale=${t.scale} .text=${this.labelText} .textEnabled=${i === "expanded-action"} title=${(l === "native" ? e : void 0) ?? c} ${f(this._elementReferenceController.ref)}></calcite-action>${d && a ? n`<calcite-tooltip class=${g(m)} close-on-click overlay-positioning=fixed .placement=${h} .referenceElement=${a}><span>${e}</span></calcite-tooltip>` : void 0}`;
|
|
31
31
|
}
|
|
32
32
|
_handleActionClick(t) {
|
|
33
|
-
this.isConnected && this.arcgisItemSelected?.emit({ element: t.currentTarget });
|
|
33
|
+
this.isConnected && (this.lastActivated = /* @__PURE__ */ new Date(), this.arcgisItemSelected?.emit({ element: t.currentTarget }));
|
|
34
34
|
}
|
|
35
35
|
_handleDropdownItemClick(t) {
|
|
36
|
-
this.isConnected && this.arcgisItemSelected?.emit({ element: t.currentTarget });
|
|
36
|
+
this.isConnected && (this.lastActivated = /* @__PURE__ */ new Date(), this.arcgisItemSelected?.emit({ element: t.currentTarget }));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
p("arcgis-toolbar-item", x);
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
import { ref as
|
|
3
|
+
import { ref as u } from "lit/directives/ref.js";
|
|
4
4
|
import { html as m } from "lit";
|
|
5
5
|
import { LitElement as C, nothing as v, safeClassMap as $ } from "@arcgis/lumina";
|
|
6
|
-
import { L as
|
|
6
|
+
import { L as f } from "../../chunks/types.js";
|
|
7
7
|
import { E as w } from "../../chunks/element-reference-controller.js";
|
|
8
8
|
import { a as g, u as _, g as y } from "../../chunks/utils2.js";
|
|
9
9
|
import { b as L } from "../../chunks/utils3.js";
|
|
@@ -11,7 +11,7 @@ class R extends C {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this._elementReferenceController = new w(this), this._childrenObserver = new MutationObserver(() => {
|
|
13
13
|
this._syncChildren();
|
|
14
|
-
}), this.priority =
|
|
14
|
+
}), this.priority = f.Medium, this.menuAppearance = "action-menu", this.overflowActionLabel = "More actions";
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
17
|
this.properties = { _children: 16, priority: 9, menuAppearance: 1, overflowActionLabel: 1 };
|
|
@@ -21,10 +21,10 @@ class R extends C {
|
|
|
21
21
|
if (!t)
|
|
22
22
|
return [0];
|
|
23
23
|
const i = g(e), l = t * i;
|
|
24
|
-
if (!(this.priority <
|
|
24
|
+
if (!(this.priority < f.NeverCollapse && t > 2))
|
|
25
25
|
return [l];
|
|
26
26
|
const s = Math.min(t, 2) * i, o = [s];
|
|
27
|
-
if (t <= 2 || this.priority <=
|
|
27
|
+
if (t <= 2 || this.priority <= f.ForceCollapse)
|
|
28
28
|
return o;
|
|
29
29
|
for (let n = 1; n < t - 1; n++)
|
|
30
30
|
o.push(s + i * n);
|
|
@@ -34,8 +34,8 @@ class R extends C {
|
|
|
34
34
|
const i = this._children;
|
|
35
35
|
if (!i)
|
|
36
36
|
return;
|
|
37
|
-
const { visible: l, hidden: r } = this._resolveActionsFromBudget(i, e, t), s = "hamburger", o = this.overflowActionLabel, n = e.tooltipAppearance, c = n !== "native", a = this._elementReferenceController.element, p = n === "calcite-dark" ? "calcite-mode-dark" : void 0, h = y(e), b = this.menuAppearance === "action-menu" ? m`<calcite-action-menu .label=${o} overlay-positioning=fixed .placement=${h}><calcite-action .icon=${s} .scale=${e.scale} slot=trigger .text=${o} title=${(n === "native" ? o : "") ?? v} ${
|
|
38
|
-
return m`${l.map((d) => d.proxiedRender(e, "collapsed-action"))}${r.length ? b : void 0}${r.length && c ? m`<calcite-tooltip class=${$(p)} overlay-positioning=fixed .placement=${h} .referenceElement=${a}><span>${o}</span></calcite-tooltip>` : void 0}`;
|
|
37
|
+
const { visible: l, hidden: r } = this._resolveActionsFromBudget(i, e, t), s = "hamburger", o = this.overflowActionLabel, n = e.tooltipAppearance, c = n !== "native", a = this._elementReferenceController.element, p = n === "calcite-dark" ? "calcite-mode-dark" : void 0, h = y(e), b = this.menuAppearance === "action-menu" ? m`<calcite-action-menu .label=${o} overlay-positioning=fixed .placement=${h}><calcite-action .icon=${s} .scale=${e.scale} slot=trigger .text=${o} title=${(n === "native" ? o : "") ?? v} ${u(this._elementReferenceController.ref)}></calcite-action>${r.map((d) => d.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : m`<calcite-action .icon=${s} .scale=${e.scale} .text=${o} title=${(n === "native" ? o : "") ?? v} ${u(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown overlay-positioning=fixed .placement=${h} .referenceElement=${a}><calcite-dropdown-group selection-mode=none>${r.map((d) => d.proxiedRender(e, "dropdown-item"))}</calcite-dropdown-group></calcite-dropdown>`;
|
|
38
|
+
return m`${l.map((d) => d.proxiedRender(e, "collapsed-action"))}${r.length ? b : void 0}${r.length && c ? m`<calcite-tooltip class=${$(p)} close-on-click overlay-positioning=fixed .placement=${h} .referenceElement=${a}><span>${o}</span></calcite-tooltip>` : void 0}`;
|
|
39
39
|
}
|
|
40
40
|
connectedCallback() {
|
|
41
41
|
super.connectedCallback(), this._childrenObserver.observe(this.el, { childList: !0 }), this._syncChildren();
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
|
|
2
2
|
import { c as y } from "../../chunks/runtime.js";
|
|
3
|
-
import { ref as
|
|
3
|
+
import { ref as $ } from "lit/directives/ref.js";
|
|
4
4
|
import { html as d } from "lit";
|
|
5
5
|
import { LitElement as _, nothing as h, safeClassMap as a } from "@arcgis/lumina";
|
|
6
6
|
import { E as L } from "../../chunks/element-reference-controller.js";
|
|
7
|
-
import { L as f
|
|
8
|
-
import { a as
|
|
9
|
-
import { b as
|
|
7
|
+
import { L as f } from "../../chunks/types.js";
|
|
8
|
+
import { a as C, u as R, g as E } from "../../chunks/utils2.js";
|
|
9
|
+
import { b as k } from "../../chunks/utils3.js";
|
|
10
|
+
import { W as O } from "../../chunks/utils.js";
|
|
10
11
|
class S extends _ {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments), this._elementReferenceController = new L(this), this._childrenObserver = new MutationObserver(() => this._syncChildren()), this.priority = f.Medium, this.menuAppearance = "dropdown", this.overflowActionLabel = "More actions";
|
|
@@ -18,18 +19,18 @@ class S extends _ {
|
|
|
18
19
|
const { priority: n, _children: i } = this, r = i?.length ?? 0;
|
|
19
20
|
if (!r)
|
|
20
21
|
return [0];
|
|
21
|
-
const o =
|
|
22
|
+
const o = C(e), s = r * o;
|
|
22
23
|
if (!(n < f.NeverCollapse) || r <= 1)
|
|
23
24
|
return [s];
|
|
24
|
-
const l = o +
|
|
25
|
-
return n <= f.ForceCollapse ? [l] :
|
|
25
|
+
const l = o + W(e);
|
|
26
|
+
return n <= f.ForceCollapse ? [l] : R([l, s]);
|
|
26
27
|
}
|
|
27
28
|
proxiedRender(e, n) {
|
|
28
29
|
const i = this._children;
|
|
29
30
|
if (!i)
|
|
30
31
|
return;
|
|
31
|
-
const { visible: r, hidden: o } = this._resolveActionsFromBudget(i, e, n, this.menuAppearance === "dropdown"), s =
|
|
32
|
-
return d`<div class="split-host">${r.map((c) => c.proxiedRender(e, "collapsed-action"))}${o.length ? w : void 0}${o.length && m ? d`<calcite-tooltip class=${a(A)} overlay-positioning=fixed .placement=${u} .referenceElement=${
|
|
32
|
+
const { visible: r, hidden: o } = this._resolveActionsFromBudget(i, e, n, this.menuAppearance === "dropdown"), s = T(e), t = this.overflowActionLabel, l = e.tooltipAppearance, m = l !== "native", v = this._elementReferenceController.element, A = l === "calcite-dark" ? "calcite-mode-dark" : void 0, g = "split-anchor", b = o.length ? "split-menu" : "", u = E(e), w = this.menuAppearance === "action-menu" ? d`<calcite-action-menu class=${a(b)} .label=${t} overlay-positioning=fixed .placement=${u}><calcite-action class=${a(g)} data-layout=${e.layout ?? h} .icon=${s} .label=${t} .scale=${e.scale} slot=trigger .text=${t} title=${t ?? h} ${$(this._elementReferenceController.ref)}></calcite-action>${o.map((c) => c.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : d`<calcite-action class=${a(g)} data-layout=${e.layout ?? h} .icon=${s} .label=${t} .scale=${e.scale} .text=${l === "native" ? t : ""} title=${t ?? h} ${$(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown class=${a(b)} overlay-positioning=fixed .placement=${u} .referenceElement=${v} .scale=${e.scale}><calcite-dropdown-group selection-mode=single>${o.map((c) => c.proxiedRender(e, "dropdown-item", c === r.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;
|
|
33
|
+
return d`<div class="split-host">${r.map((c) => c.proxiedRender(e, "collapsed-action"))}${o.length ? w : void 0}${o.length && m ? d`<calcite-tooltip class=${a(A)} close-on-click overlay-positioning=fixed .placement=${u} .referenceElement=${v}><span>${t}</span></calcite-tooltip>` : void 0}</div>`;
|
|
33
34
|
}
|
|
34
35
|
connectedCallback() {
|
|
35
36
|
super.connectedCallback(), this._childrenObserver.observe(this.el, { childList: !0 }), this._syncChildren();
|
|
@@ -38,8 +39,8 @@ class S extends _ {
|
|
|
38
39
|
this._childrenObserver.disconnect(), super.disconnectedCallback();
|
|
39
40
|
}
|
|
40
41
|
_resolveActionsFromBudget(e, n, i, r) {
|
|
41
|
-
const o = e.find((m) => m.active) ?? e?.toSorted(
|
|
42
|
-
if (Math.floor(i /
|
|
42
|
+
const o = e.find((m) => m.active) ?? e?.toSorted(k)?.at(0);
|
|
43
|
+
if (Math.floor(i / C(n)) >= e.length)
|
|
43
44
|
return { visible: [...e], hidden: [] };
|
|
44
45
|
if (r)
|
|
45
46
|
return { visible: [o ?? e[0]], hidden: [...e] };
|
|
@@ -54,11 +55,11 @@ class S extends _ {
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
+
function T({ layout: p, relativePosition: e }) {
|
|
58
59
|
return p === "horizontal" ? e.startsWith("top") ? "chevron-down" : "chevron-up" : e.endsWith("left") ? "chevron-right" : "chevron-left";
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
61
|
+
function W({ layout: p, scale: e }) {
|
|
62
|
+
return O.splitButtonPart[p][e];
|
|
62
63
|
}
|
|
63
64
|
y("arcgis-toolbar-split-button", S);
|
|
64
65
|
export {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component to support laying out multiple toolbars.
|
|
6
|
+
*
|
|
7
|
+
* This is intended to be relatively simple; toolbars are 'stacked' vertically and horizontally
|
|
8
|
+
* according to layout, docking behavior, and available space.
|
|
9
|
+
*
|
|
10
|
+
* A single ruler element is shared across toolbars to simplify the calculations and avoid
|
|
11
|
+
* issues (e.g. if the toolbar is offset relative to another toolbar, that would affect the positioning of the ruler element).
|
|
12
|
+
*
|
|
13
|
+
* The general rule is the input order of the toolbar elements determines the semantic priority. Based on that priority,
|
|
14
|
+
* higher priority elements are stuck to the outside, with smaller/lower priority elements flowing towards the center.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export abstract class ArcgisToolbarStack extends LitElement {
|
|
19
|
+
/** Toolbar orientation */
|
|
20
|
+
accessor layout: "horizontal" | "vertical";
|
|
21
|
+
/**
|
|
22
|
+
* Relative position is used to control how popover element placement and directional arrows
|
|
23
|
+
* are chosen. This is used in conjunction with the layout property.
|
|
24
|
+
*
|
|
25
|
+
* This will affect how split buttons, overflow menus, and tooltips are displayed.
|
|
26
|
+
*
|
|
27
|
+
* @default "top-left"
|
|
28
|
+
*/
|
|
29
|
+
accessor relativePosition: "bottom-end" | "bottom-left" | "bottom-right" | "bottom-start" | "top-end" | "top-left" | "top-right" | "top-start";
|
|
30
|
+
/**
|
|
31
|
+
* Action scale, will be applied to all rendered actions.
|
|
32
|
+
*
|
|
33
|
+
* @default "m"
|
|
34
|
+
*/
|
|
35
|
+
accessor scale: "l" | "m" | "s";
|
|
36
|
+
/**
|
|
37
|
+
* Toolbar visual appearance - affects layout decisions.
|
|
38
|
+
*
|
|
39
|
+
* @default "floating"
|
|
40
|
+
*/
|
|
41
|
+
accessor toolbarKind: "docked" | "floating";
|
|
42
|
+
/**
|
|
43
|
+
* Controls whether individual actions render native tooltips or Calcite tooltips.
|
|
44
|
+
*
|
|
45
|
+
* @default "native"
|
|
46
|
+
*/
|
|
47
|
+
accessor tooltipAppearance: "calcite-dark" | "calcite" | "native";
|
|
48
|
+
}
|
|
@@ -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,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 P } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as G } from "lit/directives/keyed.js";
|
|
4
4
|
import { LitElement as J, createEvent as T } from "@arcgis/lumina";
|
|
@@ -185,8 +185,8 @@ class ce extends J {
|
|
|
185
185
|
loaded() {
|
|
186
186
|
this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
this.initialized && (e.has("layer") || e.has("visualizationSource") || e.has("fieldName") || e.has("uniqueValues")) &&
|
|
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
190
|
}
|
|
191
191
|
async processProps() {
|
|
192
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];
|
|
@@ -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 o } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as n, createEvent as i, nothing as l, safeClassMap as h } from "@arcgis/lumina";
|
|
4
4
|
import { getSlotAssignedElements as r } from "@arcgis/toolkit/dom/slots";
|
|
@@ -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";
|