@arcgis/map-components 6.0.0-next.33 → 6.0.0-next.35
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/2TTSZF7O.js +2 -0
- package/dist/cdn/4UCQJWD2.js +2 -0
- package/dist/cdn/6UMEQS35.js +2 -0
- package/dist/cdn/7OLHJCFT.js +2 -0
- package/dist/cdn/AMRSK274.js +2 -0
- package/dist/cdn/{VXPGE37T.js → BABV4TXK.js} +1 -1
- package/dist/cdn/{2JXK3AW7.js → BCHHB4QH.js} +1 -1
- package/dist/cdn/D4UNIFIZ.js +2 -0
- package/dist/cdn/{LC2ZSIJY.js → DARVFHQE.js} +1 -1
- package/dist/cdn/{YME6EWHF.js → DNZXXP5C.js} +1 -1
- package/dist/cdn/{KWIZ45T7.js → F5N3YH5Z.js} +1 -1
- package/dist/cdn/{L3MJ5NAZ.js → GMN6YYZU.js} +1 -1
- package/dist/cdn/I6DE3NLP.js +2 -0
- package/dist/cdn/JKE3FA4Q.js +2 -0
- package/dist/cdn/JZTCF52M.js +2 -0
- package/dist/cdn/LZN3NDWX.js +2 -0
- package/dist/cdn/NZK2LVFA.js +2 -0
- package/dist/cdn/{2AMSAAH4.js → ODCD75PC.js} +1 -1
- package/dist/cdn/PTHNXKEA.js +2 -0
- package/dist/cdn/QVIQ66LA.js +2 -0
- package/dist/cdn/TRN35DVC.js +2 -0
- package/dist/cdn/{TEDWUEQ4.js → VTYQHAZN.js} +1 -1
- package/dist/cdn/assets/shadow-cast/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/layer-list-next.js +49 -4
- package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +2 -2
- package/dist/components/arcgis-area-measurement-2d/customElement.js +2 -2
- package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +2 -2
- package/dist/components/arcgis-area-measurement-3d/customElement.js +2 -2
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +3 -0
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +102 -101
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +3 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +87 -86
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +2 -2
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +2 -2
- package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +2 -2
- package/dist/components/arcgis-distance-measurement-2d/customElement.js +2 -2
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +2 -2
- package/dist/components/arcgis-elevation-profile/customElement.js +2 -2
- package/dist/components/arcgis-expand/customElement.js +13 -13
- package/dist/components/arcgis-exploratory-analysis/customElement.js +41 -38
- package/dist/components/arcgis-feature-expression/customElement.js +47 -47
- package/dist/components/arcgis-feature-next/customElement.js +5 -5
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +1 -0
- package/dist/components/arcgis-layer-list-next/customElement.js +72 -71
- package/dist/components/arcgis-shadow-cast/customElement.d.ts +14 -2
- package/dist/components/arcgis-shadow-cast/customElement.js +53 -34
- package/dist/components/arcgis-shadow-cast/index.js +1 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +6 -4
- package/dist/components/arcgis-sketch/customElement.js +177 -167
- package/dist/components/arcgis-table-list-next/customElement.d.ts +3 -0
- package/dist/components/arcgis-table-list-next/customElement.js +44 -43
- package/dist/components/arcgis-utility-network-picker/customElement.js +32 -31
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +10 -4
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.js +10 -9
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +3 -0
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +7 -7
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +1 -1
- package/dist/components/arcgis-view-popover/customElement.d.ts +65 -33
- package/dist/components/arcgis-view-popover/customElement.js +196 -108
- package/dist/components/arcgis-view-popover/index.js +1 -1
- package/dist/components/arcgis-volume-measurement/customElement.d.ts +2 -2
- package/dist/components/arcgis-volume-measurement/customElement.js +2 -2
- 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/loader.js +2 -2
- package/dist/types/lumina.d.ts +7 -7
- package/dist/types/preact.d.ts +7 -7
- package/dist/types/react.d.ts +7 -7
- package/dist/types/stencil.d.ts +7 -7
- package/package.json +8 -8
- package/dist/cdn/3NUN6DK3.js +0 -2
- package/dist/cdn/6FJUKYNB.js +0 -2
- package/dist/cdn/7Y6PADB5.js +0 -2
- package/dist/cdn/I5F7MVDT.js +0 -2
- package/dist/cdn/LNTE4FDB.js +0 -2
- package/dist/cdn/P5U37XIA.js +0 -2
- package/dist/cdn/PD4ELTMF.js +0 -2
- package/dist/cdn/RAADOJWX.js +0 -2
- package/dist/cdn/TEPHXOQ2.js +0 -2
- package/dist/cdn/TY4XRXLB.js +0 -2
- package/dist/cdn/UZ4VANCL.js +0 -2
- package/dist/cdn/W4BA3ECA.js +0 -2
- package/dist/cdn/XCDMOCWN.js +0 -2
- package/dist/cdn/ZEQHIKTN.js +0 -2
- /package/dist/cdn/{WFTJ4E4F.js → A6ANFEOT.js} +0 -0
|
@@ -3,9 +3,9 @@ import { c as O } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css as D, html as r } from "lit";
|
|
4
4
|
import { keyed as d } from "lit/directives/keyed.js";
|
|
5
5
|
import { repeat as k } from "lit/directives/repeat.js";
|
|
6
|
-
import
|
|
6
|
+
import S from "@arcgis/core/layerList/BasemapLayerListModel.js";
|
|
7
7
|
import L from "@arcgis/core/core/Collection.js";
|
|
8
|
-
import { on as
|
|
8
|
+
import { on as N, watch as U } from "@arcgis/core/core/reactiveUtils.js";
|
|
9
9
|
import { LitElement as G, createEvent as b, renderElement as $, safeClassMap as g, nothing as y } from "@arcgis/lumina";
|
|
10
10
|
import { usePropertyChange as H } from "@arcgis/lumina/controllers";
|
|
11
11
|
import { reEmitEvent as V } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
@@ -13,30 +13,30 @@ import { classes as q } from "@arcgis/toolkit/dom";
|
|
|
13
13
|
import { generateGuid as j } from "@arcgis/toolkit/string";
|
|
14
14
|
import { createRef as m, ref as u } from "lit/directives/ref.js";
|
|
15
15
|
import { u as z } from "../../chunks/useCloseEvent.js";
|
|
16
|
-
import { u as J } from "../../chunks/
|
|
17
|
-
import {
|
|
16
|
+
import { u as J, s as K, a as Q } from "../../chunks/layer-list-next.js";
|
|
17
|
+
import { u as W } from "../../chunks/useT9n.js";
|
|
18
|
+
import { m as X } from "../../chunks/useViewModel.js";
|
|
18
19
|
import { g as _ } from "../../chunks/globalCss.js";
|
|
19
|
-
import { g as h, a as F, b as
|
|
20
|
-
import { ArcgisLayerListItem as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { c as ae } from "../../chunks/css.js";
|
|
20
|
+
import { g as h, a as F, b as Y, r as Z, s as T, c as ee, d as te, e as se } from "../../chunks/layer-list-utils.js";
|
|
21
|
+
import { ArcgisLayerListItem as ie } from "../arcgis-layer-list-next/layer-list-item/customElement.js";
|
|
22
|
+
import { r as ae } from "../../chunks/utils.js";
|
|
23
|
+
import { c as le } from "../../chunks/css.js";
|
|
24
24
|
import "../arcgis-layer-list-item-indicator/customElement.js";
|
|
25
25
|
import "../arcgis-layer-list-item-panel/customElement.js";
|
|
26
26
|
const p = {
|
|
27
|
-
...
|
|
27
|
+
...le,
|
|
28
28
|
section: "section",
|
|
29
29
|
editing: "editing",
|
|
30
30
|
editingForm: "editing-form"
|
|
31
|
-
},
|
|
32
|
-
class
|
|
31
|
+
}, re = D`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-space-sm);padding-inline:var(--calcite-space-sm)}`, E = "nested", oe = ".*\\S+.*", M = "data-basemap-layer-type", ne = X(S);
|
|
32
|
+
class ce extends G {
|
|
33
33
|
constructor() {
|
|
34
|
-
super(...arguments), this._baseListRef = m(), this._referenceListRef = m(), this._editTitleInputRef = m(), this._layerFlowItemRef = m(), this._panelFlowItemRef = m(), this._rootFlowItemRef = m(), this._editingFlowItemRef = m(), this.#
|
|
35
|
-
const
|
|
34
|
+
super(...arguments), this.#t = J(this), this._baseListRef = m(), this._referenceListRef = m(), this._editTitleInputRef = m(), this._layerFlowItemRef = m(), this._panelFlowItemRef = m(), this._rootFlowItemRef = m(), this._editingFlowItemRef = m(), this.#s = null, this._selectedDragItemLayerUid = null, this._rootGroupUid = `basemap-${j()}`, this.#i = null, this._focusRootFlowItem = !1, this._focusPanelFlowItem = !1, this._focusLayerFlowItem = null, this._focusEditingFlowItem = !1, this.messages = W(), this.viewModel = ne(this), this.arcgisClose = z(this), this._canMove = ({ dragEl: e, fromEl: t, toEl: s }, i) => {
|
|
35
|
+
const l = i === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, o = h(e, this._allItems);
|
|
36
36
|
if (!o?.sortable)
|
|
37
37
|
return !1;
|
|
38
|
-
const
|
|
39
|
-
return A && P && typeof
|
|
38
|
+
const n = h(t, this._allItems), a = F(t), c = h(s, this._allItems), f = F(s), I = !!a && !!f && a === f, R = { selected: o, from: n, to: c }, A = t.group, P = s.group, B = n?.layer?.type ?? "", x = c?.layer?.type ?? "", w = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
|
|
39
|
+
return A && P && typeof l == "function" ? l(R) : I && !w.has(B) && !w.has(x) && o.layer?.type !== "sublayer";
|
|
40
40
|
}, this._onTriggerAction = (e, t) => {
|
|
41
41
|
this.triggerAction(e, t);
|
|
42
42
|
}, this._onTooltipReferenceChange = (e, t) => {
|
|
@@ -65,16 +65,17 @@ class ne extends G {
|
|
|
65
65
|
e.preventDefault();
|
|
66
66
|
const t = this._editTitleInputRef.value?.value;
|
|
67
67
|
t?.trim() && (this.basemapTitle = t), this._toggleEditingTitle();
|
|
68
|
-
}, this._activeItem = null, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.openedLayerLists = new L(), this.autoDestroyDisabled = !1, this.baseFilterText = "", this.baseItemCreatedFunction = this.viewModel.baseItemCreatedFunction, this.basemapTitle = this.viewModel.basemapTitle, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.editingTitle = !1, this.filterPlaceholder = "", this.headingLevel = 2, this.hideBaseLayers = !1, this.hideCatalogLayerList = !1, this.hideHeading = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.hideReferenceLayers = !1, this.hideStatusIndicators = !1, this.icon = "layers", this.layerTablesEnabled = new L(["knowledge-graph"]), this.listModeDisabled = this.viewModel.listModeDisabled, this.minFilterItems =
|
|
68
|
+
}, this._activeItem = null, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.openedLayerLists = new L(), this.autoDestroyDisabled = !1, this.baseFilterText = "", this.baseItemCreatedFunction = this.viewModel.baseItemCreatedFunction, this.basemapTitle = this.viewModel.basemapTitle, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.editingTitle = !1, this.filterPlaceholder = "", this.headingLevel = 2, this.hideBaseLayers = !1, this.hideCatalogLayerList = !1, this.hideHeading = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.hideReferenceLayers = !1, this.hideStatusIndicators = !1, this.icon = "layers", this.layerTablesEnabled = new L(["knowledge-graph"]), this.listModeDisabled = this.viewModel.listModeDisabled, this.minFilterItems = Y, this.openedLayers = new L(), this.referenceFilterText = "", this.referenceItemCreatedFunction = this.viewModel.referenceItemCreatedFunction, this.selectedItems = new L(), this.selectionMode = "none", this.showCloseButton = !1, this.showCollapseButton = !1, this.showEditTitleButton = !1, this.showErrors = !1, this.showFilter = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.view = this.viewModel.view, this.visibilityAppearance = "default", this.arcgisBaseFilterChange = b(), this.arcgisOpenedLayersChange = b(), this.arcgisPropertyChange = H()("state"), this.arcgisReady = b(), this.arcgisReferenceFilterChange = b(), this.arcgisTriggerAction = V(() => this.viewModel, "trigger-action");
|
|
69
69
|
}
|
|
70
70
|
static {
|
|
71
71
|
this.properties = { _activeItem: 16, _catalogLayerList: 16, _tableList: 16, _tooltipReferenceMap: 16, _layerListMap: 16, openedLayerLists: 16, _allItems: 16, _visibleBaseItems: 16, _visibleReferenceItems: 16, _openedPanelItems: 16, _totalBaseItems: 16, _totalReferenceItems: 16, _baseFilterEnabled: 16, _referenceFilterEnabled: 16, _renderedOpenLayerFlowItems: 16, autoDestroyDisabled: 5, baseFilterPredicate: 0, baseFilterText: 1, baseItemCreatedFunction: 0, baseItems: 32, basemapTitle: 1, catalogLayerList: 32, catalogOptions: 0, closed: 5, collapsed: 7, dragEnabled: 5, editingTitle: 5, filterPlaceholder: 1, headingLevel: 9, hideBaseLayers: 5, hideCatalogLayerList: 5, hideHeading: 5, hideNoFilterResultsNotice: 5, hideNoItemsNotice: 5, hideReferenceLayers: 5, hideStatusIndicators: 5, icon: 1, knowledgeGraphOptions: 0, label: 1, layerTablesEnabled: 0, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, listModeDisabled: 5, mapImageOptions: 0, messageOverrides: 0, minFilterItems: 9, openedLayers: 32, referenceElement: 1, referenceFilterPredicate: 0, referenceFilterText: 1, referenceItems: 32, referenceItemCreatedFunction: 0, selectedItems: 0, selectionMode: 1, showCloseButton: 5, showCollapseButton: 5, showEditTitleButton: 5, showErrors: 5, showFilter: 5, showTemporaryLayerIndicators: 5, state: 32, tableList: 32, tileOptions: 0, view: 0, visibilityAppearance: 1 };
|
|
72
72
|
}
|
|
73
73
|
static {
|
|
74
|
-
this.styles = [
|
|
74
|
+
this.styles = [K, re, Q];
|
|
75
75
|
}
|
|
76
76
|
#t;
|
|
77
77
|
#s;
|
|
78
|
+
#i;
|
|
78
79
|
get _allItems() {
|
|
79
80
|
return this.referenceItems.concat(this.baseItems);
|
|
80
81
|
}
|
|
@@ -100,7 +101,7 @@ class ne extends G {
|
|
|
100
101
|
return this._totalReferenceItems >= this.minFilterItems && this.showFilter;
|
|
101
102
|
}
|
|
102
103
|
get _renderedOpenLayerFlowItems() {
|
|
103
|
-
return this.openedLayers.toArray().map((e, t) => this
|
|
104
|
+
return this.openedLayers.toArray().map((e, t) => this.#$(e, t === this.openedLayers.length - 1));
|
|
104
105
|
}
|
|
105
106
|
get baseItems() {
|
|
106
107
|
return this.viewModel.baseItems;
|
|
@@ -115,14 +116,14 @@ class ne extends G {
|
|
|
115
116
|
return this._tableList;
|
|
116
117
|
}
|
|
117
118
|
async destroy() {
|
|
118
|
-
await this.manager.destroy(), this.#
|
|
119
|
+
await this.manager.destroy(), this.#c(), this._tooltipReferenceMap.clear();
|
|
119
120
|
}
|
|
120
121
|
loaded() {
|
|
121
122
|
this.manager.onLifecycle(() => [
|
|
122
|
-
|
|
123
|
-
this.#
|
|
123
|
+
N(() => this.openedLayers, "change", () => {
|
|
124
|
+
this.#n();
|
|
124
125
|
}, { initial: !0 }),
|
|
125
|
-
U(() => [this.viewModel.referenceItems.toArray(), this.viewModel.baseItems.toArray()], () =>
|
|
126
|
+
U(() => [this.viewModel.referenceItems.toArray(), this.viewModel.baseItems.toArray()], () => Z(this.selectedItems), { initial: !0 })
|
|
126
127
|
]);
|
|
127
128
|
}
|
|
128
129
|
updated() {
|
|
@@ -131,35 +132,35 @@ class ne extends G {
|
|
|
131
132
|
triggerAction(e, t) {
|
|
132
133
|
this.viewModel.triggerAction(e, t);
|
|
133
134
|
}
|
|
134
|
-
async #
|
|
135
|
+
async #o(e, t) {
|
|
135
136
|
const s = this._layerListMap.get(e);
|
|
136
137
|
if (s)
|
|
137
138
|
return s;
|
|
138
|
-
const i = e.type === "catalog" ? await this.#
|
|
139
|
+
const i = e.type === "catalog" ? await this.#h(e) : await this._createTableList(e);
|
|
139
140
|
return t.aborted || this._layerListMap.set(e, i), i;
|
|
140
141
|
}
|
|
141
|
-
async #
|
|
142
|
+
async #n() {
|
|
142
143
|
const { _layerListMap: e, openedLayers: t, openedLayerLists: s } = this;
|
|
143
|
-
this.#
|
|
144
|
-
const i = new AbortController(), { signal:
|
|
145
|
-
this.#
|
|
146
|
-
t.includes(c) || (
|
|
144
|
+
this.#i?.abort();
|
|
145
|
+
const i = new AbortController(), { signal: l } = i;
|
|
146
|
+
this.#i = i, e.forEach((a, c) => {
|
|
147
|
+
t.includes(c) || (a?.destroy?.(), e.delete(c));
|
|
147
148
|
});
|
|
148
|
-
const o = await Promise.all(t.map((
|
|
149
|
-
if (
|
|
149
|
+
const o = await Promise.all(t.map((a) => this.#o(a, l)));
|
|
150
|
+
if (l.aborted)
|
|
150
151
|
return;
|
|
151
152
|
s.removeAll(), s.addMany(o);
|
|
152
|
-
const
|
|
153
|
-
|
|
153
|
+
const n = s.at(-1);
|
|
154
|
+
n ? "catalogLayer" in n ? (this._catalogLayerList = n, this._tableList = void 0) : (this._catalogLayerList = void 0, this._tableList = n) : (this._catalogLayerList = void 0, this._tableList = void 0), this.arcgisOpenedLayersChange.emit();
|
|
154
155
|
}
|
|
155
|
-
#
|
|
156
|
+
#c() {
|
|
156
157
|
this.openedLayerLists.destroyAll(), this.openedLayers.removeAll(), this._layerListMap.clear();
|
|
157
158
|
}
|
|
158
|
-
async #
|
|
159
|
-
const { headingLevel: t, catalogOptions: s, filterPlaceholder: i, minFilterItems:
|
|
160
|
-
return $(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? i} .listItemCreatedFunction=${s?.listItemCreatedFunction} .minFilterItems=${s?.minFilterItems ??
|
|
159
|
+
async #h(e) {
|
|
160
|
+
const { headingLevel: t, catalogOptions: s, filterPlaceholder: i, minFilterItems: l, selectionMode: o, visibilityAppearance: n, layerTablesEnabled: a } = this;
|
|
161
|
+
return $(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? i} .listItemCreatedFunction=${s?.listItemCreatedFunction} .minFilterItems=${s?.minFilterItems ?? l} .selectionMode=${s?.selectionMode ?? o} .visibilityAppearance=${s?.visibilityAppearance ?? n} .showErrors=${s?.showErrors ?? this.showErrors} .showFilter=${s?.showFilter ?? this.showFilter} .hideStatusIndicators=${s?.hideStatusIndicators ?? this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.showTemporaryLayerIndicators ?? this.showTemporaryLayerIndicators} @arcgisReady=${(c) => c.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${a} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`);
|
|
161
162
|
}
|
|
162
|
-
#
|
|
163
|
+
#d(e) {
|
|
163
164
|
switch (e.type) {
|
|
164
165
|
case "knowledge-graph":
|
|
165
166
|
return { ...this.knowledgeGraphOptions, tables: e.tables };
|
|
@@ -172,54 +173,54 @@ class ne extends G {
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
async _createTableList(e) {
|
|
175
|
-
const t = this.#
|
|
176
|
+
const t = this.#d(e);
|
|
176
177
|
return $(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel ?? this.headingLevel} .selectionMode=${t?.selectionMode ?? this.selectionMode} .dragEnabled=${t?.dragEnabled ?? this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon ?? void 0} .label=${t?.label ?? void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${(s) => s.stopPropagation()}></arcgis-table-list-next>`);
|
|
177
178
|
}
|
|
178
|
-
#
|
|
179
|
+
#m(e) {
|
|
179
180
|
e.open = !1, this._focusRootFlowItem = !0;
|
|
180
181
|
}
|
|
181
|
-
#
|
|
182
|
-
const
|
|
183
|
-
i == null || !
|
|
184
|
-
targetItem:
|
|
185
|
-
fromParentItem:
|
|
182
|
+
#p({ toEl: e, fromEl: t, dragEl: s, newIndex: i }) {
|
|
183
|
+
const l = h(s, this._allItems), o = e.hasAttribute("data-item") ? h(e, this._allItems) : null, n = t.hasAttribute("data-item") ? h(t, this._allItems) : null, a = C(t), c = C(e);
|
|
184
|
+
i == null || !l || !a || !c || (this.viewModel.moveItem({
|
|
185
|
+
targetItem: l,
|
|
186
|
+
fromParentItem: n,
|
|
186
187
|
toParentItem: o,
|
|
187
188
|
newIndex: i,
|
|
188
|
-
from:
|
|
189
|
+
from: a,
|
|
189
190
|
to: c
|
|
190
|
-
}),
|
|
191
|
+
}), ae(this, l.uid, (f) => f.parentElement?.closest("calcite-list") === e));
|
|
191
192
|
}
|
|
192
|
-
#
|
|
193
|
-
const { fromEl: t, toEl: s, dragEl: i, oldIndex:
|
|
193
|
+
#f(e) {
|
|
194
|
+
const { fromEl: t, toEl: s, dragEl: i, oldIndex: l } = e;
|
|
194
195
|
if (t !== s) {
|
|
195
196
|
i.remove();
|
|
196
197
|
return;
|
|
197
198
|
}
|
|
198
|
-
|
|
199
|
+
l == null || !t || !i || t.insertBefore(i, t.children[l]);
|
|
199
200
|
}
|
|
200
201
|
_onCalciteListOrderChange(e) {
|
|
201
|
-
const t = this.#
|
|
202
|
-
if (!i || !s ||
|
|
202
|
+
const t = this.#s, { toEl: s, fromEl: i, dragEl: l, newIndex: o } = e, n = t?.newIndex === o && t?.dragEl === l && t?.toEl === s && t?.fromEl === i;
|
|
203
|
+
if (!i || !s || n)
|
|
203
204
|
return;
|
|
204
|
-
this.#
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
205
|
+
this.#s = e, this._selectedDragItemLayerUid = l.value.layer?.uid ?? null;
|
|
206
|
+
const a = i, c = s;
|
|
207
|
+
if (a === c) {
|
|
207
208
|
const f = Array.from(i.children).filter((I) => I?.matches("calcite-list-item")).map((I) => I.value.layer?.uid ?? "");
|
|
208
|
-
this._sortLayers(
|
|
209
|
+
this._sortLayers(a, f);
|
|
209
210
|
return;
|
|
210
211
|
}
|
|
211
|
-
this.#
|
|
212
|
+
this.#p({ toEl: c, fromEl: a, dragEl: l, newIndex: o });
|
|
212
213
|
}
|
|
213
214
|
_sortLayers(e, t) {
|
|
214
215
|
if (e === this._referenceListRef.value || e === this._baseListRef.value) {
|
|
215
216
|
const i = e === this._baseListRef.value ? this.view?.map?.basemap?.baseLayers : this.view?.map?.basemap?.referenceLayers;
|
|
216
|
-
|
|
217
|
+
ee(i, t);
|
|
217
218
|
return;
|
|
218
219
|
}
|
|
219
220
|
const s = h(e, this._allItems);
|
|
220
|
-
s &&
|
|
221
|
+
s && te(s, t);
|
|
221
222
|
}
|
|
222
|
-
#
|
|
223
|
+
#g(e) {
|
|
223
224
|
if (this.selectionMode === "none")
|
|
224
225
|
return;
|
|
225
226
|
const t = e.target.selectedItems.map((s) => h(s, this._allItems)).filter(Boolean);
|
|
@@ -233,88 +234,88 @@ class ne extends G {
|
|
|
233
234
|
[_.hidden]: this.state === "loading",
|
|
234
235
|
[_.disabled]: this.state === "disabled"
|
|
235
236
|
};
|
|
236
|
-
return r`<div class=${g(q(_.widget, _.panel, e))}>${this.#
|
|
237
|
+
return r`<div class=${g(q(_.widget, _.panel, e))}>${this.#v()}${this.#I()}</div>`;
|
|
237
238
|
}
|
|
238
|
-
#
|
|
239
|
+
#u(e) {
|
|
239
240
|
return e ? r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid ?? "")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>` : null;
|
|
240
241
|
}
|
|
241
|
-
#
|
|
242
|
+
#a(e) {
|
|
242
243
|
if (e.incompatible)
|
|
243
|
-
return this.#
|
|
244
|
-
const t = e.children?.filter((s) => !s.hidden).toArray().map((s) => this.#
|
|
244
|
+
return this.#u(e);
|
|
245
|
+
const t = e.children?.filter((s) => !s.hidden).toArray().map((s) => this.#a(s));
|
|
245
246
|
return t?.length ? t : null;
|
|
246
247
|
}
|
|
247
|
-
#
|
|
248
|
-
return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map((e) => this.#
|
|
248
|
+
#I() {
|
|
249
|
+
return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map((e) => this.#a(e));
|
|
249
250
|
}
|
|
250
|
-
#
|
|
251
|
+
#l(e) {
|
|
251
252
|
return r`<div slot=message>${e}</div>`;
|
|
252
253
|
}
|
|
253
|
-
#
|
|
254
|
-
return this.hideNoItemsNotice ? null : r`<div class=${g(p.itemMessage)}>${d(t, r`<calcite-notice icon=information kind=info open width=full>${this.#
|
|
255
|
-
}
|
|
256
|
-
#y() {
|
|
257
|
-
return r`<div class=${g(p.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${re} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle ?? y} type=text .value=${this.viewModel.basemapTitle ?? void 0} ${u(this._editTitleInputRef)}></calcite-input></calcite-label></div>`;
|
|
254
|
+
#y(e, t) {
|
|
255
|
+
return this.hideNoItemsNotice ? null : r`<div class=${g(p.itemMessage)}>${d(t, r`<calcite-notice icon=information kind=info open width=full>${this.#l(e)}</calcite-notice>`)}</div>`;
|
|
258
256
|
}
|
|
259
257
|
#L() {
|
|
258
|
+
return r`<div class=${g(p.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle ?? y} type=text .value=${this.viewModel.basemapTitle ?? void 0} ${u(this._editTitleInputRef)}></calcite-input></calcite-label></div>`;
|
|
259
|
+
}
|
|
260
|
+
#b() {
|
|
260
261
|
return this.editingTitle ? r`<calcite-flow-item .heading=${this.hideHeading ? void 0 : this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length && !this._openedPanelItems.length} @calciteFlowItemBack=${(e) => {
|
|
261
262
|
e.preventDefault(), this._toggleEditingTitle();
|
|
262
|
-
}} ${u(this._editingFlowItemRef)}>${this.#
|
|
263
|
+
}} ${u(this._editingFlowItemRef)}>${this.#L()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>` : null;
|
|
263
264
|
}
|
|
264
|
-
#
|
|
265
|
+
#_() {
|
|
265
266
|
return this.showEditTitleButton && !this.editingTitle ? r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit ?? ""} title=${this.messages.edit ?? y}></calcite-action>` : null;
|
|
266
267
|
}
|
|
267
|
-
#
|
|
268
|
+
#v() {
|
|
268
269
|
const e = [
|
|
269
270
|
d("root-flow-item", r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading ? void 0 : this.viewModel.basemapTitle ?? this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle && !this.openedLayers.length && !this._openedPanelItems.length} @calciteFlowItemClose=${() => {
|
|
270
271
|
this.closed = !0;
|
|
271
|
-
}} ${u(this._rootFlowItemRef)}>${this.#
|
|
272
|
-
this.#
|
|
273
|
-
this.#
|
|
272
|
+
}} ${u(this._rootFlowItemRef)}>${this.#_()}${this.#T()}${this.#F()}</calcite-flow-item>`),
|
|
273
|
+
this.#b(),
|
|
274
|
+
this.#w(),
|
|
274
275
|
this._renderedOpenLayerFlowItems
|
|
275
276
|
];
|
|
276
277
|
this._focusRootFlowItem = this.#e(this._rootFlowItemRef.value, this._focusRootFlowItem), this._focusEditingFlowItem = this.#e(this._editingFlowItemRef.value, this._focusEditingFlowItem);
|
|
277
278
|
const t = d("root-flow", r`<calcite-flow>${e}</calcite-flow>`);
|
|
278
279
|
return this.closed ? null : this.editingTitle ? r`<form class=${g(p.editingForm)} @submit=${this._formSubmit}>${t}</form>` : t;
|
|
279
280
|
}
|
|
280
|
-
#
|
|
281
|
+
#w() {
|
|
281
282
|
return k(this._openedPanelItems.toArray(), (e) => e.uid, (e, t) => {
|
|
282
|
-
const { panel: s, title: i } = e,
|
|
283
|
+
const { panel: s, title: i } = e, l = () => this.#m(s);
|
|
283
284
|
return this._focusPanelFlowItem = this.#e(this._panelFlowItemRef.value, this._focusPanelFlowItem), r`<calcite-flow-item .description=${i} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length && t === this._openedPanelItems.length - 1} @calciteFlowItemBack=${(o) => {
|
|
284
|
-
o.preventDefault(),
|
|
285
|
-
}} ${u(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${
|
|
285
|
+
o.preventDefault(), l();
|
|
286
|
+
}} ${u(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`;
|
|
286
287
|
});
|
|
287
288
|
}
|
|
288
|
-
|
|
289
|
+
#$(e, t) {
|
|
289
290
|
const s = e.title || this.messages.untitledLayer;
|
|
290
291
|
return this._focusLayerFlowItem === e.uid && (this._focusLayerFlowItem = this.#e(this._layerFlowItemRef.value, !0) ? e.uid : null), d(e.uid, r`<calcite-flow-item data-layer-uid=${e.uid ?? y} .description=${s} .heading=${this.messages[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(i) => {
|
|
291
292
|
i.preventDefault(), this.openedLayers.pop();
|
|
292
|
-
const
|
|
293
|
-
|
|
293
|
+
const l = this.openedLayers.at(-1);
|
|
294
|
+
l ? this._focusLayerFlowItem = l.uid : this._focusRootFlowItem = !0;
|
|
294
295
|
}} ${u(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
|
|
295
296
|
}
|
|
296
|
-
#
|
|
297
|
-
const i = t === "reference" ? this._referenceFilterEnabled : this._baseFilterEnabled,
|
|
298
|
-
return d(`block-${t}`, r`<calcite-block class=${g(p.section)} expandable expanded .heading=${t === "reference" ? this.messages.referenceHeading : this.messages.baseHeading} .headingLevel=${this.headingLevel + 1}>${e?.length ? null : this.#
|
|
299
|
-
const
|
|
300
|
-
this[t === "reference" ? "referenceFilterText" : "baseFilterText"] =
|
|
301
|
-
}} @calciteListOrderChange=${(
|
|
302
|
-
}
|
|
303
|
-
#$() {
|
|
304
|
-
return this.hideBaseLayers ? null : this.#l(this._visibleBaseItems, "base", this._visibleBaseItems.length === 1);
|
|
297
|
+
#r(e, t, s) {
|
|
298
|
+
const i = t === "reference" ? this._referenceFilterEnabled : this._baseFilterEnabled, l = t === "reference" ? this.referenceFilterText : this.baseFilterText, o = (t === "reference" ? this.messages.noReferenceLayers : this.messages.noBaseLayers) ?? this.messages.noItemsToDisplay ?? "", n = this.#t.selectionMode;
|
|
299
|
+
return d(`block-${t}`, r`<calcite-block class=${g(p.section)} expandable expanded .heading=${t === "reference" ? this.messages.referenceHeading : this.messages.baseHeading} .headingLevel=${this.headingLevel + 1}>${e?.length ? null : this.#y(o, t)}${d(`list-${t}`, r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${(a) => this._canMove(a, "pull")} .canPut=${(a) => this._canMove(a, "put")} data-basemap-layer-type=${t ?? y} data-layer-type=${this._rootGroupUid ?? y} .displayMode=${E} .dragEnabled=${this.dragEnabled} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${se} .filterText=${i ? l : ""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel ?? ""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${n} @calciteListChange=${this.#g} @calciteListDragEnd=${(a) => this.#f(a.detail)} @calciteListFilter=${(a) => {
|
|
300
|
+
const c = a.currentTarget?.filterText ?? "";
|
|
301
|
+
this[t === "reference" ? "referenceFilterText" : "baseFilterText"] = c, t === "base" ? this.arcgisBaseFilterChange.emit() : this.arcgisReferenceFilterChange.emit();
|
|
302
|
+
}} @calciteListOrderChange=${(a) => this._onCalciteListOrderChange(a.detail)} ${u(t === "reference" ? this._referenceListRef : this._baseListRef)}>${e?.toArray().map((a) => this.#E(a, s))}${i && !this.hideNoFilterResultsNotice ? r`<div class=${g(p.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l(o)}</calcite-notice></div>` : null}</calcite-list>`)}</calcite-block>`);
|
|
305
303
|
}
|
|
306
304
|
#F() {
|
|
307
|
-
return this.
|
|
305
|
+
return this.hideBaseLayers ? null : this.#r(this._visibleBaseItems, "base", this._visibleBaseItems.length === 1);
|
|
306
|
+
}
|
|
307
|
+
#T() {
|
|
308
|
+
return this.hideReferenceLayers ? null : this.#r(this._visibleReferenceItems, "reference", !1);
|
|
308
309
|
}
|
|
309
|
-
#
|
|
310
|
-
return d(e.uid,
|
|
310
|
+
#E(e, t, s, i) {
|
|
311
|
+
return d(e.uid, ie({ activeItem: this._activeItem, canMove: this._canMove, css: p, displayMode: E, dragEnabled: this.dragEnabled && !t, hideCatalogLayerList: this.hideCatalogLayerList, hideStatusIndicators: this.hideStatusIndicators, item: e, layerTablesEnabled: this.layerTablesEnabled, listModeDisabled: this.viewModel.listModeDisabled, messages: this.messages, operationalItems: this._allItems, parent: s, parentTitles: i, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.#t.selectionMode, setCurrentActiveItem: this._setCurrentActiveItem, clearActiveItem: this._clearActiveItem, showErrors: this.showErrors, showTemporaryLayerIndicators: this.showTemporaryLayerIndicators, visibilityAppearance: this.visibilityAppearance, handleAction: this._onTriggerAction, handleCatalogOpen: this._onCatalogOpen, handlePanelOpen: this._onPanelOpen, handleSelectedDragItemLayerUidChange: this._onSelectedDragItemLayerUidChange, handleTablesOpen: this._onTablesOpen, handleTooltipReferenceChange: this._onTooltipReferenceChange, view: this.view }));
|
|
311
312
|
}
|
|
312
313
|
}
|
|
313
314
|
function C(v) {
|
|
314
315
|
const e = v.closest(`[${M}]`)?.getAttribute(M);
|
|
315
316
|
return e === "base" || e === "reference" ? e : null;
|
|
316
317
|
}
|
|
317
|
-
O("arcgis-basemap-layer-list-next",
|
|
318
|
+
O("arcgis-basemap-layer-list-next", ce);
|
|
318
319
|
export {
|
|
319
|
-
|
|
320
|
+
ce as ArcgisBasemapLayerListNext
|
|
320
321
|
};
|
|
@@ -26,6 +26,9 @@ import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.j
|
|
|
26
26
|
* The [Item](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) API provides access to each layer's properties, allows
|
|
27
27
|
* the developer to configure actions related to the layer, and allows the developer to add content to the item related to the layer.
|
|
28
28
|
*
|
|
29
|
+
* When `selectionMode` is `multiple`, use Ctrl or Cmd to toggle individual items and Shift to select a range.
|
|
30
|
+
* Selecting an item without a modifier replaces the current selection.
|
|
31
|
+
*
|
|
29
32
|
* @since 5.2
|
|
30
33
|
* @beta
|
|
31
34
|
* @example
|