@arcgis/map-components 5.2.0-next.23 → 5.2.0-next.25
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/32XG4IQO.js +2 -0
- package/dist/cdn/{BXK5DVDN.js → 4BJSMXKG.js} +1 -1
- package/dist/cdn/5P3LF4QU.js +2 -0
- package/dist/cdn/5RXWVXJA.js +2 -0
- package/dist/cdn/7TE4BSW7.js +2 -0
- package/dist/cdn/{23VXN3VB.js → AASOO75T.js} +1 -1
- package/dist/cdn/B56MNMJP.js +2 -0
- package/dist/cdn/BGWYOIKY.js +2 -0
- package/dist/cdn/BV6DN77M.js +2 -0
- package/dist/cdn/BXDVZQ2A.js +3 -0
- package/dist/cdn/CXHORYLL.js +2 -0
- package/dist/cdn/DKG4Q4BC.js +2 -0
- package/dist/cdn/{MJ2AUX7N.js → F7ZQA7S5.js} +1 -1
- package/dist/cdn/{HFDHHI2B.js → FHL4L2ZY.js} +1 -1
- package/dist/cdn/{2BESNRQI.js → FPX4MV2U.js} +1 -1
- package/dist/cdn/FWRUNJU5.js +2 -0
- package/dist/cdn/HUBIN764.js +2 -0
- package/dist/cdn/KLKFMZ7U.js +2 -0
- package/dist/cdn/NR6V3DTH.js +2 -0
- package/dist/cdn/P3U6DQN6.js +2 -0
- package/dist/cdn/{UA3OPWND.js → PGCAY24R.js} +1 -1
- package/dist/cdn/{Z257GCMR.js → Q4PNCUBK.js} +1 -1
- package/dist/cdn/{XVNU3EUN.js → UCEBZVNP.js} +1 -1
- package/dist/cdn/{XPD6NXPE.js → UGOZSFW2.js} +1 -1
- package/dist/cdn/VZVNKP6W.js +2 -0
- package/dist/cdn/W67QMPVV.js +2 -0
- package/dist/cdn/XDKYOMSQ.js +2 -0
- package/dist/cdn/{6HLRQHTF.js → YKNC7IPO.js} +1 -1
- package/dist/cdn/ZAYZVEUD.js +2 -0
- package/dist/cdn/assets/basemap-layer-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/catalog-layer-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/table-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/keyboard-utils.js +15 -0
- package/dist/chunks/layer-list-item-indicator.js +1 -1
- package/dist/chunks/layer-list-item.js +6 -0
- package/dist/chunks/layer-list-utils.js +6 -6
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-basemap-gallery/customElement.js +33 -32
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +241 -0
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +329 -0
- package/dist/components/arcgis-basemap-layer-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-basemap-layer-list-next/index.js +14 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +179 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +263 -0
- package/dist/components/arcgis-catalog-layer-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-catalog-layer-list-next/index.js +10 -0
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +6 -0
- package/dist/components/arcgis-editor/customElement.js +18 -6
- package/dist/components/arcgis-expand/customElement.js +1 -1
- package/dist/components/arcgis-feature-media/customElement.js +45 -44
- package/dist/components/arcgis-features/customElement.js +26 -25
- package/dist/components/arcgis-features-next/customElement.js +22 -21
- package/dist/components/arcgis-floor-filter/customElement.js +3 -3
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +67 -66
- package/dist/components/arcgis-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +1 -1
- package/dist/components/arcgis-navigation-toggle/customElement.js +45 -26
- package/dist/components/arcgis-navigation-toggle/index.js +1 -0
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +3 -1
- package/dist/components/arcgis-paste/customElement.d.ts +6 -0
- package/dist/components/arcgis-paste/customElement.js +9 -6
- package/dist/components/arcgis-popup/customElement.d.ts +2 -3
- package/dist/components/arcgis-popup/customElement.js +27 -27
- package/dist/components/arcgis-presentation/customElement.d.ts +18 -0
- package/dist/components/arcgis-presentation/customElement.js +90 -88
- package/dist/components/arcgis-sketch/customElement.d.ts +16 -1
- package/dist/components/arcgis-sketch/customElement.js +25 -19
- package/dist/components/arcgis-table-list-next/customElement.d.ts +235 -0
- package/dist/components/arcgis-table-list-next/customElement.js +200 -0
- package/dist/components/arcgis-table-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-table-list-next/index.js +7 -0
- package/dist/components/arcgis-weather/customElement.js +105 -110
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +30 -0
- package/dist/loader.js +6 -3
- package/dist/types/lumina.d.ts +30 -1
- package/dist/types/preact.d.ts +33 -1
- package/dist/types/react.d.ts +36 -1
- package/dist/types/stencil.d.ts +30 -1
- package/dist/utils/layer-list-utils.d.ts +10 -0
- package/package.json +4 -4
- package/dist/cdn/6LACZH6O.js +0 -2
- package/dist/cdn/BMJ6NYIZ.js +0 -2
- package/dist/cdn/GQF32YL2.js +0 -2
- package/dist/cdn/HTCDJDRI.js +0 -2
- package/dist/cdn/I6IJUCE6.js +0 -2
- package/dist/cdn/IHDXJ4C3.js +0 -2
- package/dist/cdn/IJZYN6XT.js +0 -2
- package/dist/cdn/IYEZB6EU.js +0 -2
- package/dist/cdn/QJSXXDUJ.js +0 -2
- package/dist/cdn/SFSNTAYE.js +0 -2
- package/dist/cdn/T5KVNE3U.js +0 -3
- package/dist/cdn/WLMFCIBM.js +0 -2
- package/dist/cdn/XTGCV3LY.js +0 -2
- /package/dist/cdn/{T4OPNOZJ.js → OTZMVWAB.js} +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { c as B } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as W, html as _ } from "lit";
|
|
4
4
|
import { ref as j } from "lit/directives/ref.js";
|
|
5
|
-
import { keyed as
|
|
6
|
-
import { useDirection as
|
|
5
|
+
import { keyed as K } from "lit/directives/keyed.js";
|
|
6
|
+
import { useDirection as G, useMedia as q } from "@arcgis/lumina/controllers";
|
|
7
7
|
import { getColorsFromRenderer as J } from "@arcgis/core/renderers/support/utils.js";
|
|
8
8
|
import { LitElement as Q, nothing as y } from "@arcgis/lumina";
|
|
9
9
|
import { substitute as Z } from "@arcgis/core/intl.js";
|
|
@@ -13,23 +13,24 @@ import V from "@arcgis/core/popup/content/support/ChartMediaInfoValueSeries.js";
|
|
|
13
13
|
import { unsafeGetCalciteModeName as ie } from "@arcgis/toolkit/dom";
|
|
14
14
|
import { renderingSanitizer as N } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
15
15
|
import { d as A, s as R, l as z, m as X, n as ae, o as E, i as re, p as ne, h as Y, f as se } from "../../chunks/feature-utils.js";
|
|
16
|
-
|
|
16
|
+
import { a as oe, b as le } from "../../chunks/keyboard-utils.js";
|
|
17
|
+
const ce = W`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-spacing-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-spacing-xs);padding-inline:var(--calcite-spacing-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-spacing-xxs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-spacing-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-spacing-xxs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;
|
|
17
18
|
function $(S) {
|
|
18
19
|
if (!A(S))
|
|
19
20
|
return null;
|
|
20
21
|
const [e, t] = S.split("/").slice(1);
|
|
21
22
|
return { layerId: e, fieldName: t };
|
|
22
23
|
}
|
|
23
|
-
const k = 15, C = "category", w = "value",
|
|
24
|
-
class
|
|
24
|
+
const k = 15, C = "category", w = "value", de = "rgba(50, 50, 50, 1)", ue = 250, he = 500, me = 200;
|
|
25
|
+
class fe extends Q {
|
|
25
26
|
constructor() {
|
|
26
|
-
super(...arguments), this._direction =
|
|
27
|
+
super(...arguments), this._direction = G(), this._prefersReducedMotion = q("(prefers-reduced-motion)"), this.activeMediaInfoIndex = 0, this.chartAnimationDisabled = !1, this.headingLevel = 2;
|
|
27
28
|
}
|
|
28
29
|
static {
|
|
29
30
|
this.properties = { _refreshIntervalInfo: 16, messages: 0, values: 0, expressionValues: 0, activeMediaInfoIndex: 9, chartAnimationDisabled: 5, activeMediaInfo: 32, formattedMediaInfos: 32, description: 1, fieldInfoMap: 0, layer: 0, mediaInfos: 0, popupTemplate: 0, relatedInfos: 0, formattedValues: 0, heading: 1, graphic: 0, formattedMediaInfoCount: 32, headingLevel: 9 };
|
|
30
31
|
}
|
|
31
32
|
static {
|
|
32
|
-
this.styles =
|
|
33
|
+
this.styles = ce;
|
|
33
34
|
}
|
|
34
35
|
get activeMediaInfo() {
|
|
35
36
|
return this.formattedMediaInfos[this.activeMediaInfoIndex] || null;
|
|
@@ -133,18 +134,18 @@ class he extends Q {
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
_setChartValue(e) {
|
|
136
|
-
const { value: t, values: i, expressionValues: a, formattedValues: n, chartType: s, layer: o } = e, { popupTemplate: r, relatedInfos: c } = this, { fields:
|
|
137
|
-
if (t.fields = ae(
|
|
137
|
+
const { value: t, values: i, expressionValues: a, formattedValues: n, chartType: s, layer: o } = e, { popupTemplate: r, relatedInfos: c } = this, { fields: f, normalizeField: d } = t, l = o;
|
|
138
|
+
if (t.fields = ae(f, l), d && (t.normalizeField = E(d, l)), !f.some((m) => !!(n[m] != null || A(m) && c?.size)))
|
|
138
139
|
return;
|
|
139
140
|
const u = r?.fieldInfos ?? [];
|
|
140
|
-
t.series = [],
|
|
141
|
+
t.series = [], f.forEach((m, h) => {
|
|
141
142
|
const g = t.colors?.[h];
|
|
142
|
-
if (A(
|
|
143
|
+
if (A(m)) {
|
|
143
144
|
t.series = [
|
|
144
145
|
...t.series,
|
|
145
146
|
...this._getRelatedChartInfos({
|
|
146
147
|
fieldInfos: u,
|
|
147
|
-
fieldName:
|
|
148
|
+
fieldName: m,
|
|
148
149
|
formattedValues: n,
|
|
149
150
|
expressionValues: a,
|
|
150
151
|
chartType: s,
|
|
@@ -160,7 +161,7 @@ class he extends Q {
|
|
|
160
161
|
chartType: s,
|
|
161
162
|
formattedValues: n,
|
|
162
163
|
expressionValues: a,
|
|
163
|
-
fieldName:
|
|
164
|
+
fieldName: m,
|
|
164
165
|
fieldInfos: u,
|
|
165
166
|
color: g
|
|
166
167
|
});
|
|
@@ -168,7 +169,7 @@ class he extends Q {
|
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
_getRelatedChartInfos(e) {
|
|
171
|
-
const { fieldInfos: t, fieldName: i, formattedValues: a, chartType: n, value: s, color: o, expressionValues: r } = e, c = [],
|
|
172
|
+
const { fieldInfos: t, fieldName: i, formattedValues: a, chartType: n, value: s, color: o, expressionValues: r } = e, c = [], f = $(i), d = f && this.relatedInfos?.get(f.layerId);
|
|
172
173
|
if (!d)
|
|
173
174
|
return c;
|
|
174
175
|
const { relatedFeatures: l, relation: p } = d;
|
|
@@ -178,7 +179,7 @@ class he extends Q {
|
|
|
178
179
|
return l.forEach((h) => {
|
|
179
180
|
const g = h.attributes;
|
|
180
181
|
g && Object.keys(g).forEach((x) => {
|
|
181
|
-
x ===
|
|
182
|
+
x === f.fieldName && c.push(this._getChartOption({
|
|
182
183
|
value: s,
|
|
183
184
|
values: g,
|
|
184
185
|
formattedValues: a,
|
|
@@ -197,14 +198,14 @@ class he extends Q {
|
|
|
197
198
|
return i === "pie-chart" ? `${e}` : `${e}: ${t}`;
|
|
198
199
|
}
|
|
199
200
|
_getChartOption(e) {
|
|
200
|
-
const { value: t, values: i, formattedValues: a, expressionValues: n, fieldName: s, relatedFieldName: o, fieldInfos: r, chartType: c, hasMultipleRelatedFeatures:
|
|
201
|
+
const { value: t, values: i, formattedValues: a, expressionValues: n, fieldName: s, relatedFieldName: o, fieldInfos: r, chartType: c, hasMultipleRelatedFeatures: f, color: d } = e, { layer: l, graphic: p } = this, u = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { normalizeField: m, tooltipField: h } = t, g = m ? A(m) ? i[$(m).fieldName] : i[m] : null, x = re(s) && n?.[s] !== void 0 ? n[s] : o && i[o] !== void 0 ? i[o] : i[s] !== void 0 ? i[s] : a[s], I = x === void 0 ? null : x && g && typeof x == "number" && typeof g == "number" ? x / g : x, v = ne(r, s), M = E(s, l), b = (h && a[h] !== void 0 ? a[h] : Y({
|
|
201
202
|
fieldInfo: v || new te({ fieldName: M }),
|
|
202
203
|
expressionInfos: this.popupTemplate?.expressionInfos,
|
|
203
204
|
graphic: p,
|
|
204
205
|
layer: l
|
|
205
206
|
})) ?? "", P = a[M] ?? "", L = I != null ? typeof I == "number" ? I : Number(I) : null;
|
|
206
207
|
if (A(s)) {
|
|
207
|
-
const T = u.get(s.toLowerCase()), U = h ? u.get(h.toLowerCase()) : null, H = T?.fieldName ?? s, F =
|
|
208
|
+
const T = u.get(s.toLowerCase()), U = h ? u.get(h.toLowerCase()) : null, H = T?.fieldName ?? s, F = f && h ? $(h).fieldName : U?.fieldName ?? h, D = (f && F ? i[F] : a[F] ?? (T && Y({ fieldInfo: T, layer: l, graphic: p })) ?? T?.fieldName ?? o) ?? "", O = (f && o ? i[o] : a[H]) ?? "";
|
|
208
209
|
return new V({
|
|
209
210
|
fieldName: s,
|
|
210
211
|
tooltip: this._getTooltip({
|
|
@@ -259,36 +260,36 @@ class he extends Q {
|
|
|
259
260
|
}
|
|
260
261
|
_handleMediaKeyup(e) {
|
|
261
262
|
const { key: t } = e;
|
|
262
|
-
t
|
|
263
|
+
oe(t, this._direction) && (e.stopPropagation(), this.previous()), le(t, this._direction) && (e.stopPropagation(), this.next());
|
|
263
264
|
}
|
|
264
265
|
_canAnimateChart() {
|
|
265
266
|
return !this.chartAnimationDisabled && !this._prefersReducedMotion;
|
|
266
267
|
}
|
|
267
268
|
_getChartAnimationMS() {
|
|
268
|
-
return this._canAnimateChart() ?
|
|
269
|
+
return this._canAnimateChart() ? ue : 0;
|
|
269
270
|
}
|
|
270
271
|
_getChartSeriesAnimationMS() {
|
|
271
|
-
return this._canAnimateChart() ?
|
|
272
|
+
return this._canAnimateChart() ? he : 0;
|
|
272
273
|
}
|
|
273
274
|
async _customizeChartTooltip(e, t = "horizontal") {
|
|
274
275
|
const { color: i } = await import("@amcharts/amcharts5/index.js");
|
|
275
276
|
e.setAll({
|
|
276
277
|
pointerOrientation: t
|
|
277
278
|
}), e.get("background")?.setAll({
|
|
278
|
-
stroke: i(
|
|
279
|
+
stroke: i(de)
|
|
279
280
|
}), e.label.setAll({
|
|
280
281
|
direction: this._direction,
|
|
281
282
|
oversizedBehavior: "wrap",
|
|
282
|
-
maxWidth:
|
|
283
|
+
maxWidth: me
|
|
283
284
|
});
|
|
284
285
|
}
|
|
285
286
|
async _createPieChart(e, t) {
|
|
286
287
|
const [{ Tooltip: i }, { PieChart: a, PieSeries: n }] = await Promise.all([
|
|
287
288
|
import("@amcharts/amcharts5/index.js"),
|
|
288
289
|
import("@amcharts/amcharts5/percent.js")
|
|
289
|
-
]), { mediaInfo: s, root: o } = e, { title: r } = s, c = 5,
|
|
290
|
+
]), { mediaInfo: s, root: o } = e, { title: r } = s, c = 5, f = s?.altText || s?.title || "", d = o.container.children.push(a.new(o, {
|
|
290
291
|
role: "figure",
|
|
291
|
-
ariaLabel:
|
|
292
|
+
ariaLabel: f,
|
|
292
293
|
focusable: !0,
|
|
293
294
|
paddingBottom: c,
|
|
294
295
|
paddingTop: c,
|
|
@@ -316,14 +317,14 @@ class he extends Q {
|
|
|
316
317
|
return e.forEach((i) => t = Math.min(i.value, t)), t;
|
|
317
318
|
}
|
|
318
319
|
async _createColumnChart(e, t, i) {
|
|
319
|
-
const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries:
|
|
320
|
+
const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries: f }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: p, title: u } = d, { _direction: m } = this;
|
|
320
321
|
e.setAll({
|
|
321
322
|
wheelX: "panX",
|
|
322
323
|
wheelY: "zoomX"
|
|
323
324
|
});
|
|
324
325
|
const h = e.xAxes.push(s.new(l, {
|
|
325
326
|
renderer: o.new(l, {
|
|
326
|
-
inversed:
|
|
327
|
+
inversed: m === "rtl"
|
|
327
328
|
}),
|
|
328
329
|
categoryField: C
|
|
329
330
|
}));
|
|
@@ -335,11 +336,11 @@ class he extends Q {
|
|
|
335
336
|
min: this._getMinSeriesValue(p.series)
|
|
336
337
|
}));
|
|
337
338
|
g.get("renderer").labels.template.setAll({
|
|
338
|
-
direction:
|
|
339
|
+
direction: m
|
|
339
340
|
});
|
|
340
341
|
const x = "{categoryX}", I = a.new(l, {
|
|
341
342
|
labelText: x
|
|
342
|
-
}), v = e.series.push(
|
|
343
|
+
}), v = e.series.push(f.new(l, {
|
|
343
344
|
name: u,
|
|
344
345
|
xAxis: h,
|
|
345
346
|
yAxis: g,
|
|
@@ -356,7 +357,7 @@ class he extends Q {
|
|
|
356
357
|
})), h.data.setAll(i), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
|
|
357
358
|
}
|
|
358
359
|
async _createBarChart(e, t, i) {
|
|
359
|
-
const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries:
|
|
360
|
+
const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries: f }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: p, title: u } = d, { _direction: m } = this;
|
|
360
361
|
e.setAll({
|
|
361
362
|
wheelX: "panY",
|
|
362
363
|
wheelY: "zoomY"
|
|
@@ -373,16 +374,16 @@ class he extends Q {
|
|
|
373
374
|
const g = e.xAxes.push(c.new(l, {
|
|
374
375
|
renderer: o.new(l, {
|
|
375
376
|
inside: !1,
|
|
376
|
-
inversed:
|
|
377
|
+
inversed: m === "rtl"
|
|
377
378
|
}),
|
|
378
379
|
min: this._getMinSeriesValue(p.series)
|
|
379
380
|
}));
|
|
380
381
|
g.get("renderer").labels.template.setAll({
|
|
381
|
-
direction:
|
|
382
|
+
direction: m
|
|
382
383
|
});
|
|
383
384
|
const x = "{categoryY}", I = a.new(l, {
|
|
384
385
|
labelText: x
|
|
385
|
-
}), v = e.series.push(
|
|
386
|
+
}), v = e.series.push(f.new(l, {
|
|
386
387
|
name: u,
|
|
387
388
|
xAxis: g,
|
|
388
389
|
yAxis: h,
|
|
@@ -399,14 +400,14 @@ class he extends Q {
|
|
|
399
400
|
})), h.data.setAll(i), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
|
|
400
401
|
}
|
|
401
402
|
async _createLineChart(e, t, i) {
|
|
402
|
-
const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, LineSeries:
|
|
403
|
+
const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, LineSeries: f }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { root: d, mediaInfo: l } = t, { value: p, title: u } = l, { _direction: m } = this;
|
|
403
404
|
e.setAll({
|
|
404
405
|
wheelX: "panX",
|
|
405
406
|
wheelY: "zoomX"
|
|
406
407
|
});
|
|
407
408
|
const h = e.xAxes.push(s.new(d, {
|
|
408
409
|
renderer: o.new(d, {
|
|
409
|
-
inversed:
|
|
410
|
+
inversed: m === "rtl"
|
|
410
411
|
}),
|
|
411
412
|
categoryField: C
|
|
412
413
|
}));
|
|
@@ -418,7 +419,7 @@ class he extends Q {
|
|
|
418
419
|
min: this._getMinSeriesValue(p.series)
|
|
419
420
|
}));
|
|
420
421
|
g.get("renderer").labels.template.setAll({
|
|
421
|
-
direction:
|
|
422
|
+
direction: m
|
|
422
423
|
});
|
|
423
424
|
const x = "{categoryX}", I = i[0]?.lineSettings?.stroke, v = a.new(d, {
|
|
424
425
|
getFillFromSprite: !I,
|
|
@@ -427,7 +428,7 @@ class he extends Q {
|
|
|
427
428
|
I && v.get("background")?.setAll({
|
|
428
429
|
fill: I
|
|
429
430
|
});
|
|
430
|
-
const M = e.series.push(
|
|
431
|
+
const M = e.series.push(f.new(d, {
|
|
431
432
|
name: u,
|
|
432
433
|
xAxis: h,
|
|
433
434
|
yAxis: g,
|
|
@@ -502,12 +503,12 @@ class he extends Q {
|
|
|
502
503
|
_renderImageMediaInfo(e) {
|
|
503
504
|
if (!e.value)
|
|
504
505
|
return null;
|
|
505
|
-
const { _refreshIntervalInfo: t } = this, { value: i, refreshInterval: a, altText: n, title: s } = e, { sourceURL: o, linkURL: r } = i,
|
|
506
|
-
return (r ? _`<a href=${r ?? y} rel=${d ?? y} target=${
|
|
506
|
+
const { _refreshIntervalInfo: t } = this, { value: i, refreshInterval: a, altText: n, title: s } = e, { sourceURL: o, linkURL: r } = i, f = se(r ?? void 0) ? "_blank" : "_self", d = f === "_blank" ? "noreferrer" : "", l = a ? t : null, p = l ? l.sourceURL : o, u = _`<img alt=${(n || s) ?? y} src=${p ?? void 0 ?? y}>`;
|
|
507
|
+
return (r ? _`<a href=${r ?? y} rel=${d ?? y} target=${f ?? y} title=${s ?? y}>${u}</a>` : null) ?? u;
|
|
507
508
|
}
|
|
508
509
|
_renderChartMediaInfo(e) {
|
|
509
510
|
const { activeMediaInfoIndex: t, formattedMediaInfoCount: i } = this;
|
|
510
|
-
return
|
|
511
|
+
return K(`media-${e.type}-${t}-${i}`, _`<div class="chart" ${j(this._updateChartElement)}></div>`);
|
|
511
512
|
}
|
|
512
513
|
_renderMediaInfoType() {
|
|
513
514
|
const { activeMediaInfo: e } = this;
|
|
@@ -524,7 +525,7 @@ class he extends Q {
|
|
|
524
525
|
return _`<button .ariaLabel=${i} class="pagination-button" @click=${n} tabindex=0 title=${i ?? y} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`;
|
|
525
526
|
}
|
|
526
527
|
async _renderChart(e) {
|
|
527
|
-
const { root: t, mediaInfo: i } = e, { value: a, type: n } = i, [{ default: s }, { default: o }, { default: r }, { esriChartColorSet: c }, { ColorSet:
|
|
528
|
+
const { root: t, mediaInfo: i } = e, { value: a, type: n } = i, [{ default: s }, { default: o }, { default: r }, { esriChartColorSet: c }, { ColorSet: f, Theme: d }] = await Promise.all([
|
|
528
529
|
import("@amcharts/amcharts5/themes/Animated.js"),
|
|
529
530
|
import("@amcharts/amcharts5/themes/Dark.js"),
|
|
530
531
|
import("@amcharts/amcharts5/themes/Responsive.js"),
|
|
@@ -534,12 +535,12 @@ class he extends Q {
|
|
|
534
535
|
l.rule("ColorSet").set("colors", c), l.rule("ColorSet").set("reuse", !0);
|
|
535
536
|
const p = [r.new(t), l];
|
|
536
537
|
ie(this.el) === "dark" && p.push(o.new(t)), this._canAnimateChart() && p.push(s.new(t)), t.setThemes(p);
|
|
537
|
-
const u = await this._getRendererColors(),
|
|
538
|
+
const u = await this._getRendererColors(), m = await this._getSeriesColors(a.series), h = f.new(t, {}), g = m.get(a.series[0]), x = g ? {
|
|
538
539
|
lineSettings: {
|
|
539
540
|
stroke: g
|
|
540
541
|
}
|
|
541
542
|
} : void 0, I = a.series.map((v, M) => {
|
|
542
|
-
const b =
|
|
543
|
+
const b = m.get(v) || u.get(v.fieldName) || h.getIndex(M);
|
|
543
544
|
return {
|
|
544
545
|
[C]: v.tooltip,
|
|
545
546
|
[w]: v.value,
|
|
@@ -553,7 +554,7 @@ class he extends Q {
|
|
|
553
554
|
n === "pie-chart" ? this._createPieChart(e, I) : this._createXYChart(e, I);
|
|
554
555
|
}
|
|
555
556
|
}
|
|
556
|
-
B("arcgis-feature-media",
|
|
557
|
+
B("arcgis-feature-media", fe);
|
|
557
558
|
export {
|
|
558
|
-
|
|
559
|
+
fe as ArcgisFeatureMedia
|
|
559
560
|
};
|
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
2
|
+
import { c as O } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as R, html as a } from "lit";
|
|
4
4
|
import { keyed as D } from "lit/directives/keyed.js";
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
5
|
+
import B from "@arcgis/core/widgets/Features/FeaturesViewModel.js";
|
|
6
|
+
import { u as L } from "../../chunks/useT9n.js";
|
|
7
7
|
import { log as V } from "@arcgis/toolkit/log";
|
|
8
8
|
import { classes as A } from "@arcgis/toolkit/dom";
|
|
9
|
-
import {
|
|
10
|
-
import { m as
|
|
11
|
-
import { LitElement as
|
|
9
|
+
import { useDirection as S, usePropertyChange as H, bypassReadOnly as x } from "@arcgis/lumina/controllers";
|
|
10
|
+
import { m as P } from "../../chunks/useViewModel.js";
|
|
11
|
+
import { LitElement as z, createEvent as y, renderElement as U, nothing as h, safeClassMap as I } from "@arcgis/lumina";
|
|
12
12
|
import { substitute as u, formatNumber as C } from "@arcgis/core/intl.js";
|
|
13
13
|
import { watch as r } from "@arcgis/core/core/reactiveUtils.js";
|
|
14
|
-
import { t as
|
|
14
|
+
import { t as Z, z as K } from "../../chunks/action-utils.js";
|
|
15
15
|
import { stripHTML as T } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
16
16
|
import E from "@arcgis/core/core/Collection.js";
|
|
17
17
|
import { g as j } from "../../chunks/feature-utils.js";
|
|
18
18
|
import { renderingSanitizer as _ } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
19
19
|
import { initializeProjection as G } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
20
|
-
import
|
|
20
|
+
import q from "@arcgis/core/support/actions/ActionButton.js";
|
|
21
21
|
import { createRef as b, ref as m } from "lit/directives/ref.js";
|
|
22
|
-
|
|
22
|
+
import { a as W, b as X } from "../../chunks/keyboard-utils.js";
|
|
23
|
+
const J = R`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`, Q = new q({
|
|
23
24
|
icon: "magnifying-glass-plus",
|
|
24
25
|
id: "zoom-to-feature",
|
|
25
26
|
title: "{messages.zoom}"
|
|
26
|
-
}), M =
|
|
27
|
-
function
|
|
27
|
+
}), M = Q.clone();
|
|
28
|
+
function Y(k) {
|
|
28
29
|
return k?.declaredClass.startsWith("esri.layers.") ?? !1;
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
class
|
|
31
|
+
const ee = P(B);
|
|
32
|
+
class te extends z {
|
|
32
33
|
constructor() {
|
|
33
|
-
super(...arguments), this._fetchFeaturesController = null, this._featureMenuIntersectionObserverCallback = ([e]) => {
|
|
34
|
+
super(...arguments), this._direction = S(), this._fetchFeaturesController = null, this._featureMenuIntersectionObserverCallback = ([e]) => {
|
|
34
35
|
e?.isIntersecting && this.viewModel.featurePage != null && this.viewModel.featurePage++;
|
|
35
36
|
}, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, {
|
|
36
37
|
root: window.document
|
|
37
|
-
}), this._featureMenuIntersectionObserverNode = null, this._rootFlowItemNode = b(), this._featureMenuViewportNode = b(), this._actionBarMenuNode = b(), this._flowContainerNode = b(), this.messages =
|
|
38
|
+
}), this._featureMenuIntersectionObserverNode = null, this._rootFlowItemNode = b(), this._featureMenuViewportNode = b(), this._actionBarMenuNode = b(), this._flowContainerNode = b(), this.messages = L(), this._selectedFeatureComponent = b(), this._cancelOpenRelatedFeature = () => {
|
|
38
39
|
const { _openRelatedFeatureAbortController: e } = this;
|
|
39
40
|
e && e.abort(), this._openRelatedFeatureAbortController = null;
|
|
40
|
-
}, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this.viewModel =
|
|
41
|
+
}, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this.viewModel = ee(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = this.viewModel.featureMenuOpen, this.featureMenuTitle = this.viewModel.featureMenuTitle, this.featureNavigationTop = !1, this.features = this.viewModel.features, this.featuresPerPage = this.viewModel.featuresPerPage, this.featureViewModelAbilities = this.viewModel.featureViewModelAbilities, this.goToOverride = this.viewModel.goToOverride, this.headerActions = new E(), this.heading = this.viewModel.title, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideHeading = !1, this.hideSelectFeature = !1, this.hideSpinner = !1, this.hideContent = !1, this.hideExpressionContent = !1, this.hideLastEditedInfo = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.map = this.viewModel.map, this.open = this.viewModel.visible, this.promises = this.viewModel.promises, this.responsiveActionsEnabled = !1, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.showCollapseButton = !1, this.spatialReference = this.viewModel.spatialReference, this.state = this.viewModel.state, this.timeZone = this.viewModel.timeZone, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = H()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = y(), this.arcgisClose = y(), this.arcgisTriggerAction = y();
|
|
41
42
|
}
|
|
42
43
|
static {
|
|
43
44
|
this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, collapseDirection: 1, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureViewModelAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
|
|
44
45
|
}
|
|
45
46
|
static {
|
|
46
|
-
this.styles =
|
|
47
|
+
this.styles = J;
|
|
47
48
|
}
|
|
48
49
|
get _hideActionText() {
|
|
49
50
|
if (!this.responsiveActionsEnabled)
|
|
@@ -144,7 +145,7 @@ class Q extends P {
|
|
|
144
145
|
}
|
|
145
146
|
async triggerAction(e) {
|
|
146
147
|
if (!e.disabled)
|
|
147
|
-
return e?.type === "toggle" && (e.value = !e.value), await
|
|
148
|
+
return e?.type === "toggle" && (e.value = !e.value), await Z(e, this.viewModel);
|
|
148
149
|
}
|
|
149
150
|
connectedCallback() {
|
|
150
151
|
super.connectedCallback(), this._createSpinner();
|
|
@@ -204,7 +205,7 @@ class Q extends P {
|
|
|
204
205
|
const i = s?.graphic;
|
|
205
206
|
if (!i)
|
|
206
207
|
return;
|
|
207
|
-
const o = j(i), n =
|
|
208
|
+
const o = j(i), n = Y(o) ? o : null, l = t.get(n) ?? [];
|
|
208
209
|
t.set(n, [...l, s]);
|
|
209
210
|
}), t;
|
|
210
211
|
}
|
|
@@ -275,7 +276,7 @@ class Q extends P {
|
|
|
275
276
|
}
|
|
276
277
|
_onMainKeydown(e) {
|
|
277
278
|
const { key: t } = e;
|
|
278
|
-
t
|
|
279
|
+
W(t, this._direction) && (e.stopPropagation(), this._handleFeatureMenuBack(), this.previous(), this.setFocus()), X(t, this._direction) && (e.stopPropagation(), this._handleFeatureMenuBack(), this.next(), this.setFocus());
|
|
279
280
|
}
|
|
280
281
|
_featureMenuViewportScrollTop() {
|
|
281
282
|
this._featureMenuViewportNode.value?.scrollContentTo({ top: 0 });
|
|
@@ -323,7 +324,7 @@ class Q extends P {
|
|
|
323
324
|
}
|
|
324
325
|
_createSpinner() {
|
|
325
326
|
const e = this.referenceElement;
|
|
326
|
-
e && (this._removeSpinner(e), this._spinnerEl =
|
|
327
|
+
e && (this._removeSpinner(e), this._spinnerEl = U(a`<arcgis-spinner .label=${this.messages.loading ?? ""} .trackLocation=${!this.hideSpinner && this.viewModel.visible && this.viewModel?.waitingForResult} .location=${this.viewModel?.location ?? void 0} .view=${this.viewModel?.view ?? void 0}></arcgis-spinner>`), e.manager?.component?.extraContent?.add(this._spinnerEl));
|
|
327
328
|
}
|
|
328
329
|
render() {
|
|
329
330
|
return a`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`;
|
|
@@ -405,7 +406,7 @@ class Q extends P {
|
|
|
405
406
|
const { messages: s, hideCloseButton: i, hideSelectFeature: o, active: n, hideHeading: l } = this, c = "graphic" in e && "isFeatureFromTable" in e && !e.isFeatureFromTable, f = c && !o, v = e.flowType === "feature-association", g = s.returnToInitialFeature ?? "", p = s?.selectFeature, w = this._getActionTitle(M), d = !this.hideActionBar && v && c;
|
|
406
407
|
return a`<calcite-flow-item .closable=${!i} .closed=${!n} .description=${T(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${l ? void 0 : T(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${(F) => {
|
|
407
408
|
F.preventDefault(), this._handleDrillInBackClick();
|
|
408
|
-
}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l ? null : a`<div slot=heading><div .innerHTML=${_.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${_.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${g ?? ""} title=${g ?? "" ?? h}></calcite-action>${f ? a`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${p ?? ""} title=${p ?? h}></calcite-action>` : null}${d ? a`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon ?? void 0} .loading=${M.active} scale=s text-enabled .text=${w} title=${w ?? h} @click=${() =>
|
|
409
|
+
}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l ? null : a`<div slot=heading><div .innerHTML=${_.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${_.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${g ?? ""} title=${g ?? "" ?? h}></calcite-action>${f ? a`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${p ?? ""} title=${p ?? h}></calcite-action>` : null}${d ? a`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon ?? void 0} .loading=${M.active} scale=s text-enabled .text=${w} title=${w ?? h} @click=${() => K(this.viewModel, M, e)}></calcite-action></calcite-action-group></calcite-action-bar>` : null}<div class="container">${e}</div></calcite-flow-item>`;
|
|
409
410
|
}
|
|
410
411
|
_renderContentContainer() {
|
|
411
412
|
const e = this.flowItems?.toArray(), t = e?.map((i, o) => this._renderFlowItem(i, this._featureFlowItemSelected && o === e.length - 1)), s = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(), t] : [this._renderContentFeature(), t, this._renderFeatureMenuContainer()];
|
|
@@ -426,7 +427,7 @@ class Q extends P {
|
|
|
426
427
|
return t ? a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature>` : typeof e == "string" ? D(e, a`<div .innerHTML=${_.sanitize(e) ?? ""}></div>`) : e ?? null;
|
|
427
428
|
}
|
|
428
429
|
}
|
|
429
|
-
|
|
430
|
+
O("arcgis-features", te);
|
|
430
431
|
export {
|
|
431
|
-
|
|
432
|
+
te as ArcgisFeatures
|
|
432
433
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as L } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as R, html as o } from "lit";
|
|
4
4
|
import { keyed as y } from "lit/directives/keyed.js";
|
|
5
5
|
import O from "@arcgis/core/support/actions/ActionButton.js";
|
|
6
6
|
import E from "@arcgis/core/core/Collection.js";
|
|
7
7
|
import H from "@arcgis/core/popup/Features.js";
|
|
8
8
|
import { LitElement as P, createEvent as A, renderElement as z, nothing as p, safeClassMap as I } from "@arcgis/lumina";
|
|
9
|
-
import {
|
|
9
|
+
import { useDirection as Z, usePropertyChange as V, bypassReadOnly as k } from "@arcgis/lumina/controllers";
|
|
10
10
|
import { slotChangeHasContent as D, classes as x } from "@arcgis/toolkit/dom";
|
|
11
11
|
import { createRef as m, ref as f } from "lit/directives/ref.js";
|
|
12
12
|
import { g as S } from "../../chunks/feature-utils.js";
|
|
13
|
-
import { initializeProjection as
|
|
14
|
-
import { t as
|
|
13
|
+
import { initializeProjection as U } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
14
|
+
import { t as K, z as j } from "../../chunks/action-utils.js";
|
|
15
15
|
import { m as q } from "../../chunks/useViewModel.js";
|
|
16
16
|
import { renderingSanitizer as b } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
17
17
|
import { stripHTML as T } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
@@ -19,16 +19,17 @@ import { substitute as g, formatNumber as C } from "@arcgis/core/intl.js";
|
|
|
19
19
|
import { u as G } from "../../chunks/useT9n.js";
|
|
20
20
|
import { watch as c } from "@arcgis/core/core/reactiveUtils.js";
|
|
21
21
|
import { a as N } from "../../chunks/maybe.js";
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
import { a as W, b as X } from "../../chunks/keyboard-utils.js";
|
|
23
|
+
const J = R`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;
|
|
24
|
+
function Q(F) {
|
|
24
25
|
return F?.declaredClass.startsWith("esri.layers.") ?? !1;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function Y(F) {
|
|
27
28
|
if (!(!F || !("featureReduction" in F)))
|
|
28
29
|
return F.featureReduction?.type;
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
class
|
|
31
|
+
const ee = q(H);
|
|
32
|
+
class te extends P {
|
|
32
33
|
constructor() {
|
|
33
34
|
super(...arguments), this._zoomToFeature = new O({
|
|
34
35
|
icon: "magnifying-glass-plus",
|
|
@@ -38,15 +39,15 @@ class Q extends P {
|
|
|
38
39
|
e?.isIntersecting && this.viewModel.featurePage != null && this.viewModel.featurePage++;
|
|
39
40
|
}, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, {
|
|
40
41
|
root: window.document
|
|
41
|
-
}), this._featureMenuIntersectionObserverNode = null, this._focusTrapNode = m(), this._focusTrapAnimationFrameId = null, this._rootFlowItemNode = m(), this._featureMenuViewportNode = m(), this._actionBarMenuNode = m(), this._flowContainerNode = m(), this._aggregatedFeaturesComponent = m(), this.messages = G(), this._selectedFeatureComponent = m(), this._cancelOpenRelatedFeature = () => {
|
|
42
|
+
}), this._featureMenuIntersectionObserverNode = null, this._focusTrapNode = m(), this._focusTrapAnimationFrameId = null, this._rootFlowItemNode = m(), this._featureMenuViewportNode = m(), this._actionBarMenuNode = m(), this._flowContainerNode = m(), this._aggregatedFeaturesComponent = m(), this.messages = G(), this._selectedFeatureComponent = m(), this._direction = Z(), this._cancelOpenRelatedFeature = () => {
|
|
42
43
|
this._openRelatedFeatureAbortController = N(this._openRelatedFeatureAbortController);
|
|
43
|
-
}, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this._aggregatedFeatureCount = 0, this._selectedAggregatedFeatureIndex = -1, this._aggregatedFeaturesLoading = !1, this._hasActionsStartSlotContent = !1, this._hasActionsEndSlotContent = !1, this.viewModel =
|
|
44
|
+
}, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this._aggregatedFeatureCount = 0, this._selectedAggregatedFeatureIndex = -1, this._aggregatedFeaturesLoading = !1, this._hasActionsStartSlotContent = !1, this._hasActionsEndSlotContent = !1, this.viewModel = ee(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.focusTrapEnabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.effectiveHeading = this.viewModel.effectiveHeading, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = !1, this.featureNavigationTop = !1, this.features = this.viewModel.features, this.featuresPerPage = this.viewModel.featuresPerPage, this.featureItemAbilities = this.viewModel.featureItemAbilities, this.goToOverride = this.viewModel.goToOverride, this.headerActions = new E(), this.heading = this.viewModel.heading, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideHeading = !1, this.hideSelectFeature = !1, this.hideSpinner = !1, this.hideContent = !1, this.chartAnimationDisabled = this.viewModel.featureItemAbilities?.chartAnimation, this.hideAttachmentsContent = this.viewModel.featureItemAbilities?.attachmentsContent, this.hideCustomContent = this.viewModel.featureItemAbilities?.customContent, this.hideExpressionContent = !1, this.hideFieldsContent = this.viewModel.featureItemAbilities?.fieldsContent, this.hideMediaContent = this.viewModel.featureItemAbilities?.mediaContent, this.hideRelationshipContent = this.viewModel.featureItemAbilities?.relationshipContent, this.hideTextContent = this.viewModel.featureItemAbilities?.textContent, this.hideUtilityNetworkContent = this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent, this.hideLastEditedInfo = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.map = this.viewModel.map, this.open = this.viewModel.open, this.promises = this.viewModel.promises, this.responsiveActionsEnabled = !1, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.showCollapseButton = !1, this.spatialReference = this.viewModel.spatialReference, this.state = this.viewModel.state, this.timeZone = this.viewModel.timeZone, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = V()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = A(), this.arcgisClose = A(), this.arcgisTriggerAction = A();
|
|
44
45
|
}
|
|
45
46
|
static {
|
|
46
47
|
this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _aggregatedFeatureCount: 16, _selectedAggregatedFeatureIndex: 16, _aggregatedFeaturesLoading: 16, _hasActionsStartSlotContent: 16, _hasActionsEndSlotContent: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, focusTrapEnabled: 5, collapseDirection: 1, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureItemAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
|
|
47
48
|
}
|
|
48
49
|
static {
|
|
49
|
-
this.styles =
|
|
50
|
+
this.styles = J;
|
|
50
51
|
}
|
|
51
52
|
get _hideActionText() {
|
|
52
53
|
if (!this.responsiveActionsEnabled)
|
|
@@ -78,7 +79,7 @@ class Q extends P {
|
|
|
78
79
|
async fetchFeatures(e, t) {
|
|
79
80
|
this._cancelFetchingFeatures();
|
|
80
81
|
const { signal: a } = t ?? {}, i = new AbortController(), { signal: s } = i, n = a ? AbortSignal.any([s, a]) : s;
|
|
81
|
-
if (this._fetchFeaturesController = i, !e && this.view && this.location && (await
|
|
82
|
+
if (this._fetchFeaturesController = i, !e && this.view && this.location && (await U(this.location.spatialReference, this.view.spatialReference, null, {
|
|
82
83
|
signal: n
|
|
83
84
|
}), e = this.view.toScreen(this.location) ?? void 0), !e)
|
|
84
85
|
return;
|
|
@@ -99,7 +100,7 @@ class Q extends P {
|
|
|
99
100
|
}
|
|
100
101
|
async triggerAction(e) {
|
|
101
102
|
if (!e.disabled)
|
|
102
|
-
return e?.type === "toggle" && (e.value = !e.value), await
|
|
103
|
+
return e?.type === "toggle" && (e.value = !e.value), await K(e, this.viewModel);
|
|
103
104
|
}
|
|
104
105
|
connectedCallback() {
|
|
105
106
|
super.connectedCallback(), this._createSpinner();
|
|
@@ -159,7 +160,7 @@ class Q extends P {
|
|
|
159
160
|
const i = a?.graphic;
|
|
160
161
|
if (!i)
|
|
161
162
|
return;
|
|
162
|
-
const s = S(i), n =
|
|
163
|
+
const s = S(i), n = Q(s) ? s : null;
|
|
163
164
|
let r = t.get(n);
|
|
164
165
|
r || (r = [], t.set(n, r)), r.push(a);
|
|
165
166
|
}), t;
|
|
@@ -231,7 +232,7 @@ class Q extends P {
|
|
|
231
232
|
}
|
|
232
233
|
_onMainKeydown(e) {
|
|
233
234
|
const { key: t } = e;
|
|
234
|
-
t
|
|
235
|
+
W(t, this._direction) && (e.stopPropagation(), this._handleFeatureMenuBack(), this.previous(), this.setFocus()), X(t, this._direction) && (e.stopPropagation(), this._handleFeatureMenuBack(), this.next(), this.setFocus());
|
|
235
236
|
}
|
|
236
237
|
_featureMenuViewportScrollTop() {
|
|
237
238
|
this._featureMenuViewportNode.value?.scrollContentTo({ top: 0 });
|
|
@@ -245,7 +246,7 @@ class Q extends P {
|
|
|
245
246
|
}
|
|
246
247
|
_viewScaleChange() {
|
|
247
248
|
const { selectedFeature: e } = this;
|
|
248
|
-
!e?.isAggregate ||
|
|
249
|
+
!e?.isAggregate || Y(S(e)) !== "cluster" || (this.viewModel.aggregatedFeaturesEnabled = !1, this.open = !1, this.clear());
|
|
249
250
|
}
|
|
250
251
|
_viewChange() {
|
|
251
252
|
this.viewModel.clear(), this.open = !1, this._aggregatedFeatureCount = 0, this._removeFlowItems();
|
|
@@ -372,8 +373,8 @@ class Q extends P {
|
|
|
372
373
|
"flow-item-collapsed": l
|
|
373
374
|
}))} .closable=${s === "list" && !t} .closed=${!_} .collapsed=${s === "list" && l} .collapseDirection=${this.collapseDirection ?? (h ? "down" : "up")} .collapsible=${s === "list" && d} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} .description=${this.hideFeatureMenuHeading ? void 0 : g(i.total ?? "", {
|
|
374
375
|
total: u.length
|
|
375
|
-
})} .heading=${this.hideFeatureMenuHeading ? void 0 : $} .headingLevel=${v} .loading=${e.waitingForContents} .selected=${M} @calciteFlowItemBack=${(
|
|
376
|
-
|
|
376
|
+
})} .heading=${this.hideFeatureMenuHeading ? void 0 : $} .headingLevel=${v} .loading=${e.waitingForContents} .selected=${M} @calciteFlowItemBack=${(B) => {
|
|
377
|
+
B.preventDefault(), this._handleFeatureMenuBack();
|
|
377
378
|
}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${f(this._featureMenuViewportNode)}>${s === "list" ? this._renderHeaderActions() : null}${w > 0 ? o`<calcite-loader class="loader" inline .label=${i.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}<div class="container">${M ? this._renderFeatureMenu() : null}</div><div class="feature-menu-observer" ${f(this._featureMenuIntersectionObserverCreated)}></div>${s === "feature" ? o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>` : null}</calcite-flow-item>`;
|
|
378
379
|
}
|
|
379
380
|
_renderFlowItem(e, t) {
|
|
@@ -413,7 +414,7 @@ class Q extends P {
|
|
|
413
414
|
return t ? o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${f(this._selectedFeatureComponent)}></arcgis-feature-next>` : typeof e == "string" ? y(e, o`<div .innerHTML=${b.sanitize(e) ?? ""}></div>`) : e ?? null;
|
|
414
415
|
}
|
|
415
416
|
}
|
|
416
|
-
|
|
417
|
+
L("arcgis-features-next", te);
|
|
417
418
|
export {
|
|
418
|
-
|
|
419
|
+
te as ArcgisFeaturesNext
|
|
419
420
|
};
|