@arcgis/map-components 5.2.0-next.97 → 5.2.0-next.99

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.
@@ -8,34 +8,34 @@ import K from "@arcgis/core/webdoc/Widgets.js";
8
8
  import { b as H, d as G, a as L } from "../../chunks/async-utils.js";
9
9
  import { c as U, e as Y, g as F, i as C, h as J, j as Q, k as X, l as Z, a as tt } from "../../chunks/dateUtils.js";
10
10
  import { convertDateFormatToIntlOptions as b } from "@arcgis/core/intl.js";
11
- import { r as et, s as it } from "../../chunks/time-utils.js";
11
+ import { r as et, u as it, s as st } from "../../chunks/time-utils.js";
12
12
  import k from "@arcgis/core/time/TimeInterval.js";
13
- import { getTimeSliderSettingsFromWebDocument as st } from "@arcgis/core/support/timeUtils.js";
14
- import { log as nt } from "@arcgis/toolkit/log";
15
- import { property as l, subclass as at } from "@arcgis/core/core/accessorSupport/decorators.js";
13
+ import { getTimeSliderSettingsFromWebDocument as nt } from "@arcgis/core/support/timeUtils.js";
14
+ import { log as at } from "@arcgis/toolkit/log";
15
+ import { property as l, subclass as ot } from "@arcgis/core/core/accessorSupport/decorators.js";
16
16
  import { watch as w, whenOnce as O } from "@arcgis/core/core/reactiveUtils.js";
17
- import { LitElement as ot, createEvent as rt } from "@arcgis/lumina";
18
- import { createRef as lt, ref as A } from "lit/directives/ref.js";
19
- import { getSlotAssignedElements as ut } from "@arcgis/toolkit/dom/slots";
20
- import { m as mt } from "../../chunks/useViewModel.js";
21
- import { useDirection as ct, usePropertyChange as ht } from "@arcgis/lumina/controllers";
22
- import { u as dt } from "../../chunks/useT9n.js";
17
+ import { LitElement as rt, createEvent as lt } from "@arcgis/lumina";
18
+ import { createRef as ut, ref as A } from "lit/directives/ref.js";
19
+ import { getSlotAssignedElements as mt } from "@arcgis/toolkit/dom/slots";
20
+ import { m as ct } from "../../chunks/useViewModel.js";
21
+ import { useDirection as ht, usePropertyChange as dt } from "@arcgis/lumina/controllers";
22
+ import { u as vt } from "../../chunks/useT9n.js";
23
23
  const B = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap();
