@arcgis/map-components 5.2.0-next.163 → 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.
Files changed (31) hide show
  1. package/dist/cdn/67UW6MJM.js +2 -0
  2. package/dist/cdn/{VF23MMWZ.js → AALEZAW5.js} +1 -1
  3. package/dist/cdn/RV2FLHPM.js +2 -0
  4. package/dist/cdn/WEY7JGX2.js +2 -0
  5. package/dist/cdn/index.js +1 -1
  6. package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
  7. package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
  8. package/dist/components/arcgis-features-next/customElement.js +14 -15
  9. package/dist/components/arcgis-search/customElement.d.ts +12 -0
  10. package/dist/components/arcgis-search/customElement.js +3 -0
  11. package/dist/components/arcgis-time-bar/customElement.d.ts +484 -409
  12. package/dist/components/arcgis-time-bar/types.d.ts +36 -15
  13. package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
  14. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
  15. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
  16. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
  17. package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
  18. package/dist/docs/api.json +1 -1
  19. package/dist/docs/docs.json +1 -1
  20. package/dist/docs/vscode.html-custom-data.json +1 -1
  21. package/dist/docs/web-types.json +1 -1
  22. package/dist/loader.js +1 -1
  23. package/dist/types/lumina.d.ts +1 -1
  24. package/dist/types/preact.d.ts +1 -1
  25. package/dist/types/react.d.ts +1 -1
  26. package/dist/types/stencil.d.ts +1 -1
  27. package/package.json +6 -6
  28. package/dist/cdn/7PMSUAOO.js +0 -2
  29. package/dist/cdn/K664I5PA.js +0 -2
  30. package/dist/cdn/S3LQLHD6.js +0 -2
  31. package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
@@ -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 M } from "@arcgis/core/applications/Components/stringUtils.js";
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 ? M(e) : void 0;
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
- this.setFocus();
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 && M(s) : this._headingLabel;
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: b } = this.viewModel, p = this._getHeading();
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 : !b);
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 ? M(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", {
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: b, features: p, streamingFeatures: F } = e, $ = i ?? s.selectFeature, A = this._backLabel;
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=${!b} .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 ?? "", {
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=${M(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${a ? void 0 : M(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${($) => {
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], () => {