@arcgis/map-components 5.2.0-next.163 → 5.2.0-next.165
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/2MPZWW4A.js +2 -0
- package/dist/cdn/3IZHAJN7.js +2 -0
- package/dist/cdn/67UW6MJM.js +2 -0
- package/dist/cdn/73NABILZ.js +2 -0
- package/dist/cdn/{VF23MMWZ.js → AALEZAW5.js} +1 -1
- package/dist/cdn/BPTZ6LBO.js +2 -0
- package/dist/cdn/FGQJD346.js +2 -0
- package/dist/cdn/OBFJ4JUW.js +2 -0
- package/dist/cdn/RMKPKUPL.js +2 -0
- package/dist/cdn/WEY7JGX2.js +2 -0
- package/dist/cdn/YXFFWLE5.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/utils5.js +2 -2
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +5 -0
- package/dist/components/arcgis-coordinate-conversion-next/customElement.d.ts +6 -5
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +8 -0
- package/dist/components/arcgis-selection-toolbar/customElement.js +23 -17
- package/dist/components/arcgis-time-bar/customElement.d.ts +486 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-time-slider/customElement.d.ts +1 -0
- package/dist/components/arcgis-time-slider/customElement.js +8 -7
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +7 -0
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +8 -5
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +45 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +23 -20
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +125 -12
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +9 -2
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +60 -57
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +7 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +12 -9
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +217 -14
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +119 -108
- package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +155 -8
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +9 -73
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +132 -125
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -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 +5 -5
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +6 -6
- package/dist/cdn/24P3B56P.js +0 -2
- package/dist/cdn/4TTVR7UK.js +0 -2
- package/dist/cdn/7PMSUAOO.js +0 -2
- package/dist/cdn/EQX7MHI6.js +0 -2
- package/dist/cdn/ERO6VEJC.js +0 -2
- package/dist/cdn/JQL6EOCO.js +0 -2
- package/dist/cdn/K664I5PA.js +0 -2
- package/dist/cdn/NV6GXURX.js +0 -2
- package/dist/cdn/S3LQLHD6.js +0 -2
- package/dist/cdn/X5PDNDLF.js +0 -2
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
|
@@ -3,16 +3,16 @@ import { c as k } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css as I, html as i } from "lit";
|
|
4
4
|
import _ from "@arcgis/core/rest/query/support/AttachmentInfo.js";
|
|
5
5
|
import L from "@arcgis/core/rest/support/AttachmentQuery.js";
|
|
6
|
-
import
|
|
6
|
+
import P from "@arcgis/core/core/Collection.js";
|
|
7
7
|
import y from "@arcgis/core/core/Error.js";
|
|
8
|
-
import { LitElement as
|
|
8
|
+
import { LitElement as T, nothing as p, safeClassMap as b, safeStyleMap as A } from "@arcgis/lumina";
|
|
9
9
|
import { bypassReadOnly as S } from "@arcgis/lumina/controllers";
|
|
10
10
|
import { classes as $ } from "@arcgis/toolkit/dom";
|
|
11
11
|
import { g as v, i as w } from "../../chunks/attachment-utils.js";
|
|
12
12
|
import { g as f } from "../../chunks/feature-utils.js";
|
|
13
13
|
import { watch as C } from "@arcgis/core/core/reactiveUtils.js";
|
|
14
|
-
const x = I`:host([empty]){display:none}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}calcite-card:hover,calcite-card:focus,calcite-card:focus-within{--calcite-card-border-color: var(--calcite-color-text-1)}`, z =
|
|
15
|
-
class E extends
|
|
14
|
+
const x = I`:host([empty]){display:none}.loading-content{min-height:4rem;min-width:4rem}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}calcite-card:hover,calcite-card:focus,calcite-card:focus-within{--calcite-card-border-color: var(--calcite-color-text-1)}`, z = P.ofType(_);
|
|
15
|
+
class E extends T {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this._attachmentLayer = null, this._supportsImageOrientation = window?.CSS?.supports("image-orientation", "from-image"), this.hideSection = !1, this._attachmentInfos = new z(), this.headingLevel = 2, this.hidePreviewImageAttachmentName = !1, this.empty = !1;
|
|
18
18
|
}
|
|
@@ -49,22 +49,22 @@ class E extends P {
|
|
|
49
49
|
]);
|
|
50
50
|
}
|
|
51
51
|
async getAttachments() {
|
|
52
|
-
const { _attachmentLayer: e, _attachmentInfos: t, orderByFields: s, attachmentTypes:
|
|
52
|
+
const { _attachmentLayer: e, _attachmentInfos: t, orderByFields: s, attachmentTypes: r, attachmentKeywords: c, _supportsTypeWildcard: o } = this;
|
|
53
53
|
if (!e || typeof e.queryAttachments != "function")
|
|
54
54
|
throw new y("invalid-layer", "getAttachments(): A valid layer is required.");
|
|
55
55
|
const l = this.graphic?.getObjectId();
|
|
56
56
|
if (typeof l != "number")
|
|
57
57
|
throw new y("invalid-object-id", "getAttachments(): Numeric object id is required");
|
|
58
|
-
const g = s?.map((a) => `${a.field} ${a.order === "descending" ? "DESC" : "ASC"}`),
|
|
58
|
+
const g = s?.map((a) => `${a.field} ${a.order === "descending" ? "DESC" : "ASC"}`), n = new L({
|
|
59
59
|
objectIds: [l],
|
|
60
60
|
returnMetadata: !0,
|
|
61
61
|
orderByFields: g,
|
|
62
|
-
attachmentTypes: o ?
|
|
62
|
+
attachmentTypes: o ? r?.filter(Boolean).map((a) => `${a}/*`) : void 0,
|
|
63
63
|
keywords: c
|
|
64
|
-
}), m = [], h = e.queryAttachments(
|
|
64
|
+
}), m = [], h = e.queryAttachments(n).then((a) => a[l] || m).catch(() => m);
|
|
65
65
|
this.getAttachmentsPromise = h, this._setEmpty(!1);
|
|
66
|
-
const
|
|
67
|
-
t.destroyAll(),
|
|
66
|
+
const d = await h;
|
|
67
|
+
t.destroyAll(), d.length && t.addMany(d), this.getAttachmentsPromise = null, this._setEmpty(!this._hasContent);
|
|
68
68
|
}
|
|
69
69
|
_setEmpty(e) {
|
|
70
70
|
S(() => this.empty = e);
|
|
@@ -93,28 +93,28 @@ class E extends P {
|
|
|
93
93
|
return this.empty ? null : i`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`;
|
|
94
94
|
}
|
|
95
95
|
renderAttachmentsList(e) {
|
|
96
|
-
return i`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel ?? ""} interaction-mode=static selection-mode=none>${e.toArray().filter(Boolean).map((t) => this.renderAttachmentListItem(t))}</calcite-list>`;
|
|
96
|
+
return i`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel ?? ""} interaction-mode=static selection-mode=none>${this.getAttachmentsPromise ? i`<div class="loading-content"></div>` : e.toArray().filter(Boolean).map((t) => this.renderAttachmentListItem(t))}</calcite-list>`;
|
|
97
97
|
}
|
|
98
98
|
renderAttachmentsPreview(e) {
|
|
99
|
-
return i`<calcite-card-group .label=${this.messages?.componentLabel ?? ""}>${this.getAttachmentsPromise ? i`<calcite-card loading></calcite-card>` : e.toArray().filter(Boolean).map((t) => this.renderAttachmentPreviewItem(t))}</calcite-card-group>`;
|
|
99
|
+
return i`<calcite-card-group .label=${this.messages?.componentLabel ?? ""}>${this.getAttachmentsPromise ? i`<calcite-card loading><div class="loading-content"></div></calcite-card>` : e.toArray().filter(Boolean).map((t) => this.renderAttachmentPreviewItem(t))}</calcite-card-group>`;
|
|
100
100
|
}
|
|
101
101
|
renderAttachmentsCarousel(e) {
|
|
102
102
|
const t = e.toArray().filter(Boolean);
|
|
103
|
-
return i`<calcite-carousel .paginationDisabled=${t.length < 2} .label=${this.messages?.componentLabel ?? ""} pagination-position=top>${this.getAttachmentsPromise ? i`<calcite-carousel-item .label=${this.messages?.componentLabel ?? ""}><calcite-card loading></calcite-card></calcite-carousel-item>` : t.map((s) => i`<calcite-carousel-item .label=${s.name || this.messages?.noTitle || ""}>${this.renderAttachmentPreviewItem(s, !0)}</calcite-carousel-item>`)}</calcite-carousel>`;
|
|
103
|
+
return i`<calcite-carousel .paginationDisabled=${t.length < 2} .label=${this.messages?.componentLabel ?? ""} pagination-position=top>${this.getAttachmentsPromise ? i`<calcite-carousel-item .label=${this.messages?.componentLabel ?? ""}><calcite-card loading><div class="loading-content"></div></calcite-card></calcite-carousel-item>` : t.map((s) => i`<calcite-carousel-item .label=${s.name || this.messages?.noTitle || ""}>${this.renderAttachmentPreviewItem(s, !0)}</calcite-carousel-item>`)}</calcite-carousel>`;
|
|
104
104
|
}
|
|
105
105
|
renderAttachments() {
|
|
106
106
|
const { effectiveDisplayType: e, _attachmentInfos: t } = this;
|
|
107
107
|
return e === "carousel" ? this.renderAttachmentsCarousel(t) : e === "preview" ? this.renderAttachmentsPreview(t) : this.renderAttachmentsList(t);
|
|
108
108
|
}
|
|
109
109
|
renderAttachmentListItem(e) {
|
|
110
|
-
const { supportsResizeAttachments: t } = this, { contentType: s, name:
|
|
111
|
-
"item-link--list-icon": !
|
|
112
|
-
}))} slot=content-start href=${c ?? void 0 ??
|
|
110
|
+
const { supportsResizeAttachments: t } = this, { contentType: s, name: r, url: c, size: o } = e, l = 64, g = r || this.messages?.noTitle, n = v(s), m = this.getCSSTransform(e), h = m ? { transform: m, "image-orientation": "none" } : {}, d = t && w(s), a = i`<a class=${b($("item-link", "item-link--list", {
|
|
111
|
+
"item-link--list-icon": !d
|
|
112
|
+
}))} slot=content-start href=${c ?? void 0 ?? p} rel=noreferrer target=_blank>${d ? i`<img alt=${r ?? p} src=${`${c}${c?.includes("?") ? "&" : "?"}w=${l}&s=${o}`} style=${A(h)} title=${r ?? p}>` : i`<calcite-icon .icon=${n}></calcite-icon>`}</a>`, u = i`<calcite-link slot=content .href=${c ?? void 0} rel=noreferrer target=_blank>${g}</calcite-link>`;
|
|
113
113
|
return i`<calcite-list-item .label=${g}>${a}${u}</calcite-list-item>`;
|
|
114
114
|
}
|
|
115
115
|
renderAttachmentPreviewItem(e, t = !1) {
|
|
116
|
-
const { supportsResizeAttachments: s } = this, { contentType:
|
|
117
|
-
return i`<calcite-card .label=${
|
|
116
|
+
const { supportsResizeAttachments: s } = this, { contentType: r, name: c, url: o, size: l } = e, g = 225, n = c || this.messages?.noTitle, m = v(r), h = this.getCSSTransform(e), d = h ? { transform: h, "image-orientation": "none" } : {}, a = s && w(r), u = i`<a class=${b($("item-link", "item-link--preview"))} slot=thumbnail href=${o ?? void 0 ?? p} rel=noreferrer target=_blank aria-label=${n ?? p} title=${n ?? p}>${a ? i`<img alt=${n ?? p} src=${`${o}${o?.includes("?") ? "&" : "?"}w=${g}&s=${l}`} style=${A(d)}>` : i`<calcite-icon scale=l .icon=${m}></calcite-icon>`}</a>`;
|
|
117
|
+
return i`<calcite-card .label=${n}>${u}${(t || this.hidePreviewImageAttachmentName) && a ? null : i`<span class="item-description" slot=description>${n}</span>`}</calcite-card>`;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
k("arcgis-feature-attachments", E);
|
|
@@ -13,7 +13,7 @@ import type { State } from "@arcgis/core/popup/types.js";
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* > [!WARNING]
|
|
16
|
-
* > The Feature (next) component is the successor to the Feature component, provided to you early for testing and feedback. In version 6.0, the implementation of [arcgis-feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) will be updated under the hood to that of [arcgis-feature-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-next/), and this component will be removed. To update at version 6.0, simply remove `-next` from the component name.
|
|
16
|
+
* > The Feature (next) component is the successor to the Feature component, provided to you early for testing and feedback. It uses the new [FeatureModel](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureModel) to manage feature data and interactions, with action-related properties and improved accessibility features. In version 6.0, the implementation of [arcgis-feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) will be updated under the hood to that of [arcgis-feature-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-next/), and this component will be removed. To update at version 6.0, simply remove `-next` from the component name.
|
|
17
17
|
*
|
|
18
18
|
* The Feature (next) component displays a graphic according to its [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
|
|
19
19
|
* This component is useful in instances where you want to display information about a graphic but without
|
|
@@ -14,7 +14,7 @@ import { initializeProjection as K } from "@arcgis/core/applications/Components/
|
|
|
14
14
|
import { t as j } from "../../chunks/action-utils.js";
|
|
15
15
|
import { m as G } from "../../chunks/useViewModel.js";
|
|
16
16
|
import { renderingSanitizer as w } from "@arcgis/core/applications/Components/sanitizerUtils.js";
|
|
17
|
-
import { stripHTML as
|
|
17
|
+
import { stripHTML as b } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
18
18
|
import { substitute as u, formatNumber as C } from "@arcgis/core/intl.js";
|
|
19
19
|
import { u as W } from "../../chunks/useT9n.js";
|
|
20
20
|
import { when as X, watch as h } from "@arcgis/core/core/reactiveUtils.js";
|
|
@@ -73,7 +73,7 @@ class oe extends V {
|
|
|
73
73
|
}
|
|
74
74
|
get _headingLabel() {
|
|
75
75
|
const e = this._selectedFeatureHeading ?? this.heading;
|
|
76
|
-
return e ?
|
|
76
|
+
return e ? b(e) : void 0;
|
|
77
77
|
}
|
|
78
78
|
get _backLabel() {
|
|
79
79
|
const e = this._headingLabel, { messages: t } = this;
|
|
@@ -161,12 +161,8 @@ class oe extends V {
|
|
|
161
161
|
this._selectedFeatureLoading = e;
|
|
162
162
|
}
|
|
163
163
|
}),
|
|
164
|
-
X(() => [this.initialDisplayMode === "list" && !!this.viewModel?.selectedFeature, this.viewModel?.active], () =>
|
|
165
|
-
|
|
166
|
-
}),
|
|
167
|
-
h(() => [this.flowItems?.length, this.featureMenuOpen], () => {
|
|
168
|
-
this.setFocus();
|
|
169
|
-
}),
|
|
164
|
+
X(() => [this.initialDisplayMode === "list" && !!this.viewModel?.selectedFeature, this.viewModel?.active], () => this._setFocusIfTrapEnabled()),
|
|
165
|
+
h(() => [this.flowItems?.length, this.featureMenuOpen], () => this._setFocusIfTrapEnabled()),
|
|
170
166
|
h(() => this.viewModel?.selectedFeatureIndex, (e, t) => this._selectedFeatureIndexUpdated(e, t)),
|
|
171
167
|
h(() => this.viewModel?.view?.scale, () => this._viewScaleChange()),
|
|
172
168
|
h(() => this.viewModel?.view, (e, t) => t && this._viewChange()),
|
|
@@ -202,6 +198,9 @@ class oe extends V {
|
|
|
202
198
|
const { viewModel: e } = this, { featurePage: t, featuresPerPage: i, features: s } = e;
|
|
203
199
|
e.open && (this.initialDisplayMode === "list" || this.featureMenuOpen) && t != null && t * i < s.length && (e.featurePage = t + 1);
|
|
204
200
|
}
|
|
201
|
+
_setFocusIfTrapEnabled() {
|
|
202
|
+
this.focusTrapEnabled && this.setFocus();
|
|
203
|
+
}
|
|
205
204
|
_resolveSetFocusAnimationFrame() {
|
|
206
205
|
const e = this._setFocusAnimationFrameResolve;
|
|
207
206
|
this._setFocusAnimationFrameResolve = null, e?.();
|
|
@@ -288,7 +287,7 @@ class oe extends V {
|
|
|
288
287
|
_getActionLabel(e, t) {
|
|
289
288
|
if (e.id !== "zoom-to-feature")
|
|
290
289
|
return null;
|
|
291
|
-
const { messages: i } = this, s = t?.heading, a = t ? s &&
|
|
290
|
+
const { messages: i } = this, s = t?.heading, a = t ? s && b(s) : this._headingLabel;
|
|
292
291
|
return a ? u(i.zoomLabel ?? "", {
|
|
293
292
|
messages: i,
|
|
294
293
|
title: a
|
|
@@ -442,14 +441,14 @@ class oe extends V {
|
|
|
442
441
|
return this.headerActions.map((e) => this._renderHeaderAction(e)).toArray();
|
|
443
442
|
}
|
|
444
443
|
_renderContentFeature(e) {
|
|
445
|
-
const { headingLevel: t, hideCloseButton: i, _isCollapsed: s, _collapseEnabled: a, featureNavigationTop: o, initialDisplayMode: r, selectedFeature: l, hideHeading: d } = this, { active: c, selectedFeatureItem: f, content:
|
|
444
|
+
const { headingLevel: t, hideCloseButton: i, _isCollapsed: s, _collapseEnabled: a, featureNavigationTop: o, initialDisplayMode: r, selectedFeature: l, hideHeading: d } = this, { active: c, selectedFeatureItem: f, content: M } = this.viewModel, p = this._getHeading();
|
|
446
445
|
if (r === "list" && !l)
|
|
447
446
|
return null;
|
|
448
|
-
const F = !this._selectedFeaturePending && (f ? !f.content : !
|
|
447
|
+
const F = !this._selectedFeaturePending && (f ? !f.content : !M);
|
|
449
448
|
return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${x(I({
|
|
450
449
|
"content-feature": !0,
|
|
451
450
|
"flow-item-collapsed": s
|
|
452
|
-
}))} .closable=${!i} .closed=${!c} .collapsed=${s} .collapseDirection=${this.collapseDirection ?? (o ? "down" : "up")} .collapsible=${a} .headingLevel=${t} .selected=${e} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController || this._selectedFeatureLoading} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d && p ?
|
|
451
|
+
}))} .closable=${!i} .closed=${!c} .collapsed=${s} .collapseDirection=${this.collapseDirection ?? (o ? "down" : "up")} .collapsible=${a} .headingLevel=${t} .selected=${e} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController || this._selectedFeatureLoading} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d && p ? b(p) : void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d && p ? n`<div slot=heading><div .innerHTML=${w.sanitize(p ?? "") ?? ""}></div></div>` : null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${x(I("container", "content-container", {
|
|
453
452
|
"content-hidden": F
|
|
454
453
|
}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`;
|
|
455
454
|
}
|
|
@@ -470,13 +469,13 @@ class oe extends V {
|
|
|
470
469
|
return i?.size ? n`<calcite-notice class="diagnostics-notice" open kind=info scale=s><span slot=title>${e.maxRecordCountHeading}</span><div slot=message>${i.size <= ne ? this._renderDiagnosticsList(i) : this._renderDiagnosticsMultipleLayers()}</div></calcite-notice>` : null;
|
|
471
470
|
}
|
|
472
471
|
_renderFeatureMenuContainer() {
|
|
473
|
-
const { viewModel: e, hideCloseButton: t, featureMenuTitle: i, messages: s, initialDisplayMode: a, featureMenuOpen: o, _featureFlowItemSelected: r, _collapseEnabled: l, _isCollapsed: d, featureNavigationTop: c, headingLevel: f } = this, { active:
|
|
472
|
+
const { viewModel: e, hideCloseButton: t, featureMenuTitle: i, messages: s, initialDisplayMode: a, featureMenuOpen: o, _featureFlowItemSelected: r, _collapseEnabled: l, _isCollapsed: d, featureNavigationTop: c, headingLevel: f } = this, { active: M, features: p, streamingFeatures: F } = e, $ = i ?? s.selectFeature, A = this._backLabel;
|
|
474
473
|
if (a === "feature" && !o)
|
|
475
474
|
return null;
|
|
476
475
|
const O = !r;
|
|
477
476
|
return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${x(I({
|
|
478
477
|
"flow-item-collapsed": d
|
|
479
|
-
}))} .closable=${!t} .closed=${!
|
|
478
|
+
}))} .closable=${!t} .closed=${!M} .collapsed=${a === "list" && d} .collapseDirection=${this.collapseDirection ?? (c ? "down" : "up")} .collapsible=${a === "list" && l} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand, back: A }} .description=${this.hideFeatureMenuHeading ? void 0 : u(s.total ?? "", {
|
|
480
479
|
total: p.length
|
|
481
480
|
})} .heading=${this.hideFeatureMenuHeading ? void 0 : $} .headingLevel=${f} .loading=${e.waitingForResult} .selected=${O} @calciteFlowItemBack=${(N) => {
|
|
482
481
|
N.preventDefault(), this._handleFeatureMenuBack();
|
|
@@ -488,7 +487,7 @@ class oe extends V {
|
|
|
488
487
|
}, () => {
|
|
489
488
|
this._aggregatedFeaturesComponent.value?.next();
|
|
490
489
|
})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount, this._selectedAggregatedFeatureIndex)}</div>` : null;
|
|
491
|
-
return n`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${
|
|
490
|
+
return n`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${b(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${a ? void 0 : b(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${($) => {
|
|
492
491
|
$.preventDefault(), this._handleDrillInBackClick();
|
|
493
492
|
}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${a ? null : n`<div slot=heading><div .innerHTML=${w.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${w.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l ?? ""} title=${l ?? "" ?? g}></calcite-action>${p ? n`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${d ?? ""} title=${d ?? g}></calcite-action>` : null}${f && this._renderActionBar(e) || ""}<div class="container">${e}</div>${F}</calcite-flow-item>`;
|
|
494
493
|
}
|
|
@@ -474,6 +474,18 @@ export abstract class ArcgisSearch extends LitElement {
|
|
|
474
474
|
clear(): void;
|
|
475
475
|
/** Permanently destroy the component. */
|
|
476
476
|
destroy(): Promise<void>;
|
|
477
|
+
/**
|
|
478
|
+
* Returns a promise that resolves when the Search component has finished updating its default sources.
|
|
479
|
+
*
|
|
480
|
+
* Custom sources assigned through [sources](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-search/#sources) are not loaded by this method.
|
|
481
|
+
* Unavailable layer and table sources are omitted, so the promise may resolve with no default sources.
|
|
482
|
+
*
|
|
483
|
+
* @since 5.2
|
|
484
|
+
* @example
|
|
485
|
+
* const search = document.querySelector("arcgis-search");
|
|
486
|
+
* await search.onSourcesReady();
|
|
487
|
+
*/
|
|
488
|
+
onSourcesReady(): Promise<void>;
|
|
477
489
|
/**
|
|
478
490
|
* Depending on the sources specified, search() queries the feature layer(s) and/or performs
|
|
479
491
|
* address matching using any specified [locator(s)](https://developers.arcgis.com/javascript/latest/references/core/rest/locator/) and
|
|
@@ -86,6 +86,9 @@ class z extends f {
|
|
|
86
86
|
return this._suggestController !== t || (this._suggestController = void 0), null;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
+
async onSourcesReady() {
|
|
90
|
+
await this.viewModel.when();
|
|
91
|
+
}
|
|
89
92
|
loaded() {
|
|
90
93
|
this.listen("arcgisSelectResult", this._handleSelectResult), this.manager.onLifecycle(() => [
|
|
91
94
|
u(() => [this._searchResultRendererEl, this.viewModel?.defaultPopupTemplate], () => {
|
|
@@ -189,6 +189,14 @@ export abstract class ArcgisSelectionToolbar extends LitElement {
|
|
|
189
189
|
* @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
|
|
190
190
|
*/
|
|
191
191
|
accessor icon: IconName | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Indicates whether the selection toolbar will ignore layer visibility when determining selection results.
|
|
194
|
+
* Non-visible layers and layer views are typically excluded from selection results.
|
|
195
|
+
*
|
|
196
|
+
* @default false
|
|
197
|
+
* @since 5.2
|
|
198
|
+
*/
|
|
199
|
+
accessor ignoreLayerVisibility: boolean;
|
|
192
200
|
/** The component's default label. */
|
|
193
201
|
accessor label: string | undefined;
|
|
194
202
|
/**
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as v } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
3
|
+
import { css as y, html as s } from "lit";
|
|
4
4
|
import { keyed as p } from "lit/directives/keyed.js";
|
|
5
|
-
import { substitute as h, formatNumber as
|
|
6
|
-
import
|
|
7
|
-
import { LitElement as
|
|
5
|
+
import { substitute as h, formatNumber as T } from "@arcgis/core/intl.js";
|
|
6
|
+
import b from "@arcgis/core/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js";
|
|
7
|
+
import { LitElement as m, createEvent as u, nothing as a } from "@arcgis/lumina";
|
|
8
8
|
import { usePropertyChange as w } from "@arcgis/lumina/controllers";
|
|
9
9
|
import { reEmitEvent as d } from "@arcgis/lumina-toolkit/reEmitEvent";
|
|
10
10
|
import { u as M } from "../../chunks/useT9n.js";
|
|
11
11
|
import { m as O } from "../../chunks/useViewModel.js";
|
|
12
|
-
const C =
|
|
12
|
+
const C = y`:host{width:100%;display:flex;>*{align-items:center;align-self:center;height:100%;width:100%}}.root{display:flex;flex-direction:column}calcite-action-bar[layout=horizontal]{width:100%;calcite-chip{margin-inline-start:auto}}calcite-action-bar[layout=vertical]{height:100%;calcite-chip{margin-block-start:auto}}calcite-action-bar slot{align-items:center}calcite-dropdown:has(calcite-action:not([text-enabled])){align-self:center}calcite-action:not([text-enabled]){align-self:center}calcite-chip{display:flex;align-self:center;line-height:initial}calcite-dropdown{calcite-icon{margin-inline-start:var(--calcite-space-2xs)}}calcite-chip[closed]{display:inline-flex}calcite-progress{--calcite-progress-background-color: transparent}`, g = {
|
|
13
13
|
replace: "overwrite-features",
|
|
14
14
|
add: "cursor-plus",
|
|
15
15
|
remove: "cursor-minus"
|
|
16
|
-
}, S = O(
|
|
17
|
-
class $ extends
|
|
16
|
+
}, S = O(b);
|
|
17
|
+
class $ extends m {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this.viewModel = S(this), this.messages = M(), this.autoDestroyDisabled = !1, this.disabled = !1, this.icon = "selection-set", this.view = this.viewModel.view, this.activeOperation = this.viewModel.activeOperation, this.availableOperationTypes = ["replace", "add", "remove"], this.continuousSelectionEnabled = this.viewModel.continuousSelectionEnabled, this.defaultLassoToolOptions = this.viewModel.defaultLassoToolOptions, this.defaultOperationType = this.viewModel.defaultOperationType, this.defaultPolygonToolOptions = this.viewModel.defaultPolygonToolOptions, this.defaultPointToolOptions = this.viewModel.defaultPointToolOptions, this.defaultRectangleToolOptions = this.viewModel.defaultRectangleToolOptions, this.effectiveSelectionManager = this.viewModel.effectiveSelectionManager, this.effectiveSources = this.viewModel.effectiveSources, this.hideChip = !1, this.hideChipCloseButton = !1, this.hideLassoTool = !1, this.hideOperationTypeControls = !1, this.hidePanTool = !1, this.hidePolygonTool = !1, this.hidePointTool = !1, this.hideProgress = !1, this.hideRectangleTool = !1, this.layout = "horizontal", this.returnFeatureTitleFields = this.viewModel.returnFeatureTitleFields, this.selectionManager = this.viewModel.selectionManager, this.showTextLabels = !1, this.sources = this.viewModel.sources, this.toolConfigs = this.viewModel.toolConfigs, this.visualScale = "m", this.arcgisBeforeActivate = d(() => this.viewModel, "before-activate"), this.arcgisClear = u(), this.arcgisComplete = d(() => this.viewModel, "complete"), this.arcgisPropertyChange = w()("activeOperation", "state"), this.arcgisReady = u(), this.arcgisSelectionChange = d(() => this.viewModel, "selection-change");
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
|
-
this.properties = { _effectiveDisabled: 16, _effectiveOperationType: 16, _processing: 16, autoDestroyDisabled: 5, disabled: 7, icon: 1, label: 1, referenceElement: 1, view: 0, activeOperation: 32, availableOperationTypes: 0, continuousSelectionEnabled: 5, defaultLassoToolOptions: 0, defaultOperationType: 1, defaultPolygonToolOptions: 0, defaultPointToolOptions: 0, defaultRectangleToolOptions: 0, effectiveSelectionManager: 32, effectiveSources: 32, hideChip: 5, hideChipCloseButton: 5, hideLassoTool: 5, hideOperationTypeControls: 5, hidePanTool: 5, hidePolygonTool: 5, hidePointTool: 5, hideProgress: 5, hideRectangleTool: 5, layerPreferenceEnabled: 5, layout: 1, returnFeatureTitleFields: 5, returnGeometryDisabled: 5, selectionManager: 0, showTextLabels: 5, sources: 0, state: 32, syncResultsDisabled: 5, syncWhileDrawing: 5, toolConfigs: 0, visualScale: 1 };
|
|
22
|
+
this.properties = { _effectiveDisabled: 16, _effectiveOperationType: 16, _processing: 16, autoDestroyDisabled: 5, disabled: 7, icon: 1, label: 1, referenceElement: 1, view: 0, activeOperation: 32, availableOperationTypes: 0, continuousSelectionEnabled: 5, defaultLassoToolOptions: 0, defaultOperationType: 1, defaultPolygonToolOptions: 0, defaultPointToolOptions: 0, defaultRectangleToolOptions: 0, effectiveSelectionManager: 32, effectiveSources: 32, hideChip: 5, hideChipCloseButton: 5, hideLassoTool: 5, hideOperationTypeControls: 5, hidePanTool: 5, hidePolygonTool: 5, hidePointTool: 5, hideProgress: 5, hideRectangleTool: 5, ignoreLayerVisibility: 5, layerPreferenceEnabled: 5, layout: 1, returnFeatureTitleFields: 5, returnGeometryDisabled: 5, selectionManager: 0, showTextLabels: 5, sources: 0, state: 32, syncResultsDisabled: 5, syncWhileDrawing: 5, toolConfigs: 0, visualScale: 1 };
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
25
|
this.styles = C;
|
|
@@ -33,6 +33,12 @@ class $ extends b {
|
|
|
33
33
|
get _processing() {
|
|
34
34
|
return !!this.activeOperation?.processingFinalSelection;
|
|
35
35
|
}
|
|
36
|
+
get ignoreLayerVisibility() {
|
|
37
|
+
return this.viewModel.ignoreLayerVisibility;
|
|
38
|
+
}
|
|
39
|
+
set ignoreLayerVisibility(e) {
|
|
40
|
+
this.viewModel.ignoreLayerVisibility = e;
|
|
41
|
+
}
|
|
36
42
|
get layerPreferenceEnabled() {
|
|
37
43
|
return !this.viewModel.layerViewPreferenceEnabled;
|
|
38
44
|
}
|
|
@@ -110,7 +116,7 @@ class $ extends b {
|
|
|
110
116
|
const { layout: t, messages: i, visualScale: o } = this, l = o === "l" ? 999 : 99;
|
|
111
117
|
return i.countTruncated && e > l && t === "vertical" ? h(i.countTruncated, {
|
|
112
118
|
count: l
|
|
113
|
-
}) :
|
|
119
|
+
}) : T(e);
|
|
114
120
|
}
|
|
115
121
|
_getTooltipForChip(e) {
|
|
116
122
|
const { messages: t } = this;
|
|
@@ -128,7 +134,7 @@ class $ extends b {
|
|
|
128
134
|
#s() {
|
|
129
135
|
return [
|
|
130
136
|
this.#a(),
|
|
131
|
-
this.#
|
|
137
|
+
this.#n(),
|
|
132
138
|
this.#c(),
|
|
133
139
|
this.#d(),
|
|
134
140
|
this.#h()
|
|
@@ -152,13 +158,13 @@ class $ extends b {
|
|
|
152
158
|
title: e
|
|
153
159
|
});
|
|
154
160
|
}
|
|
155
|
-
#
|
|
161
|
+
#r() {
|
|
156
162
|
if (this.hideChip)
|
|
157
163
|
return;
|
|
158
164
|
const { effectiveSelectionManager: e } = this, t = e?.count ?? 0, i = this._getTextForChip(t), o = !this.hideChipCloseButton && t > 0;
|
|
159
165
|
return s`<calcite-chip appearance=outline .closable=${o} .disabled=${this._effectiveDisabled || t === 0} .label=${i} .scale=${this.visualScale} title=${this._getTooltipForChip(t) ?? a} @calciteChipClose=${this._handleClearSelection}>${i}</calcite-chip>`;
|
|
160
166
|
}
|
|
161
|
-
#
|
|
167
|
+
#n() {
|
|
162
168
|
if (this.hidePointTool)
|
|
163
169
|
return;
|
|
164
170
|
const { messages: e } = this;
|
|
@@ -186,8 +192,8 @@ class $ extends b {
|
|
|
186
192
|
const { availableOperationTypes: e } = this;
|
|
187
193
|
if (this.hideOperationTypeControls || !e.length)
|
|
188
194
|
return;
|
|
189
|
-
const { _effectiveOperationType: t, showTextLabels: i, visualScale: o } = this, l = g[t],
|
|
190
|
-
return p("toggle-group", s`<calcite-action-group><calcite-dropdown overlay-positioning=fixed placement=bottom-start .scale=${o}><calcite-action class=tool-button .disabled=${this._effectiveDisabled} .icon=${l} .scale=${o} slot=trigger .text=${
|
|
195
|
+
const { _effectiveOperationType: t, showTextLabels: i, visualScale: o } = this, l = g[t], r = this._getTextForSelectionOperationType(t), n = this._getLabelForSelectionOperationType(t);
|
|
196
|
+
return p("toggle-group", s`<calcite-action-group><calcite-dropdown overlay-positioning=fixed placement=bottom-start .scale=${o}><calcite-action class=tool-button .disabled=${this._effectiveDisabled} .icon=${l} .scale=${o} slot=trigger .text=${r ?? ""} .textEnabled=${i} title=${n ?? a}><calcite-icon icon=chevron-down scale=s></calcite-icon></calcite-action><calcite-dropdown-group>${e.map((c) => this.#u(c))}</calcite-dropdown-group></calcite-dropdown></calcite-action-group>`);
|
|
191
197
|
}
|
|
192
198
|
#u(e) {
|
|
193
199
|
return s`<calcite-dropdown-item .iconStart=${g[e]} .selected=${this.defaultOperationType === e} @calciteDropdownItemSelect=${() => this.defaultOperationType = e}>${this._getLabelForSelectionOperationType(e)}</calcite-dropdown-item>`;
|
|
@@ -205,11 +211,11 @@ class $ extends b {
|
|
|
205
211
|
});
|
|
206
212
|
}
|
|
207
213
|
#t(e) {
|
|
208
|
-
const { active: t, disabled: i, icon: o, onclick: l, text:
|
|
209
|
-
return s`<calcite-action .active=${t} class=tool-button .disabled=${i} .icon=${o} @click=${l} .text=${
|
|
214
|
+
const { active: t, disabled: i, icon: o, onclick: l, text: r, title: n } = e, { showTextLabels: c, visualScale: f } = this;
|
|
215
|
+
return s`<calcite-action .active=${t} class=tool-button .disabled=${i} .icon=${o} @click=${l} .text=${r} .textEnabled=${c} title=${n ?? a} .scale=${f}></calcite-action>`;
|
|
210
216
|
}
|
|
211
217
|
render() {
|
|
212
|
-
return s`<div><calcite-action-bar expand-toggle-disabled .layout=${this.layout} overflow-mode=none .scale=${this.visualScale}>${this.#p()}${this.#o()}${this.#
|
|
218
|
+
return s`<div><calcite-action-bar expand-toggle-disabled .layout=${this.layout} overflow-mode=none .scale=${this.visualScale}>${this.#p()}${this.#o()}${this.#r()}</calcite-action-bar>${this.#i()}</div>`;
|
|
213
219
|
}
|
|
214
220
|
}
|
|
215
221
|
v("arcgis-selection-toolbar", $);
|