@arcgis/map-components 5.2.0-next.29 → 5.2.0-next.30

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.
@@ -1,22 +1,22 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as O } from "../../chunks/runtime.js";
3
- import { css as D, html as o } from "lit";
2
+ import { c as D } from "../../chunks/runtime.js";
3
+ import { css as x, html as n } from "lit";
4
4
  import { keyed as d } from "lit/directives/keyed.js";
5
- import { repeat as x } from "lit/directives/repeat.js";
6
- import k from "@arcgis/core/widgets/BasemapLayerList/BasemapLayerListViewModel.js";
7
- import y from "@arcgis/core/core/Collection.js";
8
- import { on as S, watch as U } from "@arcgis/core/core/reactiveUtils.js";
9
- import { LitElement as G, createEvent as N, renderElement as w, safeClassMap as f, nothing as _ } from "@arcgis/lumina";
5
+ import { repeat as k } from "lit/directives/repeat.js";
6
+ import S from "@arcgis/core/widgets/BasemapLayerList/BasemapLayerListViewModel.js";
7
+ import L from "@arcgis/core/core/Collection.js";
8
+ import { on as U, watch as G } from "@arcgis/core/core/reactiveUtils.js";
9
+ import { LitElement as N, createEvent as y, renderElement as $, safeClassMap as g, nothing as _ } from "@arcgis/lumina";
10
10
  import { usePropertyChange as H } from "@arcgis/lumina/controllers";
11
11
  import { reEmitEvent as V } from "@arcgis/lumina/controllers/accessor";
12
12
  import { classes as q } from "@arcgis/toolkit/dom";
13
13
  import { generateGuid as j } from "@arcgis/toolkit/string";
14
- import { createRef as m, ref as g } from "lit/directives/ref.js";
14
+ import { createRef as m, ref as f } from "lit/directives/ref.js";
15
15
  import { u as z } from "../../chunks/useCloseEvent.js";
16
16
  import { u as J } from "../../chunks/useT9n.js";
17
17
  import { m as K } from "../../chunks/useViewModel.js";
18
- import { g as L } from "../../chunks/globalCss.js";
19
- import { g as h, a as $, b as Q, r as W, s as F, c as X, d as Y, e as Z } from "../../chunks/layer-list-utils.js";
18
+ import { g as b } from "../../chunks/globalCss.js";
19
+ import { g as h, a as F, b as Q, r as W, s as T, c as X, d as Y, e as Z } from "../../chunks/layer-list-utils.js";
20
20
  import { ArcgisLayerListItem as ee } from "../arcgis-layer-list-next/layer-list-item/customElement.js";
21
21
  import { s as te, a as se } from "../../chunks/layer-list-next.js";
22
22
  import { c as ie } from "../../chunks/css.js";
