@arcgis/map-components 6.0.0-next.37 → 6.0.0-next.38
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/{7OLHJCFT.js → 3B3VDGRJ.js} +1 -1
- package/dist/cdn/{VTYQHAZN.js → 46IHEFRQ.js} +1 -1
- package/dist/cdn/GL66LRQX.js +2 -0
- package/dist/cdn/HLZ5J5MD.js +2 -0
- package/dist/cdn/{4UCQJWD2.js → QSG4POLY.js} +1 -1
- package/dist/cdn/{JKE3FA4Q.js → T25QR447.js} +1 -1
- package/dist/cdn/{NZK2LVFA.js → TIAFGALC.js} +1 -1
- package/dist/cdn/U6FSG7JR.js +2 -0
- package/dist/cdn/{6UMEQS35.js → XHCML3ZO.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-feature-next/customElement.js +1 -1
- package/dist/components/arcgis-feature-relationship/customElement.js +97 -98
- package/dist/components/arcgis-features-next/customElement.js +9 -6
- package/dist/components/arcgis-layer-list-next/customElement.js +105 -97
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +62 -62
- package/dist/components/arcgis-selection-list/customElement.d.ts +12 -0
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +10 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +18 -0
- package/dist/components/arcgis-sketch/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/package.json +6 -6
- package/dist/cdn/6TXZMHLZ.js +0 -2
- package/dist/cdn/NEPTDMLE.js +0 -2
- package/dist/cdn/PTHNXKEA.js +0 -2
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as x } from "../../chunks/runtime.js";
|
|
3
3
|
import { html as h } from "lit";
|
|
4
4
|
import { keyed as w } from "lit/directives/keyed.js";
|
|
5
|
-
import { repeat as
|
|
6
|
-
import
|
|
7
|
-
import { classes as
|
|
8
|
-
import { generateGuid as
|
|
5
|
+
import { repeat as N } from "lit/directives/repeat.js";
|
|
6
|
+
import U from "@arcgis/core/layerList/LayerListModel.js";
|
|
7
|
+
import { classes as k } from "@arcgis/toolkit/dom";
|
|
8
|
+
import { generateGuid as B } from "@arcgis/toolkit/string";
|
|
9
9
|
import { createRef as b, ref as _ } from "lit/directives/ref.js";
|
|
10
10
|
import { u as G } from "../../chunks/useT9n.js";
|
|
11
11
|
import { m as H } from "../../chunks/useViewModel.js";
|
|
12
|
+
import { m as q } from "../../chunks/handle.js";
|
|
12
13
|
import { g as $ } from "../../chunks/globalCss.js";
|
|
13
14
|
import { c as y } from "../../chunks/css.js";
|
|
14
|
-
import { g as m, a as
|
|
15
|
+
import { g as m, a as M, m as V, b as j, r as T, s as z, c as J, d as K, e as Q } from "../../chunks/layer-list-utils.js";
|
|
15
16
|
import p from "@arcgis/core/core/Collection.js";
|
|
16
17
|
import { on as C, watch as A } from "@arcgis/core/core/reactiveUtils.js";
|
|
17
|
-
import { LitElement as
|
|
18
|
-
import { usePropertyChange as
|
|
19
|
-
import { reEmitEvent as
|
|
20
|
-
import { u as
|
|
21
|
-
import { u as
|
|
18
|
+
import { LitElement as W, createEvent as I, renderElement as D, safeClassMap as F, nothing as O } from "@arcgis/lumina";
|
|
19
|
+
import { usePropertyChange as X } from "@arcgis/lumina/controllers";
|
|
20
|
+
import { reEmitEvent as Y } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
21
|
+
import { u as Z } from "../../chunks/useCloseEvent.js";
|
|
22
|
+
import { u as ee, s as te, a as ie } from "../../chunks/layer-list-next.js";
|
|
22
23
|
import { ArcgisLayerListItem as se } from "./layer-list-item/customElement.js";
|
|
23
|
-
import { i as
|
|
24
|
+
import { i as ae, h as le, r as re } from "../../chunks/utils.js";
|
|
24
25
|
import "../arcgis-layer-list-item-indicator/customElement.js";
|
|
25
|
-
const P = "nested", oe = H(
|
|
26
|
-
class
|
|
26
|
+
const P = "nested", oe = H(U);
|
|
27
|
+
class ne extends W {
|
|
27
28
|
constructor() {
|
|
28
|
-
super(...arguments), this.#
|
|
29
|
-
const
|
|
29
|
+
super(...arguments), this.#i = ee(this), this.#s = null, this._rootListRef = b(), this._layerFlowItemRef = b(), this._panelFlowItemRef = b(), this._selectedDragItemLayerUid = null, this._rootGroupUid = `operational-${B()}`, this.#a = null, this._updateAnimationFrame = null, this.messages = G(), this._canMove = ({ dragEl: e, fromEl: t, toEl: i }, a) => {
|
|
30
|
+
const s = a === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, l = m(e, this.operationalItems);
|
|
30
31
|
if (!l?.sortable)
|
|
31
32
|
return !1;
|
|
32
|
-
const
|
|
33
|
+
const r = this.#e(t), o = this.#e(i), n = this.#t(r), d = M(r), g = this.#t(o), u = M(o), f = !!d && !!u && d === u, L = {
|
|
33
34
|
selected: l,
|
|
34
35
|
from: n,
|
|
35
36
|
to: g
|
|
36
|
-
}, v =
|
|
37
|
-
return v && c && typeof
|
|
37
|
+
}, v = r?.group, c = o?.group, R = n?.layer?.type ?? "", S = g?.layer?.type ?? "", E = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
|
|
38
|
+
return v && c && typeof s == "function" ? s(L) : f && !E.has(R) && !E.has(S) && l?.layer?.type !== "sublayer";
|
|
38
39
|
}, this._onCatalogOpen = (e) => {
|
|
39
40
|
this.openedLayers.push(e.layer?.parent);
|
|
40
41
|
}, this._onTablesOpen = (e) => {
|
|
@@ -46,33 +47,39 @@ class re extends Q {
|
|
|
46
47
|
}, this._setActiveItem = (e) => {
|
|
47
48
|
if (this.visibilityAppearance !== "default")
|
|
48
49
|
return;
|
|
49
|
-
const t = Array.from(e.composedPath()).find((a) => a.classList?.contains(y.item)),
|
|
50
|
-
this._activeItem =
|
|
51
|
-
}, this.
|
|
50
|
+
const t = Array.from(e.composedPath()).find((a) => a.classList?.contains(y.item)), i = m(t, this.operationalItems);
|
|
51
|
+
this._activeItem = i;
|
|
52
|
+
}, this._scheduleUpdate = () => {
|
|
53
|
+
this._updateAnimationFrame === null && (this._updateAnimationFrame = requestAnimationFrame(() => {
|
|
54
|
+
this._updateAnimationFrame = null, this.isConnected && this.requestUpdate();
|
|
55
|
+
}));
|
|
56
|
+
}, this._cancelScheduledUpdate = () => {
|
|
57
|
+
this._updateAnimationFrame !== null && (cancelAnimationFrame(this._updateAnimationFrame), this._updateAnimationFrame = null);
|
|
58
|
+
}, this.viewModel = oe(this), this.arcgisClose = Z(this), this._activeItem = null, this._onTooltipReferenceChange = (e, t) => {
|
|
52
59
|
t ? this._tooltipReferenceMap.set(e, t) : this._tooltipReferenceMap.delete(e);
|
|
53
60
|
}, this._onSelectedDragItemLayerUidChange = (e) => {
|
|
54
61
|
this._selectedDragItemLayerUid = e;
|
|
55
62
|
}, this._onTriggerAction = (e, t) => {
|
|
56
63
|
this.triggerAction(e, t);
|
|
57
|
-
}, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.layerTablesEnabled = new p(["knowledge-graph"]), this.mapImageOptions = null, this.openedLayerLists = new p(), this.tileOptions = null, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.hideCatalogLayerList = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.hideStatusIndicators = !1, this.icon = "layers", this.layerTablesAvailable = new p(["knowledge-graph"]), this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.minDragEnabledItems = V, this.minFilterItems = j, this.openedLayers = new p(), this.operationalItems = this.viewModel.operationalItems, this.selectedItems = new p(), this.selectionMode = "none", this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.showFilter = !1, this.showHeading = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.view = this.viewModel.view, this.visibilityAppearance = "default", this.arcgisFilterChange = I(), this.arcgisOpenedLayersChange = I(), this.arcgisPropertyChange =
|
|
64
|
+
}, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.layerTablesEnabled = new p(["knowledge-graph"]), this.mapImageOptions = null, this.openedLayerLists = new p(), this.tileOptions = null, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.hideCatalogLayerList = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.hideStatusIndicators = !1, this.icon = "layers", this.layerTablesAvailable = new p(["knowledge-graph"]), this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.minDragEnabledItems = V, this.minFilterItems = j, this.openedLayers = new p(), this.operationalItems = this.viewModel.operationalItems, this.selectedItems = new p(), this.selectionMode = "none", this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.showFilter = !1, this.showHeading = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.view = this.viewModel.view, this.visibilityAppearance = "default", this.arcgisFilterChange = I(), this.arcgisOpenedLayersChange = I(), this.arcgisPropertyChange = X()("state"), this.arcgisReady = I(), this.arcgisSelectedItemsChange = I(), this.arcgisTriggerAction = Y(() => this.viewModel, "trigger-action");
|
|
58
65
|
}
|
|
59
66
|
static {
|
|
60
67
|
this.properties = { _catalogLayerList: 16, _tableList: 16, _tooltipReferenceMap: 16, _layerListMap: 16, _totalItems: 16, _visibleItems: 16, _openedPanelItems: 16, _dragEnabled: 16, _filterEnabled: 16, layerTablesEnabled: 16, mapImageOptions: 16, openedLayerLists: 16, tileOptions: 16, _renderedOpenLayerFlowItems: 16, autoDestroyDisabled: 5, catalogLayerList: 32, catalogOptions: 0, closed: 5, collapsed: 5, dragEnabled: 5, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, hideCatalogLayerList: 5, hideNoFilterResultsNotice: 5, hideNoItemsNotice: 5, hideStatusIndicators: 5, icon: 1, knowledgeGraphOptions: 0, label: 1, layerTablesAvailable: 0, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, listItemCreatedFunction: 0, listModeDisabled: 5, messageOverrides: 0, minDragEnabledItems: 9, minFilterItems: 9, openedLayers: 32, operationalItems: 0, referenceElement: 1, selectedItems: 0, selectionMode: 1, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, showFilter: 5, showHeading: 5, showTemporaryLayerIndicators: 5, state: 32, tableList: 32, view: 0, visibilityAppearance: 1 };
|
|
61
68
|
}
|
|
62
69
|
static {
|
|
63
|
-
this.styles = [
|
|
70
|
+
this.styles = [te, ie];
|
|
64
71
|
}
|
|
65
|
-
#s;
|
|
66
72
|
#i;
|
|
73
|
+
#s;
|
|
67
74
|
#a;
|
|
68
75
|
get _totalItems() {
|
|
69
|
-
return this.viewModel.operationalItems.flatten((t) => t.children.filter((
|
|
76
|
+
return this.viewModel.operationalItems.flatten((t) => t.children.filter((i) => i.layer?.type !== "catalog-dynamic-group")).length;
|
|
70
77
|
}
|
|
71
78
|
get _visibleItems() {
|
|
72
79
|
return this.operationalItems?.filter((e) => !e.hidden && (this.showErrors || !e.error));
|
|
73
80
|
}
|
|
74
81
|
get _openedPanelItems() {
|
|
75
|
-
return this._visibleItems.flatten((e) => e.children).filter((e) => !e.hidden && e.panel?.open && !e.panel.disabled && e.panel.flowEnabled && (!
|
|
82
|
+
return this._visibleItems.flatten((e) => e.children).filter((e) => !e.hidden && e.panel?.open && !e.panel.disabled && e.panel.flowEnabled && (!ae(e) || le(e)));
|
|
76
83
|
}
|
|
77
84
|
get _dragEnabled() {
|
|
78
85
|
return this._totalItems >= this.minDragEnabledItems && this.dragEnabled;
|
|
@@ -82,7 +89,7 @@ class re extends Q {
|
|
|
82
89
|
}
|
|
83
90
|
get _renderedOpenLayerFlowItems() {
|
|
84
91
|
const { openedLayers: e } = this;
|
|
85
|
-
return e.toArray().map((t,
|
|
92
|
+
return e.toArray().map((t, i) => this.#_(t, i === e.length - 1));
|
|
86
93
|
}
|
|
87
94
|
get catalogLayerList() {
|
|
88
95
|
return this._catalogLayerList;
|
|
@@ -100,10 +107,11 @@ class re extends Q {
|
|
|
100
107
|
}, { initial: !0 }),
|
|
101
108
|
C(() => this.viewModel.operationalItems, "change", () => T(this.selectedItems), { initial: !0 }),
|
|
102
109
|
A(() => this.operationalItems.flatten((e) => e.children).map((e) => e.uid).join(","), () => {
|
|
103
|
-
T(this.selectedItems), this.
|
|
110
|
+
T(this.selectedItems), this._scheduleUpdate();
|
|
104
111
|
}, { initial: !0 }),
|
|
112
|
+
q(this._cancelScheduledUpdate),
|
|
105
113
|
C(() => this.selectedItems, "change", () => this.arcgisSelectedItemsChange.emit()),
|
|
106
|
-
A(() => [this.filterPredicate, this._rootListRef.value], () =>
|
|
114
|
+
A(() => [this.filterPredicate, this._rootListRef.value], () => z(this._rootListRef.value, this.filterPredicate, this.operationalItems))
|
|
107
115
|
]);
|
|
108
116
|
}
|
|
109
117
|
triggerAction(e, t) {
|
|
@@ -119,48 +127,48 @@ class re extends Q {
|
|
|
119
127
|
}
|
|
120
128
|
#t(e) {
|
|
121
129
|
const t = e?.getAttribute("data-item");
|
|
122
|
-
return t ? this.#
|
|
130
|
+
return t ? this.#o(t) : null;
|
|
123
131
|
}
|
|
124
|
-
#
|
|
132
|
+
#o(e) {
|
|
125
133
|
const t = this.operationalItems?.toArray() ?? [];
|
|
126
134
|
for (; t.length; ) {
|
|
127
|
-
const
|
|
128
|
-
if (!
|
|
135
|
+
const i = t.shift();
|
|
136
|
+
if (!i)
|
|
129
137
|
continue;
|
|
130
|
-
if (
|
|
131
|
-
return
|
|
132
|
-
const a =
|
|
138
|
+
if (i.uid === e)
|
|
139
|
+
return i;
|
|
140
|
+
const a = i.children?.toArray() ?? [];
|
|
133
141
|
t.push(...a);
|
|
134
142
|
}
|
|
135
143
|
return null;
|
|
136
144
|
}
|
|
137
145
|
async #n(e, t) {
|
|
138
|
-
const { _layerListMap:
|
|
146
|
+
const { _layerListMap: i } = this, a = i.get(e);
|
|
139
147
|
if (a)
|
|
140
148
|
return a;
|
|
141
|
-
const
|
|
142
|
-
return t.aborted ||
|
|
149
|
+
const s = e.type === "catalog" ? await this.#d(e) : await this.#p(e);
|
|
150
|
+
return t.aborted || i.set(e, s), s;
|
|
143
151
|
}
|
|
144
152
|
async #c() {
|
|
145
|
-
const { _layerListMap: e, openedLayers: t, openedLayerLists:
|
|
153
|
+
const { _layerListMap: e, openedLayers: t, openedLayerLists: i } = this;
|
|
146
154
|
this.#a?.abort();
|
|
147
|
-
const a = new AbortController(), { signal:
|
|
148
|
-
this.#a = a, e.forEach((
|
|
149
|
-
t.includes(n) || (
|
|
155
|
+
const a = new AbortController(), { signal: s } = a;
|
|
156
|
+
this.#a = a, e.forEach((o, n) => {
|
|
157
|
+
t.includes(n) || (o?.destroy?.(), e.delete(n));
|
|
150
158
|
});
|
|
151
|
-
const l = await Promise.all(t.map((
|
|
152
|
-
if (
|
|
159
|
+
const l = await Promise.all(t.map((o) => this.#n(o, s)));
|
|
160
|
+
if (s.aborted)
|
|
153
161
|
return;
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
162
|
+
i.removeAll(), i.addMany(l);
|
|
163
|
+
const r = i.at(-1);
|
|
164
|
+
r ? "catalogLayer" in r ? (this._catalogLayerList = r, this._tableList = void 0) : (this._catalogLayerList = void 0, this._tableList = r) : (this._catalogLayerList = void 0, this._tableList = void 0), this.arcgisOpenedLayersChange.emit();
|
|
157
165
|
}
|
|
158
166
|
#h() {
|
|
159
167
|
this.openedLayerLists.destroyAll(), this.openedLayers.removeAll(), this._layerListMap.clear();
|
|
160
168
|
}
|
|
161
169
|
async #d(e) {
|
|
162
|
-
const { headingLevel: t, catalogOptions:
|
|
163
|
-
return D(h`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${
|
|
170
|
+
const { headingLevel: t, catalogOptions: i, filterPlaceholder: a, listItemCreatedFunction: s, minFilterItems: l, selectionMode: r, visibilityAppearance: o } = this;
|
|
171
|
+
return D(h`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder ?? a} .listItemCreatedFunction=${i?.listItemCreatedFunction ?? s} .minFilterItems=${i?.minFilterItems ?? l} .selectionMode=${i?.selectionMode ?? r} .visibilityAppearance=${i?.visibilityAppearance ?? o} .showErrors=${i?.showErrors ?? this.showErrors} .showFilter=${i?.showFilter ?? this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators ?? this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators ?? this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${(n) => n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`);
|
|
164
172
|
}
|
|
165
173
|
#m(e) {
|
|
166
174
|
switch (e.type) {
|
|
@@ -181,45 +189,45 @@ class re extends Q {
|
|
|
181
189
|
}
|
|
182
190
|
}
|
|
183
191
|
async #p(e) {
|
|
184
|
-
const { headingLevel: t, selectionMode:
|
|
185
|
-
return D(h`<arcgis-table-list-next .headingLevel=${
|
|
192
|
+
const { headingLevel: t, selectionMode: i, dragEnabled: a } = this, s = this.#m(e);
|
|
193
|
+
return D(h`<arcgis-table-list-next .headingLevel=${s?.headingLevel ?? t} .selectionMode=${s?.selectionMode ?? i} .dragEnabled=${s?.dragEnabled ?? a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon ?? void 0} .label=${s?.label ?? void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${(l) => l.stopPropagation()}></arcgis-table-list-next>`);
|
|
186
194
|
}
|
|
187
195
|
#g(e) {
|
|
188
196
|
e.open = !1;
|
|
189
197
|
}
|
|
190
|
-
#u({ toEl: e, fromEl: t, dragEl:
|
|
191
|
-
const
|
|
192
|
-
a == null || !
|
|
198
|
+
#u({ toEl: e, fromEl: t, dragEl: i, newIndex: a }) {
|
|
199
|
+
const s = this.#e(e), l = this.#e(t), r = m(i, this.operationalItems), o = this.#t(s), n = this.#t(l);
|
|
200
|
+
a == null || !r || (this.viewModel.moveItem(r, n, o, a), re(
|
|
193
201
|
this,
|
|
194
|
-
|
|
202
|
+
r.uid,
|
|
195
203
|
// Make sure we have the current node and not a stale one
|
|
196
|
-
(d) => d !==
|
|
204
|
+
(d) => d !== i && this.#e(d.parentElement) === s
|
|
197
205
|
));
|
|
198
206
|
}
|
|
199
207
|
#f(e) {
|
|
200
|
-
const { fromEl: t, toEl:
|
|
201
|
-
if (t !==
|
|
208
|
+
const { fromEl: t, toEl: i, dragEl: a, oldIndex: s } = e;
|
|
209
|
+
if (t !== i) {
|
|
202
210
|
a.remove();
|
|
203
211
|
return;
|
|
204
212
|
}
|
|
205
|
-
|
|
213
|
+
s == null || !t || !a || t.insertBefore(a, t.children[s]);
|
|
206
214
|
}
|
|
207
215
|
#y(e) {
|
|
208
|
-
const t = this.#
|
|
209
|
-
if (!(!
|
|
210
|
-
if (this.#
|
|
216
|
+
const t = this.#s, { dragEl: i, newIndex: a } = e, s = this.#e(e.fromEl), l = this.#e(e.toEl), r = t?.newIndex === a && t?.dragEl === i && t?.toEl === l && t?.fromEl === s;
|
|
217
|
+
if (!(!s || !l || r)) {
|
|
218
|
+
if (this.#s = {
|
|
211
219
|
...e,
|
|
212
|
-
fromEl:
|
|
220
|
+
fromEl: s,
|
|
213
221
|
toEl: l
|
|
214
|
-
}, this._selectedDragItemLayerUid =
|
|
215
|
-
const
|
|
216
|
-
this.#I(
|
|
222
|
+
}, this._selectedDragItemLayerUid = i.value.layer?.uid ?? null, s === l) {
|
|
223
|
+
const o = Array.from(s.children).filter((n) => n?.matches("calcite-list-item")).map((n) => n.value.layer?.uid ?? "");
|
|
224
|
+
this.#I(s, o);
|
|
217
225
|
return;
|
|
218
226
|
}
|
|
219
227
|
this.#u({
|
|
220
228
|
toEl: l,
|
|
221
|
-
fromEl:
|
|
222
|
-
dragEl:
|
|
229
|
+
fromEl: s,
|
|
230
|
+
dragEl: i,
|
|
223
231
|
newIndex: a
|
|
224
232
|
});
|
|
225
233
|
}
|
|
@@ -227,77 +235,77 @@ class re extends Q {
|
|
|
227
235
|
#I(e, t) {
|
|
228
236
|
if (e)
|
|
229
237
|
if (e === this._rootListRef.value)
|
|
230
|
-
|
|
238
|
+
J(this.el.view?.map?.layers, t);
|
|
231
239
|
else {
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
240
|
+
const i = m(e, this.operationalItems);
|
|
241
|
+
if (!i)
|
|
234
242
|
return;
|
|
235
|
-
|
|
243
|
+
K(i, t);
|
|
236
244
|
}
|
|
237
245
|
}
|
|
238
246
|
#L(e) {
|
|
239
|
-
const { selectionMode: t, selectedItems:
|
|
247
|
+
const { selectionMode: t, selectedItems: i } = this;
|
|
240
248
|
if (t === "none")
|
|
241
249
|
return;
|
|
242
|
-
const
|
|
243
|
-
|
|
250
|
+
const s = e.target.selectedItems.map((l) => m(l, this.operationalItems)).filter(Boolean);
|
|
251
|
+
i.removeAll(), i.addMany(s);
|
|
244
252
|
}
|
|
245
253
|
render() {
|
|
246
254
|
const { state: e } = this, t = {
|
|
247
255
|
[$.hidden]: e === "loading",
|
|
248
256
|
[$.disabled]: e === "disabled"
|
|
249
257
|
};
|
|
250
|
-
return h`<div class=${
|
|
258
|
+
return h`<div class=${F(k($.widget, t))}>${this._visibleItems?.length ? this.#w() : null}${this.#C()}</div>`;
|
|
251
259
|
}
|
|
252
260
|
#v(e) {
|
|
253
|
-
const { _tooltipReferenceMap: t, messages:
|
|
254
|
-
return e ? h`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid ?? "")}>${
|
|
261
|
+
const { _tooltipReferenceMap: t, messages: i } = this;
|
|
262
|
+
return e ? h`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid ?? "")}>${i.layerIncompatibleTooltip}</calcite-tooltip>` : null;
|
|
255
263
|
}
|
|
256
264
|
#l(e) {
|
|
257
265
|
if (e.incompatible)
|
|
258
266
|
return this.#v(e);
|
|
259
|
-
const t = e.children?.filter((
|
|
267
|
+
const t = e.children?.filter((i) => !i.hidden).toArray().map((i) => this.#l(i)) ?? [];
|
|
260
268
|
return t.length ? t : null;
|
|
261
269
|
}
|
|
262
270
|
#w() {
|
|
263
271
|
return this._visibleItems?.toArray().map((t) => this.#l(t));
|
|
264
272
|
}
|
|
265
|
-
#
|
|
273
|
+
#r() {
|
|
266
274
|
return h`<div slot=message>${this.messages.noItemsToDisplay}</div>`;
|
|
267
275
|
}
|
|
268
276
|
#b() {
|
|
269
|
-
return this.hideNoItemsNotice ? null : h`<div class=${
|
|
277
|
+
return this.hideNoItemsNotice ? null : h`<div class=${F(y.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#r()}</calcite-notice></div>`;
|
|
270
278
|
}
|
|
271
279
|
#_(e, t) {
|
|
272
|
-
const { messages:
|
|
273
|
-
return w(e?.uid ??
|
|
280
|
+
const { messages: i, openedLayers: a } = this, s = e.title || this.messages.untitledLayer;
|
|
281
|
+
return w(e?.uid ?? s, h`<calcite-flow-item data-layer-uid=${e?.uid ?? "" ?? O} .description=${s} .heading=${i[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(l) => {
|
|
274
282
|
l.preventDefault(), a.pop(), a.at(-1) && this._layerFlowItemRef.value?.setFocus();
|
|
275
283
|
}} ${_(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
|
|
276
284
|
}
|
|
277
285
|
#$() {
|
|
278
286
|
const { _openedPanelItems: e, openedLayers: t } = this;
|
|
279
|
-
return
|
|
280
|
-
const { panel: l, title:
|
|
281
|
-
return h`<calcite-flow-item .description=${
|
|
282
|
-
n.preventDefault(),
|
|
283
|
-
}} ${_(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${a} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${
|
|
287
|
+
return N(e.toArray(), (a) => a.uid, (a, s) => {
|
|
288
|
+
const { panel: l, title: r } = a, o = () => this.#g(l);
|
|
289
|
+
return h`<calcite-flow-item .description=${r} .heading=${l.title} .headingLevel=${this.headingLevel} .selected=${!t.length && s === e.length - 1} @calciteFlowItemBack=${(n) => {
|
|
290
|
+
n.preventDefault(), o();
|
|
291
|
+
}} ${_(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${a} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${o} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`;
|
|
284
292
|
});
|
|
285
293
|
}
|
|
286
294
|
#C() {
|
|
287
|
-
const { collapsed: e, _visibleItems: t, _openedPanelItems:
|
|
288
|
-
h`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${
|
|
295
|
+
const { collapsed: e, _visibleItems: t, _openedPanelItems: i, _filterEnabled: a, _rootGroupUid: s, showCloseButton: l, showCollapseButton: r, showHeading: o, _dragEnabled: n, filterText: d, openedLayers: g, filterPlaceholder: u, messages: f } = this, L = this.#i.selectionMode, v = [
|
|
296
|
+
h`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${r} .heading=${o ? f.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!g.length && !i.length} @calciteFlowItemClose=${() => this.closed = !1}>${t?.length ? h`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${(c) => this._canMove(c, "pull")} .canPut=${(c) => this._canMove(c, "put")} data-layer-type=${s ?? O} .displayMode=${P} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${u} .filterProps=${Q} .filterText=${a ? d : ""} .group=${s} .label=${f.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${L} @calciteListChange=${this.#L} @calciteListFilter=${(c) => {
|
|
289
297
|
this.filterText = c.currentTarget?.filterText ?? "", this.arcgisFilterChange.emit();
|
|
290
|
-
}} @calciteListOrderChange=${(c) => this.#y(c.detail)} @calciteListDragEnd=${(c) => this.#f(c.detail)} ${_(this._rootListRef)}>${t.toArray().map((c) => this.#
|
|
298
|
+
}} @calciteListOrderChange=${(c) => this.#y(c.detail)} @calciteListDragEnd=${(c) => this.#f(c.detail)} ${_(this._rootListRef)}>${t.toArray().map((c) => this.#F(c))}${a && !this.hideNoFilterResultsNotice ? h`<div class=${F(y.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#r()}</calcite-notice></div>` : null}</calcite-list>` : this.#b()}</calcite-flow-item>`,
|
|
291
299
|
this.#$(),
|
|
292
300
|
this._renderedOpenLayerFlowItems
|
|
293
301
|
];
|
|
294
302
|
return this.closed ? null : w("root-flow", h`<calcite-flow>${v}</calcite-flow>`);
|
|
295
303
|
}
|
|
296
|
-
#
|
|
297
|
-
return w(e.uid, se({ activeItem: this._activeItem, canMove: this._canMove, css: y, displayMode: P, dragEnabled: this.dragEnabled, hideStatusIndicators: this.hideStatusIndicators, hideCatalogLayerList: this.hideCatalogLayerList, item: e, messages: this.messages, layerTablesEnabled: this.layerTablesEnabled, listModeDisabled: this.viewModel.listModeDisabled, operationalItems: this.operationalItems, parent: t, parentTitles:
|
|
304
|
+
#F(e, t, i) {
|
|
305
|
+
return w(e.uid, se({ activeItem: this._activeItem, canMove: this._canMove, css: y, displayMode: P, dragEnabled: this.dragEnabled, hideStatusIndicators: this.hideStatusIndicators, hideCatalogLayerList: this.hideCatalogLayerList, item: e, messages: this.messages, layerTablesEnabled: this.layerTablesEnabled, listModeDisabled: this.viewModel.listModeDisabled, operationalItems: this.operationalItems, parent: t, parentTitles: i, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.#i.selectionMode, setCurrentActiveItem: this._setCurrentActiveItem, showTemporaryLayerIndicators: this.showTemporaryLayerIndicators, showCloseButton: this.showCloseButton, showCollapseButton: this.showCollapseButton, showErrors: this.showErrors, showHeading: this.showHeading, showFilter: this.showFilter, clearActiveItem: this._clearActiveItem, visibilityAppearance: this.visibilityAppearance, handleAction: this._onTriggerAction, handleCatalogOpen: this._onCatalogOpen, handleSelectedDragItemLayerUidChange: this._onSelectedDragItemLayerUidChange, handleTablesOpen: this._onTablesOpen, handleTooltipReferenceChange: this._onTooltipReferenceChange, view: this.view }));
|
|
298
306
|
}
|
|
299
307
|
}
|
|
300
|
-
|
|
308
|
+
x("arcgis-layer-list-next", ne);
|
|
301
309
|
export {
|
|
302
|
-
|
|
310
|
+
ne as ArcgisLayerListNext
|
|
303
311
|
};
|
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { html as s } from "lit";
|
|
3
|
-
import { keyed as
|
|
4
|
-
import { isLayerFromCatalog as
|
|
3
|
+
import { keyed as W } from "lit/directives/keyed.js";
|
|
4
|
+
import { isLayerFromCatalog as Pe } from "@arcgis/core/layers/catalog/catalogUtils.js";
|
|
5
5
|
import { safeClassMap as r, nothing as d } from "@arcgis/lumina";
|
|
6
|
-
import { classes as
|
|
7
|
-
import { createRef as
|
|
8
|
-
import { a as
|
|
9
|
-
import { f as
|
|
10
|
-
import { a as
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
return l ?
|
|
6
|
+
import { classes as X } from "@arcgis/toolkit/dom";
|
|
7
|
+
import { createRef as Y, ref as Z } from "lit/directives/ref.js";
|
|
8
|
+
import { a as we } from "../../../chunks/action-utils.js";
|
|
9
|
+
import { f as Oe, i as ee, l as Fe, h as Ge, j as Re, k as Ve, g as He } from "../../../chunks/layer-list-utils.js";
|
|
10
|
+
import { a as Ue, b as qe, i as je, g as te, t as ie, h as ae, c as Be, F as Ne, d as _e, L as le, f as ze } from "../../../chunks/utils.js";
|
|
11
|
+
const ne = /* @__PURE__ */ new Map();
|
|
12
|
+
function se(l) {
|
|
13
|
+
return l ? ne.get(l) ?? !1 : !1;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const g = !(l.aria?.pressed ??
|
|
17
|
-
return l.aria = { ...l.aria, pressed: g }, e &&
|
|
15
|
+
function Je(l, e) {
|
|
16
|
+
const g = !(l.aria?.pressed ?? se(e));
|
|
17
|
+
return l.aria = { ...l.aria, pressed: g }, e && ne.set(e, g), g;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const { item: e, itemType: g = "layer", parent: v, hideStatusIndicators:
|
|
21
|
-
let F = null;
|
|
22
|
-
!ne && !c && (F = s`<arcgis-layer-list-item-indicator class=${r(i.statusIndicator)} .messages=${a} .item=${e} .parent=${v} slot=content-end></arcgis-layer-list-item-indicator>`);
|
|
19
|
+
function Ke(l) {
|
|
20
|
+
const { item: e, itemType: g = "layer", parent: v, hideStatusIndicators: ce, css: i, visibilityAppearance: I, hideCatalogLayerList: oe, dragEnabled: E = !1, rootGroupUid: A, listModeDisabled: re = !1, selectionMode: T, displayMode: de, layerTablesEnabled: C, showErrors: me, parentTitles: P, selectedItems: ue, activeItem: pe, handleCatalogOpen: be, handleTablesOpen: ge, selectedDragItemLayerUid: w, handleSelectedDragItemLayerUidChange: ye, handlePanelOpen: $e, messages: a, setCurrentActiveItem: O, clearActiveItem: F } = l, ve = Ue(e), fe = qe(e), c = je(e), y = Y(), S = Y(), he = g === "table" ? a.untitledTable ?? "" : a.untitledLayer ?? "", Ie = ve ? a.trackInfo?.[e.content.name] ?? e.content.name : "", Ae = fe ? a.telemetryDisplay?.[e.content.name] ?? e.content.name : "", p = e.title || Ie || Ae || he || "";
|
|
23
21
|
let G = null;
|
|
22
|
+
!ce && !c && (G = s`<arcgis-layer-list-item-indicator class=${r(i.statusIndicator)} .messages=${a} .item=${e} .parent=${v} slot=content-end></arcgis-layer-list-item-indicator>`);
|
|
23
|
+
let R = null;
|
|
24
24
|
{
|
|
25
|
-
const { layer: t } = e, n = t && "persistenceEnabled" in t && (
|
|
26
|
-
!c && (l.showTemporaryLayerIndicators || l.showTemporaryTableIndicators) && n && (
|
|
25
|
+
const { layer: t } = e, n = t && "persistenceEnabled" in t && (Pe(t) || !t.persistenceEnabled);
|
|
26
|
+
!c && (l.showTemporaryLayerIndicators || l.showTemporaryTableIndicators) && n && (R = s`<calcite-icon class=${r(i.itemTemporaryIcon)} icon=temporary scale=s slot=content-start title=${a.temporary ?? d}></calcite-icon>`);
|
|
27
27
|
}
|
|
28
|
-
let
|
|
28
|
+
let V = null;
|
|
29
29
|
if ("visible" in e && "visibleToggle" in i && I) {
|
|
30
|
-
const t =
|
|
30
|
+
const t = te(v);
|
|
31
31
|
if (t !== "inherited") {
|
|
32
|
-
const n =
|
|
32
|
+
const n = Oe({
|
|
33
33
|
visible: e.visible,
|
|
34
34
|
exclusive: t === "exclusive",
|
|
35
35
|
visibilityAppearance: I
|
|
36
|
-
}), o = I === "checkbox", m = a.layerVisibility, $ = p, b = $ ? `${m ?? ""}: ${$}` : m ?? "",
|
|
37
|
-
|
|
38
|
-
c ||
|
|
39
|
-
}} .slot=${o ? "actions-start" : "actions-end"} .text=${m ?? ""} title=${m ?? d}>${o ? null : s`<calcite-icon class=${r(
|
|
36
|
+
}), o = I === "checkbox", m = a.layerVisibility, $ = p, b = $ ? `${m ?? ""}: ${$}` : m ?? "", h = c ? e.visible : se(e.layer?.id);
|
|
37
|
+
V = s`<calcite-action .aria=${{ pressed: h }} class=${r(i.visibleToggle)} .icon=${o ? n : void 0} .label=${b} @click=${(D) => {
|
|
38
|
+
c || Je(D.currentTarget, e.layer?.id), ie(e, v);
|
|
39
|
+
}} .slot=${o ? "actions-start" : "actions-end"} .text=${m ?? ""} title=${m ?? d}>${o ? null : s`<calcite-icon class=${r(X({
|
|
40
40
|
[i.visibleIcon]: t !== "exclusive" && e.visible
|
|
41
41
|
}))} .icon=${n} scale=s></calcite-icon>`}</calcite-action>`;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
let
|
|
44
|
+
let H = null;
|
|
45
45
|
{
|
|
46
46
|
const t = e.panel;
|
|
47
|
-
t?.open && !t.disabled && !t.flowEnabled && (!c ||
|
|
47
|
+
t?.open && !t.disabled && !t.flowEnabled && (!c || ae(e)) && (H = s`<div class=${r(i.itemContentBottom)} slot=content-bottom><arcgis-layer-list-item-panel .item=${e} .view=${l.view}></arcgis-layer-list-item-panel></div>`);
|
|
48
48
|
}
|
|
49
|
-
let
|
|
49
|
+
let U = null;
|
|
50
50
|
{
|
|
51
51
|
const t = e.panel;
|
|
52
|
-
if (t?.visible && (!c ||
|
|
52
|
+
if (t?.visible && (!c || ae(e))) {
|
|
53
53
|
const { open: n, title: o, disabled: m } = t;
|
|
54
54
|
(t.content === "legend" || Array.isArray(t.content) && t.content.includes("legend")) && (t.icon = "legend");
|
|
55
55
|
const $ = {
|
|
56
56
|
icon: t.icon,
|
|
57
57
|
image: t.image ?? void 0,
|
|
58
58
|
indicator: !1
|
|
59
|
-
}, b =
|
|
60
|
-
|
|
59
|
+
}, b = we($);
|
|
60
|
+
U = s`<calcite-action .active=${n} .disabled=${m} .icon=${b} @click=${() => Be(e, $e)} slot=actions-end .text=${o ?? ""} title=${o ?? void 0 ?? d}>${Ne(i, t)}</calcite-action>`;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
let U = null;
|
|
64
|
-
{
|
|
65
|
-
const t = e.layer, n = t?.type === "catalog-footprint", o = t?.type === "sublayer" && Y(t, "footprints");
|
|
66
|
-
!c && "itemCatalogIcon" in i && (n || o) && (U = s`<calcite-icon class=${r(i.itemCatalogIcon)} icon=footprint scale=s slot=content-start></calcite-icon>`);
|
|
67
|
-
}
|
|
68
63
|
let q = null;
|
|
69
64
|
{
|
|
70
|
-
const t = e.layer, n = t?.type === "catalog-
|
|
71
|
-
!c && "itemCatalogIcon" in i && (n || o) && (q = s`<calcite-icon class=${r(i.itemCatalogIcon)} icon=
|
|
65
|
+
const t = e.layer, n = t?.type === "catalog-footprint", o = t?.type === "sublayer" && ee(t, "footprints");
|
|
66
|
+
!c && "itemCatalogIcon" in i && (n || o) && (q = s`<calcite-icon class=${r(i.itemCatalogIcon)} icon=footprint scale=s slot=content-start></calcite-icon>`);
|
|
72
67
|
}
|
|
73
68
|
let j = null;
|
|
69
|
+
{
|
|
70
|
+
const t = e.layer, n = t?.type === "catalog-dynamic-group", o = t?.type === "sublayer" && ee(t, "layers-in-view");
|
|
71
|
+
!c && "itemCatalogIcon" in i && (n || o) && (j = s`<calcite-icon class=${r(i.itemCatalogIcon)} icon=catalog-dataset scale=s slot=content-start></calcite-icon>`);
|
|
72
|
+
}
|
|
73
|
+
let B = null;
|
|
74
74
|
if ("visible" in e) {
|
|
75
75
|
const t = e.layer;
|
|
76
|
-
!c && !
|
|
76
|
+
!c && !oe && t?.type === "catalog-dynamic-group" && (B = s`<calcite-action .disabled=${!t.visible} icon=chevron-right icon-flip-rtl @click=${() => be?.(e)} slot=actions-end .text=${p ?? ""}></calcite-action>`);
|
|
77
77
|
}
|
|
78
|
-
let
|
|
78
|
+
let N = null, L = !1;
|
|
79
79
|
{
|
|
80
80
|
const t = e.layer;
|
|
81
81
|
if (!c && C && t)
|
|
@@ -88,50 +88,50 @@ function Je(l) {
|
|
|
88
88
|
L = C.includes(t.type) && "subtables" in t && !!t.subtables?.length;
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
|
-
"itemTableIcon" in i && "visible" in e && "tables" in a && L && (
|
|
91
|
+
"itemTableIcon" in i && "visible" in e && "tables" in a && L && (N = W(`${e.uid}-tables`, s`<calcite-list-item class=${r(i.item)} data-layer-id=${t?.id ?? d} drag-disabled .label=${a.tables} title=${a.tables ?? d} @calciteListItemSelect=${() => ge?.(e)} .value=${e}><calcite-icon class=${r(i.itemTableIcon)} icon=table scale=s slot=content-start></calcite-icon><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`));
|
|
92
92
|
}
|
|
93
|
-
let
|
|
93
|
+
let _ = null;
|
|
94
94
|
if ("children" in e) {
|
|
95
|
-
const t = [...P ?? [], e.title], { children: n, layer: o } = e, m = o?.type !== "catalog-dynamic-group" &&
|
|
95
|
+
const t = [...P ?? [], e.title], { children: n, layer: o } = e, m = o?.type !== "catalog-dynamic-group" && Fe(e), $ = re ? !1 : Ge(o), b = o?.type === "group", h = !$ && !m && E && b, D = b && "sortable" in e && e.sortable, Me = n.some((u) => "sortable" in u && u.sortable), ke = g === "layer" ? Re(e) : !0, De = E && (m || h) && (Me || h) && ("childrenSortable" in e && e.childrenSortable || D) && ke, Ee = m ? (n?.filter((u) => !u.hidden && (me || !u.error)).toArray() ?? []).map((u) => Ke({
|
|
96
96
|
...l,
|
|
97
97
|
item: u,
|
|
98
98
|
parent: e,
|
|
99
99
|
parentTitles: t
|
|
100
100
|
})) : null;
|
|
101
|
-
(m ||
|
|
101
|
+
(m || h) && (_ = s`<calcite-list .canPull=${(u) => l.canMove ? l.canMove(u, "pull") : !1} .canPut=${(u) => l.canMove ? l.canMove(u, "put") : !1} data-item=${e.uid ?? d} data-layer-type=${A ?? d} .displayMode=${de} .dragEnabled=${De} .group=${b ? A : `${A}-${o?.uid}`} .label=${e.title} selection-appearance=highlight .selectionMode=${T}>${Ee}${N}</calcite-list>`);
|
|
102
102
|
}
|
|
103
103
|
let x = null;
|
|
104
104
|
if (!c && e.error) {
|
|
105
105
|
const t = "layerError" in a ? a.layerError : a.tableError;
|
|
106
106
|
x = s`<div class=${r(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s width=full><div slot=message>${t}</div></calcite-notice></div>`;
|
|
107
|
-
} else "incompatible" in e && e.incompatible && "layerIncompatible" in a && (x = s`<div class=${r(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${
|
|
108
|
-
const
|
|
107
|
+
} else "incompatible" in e && e.incompatible && "layerIncompatible" in a && (x = s`<div class=${r(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${Z(S)}><div slot=message>${a.layerIncompatible}</div></calcite-notice></div>`);
|
|
108
|
+
const z = _e(e), M = e.actionsSections.reduce((t, n) => t + n.length, 0), J = Ve(z), Te = z.toArray().map((t) => s`<calcite-action-group>${t.toArray().map((n) => le(l, n, !0))}</calcite-action-group>`), Ce = (t) => {
|
|
109
109
|
e.actionsOpen = t.currentTarget.open;
|
|
110
110
|
};
|
|
111
|
-
let
|
|
112
|
-
M > 1 && (
|
|
111
|
+
let K = null;
|
|
112
|
+
M > 1 && (K = s`<calcite-action-menu appearance=transparent .label=${a.menu ?? ""} .open=${e.actionsOpen} overlay-positioning=fixed placement=bottom-end slot=actions-end @calciteActionMenuOpen=${Ce}><calcite-action .aria=${{
|
|
113
113
|
expanded: e.actionsOpen ?? !1,
|
|
114
114
|
hasPopup: "true"
|
|
115
|
-
}} icon=ellipsis slot=trigger .text=${a.options ?? ""} title=${a.options ?? d}></calcite-action>${
|
|
115
|
+
}} icon=ellipsis slot=trigger .text=${a.options ?? ""} title=${a.options ?? d}></calcite-action>${Te}</calcite-action-menu>`);
|
|
116
116
|
let k = null;
|
|
117
|
-
M === 1 &&
|
|
118
|
-
const
|
|
119
|
-
return queueMicrotask(() => {
|
|
120
|
-
|
|
121
|
-
}),
|
|
122
|
-
|
|
117
|
+
M === 1 && J ? k = le(l, J, !1) : M > 1 && (k = K);
|
|
118
|
+
const Se = c ? p : "visibleAtCurrentTimeExtent" in e && "layerInvisibleAtTime" in a && !e.visibleAtCurrentTimeExtent ? `${p} (${a.layerInvisibleAtTime})` : "visibleAtCurrentScale" in e && "layerInvisibleAtScale" in a && !e.visibleAtCurrentScale ? `${p} (${a.layerInvisibleAtScale})` : p, Le = "parent" in e && e.parent?.layer?.type === "catalog", f = e.layer, xe = !c && ("visibleAtCurrentScale" in e && !e.visibleAtCurrentScale || "visibleAtCurrentTimeExtent" in e && !e.visibleAtCurrentTimeExtent), Q = !c && w === f?.uid;
|
|
119
|
+
return (Q || "incompatible" in e && e.incompatible) && queueMicrotask(() => {
|
|
120
|
+
Q && ze(y.value ?? null, e, w, ye), S.value && (l.handleTooltipReferenceChange?.(f?.uid, S.value), queueMicrotask(() => l.handleTooltipReferenceChange?.(f?.uid, null)));
|
|
121
|
+
}), W(e.uid, s`<calcite-list-item class=${r(X(i.item, "itemActive" in i && { [i.itemActive]: pe?.uid === e.uid }))} data-item=${e.uid ?? d} data-layer-id=${f?.id ?? d} .dragDisabled=${!("sortable" in e && e.sortable) || Le} id=${(c ? void 0 : f?.uid) ?? d} .label=${p} .metadata=${{ parentTitles: P ?? [], _title: p }} .expanded=${"open" in e && e.open} .selected=${T !== "none" ? ue.includes(e) : !1} title=${Se ?? d} .unavailable=${xe} .value=${e} @focusin=${() => {
|
|
122
|
+
O?.(e), y.value?.classList.add(i.itemActive);
|
|
123
123
|
}} @focusout=${() => {
|
|
124
|
-
|
|
124
|
+
F?.(), y.value?.classList.remove(i.itemActive);
|
|
125
125
|
}} @mouseover=${() => {
|
|
126
|
-
|
|
126
|
+
O?.(e), y.value?.classList.add(i.itemActive);
|
|
127
127
|
}} @mouseleave=${() => {
|
|
128
|
-
|
|
128
|
+
F?.(), y.value?.classList.remove(i.itemActive);
|
|
129
129
|
}} @calciteListItemSelect=${(t) => {
|
|
130
|
-
t.target === t.currentTarget && "visible" in e &&
|
|
130
|
+
t.target === t.currentTarget && "visible" in e && He(t.currentTarget, l.operationalItems) === e && T === "none" && te(v) !== "inherited" && ie(e, v);
|
|
131
131
|
}} @calciteListItemToggle=${(t) => {
|
|
132
132
|
"open" in e && (t.stopPropagation(), e.open = t.target.expanded);
|
|
133
|
-
}} ${
|
|
133
|
+
}} ${Z(y)}>${q}${j}${G}${V}${B}${R}${_}${x}${H}${U}${k}</calcite-list-item>`);
|
|
134
134
|
}
|
|
135
135
|
export {
|
|
136
|
-
|
|
136
|
+
Ke as ArcgisLayerListItem
|
|
137
137
|
};
|