@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
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { c as N } from "../../chunks/runtime.js";
|
|
3
3
|
import { html as h } from "lit";
|
|
4
4
|
import { keyed as w } from "lit/directives/keyed.js";
|
|
5
|
-
import { repeat as
|
|
6
|
-
import
|
|
7
|
-
import { classes as
|
|
5
|
+
import { repeat as S } from "lit/directives/repeat.js";
|
|
6
|
+
import k from "@arcgis/core/layerList/LayerListModel.js";
|
|
7
|
+
import { classes as B } from "@arcgis/toolkit/dom";
|
|
8
8
|
import { generateGuid as U } from "@arcgis/toolkit/string";
|
|
9
9
|
import { createRef as b, ref as _ } from "lit/directives/ref.js";
|
|
10
10
|
import { u as G } from "../../chunks/useT9n.js";
|
|
@@ -18,23 +18,23 @@ import { LitElement as Q, createEvent as I, renderElement as D, safeClassMap as
|
|
|
18
18
|
import { usePropertyChange as W } from "@arcgis/lumina/controllers";
|
|
19
19
|
import { reEmitEvent as X } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
20
20
|
import { u as Y } from "../../chunks/useCloseEvent.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { i as
|
|
21
|
+
import { u as Z, s as ee, a as te } from "../../chunks/layer-list-next.js";
|
|
22
|
+
import { ArcgisLayerListItem as se } from "./layer-list-item/customElement.js";
|
|
23
|
+
import { i as ie, h as ae, r as le } from "../../chunks/utils.js";
|
|
24
24
|
import "../arcgis-layer-list-item-indicator/customElement.js";
|
|
25
|
-
const P = "nested",
|
|
25
|
+
const P = "nested", oe = H(k);
|
|
26
26
|
class re extends Q {
|
|
27
27
|
constructor() {
|
|
28
|
-
super(...arguments), this.#s = null, this._rootListRef = b(), this._layerFlowItemRef = b(), this._panelFlowItemRef = b(), this._selectedDragItemLayerUid = null, this._rootGroupUid = `operational-${U()}`, this.#
|
|
28
|
+
super(...arguments), this.#s = Z(this), this.#i = null, this._rootListRef = b(), this._layerFlowItemRef = b(), this._panelFlowItemRef = b(), this._selectedDragItemLayerUid = null, this._rootGroupUid = `operational-${U()}`, this.#a = null, this.messages = G(), this._canMove = ({ dragEl: e, fromEl: t, toEl: s }, a) => {
|
|
29
29
|
const i = a === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, l = m(e, this.operationalItems);
|
|
30
30
|
if (!l?.sortable)
|
|
31
31
|
return !1;
|
|
32
|
-
const
|
|
32
|
+
const o = this.#e(t), r = this.#e(s), n = this.#t(o), d = F(o), g = this.#t(r), u = F(r), f = !!d && !!u && d === u, L = {
|
|
33
33
|
selected: l,
|
|
34
34
|
from: n,
|
|
35
35
|
to: g
|
|
36
|
-
}, v =
|
|
37
|
-
return v && c && typeof i == "function" ? i(
|
|
36
|
+
}, v = o?.group, c = r?.group, R = n?.layer?.type ?? "", x = g?.layer?.type ?? "", M = /* @__PURE__ */ new Set(["map-image", "catalog", "knowledge-graph"]);
|
|
37
|
+
return v && c && typeof i == "function" ? i(L) : f && !M.has(R) && !M.has(x) && l?.layer?.type !== "sublayer";
|
|
38
38
|
}, this._onCatalogOpen = (e) => {
|
|
39
39
|
this.openedLayers.push(e.layer?.parent);
|
|
40
40
|
}, this._onTablesOpen = (e) => {
|
|
@@ -48,7 +48,7 @@ class re extends Q {
|
|
|
48
48
|
return;
|
|
49
49
|
const t = Array.from(e.composedPath()).find((a) => a.classList?.contains(y.item)), s = m(t, this.operationalItems);
|
|
50
50
|
this._activeItem = s;
|
|
51
|
-
}, this.viewModel =
|
|
51
|
+
}, this.viewModel = oe(this), this.arcgisClose = Y(this), this._activeItem = null, this._onTooltipReferenceChange = (e, t) => {
|
|
52
52
|
t ? this._tooltipReferenceMap.set(e, t) : this._tooltipReferenceMap.delete(e);
|
|
53
53
|
}, this._onSelectedDragItemLayerUidChange = (e) => {
|
|
54
54
|
this._selectedDragItemLayerUid = e;
|
|
@@ -64,6 +64,7 @@ class re extends Q {
|
|
|
64
64
|
}
|
|
65
65
|
#s;
|
|
66
66
|
#i;
|
|
67
|
+
#a;
|
|
67
68
|
get _totalItems() {
|
|
68
69
|
return this.viewModel.operationalItems.flatten((t) => t.children.filter((s) => s.layer?.type !== "catalog-dynamic-group")).length;
|
|
69
70
|
}
|
|
@@ -71,7 +72,7 @@ class re extends Q {
|
|
|
71
72
|
return this.operationalItems?.filter((e) => !e.hidden && (this.showErrors || !e.error));
|
|
72
73
|
}
|
|
73
74
|
get _openedPanelItems() {
|
|
74
|
-
return this._visibleItems.flatten((e) => e.children).filter((e) => !e.hidden && e.panel?.open && !e.panel.disabled && e.panel.flowEnabled && (!
|
|
75
|
+
return this._visibleItems.flatten((e) => e.children).filter((e) => !e.hidden && e.panel?.open && !e.panel.disabled && e.panel.flowEnabled && (!ie(e) || ae(e)));
|
|
75
76
|
}
|
|
76
77
|
get _dragEnabled() {
|
|
77
78
|
return this._totalItems >= this.minDragEnabledItems && this.dragEnabled;
|
|
@@ -81,7 +82,7 @@ class re extends Q {
|
|
|
81
82
|
}
|
|
82
83
|
get _renderedOpenLayerFlowItems() {
|
|
83
84
|
const { openedLayers: e } = this;
|
|
84
|
-
return e.toArray().map((t, s) => this.#
|
|
85
|
+
return e.toArray().map((t, s) => this.#_(t, s === e.length - 1));
|
|
85
86
|
}
|
|
86
87
|
get catalogLayerList() {
|
|
87
88
|
return this._catalogLayerList;
|
|
@@ -90,12 +91,12 @@ class re extends Q {
|
|
|
90
91
|
return this._tableList;
|
|
91
92
|
}
|
|
92
93
|
async destroy() {
|
|
93
|
-
await this.manager.destroy(), this.#
|
|
94
|
+
await this.manager.destroy(), this.#h(), this._tooltipReferenceMap.clear();
|
|
94
95
|
}
|
|
95
96
|
loaded() {
|
|
96
97
|
this.manager.onLifecycle(() => [
|
|
97
98
|
C(() => this.openedLayers, "change", () => {
|
|
98
|
-
this.#
|
|
99
|
+
this.#c();
|
|
99
100
|
}, { initial: !0 }),
|
|
100
101
|
C(() => this.viewModel.operationalItems, "change", () => T(this.selectedItems), { initial: !0 }),
|
|
101
102
|
A(() => this.operationalItems.flatten((e) => e.children).map((e) => e.uid).join(","), () => {
|
|
@@ -133,35 +134,35 @@ class re extends Q {
|
|
|
133
134
|
}
|
|
134
135
|
return null;
|
|
135
136
|
}
|
|
136
|
-
async #
|
|
137
|
+
async #n(e, t) {
|
|
137
138
|
const { _layerListMap: s } = this, a = s.get(e);
|
|
138
139
|
if (a)
|
|
139
140
|
return a;
|
|
140
|
-
const i = e.type === "catalog" ? await this.#
|
|
141
|
+
const i = e.type === "catalog" ? await this.#d(e) : await this.#p(e);
|
|
141
142
|
return t.aborted || s.set(e, i), i;
|
|
142
143
|
}
|
|
143
|
-
async #
|
|
144
|
+
async #c() {
|
|
144
145
|
const { _layerListMap: e, openedLayers: t, openedLayerLists: s } = this;
|
|
145
|
-
this.#
|
|
146
|
+
this.#a?.abort();
|
|
146
147
|
const a = new AbortController(), { signal: i } = a;
|
|
147
|
-
this.#
|
|
148
|
-
t.includes(n) || (
|
|
148
|
+
this.#a = a, e.forEach((r, n) => {
|
|
149
|
+
t.includes(n) || (r?.destroy?.(), e.delete(n));
|
|
149
150
|
});
|
|
150
|
-
const l = await Promise.all(t.map((
|
|
151
|
+
const l = await Promise.all(t.map((r) => this.#n(r, i)));
|
|
151
152
|
if (i.aborted)
|
|
152
153
|
return;
|
|
153
154
|
s.removeAll(), s.addMany(l);
|
|
154
|
-
const
|
|
155
|
-
|
|
155
|
+
const o = s.at(-1);
|
|
156
|
+
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();
|
|
156
157
|
}
|
|
157
|
-
#
|
|
158
|
+
#h() {
|
|
158
159
|
this.openedLayerLists.destroyAll(), this.openedLayers.removeAll(), this._layerListMap.clear();
|
|
159
160
|
}
|
|
160
|
-
async #
|
|
161
|
-
const { headingLevel: t, catalogOptions: s, filterPlaceholder: a, listItemCreatedFunction: i, minFilterItems: l, selectionMode:
|
|
162
|
-
return D(h`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? a} .listItemCreatedFunction=${s?.listItemCreatedFunction ?? i} .minFilterItems=${s?.minFilterItems ?? l} .selectionMode=${s?.selectionMode ??
|
|
161
|
+
async #d(e) {
|
|
162
|
+
const { headingLevel: t, catalogOptions: s, filterPlaceholder: a, listItemCreatedFunction: i, minFilterItems: l, selectionMode: o, visibilityAppearance: r } = this;
|
|
163
|
+
return D(h`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? a} .listItemCreatedFunction=${s?.listItemCreatedFunction ?? i} .minFilterItems=${s?.minFilterItems ?? l} .selectionMode=${s?.selectionMode ?? o} .visibilityAppearance=${s?.visibilityAppearance ?? r} .showErrors=${s?.showErrors ?? this.showErrors} .showFilter=${s?.showFilter ?? this.showFilter} .hideStatusIndicators=${s?.hideStatusIndicators ?? this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.showTemporaryLayerIndicators ?? this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${(n) => n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`);
|
|
163
164
|
}
|
|
164
|
-
#
|
|
165
|
+
#m(e) {
|
|
165
166
|
switch (e.type) {
|
|
166
167
|
case "knowledge-graph":
|
|
167
168
|
return { ...this.knowledgeGraphOptions, tables: e.tables };
|
|
@@ -179,23 +180,23 @@ class re extends Q {
|
|
|
179
180
|
return null;
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
|
-
async #
|
|
183
|
-
const { headingLevel: t, selectionMode: s, dragEnabled: a } = this, i = this.#
|
|
183
|
+
async #p(e) {
|
|
184
|
+
const { headingLevel: t, selectionMode: s, dragEnabled: a } = this, i = this.#m(e);
|
|
184
185
|
return D(h`<arcgis-table-list-next .headingLevel=${i?.headingLevel ?? t} .selectionMode=${i?.selectionMode ?? s} .dragEnabled=${i?.dragEnabled ?? a} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .icon=${i?.icon ?? void 0} .label=${i?.label ?? void 0} .listItemCreatedFunction=${i?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${i?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${(l) => l.stopPropagation()}></arcgis-table-list-next>`);
|
|
185
186
|
}
|
|
186
|
-
#
|
|
187
|
+
#g(e) {
|
|
187
188
|
e.open = !1;
|
|
188
189
|
}
|
|
189
|
-
#
|
|
190
|
-
const i = this.#e(e), l = this.#e(t),
|
|
191
|
-
a == null || !
|
|
190
|
+
#u({ toEl: e, fromEl: t, dragEl: s, newIndex: a }) {
|
|
191
|
+
const i = this.#e(e), l = this.#e(t), o = m(s, this.operationalItems), r = this.#t(i), n = this.#t(l);
|
|
192
|
+
a == null || !o || (this.viewModel.moveItem(o, n, r, a), le(
|
|
192
193
|
this,
|
|
193
|
-
|
|
194
|
+
o.uid,
|
|
194
195
|
// Make sure we have the current node and not a stale one
|
|
195
196
|
(d) => d !== s && this.#e(d.parentElement) === i
|
|
196
197
|
));
|
|
197
198
|
}
|
|
198
|
-
#
|
|
199
|
+
#f(e) {
|
|
199
200
|
const { fromEl: t, toEl: s, dragEl: a, oldIndex: i } = e;
|
|
200
201
|
if (t !== s) {
|
|
201
202
|
a.remove();
|
|
@@ -203,19 +204,19 @@ class re extends Q {
|
|
|
203
204
|
}
|
|
204
205
|
i == null || !t || !a || t.insertBefore(a, t.children[i]);
|
|
205
206
|
}
|
|
206
|
-
#
|
|
207
|
-
const t = this.#
|
|
208
|
-
if (!(!i || !l ||
|
|
209
|
-
if (this.#
|
|
207
|
+
#y(e) {
|
|
208
|
+
const t = this.#i, { dragEl: s, newIndex: a } = e, i = this.#e(e.fromEl), l = this.#e(e.toEl), o = t?.newIndex === a && t?.dragEl === s && t?.toEl === l && t?.fromEl === i;
|
|
209
|
+
if (!(!i || !l || o)) {
|
|
210
|
+
if (this.#i = {
|
|
210
211
|
...e,
|
|
211
212
|
fromEl: i,
|
|
212
213
|
toEl: l
|
|
213
214
|
}, this._selectedDragItemLayerUid = s.value, i === l) {
|
|
214
|
-
const
|
|
215
|
-
this.#
|
|
215
|
+
const r = Array.from(i.children).filter((n) => n?.matches("calcite-list-item")).map((n) => n.value.layer?.uid ?? "");
|
|
216
|
+
this.#I(i, r);
|
|
216
217
|
return;
|
|
217
218
|
}
|
|
218
|
-
this.#
|
|
219
|
+
this.#u({
|
|
219
220
|
toEl: l,
|
|
220
221
|
fromEl: i,
|
|
221
222
|
dragEl: s,
|
|
@@ -223,7 +224,7 @@ class re extends Q {
|
|
|
223
224
|
});
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
|
-
#
|
|
227
|
+
#I(e, t) {
|
|
227
228
|
if (e)
|
|
228
229
|
if (e === this._rootListRef.value)
|
|
229
230
|
z(this.el.view?.map?.layers, t);
|
|
@@ -234,7 +235,7 @@ class re extends Q {
|
|
|
234
235
|
J(s, t);
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
|
-
#
|
|
238
|
+
#L(e) {
|
|
238
239
|
const { selectionMode: t, selectedItems: s } = this;
|
|
239
240
|
if (t === "none")
|
|
240
241
|
return;
|
|
@@ -246,54 +247,54 @@ class re extends Q {
|
|
|
246
247
|
[$.hidden]: e === "loading",
|
|
247
248
|
[$.disabled]: e === "disabled"
|
|
248
249
|
};
|
|
249
|
-
return h`<div class=${E(
|
|
250
|
+
return h`<div class=${E(B($.widget, t))}>${this._visibleItems?.length ? this.#w() : null}${this.#C()}</div>`;
|
|
250
251
|
}
|
|
251
|
-
#
|
|
252
|
+
#v(e) {
|
|
252
253
|
const { _tooltipReferenceMap: t, messages: s } = this;
|
|
253
254
|
return e ? h`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid ?? "")}>${s.layerIncompatibleTooltip}</calcite-tooltip>` : null;
|
|
254
255
|
}
|
|
255
|
-
#
|
|
256
|
+
#l(e) {
|
|
256
257
|
if (e.incompatible)
|
|
257
|
-
return this.#
|
|
258
|
-
const t = e.children?.filter((s) => !s.hidden).toArray().map((s) => this.#
|
|
258
|
+
return this.#v(e);
|
|
259
|
+
const t = e.children?.filter((s) => !s.hidden).toArray().map((s) => this.#l(s)) ?? [];
|
|
259
260
|
return t.length ? t : null;
|
|
260
261
|
}
|
|
261
|
-
#
|
|
262
|
-
return this._visibleItems?.toArray().map((t) => this.#
|
|
262
|
+
#w() {
|
|
263
|
+
return this._visibleItems?.toArray().map((t) => this.#l(t));
|
|
263
264
|
}
|
|
264
|
-
#
|
|
265
|
+
#o() {
|
|
265
266
|
return h`<div slot=message>${this.messages.noItemsToDisplay}</div>`;
|
|
266
267
|
}
|
|
267
|
-
#
|
|
268
|
-
return this.hideNoItemsNotice ? null : h`<div class=${E(y.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#
|
|
268
|
+
#b() {
|
|
269
|
+
return this.hideNoItemsNotice ? null : h`<div class=${E(y.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#o()}</calcite-notice></div>`;
|
|
269
270
|
}
|
|
270
|
-
#
|
|
271
|
+
#_(e, t) {
|
|
271
272
|
const { messages: s, openedLayers: a } = this, i = e.title || this.messages.untitledLayer;
|
|
272
273
|
return w(e?.uid ?? i, h`<calcite-flow-item data-layer-uid=${e?.uid ?? "" ?? O} .description=${i} .heading=${s[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(l) => {
|
|
273
274
|
l.preventDefault(), a.pop(), a.at(-1) && this._layerFlowItemRef.value?.setFocus();
|
|
274
275
|
}} ${_(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`);
|
|
275
276
|
}
|
|
276
|
-
|
|
277
|
+
#$() {
|
|
277
278
|
const { _openedPanelItems: e, openedLayers: t } = this;
|
|
278
|
-
return
|
|
279
|
-
const { panel: l, title:
|
|
280
|
-
return h`<calcite-flow-item .description=${
|
|
281
|
-
n.preventDefault(),
|
|
282
|
-
}} ${_(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${a} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${
|
|
279
|
+
return S(e.toArray(), (a) => a.uid, (a, i) => {
|
|
280
|
+
const { panel: l, title: o } = a, r = () => this.#g(l);
|
|
281
|
+
return h`<calcite-flow-item .description=${o} .heading=${l.title} .headingLevel=${this.headingLevel} .selected=${!t.length && i === e.length - 1} @calciteFlowItemBack=${(n) => {
|
|
282
|
+
n.preventDefault(), r();
|
|
283
|
+
}} ${_(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${a} .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>`;
|
|
283
284
|
});
|
|
284
285
|
}
|
|
285
|
-
|
|
286
|
-
const { collapsed: e, _visibleItems: t, _openedPanelItems: s, _filterEnabled: a, _rootGroupUid: i, showCloseButton: l, showCollapseButton:
|
|
287
|
-
h`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${
|
|
286
|
+
#C() {
|
|
287
|
+
const { collapsed: e, _visibleItems: t, _openedPanelItems: s, _filterEnabled: a, _rootGroupUid: i, showCloseButton: l, showCollapseButton: o, showHeading: r, _dragEnabled: n, filterText: d, openedLayers: g, filterPlaceholder: u, messages: f } = this, L = this.#s.selectionMode, v = [
|
|
288
|
+
h`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${r ? f.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!g.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 ?? O} .displayMode=${P} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${u} .filterProps=${K} .filterText=${a ? d : ""} .group=${i} .label=${f.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${L} @calciteListChange=${this.#L} @calciteListFilter=${(c) => {
|
|
288
289
|
this.filterText = c.currentTarget?.filterText ?? "", this.arcgisFilterChange.emit();
|
|
289
|
-
}} @calciteListOrderChange=${(c) => this.#
|
|
290
|
-
this
|
|
290
|
+
}} @calciteListOrderChange=${(c) => this.#y(c.detail)} @calciteListDragEnd=${(c) => this.#f(c.detail)} ${_(this._rootListRef)}>${t.toArray().map((c) => this.#E(c))}${a && !this.hideNoFilterResultsNotice ? h`<div class=${E(y.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#o()}</calcite-notice></div>` : null}</calcite-list>` : this.#b()}</calcite-flow-item>`,
|
|
291
|
+
this.#$(),
|
|
291
292
|
this._renderedOpenLayerFlowItems
|
|
292
293
|
];
|
|
293
294
|
return this.closed ? null : w("root-flow", h`<calcite-flow>${v}</calcite-flow>`);
|
|
294
295
|
}
|
|
295
|
-
#
|
|
296
|
-
return w(e.uid,
|
|
296
|
+
#E(e, t, s) {
|
|
297
|
+
return w(e.uid, se({ activeItem: this._activeItem, canMove: this._canMove, css: y, displayMode: P, dragEnabled: this.dragEnabled, hideStatusIndicators: this.hideStatusIndicators, hideCatalogLayerList: this.hideCatalogLayerList, item: e, messages: this.messages, layerTablesEnabled: this.layerTablesEnabled, listModeDisabled: this.viewModel.listModeDisabled, operationalItems: this.operationalItems, parent: t, parentTitles: s, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.#s.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 }));
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
300
|
N("arcgis-layer-list-next", re);
|
|
@@ -27,6 +27,9 @@ import type { Icon as Icon } from "@esri/calcite-components/components/calcite-i
|
|
|
27
27
|
* define the date, time range, and UTC offset used to compute the analysis overlay. They do not change the lighting in
|
|
28
28
|
* the scene. To control scene lighting, use the [arcgis-daylight](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-daylight/) component.
|
|
29
29
|
*
|
|
30
|
+
* The visualization is hidden when the selected time range includes nighttime at the current camera location.
|
|
31
|
+
* When that happens, we display a notice indicating that the visualization is not available.
|
|
32
|
+
*
|
|
30
33
|
* The [utcOffset](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-shadow-cast/#utcOffset) property specifies a numeric offset from Coordinated Universal
|
|
31
34
|
* Time (UTC) used to interpret the selected date and time range. A UTC offset does not identify a regional time zone,
|
|
32
35
|
* such as `Europe/Zurich`, or automatically account for daylight saving time.
|
|
@@ -58,8 +61,9 @@ import type { Icon as Icon } from "@esri/calcite-components/components/calcite-i
|
|
|
58
61
|
* * Shadow Cast is only supported in a 3D [arcgis-scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/) component.
|
|
59
62
|
* * Terrain does not cast shadows in this analysis.
|
|
60
63
|
* * As a result, shadow duration may be underestimated and sunlight duration may be overestimated in areas where terrain
|
|
61
|
-
* would normally block sunlight.
|
|
62
|
-
*
|
|
64
|
+
* would normally block sunlight.
|
|
65
|
+
* * The time range must fit within one continuous daylight period at the current camera location.
|
|
66
|
+
* The visualization is also hidden when no daylight is expected or the analysis settings cannot be resolved.
|
|
63
67
|
* * When [utcOffset](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-shadow-cast/#utcOffset) is not specified, the component estimates the UTC offset from
|
|
64
68
|
* the camera's longitude. It does not determine the regional time zone at the camera's location. If the estimated offset
|
|
65
69
|
* is not appropriate for the analysis date and location, users can set it manually using the UTC offset selector.
|
|
@@ -339,6 +343,10 @@ export abstract class ArcgisShadowCast extends LitElement {
|
|
|
339
343
|
protected messages: Partial<{
|
|
340
344
|
componentLabel: string;
|
|
341
345
|
dateLabel: string;
|
|
346
|
+
outsideDaylight: string;
|
|
347
|
+
splitDaylight: string;
|
|
348
|
+
noDaylight: string;
|
|
349
|
+
visualizationUnavailable: string;
|
|
342
350
|
discrete: {
|
|
343
351
|
optionLabel: string;
|
|
344
352
|
colorLabel: string;
|
|
@@ -388,6 +396,10 @@ export abstract class ArcgisShadowCast extends LitElement {
|
|
|
388
396
|
}> & T9nMeta<{
|
|
389
397
|
componentLabel: string;
|
|
390
398
|
dateLabel: string;
|
|
399
|
+
outsideDaylight: string;
|
|
400
|
+
splitDaylight: string;
|
|
401
|
+
noDaylight: string;
|
|
402
|
+
visualizationUnavailable: string;
|
|
391
403
|
discrete: {
|
|
392
404
|
optionLabel: string;
|
|
393
405
|
colorLabel: string;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as O } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
3
|
+
import { css as S, html as d } from "lit";
|
|
4
|
+
import { LitElement as T, createEvent as $, nothing as z, safeClassMap as u } from "@arcgis/lumina";
|
|
5
5
|
import { usePropertyChange as k } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { u as Z } from "../../chunks/useT9n.js";
|
|
7
|
-
import { m as
|
|
7
|
+
import { m as V } from "../../chunks/useViewModel.js";
|
|
8
8
|
import { H as p } from "../../chunks/heading.js";
|
|
9
9
|
import { g as v } from "../../chunks/globalCss.js";
|
|
10
|
-
import { V as
|
|
11
|
-
import
|
|
12
|
-
import { property as r, subclass as
|
|
10
|
+
import { V as g } from "../../chunks/visible-element.js";
|
|
11
|
+
import I from "@arcgis/core/analysis/ShadowCastAnalysis.js";
|
|
12
|
+
import { property as r, subclass as P } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
13
13
|
import { A as L } from "../../chunks/AnalysisViewModel.js";
|
|
14
14
|
import { m as E } from "../../chunks/handle.js";
|
|
15
|
-
import { watch as f, whenOnce as
|
|
16
|
-
import { t as
|
|
15
|
+
import { watch as f, whenOnce as A } from "@arcgis/core/core/reactiveUtils.js";
|
|
16
|
+
import { t as R } from "../../chunks/earth-utils.js";
|
|
17
17
|
import { c as h, s as w, g as H } from "../../chunks/time-utils.js";
|
|
18
18
|
import { forceInteractive as j } from "@arcgis/core/applications/Components/analysisUtils.js";
|
|
19
|
-
const U =
|
|
20
|
-
var F = Object.defineProperty,
|
|
21
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
22
|
-
(
|
|
19
|
+
const U = S`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-space-md);display:flex;flex-direction:column;gap:var(--calcite-space-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-space-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-space-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-heading{display:flex;align-items:center;gap:var(--calcite-space-sm);margin-block-end:var(--calcite-space-sm);.esri-widget__heading{margin-block-end:0}arcgis-time-zone-chip{margin-inline-start:auto}}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`;
|
|
20
|
+
var F = Object.defineProperty, W = Object.getOwnPropertyDescriptor, n = (e, i, t, a) => {
|
|
21
|
+
for (var s = a > 1 ? void 0 : a ? W(i, t) : i, l = e.length - 1, c; l >= 0; l--)
|
|
22
|
+
(c = e[l]) && (s = (a ? c(i, t, s) : c(s)) || s);
|
|
23
23
|
return a && s && F(i, t, s), s;
|
|
24
24
|
};
|
|
25
25
|
const y = /* @__PURE__ */ Symbol("interactiveHandle");
|
|
@@ -28,7 +28,7 @@ let o = class extends L {
|
|
|
28
28
|
super(...arguments), this.supportedViewType = "3d", this.unsupportedErrorMessage = "The Shadow Cast component is only supported in 3D views.", this.shouldForceInteractive = !1, this.timeZoneMode = "offset", this.minMinDuration = 0, this.maxMinDuration = h(8, "hours", "milliseconds"), this.hideShadowDurationTooltip = !1;
|
|
29
29
|
}
|
|
30
30
|
constructAnalysis() {
|
|
31
|
-
return new
|
|
31
|
+
return new I();
|
|
32
32
|
}
|
|
33
33
|
initialize() {
|
|
34
34
|
this.addHandles([
|
|
@@ -65,6 +65,9 @@ let o = class extends L {
|
|
|
65
65
|
E(() => this._clearViewTimeZoneSync())
|
|
66
66
|
]);
|
|
67
67
|
}
|
|
68
|
+
onDisconnectFromAnalysisView() {
|
|
69
|
+
this.analysisView && (this.analysisView.visible = void 0);
|
|
70
|
+
}
|
|
68
71
|
_clearViewTimeZoneSync() {
|
|
69
72
|
const e = this._viewTimeZoneSync;
|
|
70
73
|
this._viewTimeZoneSync = void 0, e && e.analysis.timeZone === e.timeZone && (e.analysis.timeZone = e.originalTimeZone);
|
|
@@ -176,10 +179,10 @@ let o = class extends L {
|
|
|
176
179
|
if (e != null)
|
|
177
180
|
return e;
|
|
178
181
|
const i = this.view?.camera?.position;
|
|
179
|
-
return i ?
|
|
182
|
+
return i ? R(i) : 0;
|
|
180
183
|
}
|
|
181
184
|
async getDurationAtScreen(e) {
|
|
182
|
-
return await (await
|
|
185
|
+
return await (await A(() => this.analysisView)).getDurationAtScreen(e);
|
|
183
186
|
}
|
|
184
187
|
};
|
|
185
188
|
n([
|
|
@@ -252,12 +255,12 @@ n([
|
|
|
252
255
|
r()
|
|
253
256
|
], o.prototype, "hideShadowDurationTooltip", 2);
|
|
254
257
|
o = n([
|
|
255
|
-
|
|
258
|
+
P("components.shadow-cast.ShadowCastViewModel")
|
|
256
259
|
], o);
|
|
257
|
-
const
|
|
258
|
-
class
|
|
260
|
+
const B = V(o);
|
|
261
|
+
class K extends T {
|
|
259
262
|
constructor() {
|
|
260
|
-
super(...arguments), this.viewModel =
|
|
263
|
+
super(...arguments), this.viewModel = B(this), this.messages = Z(), this.analysis = this.viewModel.analysis, this.view = this.viewModel.view, this.visualizeSunlight = this.viewModel.visualizeSunlight, this.visualScale = "m", this.autoDestroyDisabled = !1, this.endTimeOfDay = this.viewModel.endTimeOfDay, this.headingLevel = 4, this.hideTimeRangeSlider = !1, this.hideTimezone = !1, this.hideDatePicker = !1, this.hideShadowDurationTooltip = this.viewModel.hideShadowDurationTooltip, this.hideVisualization = this.viewModel.hideVisualization, this.hideVisualizationOptions = !1, this.hideDiscreteOptions = !1, this.hideDiscreteColorPicker = !1, this.hideDiscreteInterval = !1, this.hideTotalDurationOptions = !1, this.hideTotalDurationColorPicker = !1, this.hideTotalDurationModeSelect = !1, this.hideMinDurationOptions = !1, this.hideMinDurationColorPicker = !1, this.hideMinDurationSlider = !1, this.hideMinDurationContextOptions = !1, this.hideMinDurationContextToggle = !1, this.hideMinDurationContextColorPicker = !1, this.hideMinDurationContextInterval = !1, this.icon = "measure-building-height-shadow", this.mode = this.viewModel.mode, this.startTimeOfDay = this.viewModel.startTimeOfDay, this.state = this.viewModel.state, this.timeZoneMode = this.viewModel.timeZoneMode, this.utcOffset = this.viewModel.utcOffset, this.discreteColor = this.viewModel.discreteColor, this.discreteInterval = this.viewModel.discreteInterval, this.totalDurationColor = this.viewModel.totalDurationColor, this.totalDurationMode = this.viewModel.totalDurationMode, this.minDuration = this.viewModel.minDuration, this.minDurationColor = this.viewModel.minDurationColor, this.minMinDuration = this.viewModel.minMinDuration, this.maxMinDuration = this.viewModel.maxMinDuration, this.minDurationContextEnabled = this.viewModel.minDurationContextEnabled, this.minDurationContextColor = this.viewModel.minDurationContextColor, this.minDurationContextInterval = this.viewModel.minDurationContextInterval, this.arcgisPropertyChange = k()("state"), this.arcgisReady = $();
|
|
261
264
|
}
|
|
262
265
|
static {
|
|
263
266
|
this.properties = { analysis: 0, view: 0, visualizeSunlight: 5, visualScale: 3, autoDestroyDisabled: 5, date: 1, endTimeOfDay: 9, headingLevel: 9, hideTimeRangeSlider: 5, hideTimezone: 5, hideDatePicker: 5, hideShadowDurationTooltip: 5, hideVisualization: 5, hideVisualizationOptions: 5, hideDiscreteOptions: 5, hideDiscreteColorPicker: 5, hideDiscreteInterval: 5, hideTotalDurationOptions: 5, hideTotalDurationColorPicker: 5, hideTotalDurationModeSelect: 5, hideMinDurationOptions: 5, hideMinDurationColorPicker: 5, hideMinDurationSlider: 5, hideMinDurationContextOptions: 5, hideMinDurationContextToggle: 5, hideMinDurationContextColorPicker: 5, hideMinDurationContextInterval: 5, icon: 3, label: 1, mode: 1, referenceElement: 1, startTimeOfDay: 9, state: 32, timeZoneMode: 1, utcOffset: 9, discreteColor: 0, discreteInterval: 9, totalDurationColor: 0, totalDurationMode: 1, minDuration: 9, minDurationColor: 0, minMinDuration: 9, maxMinDuration: 9, minDurationContextEnabled: 5, minDurationContextColor: 0, minDurationContextInterval: 9 };
|
|
@@ -288,31 +291,47 @@ class q extends S {
|
|
|
288
291
|
async getDurationAtScreen(i) {
|
|
289
292
|
return await this.viewModel.getDurationAtScreen(i);
|
|
290
293
|
}
|
|
294
|
+
_getWarningMessage() {
|
|
295
|
+
const { messages: i } = this;
|
|
296
|
+
switch (this.viewModel.analysisView?.error?.name) {
|
|
297
|
+
case "outside-daylight":
|
|
298
|
+
return i.outsideDaylight;
|
|
299
|
+
case "split-daylight":
|
|
300
|
+
return i.splitDaylight;
|
|
301
|
+
case "no-daylight":
|
|
302
|
+
return i.noDaylight;
|
|
303
|
+
case "unavailable":
|
|
304
|
+
case "invalid":
|
|
305
|
+
return i.visualizationUnavailable;
|
|
306
|
+
default:
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
291
310
|
render() {
|
|
292
|
-
const { _effectiveMessages: i } = this;
|
|
293
|
-
return
|
|
311
|
+
const { _effectiveMessages: i } = this, t = this._getWarningMessage();
|
|
312
|
+
return d`<div aria-label=${i.componentLabel ?? z} class=${u({
|
|
294
313
|
root: !0,
|
|
295
314
|
[v.widget]: !0,
|
|
296
315
|
[v.widgetDisabled]: this.viewModel.state === "disabled",
|
|
297
316
|
[v.panel]: !0
|
|
298
|
-
})} role=presentation>${this._renderTimeRangeSection()}${
|
|
317
|
+
})} role=presentation>${this._renderTimeRangeSection()}${g({ hidden: this.hideVisualizationOptions, children: this._renderVisualizationOptionsSection() })}${t ? d`<calcite-notice aria-live=polite icon=exclamation-mark-triangle-f kind=warning open .scale=${this.visualScale} width=full><div slot=message dir=auto>${t}</div></calcite-notice>` : void 0}</div>`;
|
|
299
318
|
}
|
|
300
319
|
_renderTimeRangeSection() {
|
|
301
320
|
if (!this.analysis || this.hideTimeRangeSlider && this.hideDatePicker)
|
|
302
321
|
return;
|
|
303
322
|
const { _effectiveMessages: i, viewModel: t } = this, a = this.visualScale, s = t.timeZone;
|
|
304
|
-
return
|
|
323
|
+
return d`<section class="time-range-section">${s && !this.hideTimezone ? d`<div class="time-range-heading">${p({ level: this.headingLevel, children: i.timeRangeHeading })}<arcgis-time-zone-chip .disabled=${t.state === "disabled"} .timeZone=${s} .visualScale=${a} @arcgisInternalTimeZoneChange=${(l) => {
|
|
305
324
|
t.timeZone = l.detail;
|
|
306
|
-
}}></arcgis-time-zone-chip></div>` : p({ level: this.headingLevel, children: i.timeRangeHeading })}${
|
|
325
|
+
}}></arcgis-time-zone-chip></div>` : p({ level: this.headingLevel, children: i.timeRangeHeading })}${g({ hidden: this.hideTimeRangeSlider, children: this._renderTimeRange() })}${s == null ? g({ hidden: this.hideTimezone, children: d`<calcite-label .scale=${a}>${i.timezoneLabel}<calcite-input-time-zone data-testid=shadow-cast-time-zone-input mode=offset overlay-positioning=fixed .referenceDate=${t.localDate} .scale=${a} .value=${`${h(t.effectiveUtcOffset, "hours", "minutes")}`} @calciteInputTimeZoneChange=${(l) => {
|
|
307
326
|
t.utcOffset = +l.target.value / 60;
|
|
308
|
-
}}></calcite-input-time-zone></calcite-label>` }) : null}${
|
|
309
|
-
const
|
|
310
|
-
t.date = Array.isArray(
|
|
327
|
+
}}></calcite-input-time-zone></calcite-label>` }) : null}${g({ hidden: this.hideDatePicker, children: d`<calcite-label .scale=${a}>${i.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${a} .valueAsDate=${t.date} @calciteInputDatePickerChange=${(l) => {
|
|
328
|
+
const c = l.currentTarget.valueAsDate;
|
|
329
|
+
t.date = Array.isArray(c) ? c[0] : c;
|
|
311
330
|
}}></calcite-input-date-picker></calcite-label>` })}</section>`;
|
|
312
331
|
}
|
|
313
332
|
_renderTimeRange() {
|
|
314
333
|
const { _effectiveMessages: i, viewModel: t } = this;
|
|
315
|
-
return
|
|
334
|
+
return d`<arcgis-time-of-day-slider mode=range .disabled=${t.state === "disabled"} .startTime=${D(this.startTimeOfDay)} .endTime=${D(this.endTimeOfDay)} .label=${i.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({ currentTarget: a }) => {
|
|
316
335
|
t.startTimeOfDay = h(a.startTime, "minutes", "milliseconds"), t.endTimeOfDay = h(a.endTime, "minutes", "milliseconds");
|
|
317
336
|
}}></arcgis-time-of-day-slider>`;
|
|
318
337
|
}
|
|
@@ -320,25 +339,25 @@ class q extends S {
|
|
|
320
339
|
const { analysis: i, _effectiveMessages: t, headingLevel: a, viewModel: s } = this;
|
|
321
340
|
if (!i)
|
|
322
341
|
return;
|
|
323
|
-
const { discreteOptions: l, totalDurationOptions:
|
|
324
|
-
return
|
|
342
|
+
const { discreteOptions: l, totalDurationOptions: c, minDurationOptions: _ } = i, m = (M, C) => s.mode === M && !C ? void 0 : "hidden-config", b = this.hideMinDurationContextOptions || this.visualizeSunlight, x = this.hideMinDurationContextToggle || this.visualizeSunlight;
|
|
343
|
+
return d`<section class="visualization-options-section">${p({ level: a, children: t.visualizationLabel })}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(m("min-duration", this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${b} .hideContextToggle=${x} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${t} .options=${_} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(m("total-duration", this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${t} .options=${c} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(m("discrete", this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${t} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`;
|
|
325
344
|
}
|
|
326
345
|
_renderModeSelect() {
|
|
327
346
|
const { _effectiveMessages: i, viewModel: t } = this, { mode: a } = t;
|
|
328
|
-
return
|
|
347
|
+
return d`<calcite-select .label=${i.visualizationLabel ?? ""} .scale=${this.visualScale} @calciteSelectChange=${(s) => {
|
|
329
348
|
const l = s.target.selectedOption?.value;
|
|
330
349
|
t.mode = l ?? "min-duration";
|
|
331
350
|
}}>${[
|
|
332
351
|
{ mode: "min-duration", label: i.minDuration?.optionLabel },
|
|
333
352
|
{ mode: "total-duration", label: i.totalDuration?.optionLabel },
|
|
334
353
|
{ mode: "discrete", label: i.discrete?.optionLabel }
|
|
335
|
-
].map(({ mode: s, label: l }) =>
|
|
354
|
+
].map(({ mode: s, label: l }) => d`<calcite-option .selected=${s === a} .value=${s} .label=${l}></calcite-option>`)}</calcite-select>`;
|
|
336
355
|
}
|
|
337
356
|
}
|
|
338
357
|
function D(e) {
|
|
339
358
|
return Math.round(h(e, "milliseconds", "minutes"));
|
|
340
359
|
}
|
|
341
|
-
O("arcgis-shadow-cast",
|
|
360
|
+
O("arcgis-shadow-cast", K);
|
|
342
361
|
export {
|
|
343
|
-
|
|
362
|
+
K as ArcgisShadowCast
|
|
344
363
|
};
|
|
@@ -733,8 +733,10 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
733
733
|
*/
|
|
734
734
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
735
735
|
/**
|
|
736
|
-
* Relative position is used to control the appearance of elements rendered by `arcgis-sketch`. If used
|
|
737
|
-
* the slots of an `arcgis-map` or `arcgis-scene` component,
|
|
736
|
+
* Relative position is used to control the appearance of elements rendered by `arcgis-sketch`. If used
|
|
737
|
+
* directly within the slots of an `arcgis-map` or `arcgis-scene` component,
|
|
738
|
+
* you do not need to manually set this value. If using custom layouts, or dynamically moving layouts between
|
|
739
|
+
* slots, prefer explicitly setting this property.
|
|
738
740
|
*
|
|
739
741
|
* Examples of elements that depend on relative position include the split button chevrons (in vertical layout), the settings
|
|
740
742
|
* popover, and tooltips.
|
|
@@ -818,8 +820,8 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
818
820
|
/**
|
|
819
821
|
* Controls the appearance of the sketch component, allowing the toolbar to adapt its appearance appropriately based on context.
|
|
820
822
|
*
|
|
821
|
-
* Set this to `docked` for use within the Expand component, or any other situation
|
|
822
|
-
* where Sketch is not floating within a
|
|
823
|
+
* Set this to `docked` for use within the Expand component, a panel, or any other situation
|
|
824
|
+
* where Sketch is not floating within a larger canvas (like a map or scene).
|
|
823
825
|
*
|
|
824
826
|
* @default "floating"
|
|
825
827
|
* @since 4.32
|