@@ -27,15 +27,15 @@ const p = {
27
27
  section: "section",
28
28
  editing: "editing",
29
29
  editingForm: "editing-form"
30
- }, ae = D`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`, T = "nested", le = ".*\\S+.*", E = "data-basemap-layer-type", re = K(k);
31
- class oe extends G {
30
+ }, ae = x`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`, E = "nested", re = ".*\\S+.*", C = "data-basemap-layer-type", le = K(S);
31
+ class oe extends N {
32
32
  constructor() {
33
- super(...arguments), this._baseListRef = m(), this._referenceListRef = m(), this._editTitleInputRef = m(), this._layerFlowItemRef = m(), this._panelFlowItemRef = m(), this._rootFlowItemRef = m(), this._editingFlowItemRef = m(), this._lastDragDetail = null, this._selectedDragItemLayerUid = null, this._rootGroupUid = `basemap-${j()}`, this._openedLayersController = null, this._focusRootFlowItem = !1, this._focusPanelFlowItem = !1, this._focusLayerFlowItem = null, this._focusEditingFlowItem = !1, this.messages = J(), this.viewModel = re(this), this.arcgisClose = z(this), this._canMove = ({ dragEl: e, fromEl: t, toEl: s }, i) => {
34
- const l = i === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, r = h(e, this._allItems);
35
- if (!r?.sortable)
33
+ super(...arguments), this._baseListRef = m(), this._referenceListRef = m(), this._editTitleInputRef = m(), this._layerFlowItemRef = m(), this._panelFlowItemRef = m(), this._rootFlowItemRef = m(), this._editingFlowItemRef = m(), this._lastDragDetail = null, this._selectedDragItemLayerUid = null, this._rootGroupUid = `basemap-${j()}`, this._openedLayersController = null, this._focusRootFlowItem = !1, this._focusPanelFlowItem = !1, this._focusLayerFlowItem = null, this._focusEditingFlowItem = !1, this.messages = J(), this.viewModel = le(this), this.arcgisClose = z(this), this._canMove = ({ dragEl: e, fromEl: t, toEl: s }, i) => {
34
+ const r = i === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, l = h(e, this._allItems);
35
+ if (!l?.sortable)
36
36
  return !1;
37
- const a = h(t, this._allItems), n = $(t), c = h(s, this._allItems), I = $(s), u = !!n && !!I && n === I, M = { selected: r, from: a, to: c }, R = t.group, P = s.group, A = a?.layer?.type ?? "", B = c?.layer?.type ?? "", v = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
38
- return R && P && typeof l == "function" ? l(M) : u && !v.has(A) && !v.has(B) && r.layer?.type !== "sublayer";
37
+ const a = h(t, this._allItems), o = F(t), c = h(s, this._allItems), I = F(s), u = !!o && !!I && o === I, R = { selected: l, from: a, to: c }, P = t.group, A = s.group, B = a?.layer?.type ?? "", O = c?.layer?.type ?? "", w = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
38
+ return P && A && typeof r == "function" ? r(R) : u && !w.has(B) && !w.has(O) && l.layer?.type !== "sublayer";
39
39
  }, this._onTriggerAction = (e, t) => {
40
40
  this.triggerAction(e, t);
41
41
  }, this._onTooltipReferenceChange = (e, t) => {
@@ -64,7 +64,7 @@ class oe extends G {
64
64
  e.preventDefault();
65
65
  const t = this._editTitleInputRef.value?.value;
66
66
  t?.trim() && (this.basemapTitle = t), this._toggleEditingTitle();
67
- }, this._activeItem = null, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.openedLayerLists = new y(), this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.baseFilterText = "", this.baseListItemCreatedFunction = this.viewModel.baseListItemCreatedFunction, this.basemapTitle = this.viewModel.basemapTitle, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.editingTitle = !1, this.filterPlaceholder = "", this.headingLevel = 2, this.icon = "layers", this.layerTablesEnabled = new y(["knowledge-graph"]), this.minFilterItems = Q, this.openedLayers = new y(), this.referenceFilterText = "", this.referenceListItemCreatedFunction = this.viewModel.referenceListItemCreatedFunction, this.selectedItems = new y(), this.selectionMode = "none", this.visibilityAppearance = "default", this.hideBaseLayers = !1, this.hideCatalogLayerList = !1, this.hideHeading = !1, this.hideReferenceLayers = !1, this.hideStatusIndicators = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showEditTitleButton = !1, this.showErrors = !1, this.showFilter = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.arcgisPropertyChange = H()("state"), this.arcgisReady = N(), this.arcgisTriggerAction = V(() => this.viewModel, "trigger-action");
67
+ }, this._activeItem = null, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.openedLayerLists = new L(), this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.baseFilterText = "", this.baseListItemCreatedFunction = this.viewModel.baseListItemCreatedFunction, this.basemapTitle = this.viewModel.basemapTitle, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.editingTitle = !1, this.filterPlaceholder = "", this.headingLevel = 2, this.icon = "layers", this.layerTablesEnabled = new L(["knowledge-graph"]), this.minFilterItems = Q, this.openedLayers = new L(), this.referenceFilterText = "", this.referenceListItemCreatedFunction = this.viewModel.referenceListItemCreatedFunction, this.selectedItems = new L(), this.selectionMode = "none", this.visibilityAppearance = "default", this.hideBaseLayers = !1, this.hideCatalogLayerList = !1, this.hideHeading = !1, this.hideReferenceLayers = !1, this.hideStatusIndicators = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showEditTitleButton = !1, this.showErrors = !1, this.showFilter = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.arcgisPropertyChange = H()("state"), this.arcgisReady = y(), this.arcgisBaseFilterChange = y(), this.arcgisReferenceFilterChange = y(), this.arcgisOpenedLayersChange = y(), this.arcgisTriggerAction = V(() => this.viewModel, "trigger-action");
68
68
  }
69
69
  static {
70
70
  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, view: 0, autoDestroyDisabled: 5, baseFilterPredicate: 0, baseFilterText: 1, baseItems: 32, baseListItemCreatedFunction: 0, basemapTitle: 1, catalogLayerList: 32, catalogOptions: 0, closed: 5, collapsed: 7, dragEnabled: 5, editingTitle: 5, filterPlaceholder: 1, headingLevel: 9, icon: 1, knowledgeGraphOptions: 0, label: 1, layerTablesEnabled: 0, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, mapImageOptions: 0, minFilterItems: 9, openedLayers: 32, position: 1, referenceElement: 1, referenceFilterPredicate: 0, referenceFilterText: 1, referenceItems: 32, referenceListItemCreatedFunction: 0, selectedItems: 0, selectionMode: 1, tableList: 32, tileOptions: 0, visibilityAppearance: 1, hideBaseLayers: 5, hideCatalogLayerList: 5, hideHeading: 5, hideReferenceLayers: 5, hideStatusIndicators: 5, showCloseButton: 5, showCollapseButton: 5, showEditTitleButton: 5, showErrors: 5, showFilter: 5, showTemporaryLayerIndicators: 5, messageOverrides: 0, state: 32 };
@@ -116,14 +116,14 @@ class oe extends G {
116
116
  }
117
117
  loaded() {
118
118
  this.manager.onLifecycle(() => [
119
- S(() => this.openedLayers, "change", () => {
119
+ U(() => this.openedLayers, "change", () => {
120
120
  this._handleOpenedLayersChange();
121
121
  }, { initial: !0 }),
122
- U(() => [this.viewModel.referenceItems.toArray(), this.viewModel.baseItems.toArray()], () => W(this.selectedItems), { initial: !0 })
122
+ G(() => [this.viewModel.referenceItems.toArray(), this.viewModel.baseItems.toArray()], () => W(this.selectedItems), { initial: !0 })
123
123
  ]);
124
124
  }
125
125
  updated() {
126
- F(this._baseListRef.value, this.baseFilterPredicate, this.baseItems), F(this._referenceListRef.value, this.referenceFilterPredicate, this.referenceItems);
126
+ T(this._baseListRef.value, this.baseFilterPredicate, this.baseItems), T(this._referenceListRef.value, this.referenceFilterPredicate, this.referenceItems);
127
127
  }
128
128
  triggerAction(e, t) {
129
129
  this.viewModel.triggerAction(e, t);
@@ -138,23 +138,23 @@ class oe extends G {
138
138
  async _handleOpenedLayersChange() {
139
139
  const { _layerListMap: e, openedLayers: t, openedLayerLists: s } = this;
140
140
  this._openedLayersController?.abort();
141
- const i = new AbortController(), { signal: l } = i;
142
- this._openedLayersController = i, e.forEach((n, c) => {
143
- t.includes(c) || (n?.destroy?.(), e.delete(c));
141
+ const i = new AbortController(), { signal: r } = i;
142
+ this._openedLayersController = i, e.forEach((o, c) => {
143
+ t.includes(c) || (o?.destroy?.(), e.delete(c));
144
144
  });
145
- const r = await Promise.all(t.map((n) => this._createFlowList(n, l)));
146
- if (l.aborted)
145
+ const l = await Promise.all(t.map((o) => this._createFlowList(o, r)));
146
+ if (r.aborted)
147
147
  return;
148
- s.removeAll(), s.addMany(r);
148
+ s.removeAll(), s.addMany(l);
149
149
  const a = s.at(-1);
150
- a ? "catalogLayer" in a ? (this._catalogLayerList = a, this._tableList = void 0) : (this._catalogLayerList = void 0, this._tableList = a) : (this._catalogLayerList = void 0, this._tableList = void 0);
150
+ a ? "catalogLayer" in a ? (this._catalogLayerList = a, this._tableList = void 0) : (this._catalogLayerList = void 0, this._tableList = a) : (this._catalogLayerList = void 0, this._tableList = void 0), this.arcgisOpenedLayersChange.emit();
151
151
  }
152
152
  _destroyOpenedLayerLists() {
153
153
  this.openedLayerLists.destroyAll(), this.openedLayers.removeAll(), this._layerListMap.clear();
154
154
  }
155
155
  async _createCatalogLayerList(e) {
156
- const { headingLevel: t, catalogOptions: s, filterPlaceholder: i, minFilterItems: l, selectionMode: r, visibilityAppearance: a, layerTablesEnabled: n } = this;
157
- return w(o`<arcgis-catalog-layer-list .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? i} .listItemCreatedFunction=${s?.listItemCreatedFunction} .minFilterItems=${s?.minFilterItems ?? l} .selectionMode=${s?.selectionMode ?? r} .visibilityAppearance=${s?.visibilityAppearance ?? a} .showErrors=${s?.visibleElements?.errors ?? this.showErrors} .showFilter=${s?.visibleElements?.filter ?? this.showFilter} .hideStatusIndicators=${s?.visibleElements?.statusIndicators ?? this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.visibleElements?.temporaryLayerIndicators ?? this.showTemporaryLayerIndicators} @arcgisReady=${(c) => c.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list>`);
156
+ const { headingLevel: t, catalogOptions: s, filterPlaceholder: i, minFilterItems: r, selectionMode: l, visibilityAppearance: a, layerTablesEnabled: o } = this;
157
+ return $(n`<arcgis-catalog-layer-list .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? i} .listItemCreatedFunction=${s?.listItemCreatedFunction} .minFilterItems=${s?.minFilterItems ?? r} .selectionMode=${s?.selectionMode ?? l} .visibilityAppearance=${s?.visibilityAppearance ?? a} .showErrors=${s?.visibleElements?.errors ?? this.showErrors} .showFilter=${s?.visibleElements?.filter ?? this.showFilter} .hideStatusIndicators=${s?.visibleElements?.statusIndicators ?? this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.visibleElements?.temporaryLayerIndicators ?? this.showTemporaryLayerIndicators} @arcgisReady=${(c) => c.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${o} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list>`);
158
158
  }
159
159
  _getTableListParams(e) {
160
160
  switch (e.type) {
@@ -170,42 +170,42 @@ class oe extends G {
170
170
  }
171
171
  async _createTableList(e) {
172
172
  const t = this._getTableListParams(e);
173
- return w(o`<arcgis-table-list .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>`);
173
+ return $(n`<arcgis-table-list .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>`);
174
174
  }
175
175
  _handlePanelFlowItemBack(e) {
176
176
  e.open = !1, this._focusRootFlowItem = !0;
177
177
  }
178
178
  _moveLayerFromChildList({ toEl: e, fromEl: t, dragEl: s, newIndex: i }) {
179
- const l = h(s, this._allItems), r = h(e, this._allItems), a = h(t, this._allItems), n = C(t), c = C(e);
180
- i == null || !l || !a || !r || !n || !c || this.viewModel.moveListItem({
181
- targetItem: l,
179
+ const r = h(s, this._allItems), l = h(e, this._allItems), a = h(t, this._allItems), o = M(t), c = M(e);
180
+ i == null || !r || !a || !l || !o || !c || this.viewModel.moveListItem({
181
+ targetItem: r,
182
182
  fromParentItem: a,
183
- toParentItem: r,
183
+ toParentItem: l,
184
184
  newIndex: i,
185
- from: n,
185
+ from: o,
186
186
  to: c
187
187
  });
188
188
  }
189
189
  _handleCalciteListDragEnd(e) {
190
- const { fromEl: t, toEl: s, dragEl: i, oldIndex: l } = e;
190
+ const { fromEl: t, toEl: s, dragEl: i, oldIndex: r } = e;
191
191
  if (t !== s) {
192
192
  i.remove();
193
193
  return;
194
194
  }
195
- l == null || !t || !i || t.insertBefore(i, t.children[l]);
195
+ r == null || !t || !i || t.insertBefore(i, t.children[r]);
196
196
  }
197
197
  _onCalciteListOrderChange(e) {
198
- const { _lastDragDetail: t } = this, { toEl: s, fromEl: i, dragEl: l, newIndex: r } = e, a = t?.newIndex === r && t?.dragEl === l && t?.toEl === s && t?.fromEl === i;
198
+ const { _lastDragDetail: t } = this, { toEl: s, fromEl: i, dragEl: r, newIndex: l } = e, a = t?.newIndex === l && t?.dragEl === r && t?.toEl === s && t?.fromEl === i;
199
199
  if (!i || !s || a)
200
200
  return;
201
- this._lastDragDetail = e, this._selectedDragItemLayerUid = l.value.layer?.uid ?? null;
202
- const n = i, c = s;
203
- if (n === c) {
201
+ this._lastDragDetail = e, this._selectedDragItemLayerUid = r.value.layer?.uid ?? null;
202
+ const o = i, c = s;
203
+ if (o === c) {
204
204
  const I = Array.from(i.children).filter((u) => u?.matches("calcite-list-item")).map((u) => u.value.layer?.uid ?? "");
205
- this._sortLayers(n, I);
205
+ this._sortLayers(o, I);
206
206
  return;
207
207
  }
208
- this._moveLayerFromChildList({ toEl: c, fromEl: n, dragEl: l, newIndex: r });
208
+ this._moveLayerFromChildList({ toEl: c, fromEl: o, dragEl: r, newIndex: l });
209
209
  }
210
210
  _sortLayers(e, t) {
211
211
  if (e === this._referenceListRef.value || e === this._baseListRef.value) {
@@ -227,13 +227,13 @@ class oe extends G {
227
227
  }
228
228
  render() {
229
229
  const e = {
230
- [L.hidden]: this.state === "loading",
231
- [L.disabled]: this.state === "disabled"
230
+ [b.hidden]: this.state === "loading",
231
+ [b.disabled]: this.state === "disabled"
232
232
  };
233
- return o`<div class=${f(q(L.widget, L.panel, e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`;
233
+ return n`<div class=${g(q(b.widget, b.panel, e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`;
234
234
  }
235
235
  _renderItemTooltip(e) {
236
- return e ? o`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid ?? "")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>` : null;
236
+ return e ? n`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid ?? "")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>` : null;
237
237
  }
238
238
  _renderItemTooltipNodes(e) {
239
239
  if (e.incompatible)
@@ -245,52 +245,55 @@ class oe extends G {
245
245
  return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map((e) => this._renderItemTooltipNodes(e));
246
246
  }
247
247
  _renderNoLayersInfoMessage(e) {
248
- return o`<div slot=message>${e}</div>`;
248
+ return n`<div slot=message>${e}</div>`;
249
249
  }
250
250
  _renderNoLayersInfo(e, t) {
251
- return o`<div class=${f(p.itemMessage)}>${d(t, o`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`;
251
+ return n`<div class=${g(p.itemMessage)}>${d(t, n`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`;
252
252
  }
253
253
  _renderEditingInput() {
254
- return o`<div class=${f(p.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${le} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle ?? _} type=text .value=${this.viewModel.basemapTitle ?? void 0} ${g(this._editTitleInputRef)}></calcite-input></calcite-label></div>`;
254
+ return n`<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 ?? _} type=text .value=${this.viewModel.basemapTitle ?? void 0} ${f(this._editTitleInputRef)}></calcite-input></calcite-label></div>`;
255
255
  }
256
256
  _renderEditingForm() {
257
- return this.editingTitle ? o`<form class=${f(p.editingForm)} @submit=${this._formSubmit}><calcite-flow-item .heading=${this.hideHeading ? void 0 : this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length && !this._openedPanelItems.length} @calciteFlowItemBack=${(e) => {
257
+ return this.editingTitle ? n`<form class=${g(p.editingForm)} @submit=${this._formSubmit}><calcite-flow-item .heading=${this.hideHeading ? void 0 : this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length && !this._openedPanelItems.length} @calciteFlowItemBack=${(e) => {
258
258
  e.preventDefault(), this._toggleEditingTitle();
259
- }} ${g(this._editingFlowItemRef)}>${this._renderEditingInput()}<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></form>` : null;
259
+ }} ${f(this._editingFlowItemRef)}>${this._renderEditingInput()}<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></form>` : null;
260
260
  }
261
261
  _renderEditTitleButton() {
262
- return this.showEditTitleButton && !this.editingTitle ? o`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit ?? ""} title=${this.messages.edit ?? _}></calcite-action>` : null;
262
+ return this.showEditTitleButton && !this.editingTitle ? n`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit ?? ""} title=${this.messages.edit ?? _}></calcite-action>` : null;
263
263
  }
264
264
  _renderItems() {
265
265
  const e = [
266
- d("root-flow-item", o`<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=${() => {
266
+ d("root-flow-item", n`<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=${() => {
267
267
  this.closed = !0;
268
- }} ${g(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),
268
+ }} ${f(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),
269
269
  this._renderEditingForm(),
270
270
  this._renderPanelFlowItems(),
271
271
  this._renderedOpenLayerFlowItems
272
272
  ];
273
- return this._focusRootFlowItem = this._focusFlowItem(this._rootFlowItemRef.value, this._focusRootFlowItem), this._focusEditingFlowItem = this._focusFlowItem(this._editingFlowItemRef.value, this._focusEditingFlowItem), this.closed ? null : d("root-flow", o`<calcite-flow>${e}</calcite-flow>`);
273
+ return this._focusRootFlowItem = this._focusFlowItem(this._rootFlowItemRef.value, this._focusRootFlowItem), this._focusEditingFlowItem = this._focusFlowItem(this._editingFlowItemRef.value, this._focusEditingFlowItem), this.closed ? null : d("root-flow", n`<calcite-flow>${e}</calcite-flow>`);
274
274
  }
275
275
  _renderPanelFlowItems() {
276
- return x(this._openedPanelItems.toArray(), (e) => e.uid, (e, t) => {
277
- const { panel: s, title: i } = e, l = () => this._handlePanelFlowItemBack(s);
278
- return this._focusPanelFlowItem = this._focusFlowItem(this._panelFlowItemRef.value, this._focusPanelFlowItem), o`<calcite-flow-item .description=${i} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length && t === this._openedPanelItems.length - 1} @calciteFlowItemBack=${(r) => {
279
- r.preventDefault(), l();
280
- }} ${g(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>`;
276
+ return k(this._openedPanelItems.toArray(), (e) => e.uid, (e, t) => {
277
+ const { panel: s, title: i } = e, r = () => this._handlePanelFlowItemBack(s);
278
+ return this._focusPanelFlowItem = this._focusFlowItem(this._panelFlowItemRef.value, this._focusPanelFlowItem), n`<calcite-flow-item .description=${i} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length && t === this._openedPanelItems.length - 1} @calciteFlowItemBack=${(l) => {
279
+ l.preventDefault(), r();
280
+ }} ${f(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${r} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`;
281
281
  });
282
282
  }
283
283
  _renderLayerFlowItem(e, t) {
284
284
  const s = e.title || this.messages.untitledLayer;
285
- return this._focusLayerFlowItem === e.uid && (this._focusLayerFlowItem = this._focusFlowItem(this._layerFlowItemRef.value, !0) ? e.uid : null), d(e.uid, o`<calcite-flow-item data-layer-uid=${e.uid ?? _} .description=${s} .heading=${this.messages[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(i) => {
285
+ return this._focusLayerFlowItem === e.uid && (this._focusLayerFlowItem = this._focusFlowItem(this._layerFlowItemRef.value, !0) ? e.uid : null), d(e.uid, n`<calcite-flow-item data-layer-uid=${e.uid ?? _} .description=${s} .heading=${this.messages[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(i) => {
286
286
  i.preventDefault(), this.openedLayers.pop();
287
- const l = this.openedLayers.at(-1);
288
- l ? this._focusLayerFlowItem = l.uid : this._focusRootFlowItem = !0;
289
- }} ${g(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
287
+ const r = this.openedLayers.at(-1);
288
+ r ? this._focusLayerFlowItem = r.uid : this._focusRootFlowItem = !0;
289
+ }} ${f(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
290
290
  }
291
291
  _renderList(e, t, s) {
292
- const i = t === "reference" ? this._referenceFilterEnabled : this._baseFilterEnabled, l = t === "reference" ? this.referenceFilterText : this.baseFilterText, r = (t === "reference" ? this.messages.noReferenceLayers : this.messages.noBaseLayers) ?? this.messages.noItemsToDisplay ?? "";
293
- return d(`block-${t}`, o`<calcite-block class=${f(p.section)} collapsible expanded .heading=${t === "reference" ? this.messages.referenceHeading : this.messages.baseHeading} .headingLevel=${this.headingLevel + 1}>${e?.length ? null : this._renderNoLayersInfo(r, t)}${d(`list-${t}`, o`<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 ?? _} data-layer-type=${this._rootGroupUid ?? _} .displayMode=${T} .dragEnabled=${this.dragEnabled} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${Z} .filterText=${i ? l : ""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel ?? ""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${(a) => this._handleCalciteListDragEnd(a.detail)} @calciteListFilter=${(a) => this[t === "reference" ? "referenceFilterText" : "baseFilterText"] = a.currentTarget?.filterText ?? ""} @calciteListOrderChange=${(a) => this._onCalciteListOrderChange(a.detail)} ${g(t === "reference" ? this._referenceListRef : this._baseListRef)}>${e?.toArray().map((a) => this._renderItem(a, s))}${i ? o`<div class=${f(p.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(r)}</calcite-notice></div>` : null}</calcite-list>`)}</calcite-block>`);
292
+ const i = t === "reference" ? this._referenceFilterEnabled : this._baseFilterEnabled, r = t === "reference" ? this.referenceFilterText : this.baseFilterText, l = (t === "reference" ? this.messages.noReferenceLayers : this.messages.noBaseLayers) ?? this.messages.noItemsToDisplay ?? "";
293
+ return d(`block-${t}`, n`<calcite-block class=${g(p.section)} collapsible expanded .heading=${t === "reference" ? this.messages.referenceHeading : this.messages.baseHeading} .headingLevel=${this.headingLevel + 1}>${e?.length ? null : this._renderNoLayersInfo(l, t)}${d(`list-${t}`, n`<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 ?? _} data-layer-type=${this._rootGroupUid ?? _} .displayMode=${E} .dragEnabled=${this.dragEnabled} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${Z} .filterText=${i ? r : ""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel ?? ""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${(a) => this._handleCalciteListDragEnd(a.detail)} @calciteListFilter=${(a) => {
294
+ const o = a.currentTarget?.filterText ?? "";
295
+ this[t === "reference" ? "referenceFilterText" : "baseFilterText"] = o, t === "base" ? this.arcgisBaseFilterChange.emit() : this.arcgisReferenceFilterChange.emit();
296
+ }} @calciteListOrderChange=${(a) => this._onCalciteListOrderChange(a.detail)} ${f(t === "reference" ? this._referenceListRef : this._baseListRef)}>${e?.toArray().map((a) => this._renderItem(a, s))}${i ? n`<div class=${g(p.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(l)}</calcite-notice></div>` : null}</calcite-list>`)}</calcite-block>`);
294
297
  }
295
298
  _renderBaseSection() {
296
299
  return this.hideBaseLayers ? null : this._renderList(this._visibleBaseItems, "base", this._visibleBaseItems.length === 1);
@@ -299,14 +302,14 @@ class oe extends G {
299
302
  return this.hideReferenceLayers ? null : this._renderList(this._visibleReferenceItems, "reference", !1);
300
303
  }
301
304
  _renderItem(e, t, s, i) {
302
- return d(e.uid, ee({ activeItem: this._activeItem, canMove: this._canMove, css: p, displayMode: T, 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.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 }));
305
+ return d(e.uid, ee({ 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.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 }));
303
306
  }
304
307
  }
305
- function C(b) {
306
- const e = b.closest(`[${E}]`)?.getAttribute(E);
308
+ function M(v) {
309
+ const e = v.closest(`[${C}]`)?.getAttribute(C);
307
310
  return e === "base" || e === "reference" ? e : null;
308
311
  }
309
- O("arcgis-basemap-layer-list-next", oe);
312
+ D("arcgis-basemap-layer-list-next", oe);
310
313
  export {
311
314
  oe as ArcgisBasemapLayerListNext
312
315
  };
@@ -577,16 +577,25 @@ export abstract class ArcgisLayerListNext extends LitElement {
577
577
  destroy(): Promise<void>;
578
578
  /** Emitted when the component's close button is clicked. */
579
579
  readonly arcgisClose: import("@arcgis/lumina").TargetedEvent<this, void>;
580
+ /** Emits when the list filter input value changes. */
581
+ readonly arcgisFilterChange: import("@arcgis/lumina").TargetedEvent<this, void>;
582
+ /** Emits when opened layer flow state changes. */
583
+ readonly arcgisOpenedLayersChange: import("@arcgis/lumina").TargetedEvent<this, void>;
580
584
  /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
581
585
  readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "state"; }>;
582
586
  /** Emitted when the component associated with a map or scene view is ready to be interacted with. */
583
587
  readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
588
+ /** Emits when selected items state changes. */
589
+ readonly arcgisSelectedItemsChange: import("@arcgis/lumina").TargetedEvent<this, void>;
584
590
  /** Emitted when an action is triggered on the component. */
585
591
  readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, LayerListViewModelEvents["trigger-action"]>;
586
592
  readonly "@eventTypes": {
587
593
  arcgisClose: ArcgisLayerListNext["arcgisClose"]["detail"];
594
+ arcgisFilterChange: ArcgisLayerListNext["arcgisFilterChange"]["detail"];
595
+ arcgisOpenedLayersChange: ArcgisLayerListNext["arcgisOpenedLayersChange"]["detail"];
588
596
  arcgisPropertyChange: ArcgisLayerListNext["arcgisPropertyChange"]["detail"];
589
597
  arcgisReady: ArcgisLayerListNext["arcgisReady"]["detail"];
598
+ arcgisSelectedItemsChange: ArcgisLayerListNext["arcgisSelectedItemsChange"]["detail"];
590
599
  arcgisTriggerAction: ArcgisLayerListNext["arcgisTriggerAction"]["detail"];
591
600
  };
592
601
  }
@@ -1,20 +1,20 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as O } from "../../chunks/runtime.js";
2
+ import { c as R } from "../../chunks/runtime.js";
3
3
  import { html as h } from "lit";
4
- import { keyed as _ } from "lit/directives/keyed.js";
5
- import { repeat as R } from "lit/directives/repeat.js";
6
- import x from "@arcgis/core/widgets/LayerList/LayerListViewModel.js";
7
- import { classes as B } from "@arcgis/toolkit/dom";
8
- import { generateGuid as k } from "@arcgis/toolkit/string";
9
- import { createRef as v, ref as w } from "lit/directives/ref.js";
4
+ import { keyed as v } from "lit/directives/keyed.js";
5
+ import { repeat as x } from "lit/directives/repeat.js";
6
+ import B from "@arcgis/core/widgets/LayerList/LayerListViewModel.js";
7
+ import { classes as k } from "@arcgis/toolkit/dom";
8
+ import { generateGuid as S } from "@arcgis/toolkit/string";
9
+ import { createRef as w, ref as b } from "lit/directives/ref.js";
10
10
  import { u as U } from "../../chunks/useT9n.js";
11
- import { m as S } from "../../chunks/useViewModel.js";
12
- import { g as b } from "../../chunks/globalCss.js";
13
- import { c as y } from "../../chunks/css.js";
14
- import { g as d, a as E, m as N, b as G, r as H, s as V, c as j, d as q, e as z } from "../../chunks/layer-list-utils.js";
11
+ import { m as N } from "../../chunks/useViewModel.js";
12
+ import { g as $ } from "../../chunks/globalCss.js";
13
+ import { c as f } from "../../chunks/css.js";
14
+ import { g as d, a as F, m as G, b as H, r as V, s as j, c as q, d as z, e as J } from "../../chunks/layer-list-utils.js";
15
15
  import m from "@arcgis/core/core/Collection.js";
16
- import { on as T, watch as J } from "@arcgis/core/core/reactiveUtils.js";
17
- import { LitElement as K, createEvent as Q, renderElement as M, safeClassMap as $, nothing as F } from "@arcgis/lumina";
16
+ import { on as C, watch as K } from "@arcgis/core/core/reactiveUtils.js";
17
+ import { LitElement as Q, createEvent as L, renderElement as M, safeClassMap as E, nothing as A } from "@arcgis/lumina";
18
18
  import { usePropertyChange as W } from "@arcgis/lumina/controllers";
19
19
  import { reEmitEvent as X } from "@arcgis/lumina/controllers/accessor";
20
20
  import "@arcgis/toolkit/function";
@@ -22,19 +22,19 @@ import { u as Y } from "../../chunks/useCloseEvent.js";
22
22
  import { ArcgisLayerListItem as Z } from "./layer-list-item/customElement.js";
23
23
  import { s as ee, a as te } from "../../chunks/layer-list-next.js";
24
24
  import "../arcgis-layer-list-item-indicator/customElement.js";
25
- const A = "nested", se = S(x);
26
- class ie extends K {
25
+ const O = "nested", se = N(B);
26
+ class ie extends Q {
27
27
  constructor() {
28
- super(...arguments), this._lastDragDetail = null, this._rootListRef = v(), this._layerFlowItemRef = v(), this._panelFlowItemRef = v(), this._selectedDragItemLayerUid = null, this._rootGroupUid = `operational-${k()}`, this._openedLayersController = null, this.messages = U(), this._canMove = ({ dragEl: e, fromEl: t, toEl: s }, a) => {
28
+ super(...arguments), this._lastDragDetail = null, this._rootListRef = w(), this._layerFlowItemRef = w(), this._panelFlowItemRef = w(), this._selectedDragItemLayerUid = null, this._rootGroupUid = `operational-${S()}`, this._openedLayersController = null, this.messages = U(), this._canMove = ({ dragEl: e, fromEl: t, toEl: s }, a) => {
29
29
  const i = a === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, r = d(e, this.operationalItems);
30
30
  if (!r?.sortable)
31
31
  return !1;
32
- const o = this._resolveListContainer(t), l = this._resolveListContainer(s), n = this._getContainerItem(o), p = E(o), g = this._getContainerItem(l), u = E(l), L = !!p && !!u && p === u, f = {
32
+ const o = this._resolveListContainer(t), l = this._resolveListContainer(s), n = this._getContainerItem(o), p = F(o), g = this._getContainerItem(l), u = F(l), I = !!p && !!u && p === u, y = {
33
33
  selected: r,
34
34
  from: n,
35
35
  to: g
36
- }, I = o?.group, c = l?.group, P = n?.layer?.type ?? "", D = g?.layer?.type ?? "", C = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
37
- return I && c && typeof i == "function" ? i(f) : L && !C.has(P) && !C.has(D) && r?.layer?.type !== "sublayer";
36
+ }, _ = o?.group, c = l?.group, P = n?.layer?.type ?? "", D = g?.layer?.type ?? "", T = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
37
+ return _ && c && typeof i == "function" ? i(y) : I && !T.has(P) && !T.has(D) && r?.layer?.type !== "sublayer";
38
38
  }, this._onCatalogOpen = (e) => {
39
39
  this.openedLayers.push(e.layer?.parent);
40
40
  }, this._onTablesOpen = (e) => {
@@ -46,7 +46,7 @@ class ie extends K {
46
46
  }, this._setActiveItem = (e) => {
47
47
  if (this.visibilityAppearance !== "default")
48
48
  return;
49
- const t = Array.from(e.composedPath()).find((a) => a.classList?.contains(y.item)), s = d(t, this.operationalItems);
49
+ const t = Array.from(e.composedPath()).find((a) => a.classList?.contains(f.item)), s = d(t, this.operationalItems);
50
50
  this._activeItem = s;
51
51
  }, this.viewModel = se(this), this.arcgisClose = Y(this), this._activeItem = null, this._onTooltipReferenceChange = (e, t) => {
52
52
  t ? this._tooltipReferenceMap.set(e, t) : this._tooltipReferenceMap.delete(e);
@@ -54,7 +54,7 @@ class ie extends K {
54
54
  this._selectedDragItemLayerUid = e;
55
55
  }, this._onTriggerAction = (e, t) => {
56
56
  this.triggerAction(e, t);
57
- }, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.layerTablesEnabled = new m(["knowledge-graph"]), this.mapImageOptions = null, this.openedLayerLists = new m(), this.tileOptions = null, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.closed = !1, this.icon = "layers", this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.layerTablesAvailable = new m(["knowledge-graph"]), this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.minDragEnabledItems = N, this.minFilterItems = G, this.openedLayers = new m(), this.operationalItems = this.viewModel.operationalItems, this.selectedItems = new m(), this.selectionMode = "none", this.visibilityAppearance = "default", this.hideCatalogLayerList = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.showFilter = !1, this.showHeading = !1, this.hideStatusIndicators = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.arcgisPropertyChange = W()("state"), this.arcgisReady = Q(), this.arcgisTriggerAction = X(() => this.viewModel, "trigger-action");
57
+ }, this._tooltipReferenceMap = /* @__PURE__ */ new Map(), this._layerListMap = /* @__PURE__ */ new Map(), this.layerTablesEnabled = new m(["knowledge-graph"]), this.mapImageOptions = null, this.openedLayerLists = new m(), this.tileOptions = null, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.closed = !1, this.icon = "layers", this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.layerTablesAvailable = new m(["knowledge-graph"]), this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.minDragEnabledItems = G, this.minFilterItems = H, this.openedLayers = new m(), this.operationalItems = this.viewModel.operationalItems, this.selectedItems = new m(), this.selectionMode = "none", this.visibilityAppearance = "default", this.hideCatalogLayerList = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.showFilter = !1, this.showHeading = !1, this.hideStatusIndicators = !1, this.showTemporaryLayerIndicators = !1, this.state = this.viewModel.state, this.arcgisPropertyChange = W()("state"), this.arcgisReady = L(), this.arcgisFilterChange = L(), this.arcgisSelectedItemsChange = L(), this.arcgisOpenedLayersChange = L(), this.arcgisTriggerAction = X(() => this.viewModel, "trigger-action");
58
58
  }
59
59
  static {
60
60
  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, view: 0, autoDestroyDisabled: 5, closed: 5, referenceElement: 1, icon: 1, catalogLayerList: 32, catalogOptions: 0, collapsed: 5, dragEnabled: 5, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, knowledgeGraphOptions: 0, layerTablesAvailable: 0, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, listItemCreatedFunction: 0, minDragEnabledItems: 9, minFilterItems: 9, openedLayers: 32, operationalItems: 0, selectedItems: 0, selectionMode: 1, tableList: 32, visibilityAppearance: 1, hideCatalogLayerList: 5, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, showFilter: 5, showHeading: 5, hideStatusIndicators: 5, showTemporaryLayerIndicators: 5, messageOverrides: 0, label: 1, state: 32 };
@@ -92,11 +92,12 @@ class ie extends K {
92
92
  }
93
93
  loaded() {
94
94
  this.manager.onLifecycle(() => [
95
- T(() => this.openedLayers, "change", () => {
95
+ C(() => this.openedLayers, "change", () => {
96
96
  this._handleOpenedLayersChange();
97
97
  }, { initial: !0 }),
98
- T(() => this.viewModel.operationalItems, "change", () => H(this.selectedItems), { initial: !0 }),
99
- J(() => [this.filterPredicate, this._rootListRef.value], () => V(this._rootListRef.value, this.filterPredicate, this.operationalItems))
98
+ C(() => this.viewModel.operationalItems, "change", () => V(this.selectedItems), { initial: !0 }),
99
+ C(() => this.selectedItems, "change", () => this.arcgisSelectedItemsChange.emit()),
100
+ K(() => [this.filterPredicate, this._rootListRef.value], () => j(this._rootListRef.value, this.filterPredicate, this.operationalItems))
100
101
  ]);
101
102
  }
102
103
  triggerAction(e, t) {
@@ -146,7 +147,7 @@ class ie extends K {
146
147
  return;
147
148
  s.removeAll(), s.addMany(r);
148
149
  const o = s.at(-1);
149
- o ? "catalogLayer" in o ? (this._catalogLayerList = o, this._tableList = void 0) : (this._catalogLayerList = void 0, this._tableList = o) : (this._catalogLayerList = void 0, this._tableList = void 0);
150
+ o ? "catalogLayer" in o ? (this._catalogLayerList = o, this._tableList = void 0) : (this._catalogLayerList = void 0, this._tableList = o) : (this._catalogLayerList = void 0, this._tableList = void 0), this.arcgisOpenedLayersChange.emit();
150
151
  }
151
152
  _destroyOpenedLayerLists() {
152
153
  this.openedLayerLists.destroyAll(), this.openedLayers.removeAll(), this._layerListMap.clear();
@@ -215,12 +216,12 @@ class ie extends K {
215
216
  _sortLayers(e, t) {
216
217
  if (e)
217
218
  if (e === this._rootListRef.value)
218
- j(this.el.view?.map?.layers, t);
219
+ q(this.el.view?.map?.layers, t);
219
220
  else {
220
221
  const s = d(e, this.operationalItems);
221
222
  if (!s)
222
223
  return;
223
- q(s, t);
224
+ z(s, t);
224
225
  }
225
226
  }
226
227
  _handleCalciteListChange(e) {
@@ -232,10 +233,10 @@ class ie extends K {
232
233
  }
233
234
  render() {
234
235
  const { state: e } = this, t = {
235
- [b.hidden]: e === "loading",
236
- [b.disabled]: e === "disabled"
236
+ [$.hidden]: e === "loading",
237
+ [$.disabled]: e === "disabled"
237
238
  };
238
- return h`<div class=${$(B(b.widget, t))}>${this._visibleItems?.length ? this._renderItemTooltips() : null}${this._renderItems()}</div>`;
239
+ return h`<div class=${E(k($.widget, t))}>${this._visibleItems?.length ? this._renderItemTooltips() : null}${this._renderItems()}</div>`;
239
240
  }
240
241
  _renderItemTooltip(e) {
241
242
  const { _tooltipReferenceMap: t, messages: s } = this;
@@ -254,36 +255,38 @@ class ie extends K {
254
255
  return h`<div slot=message>${this.messages.noItemsToDisplay}</div>`;
255
256
  }
256
257
  _renderNoItems() {
257
- return h`<div class=${$(y.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`;
258
+ return h`<div class=${E(f.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`;
258
259
  }
259
260
  _renderLayerFlowItem(e, t) {
260
261
  const { messages: s, openedLayers: a } = this, i = e.title || this.messages.untitledLayer;
261
- return _(e?.uid ?? i, h`<calcite-flow-item data-layer-uid=${e?.uid ?? "" ?? F} .description=${i} .heading=${s[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(r) => {
262
+ return v(e?.uid ?? i, h`<calcite-flow-item data-layer-uid=${e?.uid ?? "" ?? A} .description=${i} .heading=${s[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(r) => {
262
263
  r.preventDefault(), a.pop(), a.at(-1) && this._layerFlowItemRef.value?.setFocus();
263
- }} ${w(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
264
+ }} ${b(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
264
265
  }
265
266
  _renderPanelFlowItems() {
266
267
  const { _openedPanelItems: e, openedLayers: t } = this;
267
- return R(e.toArray(), (a) => a.uid, (a, i) => {
268
+ return x(e.toArray(), (a) => a.uid, (a, i) => {
268
269
  const { panel: r, title: o } = a, l = () => this._handlePanelFlowItemBack(r);
269
270
  return h`<calcite-flow-item .description=${o} .heading=${r.title} .headingLevel=${this.headingLevel} .selected=${!t.length && i === e.length - 1} @calciteFlowItemBack=${(n) => {
270
271
  n.preventDefault(), l();
271
- }} ${w(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${a} .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>`;
272
+ }} ${b(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${a} .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>`;
272
273
  });
273
274
  }
274
275
  _renderItems() {
275
- const { collapsed: e, _visibleItems: t, _openedPanelItems: s, _filterEnabled: a, _rootGroupUid: i, showCloseButton: r, showCollapseButton: o, showHeading: l, _dragEnabled: n, selectionMode: p, filterText: g, openedLayers: u, filterPlaceholder: L, messages: f } = this, I = [
276
- h`<calcite-flow-item .closable=${r} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${l ? f.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!u.length && !s.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=${i ?? F} .displayMode=${A} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${L} .filterProps=${z} .filterText=${a ? g : ""} .group=${i} .label=${f.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${p} @calciteListChange=${this._handleCalciteListChange} @calciteListFilter=${(c) => this.filterText = c.currentTarget?.filterText ?? ""} @calciteListOrderChange=${(c) => this._onCalciteListOrderChange(c.detail)} @calciteListDragEnd=${(c) => this._onCalciteListDragEnd(c.detail)} ${w(this._rootListRef)}>${t.toArray().map((c) => this._renderItem(c))}${a ? h`<div class=${$(y.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>` : null}</calcite-list>` : this._renderNoItems()}</calcite-flow-item>`,
276
+ const { collapsed: e, _visibleItems: t, _openedPanelItems: s, _filterEnabled: a, _rootGroupUid: i, showCloseButton: r, showCollapseButton: o, showHeading: l, _dragEnabled: n, selectionMode: p, filterText: g, openedLayers: u, filterPlaceholder: I, messages: y } = this, _ = [
277
+ h`<calcite-flow-item .closable=${r} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${l ? y.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!u.length && !s.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=${i ?? A} .displayMode=${O} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${I} .filterProps=${J} .filterText=${a ? g : ""} .group=${i} .label=${y.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${p} @calciteListChange=${this._handleCalciteListChange} @calciteListFilter=${(c) => {
278
+ this.filterText = c.currentTarget?.filterText ?? "", this.arcgisFilterChange.emit();
279
+ }} @calciteListOrderChange=${(c) => this._onCalciteListOrderChange(c.detail)} @calciteListDragEnd=${(c) => this._onCalciteListDragEnd(c.detail)} ${b(this._rootListRef)}>${t.toArray().map((c) => this._renderItem(c))}${a ? h`<div class=${E(f.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>` : null}</calcite-list>` : this._renderNoItems()}</calcite-flow-item>`,
277
280
  this._renderPanelFlowItems(),
278
281
  this._renderedOpenLayerFlowItems
279
282
  ];
280
- return this.closed ? null : _("root-flow", h`<calcite-flow>${I}</calcite-flow>`);
283
+ return this.closed ? null : v("root-flow", h`<calcite-flow>${_}</calcite-flow>`);
281
284
  }
282
285
  _renderItem(e, t, s) {
283
- return _(e.uid, Z({ activeItem: this._activeItem, canMove: this._canMove, css: y, displayMode: A, 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: s, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.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 }));
286
+ return v(e.uid, Z({ activeItem: this._activeItem, canMove: this._canMove, css: f, displayMode: O, 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: s, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.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 }));
284
287
  }
285
288
  }
286
- O("arcgis-layer-list-next", ie);
289
+ R("arcgis-layer-list-next", ie);
287
290
  export {
288
291
  ie as ArcgisLayerListNext
289
292
  };
@@ -4,6 +4,12 @@ import type { TooltipDirectionMode } from "@arcgis/core/views/interactive/toolti
4
4
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
5
5
  import type { T9nMeta } from "@arcgis/lumina/controllers";
6
6
 
7
+ /**
8
+ * The sketch-tooltip-controls component provides a user interface to set specific options within Sketch's [SketchTooltipOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchTooltipOptions/), [SkechLabelOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchLabelOptions/), and [SketchValueOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchValueOptions/) classes.
9
+ *
10
+ * @since 5.1
11
+ * @internal
12
+ */
7
13
  export abstract class ArcgisSketchTooltipControls extends LitElement {
8
14
  /**
9
15
  * private