@arcgis/map-components 5.2.0-next.162 → 5.2.0-next.164
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/{4KEMJ2WV.js → 4TFO5B3N.js} +1 -1
- package/dist/cdn/67UW6MJM.js +2 -0
- package/dist/cdn/{G3DWZLJP.js → 7XO4NAD5.js} +1 -1
- package/dist/cdn/{VF23MMWZ.js → AALEZAW5.js} +1 -1
- package/dist/cdn/RV2FLHPM.js +2 -0
- package/dist/cdn/WEY7JGX2.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-daylight/customElement.js +2 -1
- 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-sketch/customElement.d.ts +308 -30
- package/dist/components/arcgis-sketch/customElement.js +48 -21
- package/dist/components/arcgis-time-bar/customElement.d.ts +484 -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 +2 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
- 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 +2 -2
- 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/7PMSUAOO.js +0 -2
- package/dist/cdn/K664I5PA.js +0 -2
- package/dist/cdn/S3LQLHD6.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], () => {
|