24
- function vt(t) {
25
- const { locale: e, formatOptions: n } = t, a = yt(n), u = new Intl.DateTimeFormat(e, a);
24
+ function pt(t) {
25
+ const { locale: e, formatOptions: n } = t, a = wt(n), u = new Intl.DateTimeFormat(e, a);
26
26
  return B.set(t, u), u;
27
27
  }
28
- function pt(t) {
28
+ function ft(t) {
29
29
  const { locale: e, formatOptions: n } = t, a = new Intl.NumberFormat(e, n);
30
30
  return I.set(t, a), a;
31
31
  }
32
- function ft(t) {
33
- return B.get(t) ?? vt(t);
34
- }
35
32
  function gt(t) {
36
- return I.get(t) ?? pt(t);
33
+ return B.get(t) ?? pt(t);
37
34
  }
38
35
  function yt(t) {
36
+ return I.get(t) ?? ft(t);
37
+ }
38
+ function wt(t) {
39
39
  return t.timeZone ? {
40
40
  ...t,
41
41
  timeZone: et(t.timeZone)
@@ -51,7 +51,7 @@ const i = (t, e, n) => ({ minorTick: t, majorTick: e, majorTickFormat: n }), s =
51
51
  m: { month: "short" },
52
52
  my: { month: "short", year: "numeric" },
53
53
  y: { year: "numeric" }
54
- }, wt = [
54
+ }, xt = [
55
55
  i({ value: 1, unit: "milliseconds" }, { value: 20, unit: "milliseconds" }, s.sf),
56
56
  i({ value: 2, unit: "milliseconds" }, { value: 50, unit: "milliseconds" }, s.sf),
57
57
  i({ value: 5, unit: "milliseconds" }, { value: 100, unit: "milliseconds" }, s.sf),
@@ -103,8 +103,8 @@ const i = (t, e, n) => ({ minorTick: t, majorTick: e, majorTickFormat: n }), s =
103
103
  i({ value: 500, unit: "centuries" }, { value: 1e4, unit: "centuries" }, s.y),
104
104
  i({ value: 1e3, unit: "centuries" }, { value: 2e4, unit: "centuries" }, s.y)
105
105
  ];
106
- function xt(t) {
107
- return wt.map(({ minorTick: e, majorTick: n, majorTickFormat: a }, u) => {
106
+ function _t(t) {
107
+ return xt.map(({ minorTick: e, majorTick: n, majorTickFormat: a }, u) => {
108
108
  const c = new k(e), f = new k(n), m = c.toMilliseconds(), g = {
109
109
  ...a,
110
110
  timeZone: t
@@ -112,12 +112,12 @@ function xt(t) {
112
112
  return { minor: c, major: f, duration: m, format: g, index: u };
113
113
  });
114
114
  }
115
- var _t = Object.defineProperty, Et = Object.getOwnPropertyDescriptor, N = (t) => {
115
+ var Et = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, N = (t) => {
116
116
  throw TypeError(t);
117
117
  }, r = (t, e, n, a) => {
118
- for (var u = a > 1 ? void 0 : a ? Et(e, n) : e, c = t.length - 1, f; c >= 0; c--)
118
+ for (var u = a > 1 ? void 0 : a ? bt(e, n) : e, c = t.length - 1, f; c >= 0; c--)
119
119
  (f = t[c]) && (u = (a ? f(e, n, u) : f(u)) || u);
120
- return a && u && _t(e, n, u), u;
120
+ return a && u && Et(e, n, u), u;
121
121
  }, j = (t, e, n) => e.has(t) || N("Cannot " + n), M = (t, e, n) => (j(t, e, "read from private field"), n ? n.call(t) : e.get(t)), R = (t, e, n) => e.has(t) ? N("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), p = (t, e, n) => (j(t, e, "access private method"), n), _, h, D, $, E, T, P;
122
122
  let o = class extends V {
123
123
  constructor() {
@@ -190,7 +190,7 @@ let o = class extends V {
190
190
  return (this.fullTimeExtent?.start?.getFullYear() ?? 0) < 0 ? "short" : void 0;
191
191
  }
192
192
  get interactive() {
193
- return !(this.disabled || this.state === "disabled");
193
+ return !(this.disabled || this.state === "disabled" || this.timeZone === it);
194
194
  }
195
195
  get isOutOfRange() {
196
196
  const { timeExtent: t, fullTimeExtent: e } = this, { start: n, end: a } = e ?? {};
@@ -209,16 +209,16 @@ let o = class extends V {
209
209
  return this.fullTimeExtent ? this._animationController ? "playing" : "ready" : "disabled";
210
210
  }
211
211
  get tickFormats() {
212
- return xt(this.timeZone);
212
+ return _t(this.timeZone);
213
213
  }
214
214
  get timeZone() {
215
- return this._userTimeZone ?? this.viewTimeZone ?? it;
215
+ return this._userTimeZone ?? this.viewTimeZone ?? st;
216
216
  }
217
217
  set timeZone(t) {
218
218
  this._userTimeZone = t ?? void 0;
219
219
  }
220
220
  get viewTimeZone() {
221
- return this.view?.type === "2d" ? this.view.timeZone : void 0;
221
+ return this.view?.timeZone;
222
222
  }
223
223
  //#endregion
224
224
  //#region Public Methods
@@ -313,7 +313,7 @@ let o = class extends V {
313
313
  (async () => {
314
314
  if (await O(() => this.view?.ready, { signal: M(this, _).signal }), this.loadPersistedSettingsDisabled)
315
315
  return;
316
- const t = await st(
316
+ const t = await nt(
317
317
  this.view?.map,
318
318
  M(this, _).signal
319
319
  );
@@ -349,10 +349,10 @@ let o = class extends V {
349
349
  t.widgets ??= new K(), t.widgets.timeSlider = e;
350
350
  }
351
351
  _formatDate(t, e) {
352
- return ft({ locale: this.locale, formatOptions: e }).format(t);
352
+ return gt({ locale: this.locale, formatOptions: e }).format(t);
353
353
  }
354
354
  _formatNumber(t, e) {
355
- return gt({ locale: this.locale, formatOptions: e }).format(t);
355
+ return yt({ locale: this.locale, formatOptions: e }).format(t);
356
356
  }
357
357
  //#endregion
358
358
  };
@@ -363,7 +363,7 @@ D = async function() {
363
363
  const { view: t } = this, e = this._animationController?.signal;
364
364
  await Promise.all([G(this.playRate, e), t && O(() => !t.updating, e)]);
365
365
  } catch (t) {
366
- L(t) || nt("error", "arcgis-slider-time", "animation error", { detail: { error: t } }), this._animationController = void 0;
366
+ L(t) || at("error", "arcgis-slider-time", "animation error", { detail: { error: t } }), this._animationController = void 0;
367
367
  return;
368
368
  }
369
369
  p(this, h, E).call(this, { forward: !0, allowRestart: !1 }), this._animationController && p(this, h, D).call(this);
@@ -495,20 +495,20 @@ r([
495
495
  l()
496
496
  ], o.prototype, "viewTimeZone", 1);
497
497
  o = r([
498
- at("components.time-bar.TimeBarViewModel")
498
+ ot("components.time-bar.TimeBarViewModel")
499
499
  ], o);
500
- const bt = z`:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out;--arcgis-time-bar-shadow: none}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: var(--arcgis-time-bar-shadow);--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`, Tt = mt(o);
501
- class St extends ot {
500
+ const Tt = z`:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out;--arcgis-time-bar-shadow: none}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: var(--arcgis-time-bar-shadow);--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`, St = ct(o);
501
+ class Mt extends rt {
502
502
  constructor() {
503
- super(...arguments), this._viewModel = Tt(this), this.messages = dt({ name: "time-bar", blocking: !0 }), this.#t = lt(), this.#e = ct(), this.#i = (e) => {
503
+ super(...arguments), this._viewModel = St(this), this.messages = vt({ name: "time-bar", blocking: !0 }), this.#t = ut(), this.#e = ht(), this.#i = (e) => {
504
504
  this._settingsActionElement = e;
505
- }, this.autoDestroyDisabled = !1, this.disabled = this._viewModel.disabled, this.effectiveStops = this._viewModel.effectiveStops, this.format = this._viewModel.format, this.fullTimeExtent = this._viewModel.fullTimeExtent, this.icon = "clock", this.loadPersistedSettingsDisabled = this._viewModel.loadPersistedSettingsDisabled, this.loop = this._viewModel.loop, this.mode = this._viewModel.mode, this.playRate = this._viewModel.playRate, this.savePersistedSettingsDisabled = this._viewModel.savePersistedSettingsDisabled, this.showNext = !1, this.showPlay = !1, this.showPrevious = !1, this.showSettings = !1, this.state = this._viewModel.state, this.stops = this._viewModel.stops, this.timeExtent = this._viewModel.timeExtent, this.timeZone = this._viewModel.timeZone, this.toolbarKind = "floating", this.view = this._viewModel.view, this.arcgisPropertyChange = ht()("effectiveStops", "fullTimeExtent", "state", "timeExtent"), this.arcgisReady = rt();
505
+ }, this.autoDestroyDisabled = !1, this.disabled = this._viewModel.disabled, this.effectiveStops = this._viewModel.effectiveStops, this.format = this._viewModel.format, this.fullTimeExtent = this._viewModel.fullTimeExtent, this.icon = "clock", this.loadPersistedSettingsDisabled = this._viewModel.loadPersistedSettingsDisabled, this.loop = this._viewModel.loop, this.mode = this._viewModel.mode, this.playRate = this._viewModel.playRate, this.savePersistedSettingsDisabled = this._viewModel.savePersistedSettingsDisabled, this.showNext = !1, this.showPlay = !1, this.showPrevious = !1, this.showSettings = !1, this.state = this._viewModel.state, this.stops = this._viewModel.stops, this.timeExtent = this._viewModel.timeExtent, this.timeZone = this._viewModel.timeZone, this.toolbarKind = "floating", this.view = this._viewModel.view, this.arcgisPropertyChange = dt()("effectiveStops", "fullTimeExtent", "state", "timeExtent"), this.arcgisReady = lt();
506
506
  }
507
507
  static {
508
508
  this.properties = { _settingsActionElement: 16, autoDestroyDisabled: 5, disabled: 5, effectiveStops: 32, format: 1, fullTimeExtent: 0, icon: 1, label: 1, loadPersistedSettingsDisabled: 5, loop: 5, messageOverrides: 0, mode: 1, playRate: 9, referenceElement: 1, savePersistedSettingsDisabled: 5, showNext: 5, showPlay: 5, showPrevious: 5, showSettings: 5, state: 32, stops: 0, timeExtent: 0, timeZone: 1, toolbarKind: 1, view: 0 };
509
509
  }
510
510
  static {
511
- this.styles = bt;
511
+ this.styles = Tt;
512
512
  }
513
513
  #t;
514
514
  #e;
@@ -540,7 +540,7 @@ class St extends ot {
540
540
  #m(e) {
541
541
  const { currentTarget: n } = e, a = (
542
542
  // prioritizes slotted element (if it exists)
543
- ut(n).at(0) ?? // fallback to default label
543
+ mt(n).at(0) ?? // fallback to default label
544
544
  n.querySelector("arcgis-time-bar-extent")
545
545
  );
546
546
  a && (a.viewModel = this._viewModel);
@@ -581,7 +581,7 @@ class St extends ot {
581
581
  return v`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent class="label" .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`;
582
582
  }
583
583
  }
584
- W("arcgis-time-bar", St);
584
+ W("arcgis-time-bar", Mt);
585
585
  export {
586
- St as ArcgisTimeBar
586
+ Mt as ArcgisTimeBar
587
587
  };
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as u } from "../../chunks/runtime.js";
3
- import m from "@arcgis/core/networks/support/UNTraceConfiguration.js";
4
- import { LitElement as d, createEvent as h } from "@arcgis/lumina";
2
+ import { c as d } from "../../chunks/runtime.js";
3
+ import c from "@arcgis/core/networks/support/UNTraceConfiguration.js";
4
+ import { LitElement as m, createEvent as h } from "@arcgis/lumina";
5
5
  import { u as b } from "../../chunks/useT9n.js";
6
6
  import { css as g, html as r } from "lit";
7
- import { log as c } from "@arcgis/toolkit/log";
7
+ import { log as l } from "@arcgis/toolkit/log";
8
8
  import { usePropertyChange as f } from "@arcgis/lumina/controllers";
9
9
  import { q as k } from "../../chunks/layer-utils.js";
10
10
  const w = g`:host{height:100%;flex-grow:1}.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-space-sm)}.key-value-pair__key{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3)}.key-value-pair__value{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-input,calcite-label,calcite-notice){margin:0 var(--calcite-space-md) var(--calcite-space-md)}calcite-block>:last-child{margin-bottom:0}calcite-block calcite-input-message{padding:var(--calcite-space-sm) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}#subnetwork-info-block{margin:var(--calcite-space-md) var(--calcite-space-md) 0}.inline-loader{--calcite-loader-spacing: var(--calcite-space-md)}`, C = 20, p = /* @__PURE__ */ new Set(["subnetwork", "subnetwork-controller", "upstream", "downstream", "isolation"]);
11
- class N extends d {
11
+ class N extends m {
12
12
  constructor() {
13
13
  super(...arguments), this._messages = b({ blocking: !0 }), this._subnetworkNamesState = "ready", this._compatibleSubnetworkNames = [], this.traceConfigurations = [], this.hideSubnetworkInfo = !1, this.hideErrors = !1, this.state = "ready", this.arcgisPropertyChange = f()("selectedNamedTraceConfiguration", "traceConfiguration"), this.arcgisError = h();
14
14
  }
@@ -29,11 +29,11 @@ class N extends d {
29
29
  return !!e?.traceConfiguration?.subnetworkName && e?.traceType === "subnetwork";
30
30
  }
31
31
  willUpdate(e) {
32
- e.has("traceConfigurations") && this.#d(), e.has("selectedNamedTraceConfiguration") && this.#o(), e.has("utilityNetwork") && this.#m();
32
+ e.has("traceConfigurations") && this.#m(), e.has("selectedNamedTraceConfiguration") && this.#o(), e.has("utilityNetwork") && this.#d();
33
33
  }
34
34
  async #o() {
35
35
  const { selectedNamedTraceConfiguration: e, _messages: t } = this;
36
- if (!(e?.traceConfiguration instanceof m)) {
36
+ if (!(e?.traceConfiguration instanceof c)) {
37
37
  this.#t(t.errors.noTraceConfiguration), this.traceConfiguration = void 0, this.arcgisPropertyChange.emit({ name: "traceConfiguration" });
38
38
  return;
39
39
  }
@@ -49,7 +49,7 @@ class N extends d {
49
49
  const { _subnetworksTable: e } = this;
50
50
  if (!e)
51
51
  return;
52
- const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (s, n, l) => n === 0 || s.getAttribute(t.name) !== l[n - 1].getAttribute(t.name), a = e.createQuery();
52
+ const t = e.fieldsIndex.get("SUBNETWORKNAME"), i = (s, n, u) => n === 0 || s.getAttribute(t.name) !== u[n - 1].getAttribute(t.name), a = e.createQuery();
53
53
  a.gdbVersion = this.utilityNetwork?.gdbVersion, a.where = this.#l(), a.outFields = [t.name], a.orderByFields = [t.name];
54
54
  const { features: o } = await k(e, a, void 0, !1);
55
55
  this._compatibleSubnetworkNames = o.filter(i).map((s) => s.getAttribute(t.name));
@@ -66,14 +66,14 @@ class N extends d {
66
66
  }
67
67
  this.#i(), this.selectedNamedTraceConfiguration = t;
68
68
  }
69
- #m() {
69
+ #d() {
70
70
  this.#e = void 0, this._subnetworksTable = void 0, this._compatibleSubnetworkNames = [];
71
71
  }
72
- #d() {
73
- this.traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this.traceConfigurations.length ? (this.#i(), this.selectedNamedTraceConfiguration = this.traceConfigurations.at(0), this.#o()) : this.#t(this._messages.errors.noTraceConfigurations);
72
+ #m() {
73
+ this.traceConfiguration = void 0, this.selectedNamedTraceConfiguration = void 0, this.traceConfigurations.length ? (this.#i(), this.selectedNamedTraceConfiguration = this.traceConfigurations.find((e) => e.traceConfiguration instanceof c), this.#o()) : this.#t(this._messages.errors.noTraceConfigurations);
74
74
  }
75
75
  #t(e) {
76
- c("error", this, e), this.error = e, this.state = "error", this.arcgisError.emit();
76
+ l("error", this, e), this.error = e, this.state = "error", this.arcgisError.emit();
77
77
  }
78
78
  #i() {
79
79
  this.error = void 0, this.state = "ready";
@@ -110,7 +110,7 @@ class N extends d {
110
110
  return this.traceConfiguration = void 0, this.#t(this._messages.errors.noTraceConfiguration), null;
111
111
  this.#i();
112
112
  const { domainNetworkName: i, tierName: a, targetTierName: o } = t.traceConfiguration;
113
- return !i && !a && !o ? (c("warn", this, "`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."), null) : r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><div class="subnetwork-details">${i ? this.#a(e.headings.domainNetwork, i) : null}${a ? this.#a(e.headings.tier, a) : null}${o ? this.#a(e.headings.targetTier, o) : null}</div></calcite-block>`;
113
+ return !i && !a && !o ? (l("warn", this, "`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."), null) : r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><div class="subnetwork-details">${i ? this.#a(e.headings.domainNetwork, i) : null}${a ? this.#a(e.headings.tier, a) : null}${o ? this.#a(e.headings.targetTier, o) : null}</div></calcite-block>`;
114
114
  }
115
115
  #k() {
116
116
  const { _messages: e } = this, t = e.labels.subnetworkName;
@@ -131,7 +131,7 @@ class N extends d {
131
131
  return r`${this.#g()}${i}`;
132
132
  }
133
133
  }
134
- u("arcgis-utility-network-trace-configuration-picker", N);
134
+ d("arcgis-utility-network-trace-configuration-picker", N);
135
135
  export {
136
136
  N as ArcgisUtilityNetworkTraceConfigurationPicker
137
137
  };