@arcgis/map-components 6.0.0-next.6 → 6.0.0-next.8

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 (34) hide show
  1. package/dist/cdn/43ETXXS2.js +2 -0
  2. package/dist/cdn/{IDIAWXUO.js → 6XDLG2SC.js} +1 -1
  3. package/dist/cdn/7HS2SX6W.js +2 -0
  4. package/dist/cdn/{VOBRCUIE.js → 7ODW3J2D.js} +1 -1
  5. package/dist/cdn/MSGW4PYB.js +2 -0
  6. package/dist/cdn/Q3B3NI7P.js +2 -0
  7. package/dist/cdn/XZDVW553.js +2 -0
  8. package/dist/cdn/index.js +1 -1
  9. package/dist/components/arcgis-editor/customElement.d.ts +10 -0
  10. package/dist/components/arcgis-editor/customElement.js +3 -0
  11. package/dist/components/arcgis-exploratory-analysis/customElement.d.ts +7 -0
  12. package/dist/components/arcgis-exploratory-analysis/customElement.js +51 -51
  13. package/dist/components/arcgis-features-next/customElement.js +102 -92
  14. package/dist/components/arcgis-map/customElement.d.ts +2 -2
  15. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
  16. package/dist/components/arcgis-popup/customElement.js +26 -22
  17. package/dist/components/arcgis-time-bar/customElement.js +23 -24
  18. package/dist/components/arcgis-time-bar-slider/customElement.js +46 -45
  19. package/dist/components/arcgis-track/customElement.d.ts +1 -1
  20. package/dist/docs/api.json +1 -1
  21. package/dist/docs/docs.json +1 -1
  22. package/dist/docs/vscode.html-custom-data.json +1 -1
  23. package/dist/docs/web-types.json +1 -1
  24. package/dist/loader.js +2 -2
  25. package/dist/types/lumina.d.ts +1 -1
  26. package/dist/types/preact.d.ts +1 -1
  27. package/dist/types/react.d.ts +1 -1
  28. package/dist/types/stencil.d.ts +1 -1
  29. package/package.json +6 -6
  30. package/dist/cdn/EZCHUWDK.js +0 -2
  31. package/dist/cdn/FDJGQHUA.js +0 -2
  32. package/dist/cdn/LU22VNJ7.js +0 -2
  33. package/dist/cdn/R5TCWJ6V.js +0 -2
  34. package/dist/cdn/W6PA72LV.js +0 -2
@@ -1,12 +1,12 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as u } from "../../chunks/runtime.js";
3
- import { css as y, html as r } from "lit";
2
+ import { c as m } from "../../chunks/runtime.js";
3
+ import { css as y, html as o } from "lit";
4
4
  import { watch as v } from "@arcgis/core/core/reactiveUtils.js";
5
5
  import { LitElement as g, createEvent as h, nothing as d } from "@arcgis/lumina";
6
6
  import { usePropertyChange as p } from "@arcgis/lumina/controllers";
7
- import { getSlotAssignedElements as f } from "@arcgis/toolkit/dom/slots";
8
- import { u as A } from "../../chunks/useT9n.js";
9
- import { r as m } from "../../chunks/maybe.js";
7
+ import { getSlotAssignedElements as A } from "@arcgis/toolkit/dom/slots";
8
+ import { u as f } from "../../chunks/useT9n.js";
9
+ import { r as u } from "../../chunks/maybe.js";
10
10
  const b = y`:host{--arcgis-internal-exploratory-analysis-width: fit-content;display:flex;justify-content:flex-end;width:var(--arcgis-internal-exploratory-analysis-width)}:host(:is([data-content-open],[show-heading])){--arcgis-internal-exploratory-analysis-width: var(--arcgis-internal-panel-width, 300px);calcite-panel{min-width:var(--arcgis-internal-panel-width, 300px)}calcite-action-bar{width:100%}}calcite-panel{flex:none}calcite-action-bar{width:fit-content}.selection-notice-container{padding:var(--calcite-spacing-md)}.selection-notice-list{margin-block:0;padding-inline-start:var(--calcite-spacing-lg)}.measurement-content{--arcgis-internal-padding: var(--calcite-space-md) var(--calcite-space-none);margin-block-end:var(--calcite-space-none)}.measurement-content,slot::slotted(*){width:100%}.footer{display:grid;grid-template-columns:1fr 2fr;gap:var(--calcite-spacing-md);width:100%}`, w = [
11
11
  "arcgis-area-measurement-2d",
12
12
  "arcgis-area-measurement-3d",
@@ -15,48 +15,48 @@ const b = y`:host{--arcgis-internal-exploratory-analysis-width: fit-content;disp
15
15
  "arcgis-elevation-profile",
16
16
  "arcgis-volume-measurement"
17
17
  ];
18
- function C(o) {
19
- return o?.state === "measuring" || o?.state === "creating" || o?.state === "selecting";
18
+ function C(r) {
19
+ return r?.state === "measuring" || r?.state === "creating" || r?.state === "selecting";
20
20
  }
21
21
  const _ = w.join(",");
22
22
  class $ extends g {
23
23
  constructor() {
24
- super(), this._messages = A({ blocking: !0 }), this.#i = !1, this.#t = /* @__PURE__ */ new WeakMap(), this._activeAnalysisHasInput = !1, this._measurements = [], this.autoDestroyDisabled = !1, this.autoStartDisabled = !1, this.closed = !1, this.icon = "measure", this.preserveAnalysisOnChange = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showHeading = !1, this.arcgisClose = h(), this.arcgisPropertyChange = p()("activeAnalysis"), this.arcgisReady = h(), this.listen("arcgisPropertyChange", this.#r.bind(this)), this.listen("arcgisReady", this.#r.bind(this));
24
+ super(), this._messages = f({ blocking: !0 }), this.#i = !1, this.#e = /* @__PURE__ */ new WeakMap(), this._activeAnalysisHasInput = !1, this._measurements = [], this.autoDestroyDisabled = !1, this.autoStartDisabled = !1, this.closed = !1, this.icon = "measure", this.preserveAnalysisOnChange = !1, this.requireActiveAnalysis = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showHeading = !1, this.arcgisClose = h(), this.arcgisPropertyChange = p()("activeAnalysis"), this.arcgisReady = h(), this.listen("arcgisPropertyChange", this.#o.bind(this)), this.listen("arcgisReady", this.#o.bind(this));
25
25
  }
26
26
  static {
27
- this.properties = { _activeAnalysisHasInput: 16, _activeAnalysisState: 16, _measurements: 16, activeAnalysis: 1, autoDestroyDisabled: 5, autoStartDisabled: 5, closed: 5, icon: 1, messageOverrides: 0, preserveAnalysisOnChange: 5, showCloseButton: 5, showCollapseButton: 5, showHeading: 7 };
27
+ this.properties = { _activeAnalysisHasInput: 16, _activeAnalysisState: 16, _measurements: 16, activeAnalysis: 1, autoDestroyDisabled: 5, autoStartDisabled: 5, closed: 5, icon: 1, messageOverrides: 0, preserveAnalysisOnChange: 5, requireActiveAnalysis: 5, showCloseButton: 5, showCollapseButton: 5, showHeading: 7 };
28
28
  }
29
29
  static {
30
30
  this.styles = b;
31
31
  }
32
32
  #a;
33
33
  #i;
34
- #t;
35
34
  #e;
35
+ #t;
36
36
  #n;
37
37
  #s;
38
38
  get activeAnalysis() {
39
39
  return this.#a;
40
40
  }
41
- set activeAnalysis(e) {
42
- this.#e = typeof e == "string" ? e : void 0, this.#c(typeof e == "string" ? this._measurements.find((s) => s.localName === e) : e ?? void 0);
41
+ set activeAnalysis(t) {
42
+ this.#t = typeof t == "string" ? t : void 0, this.#c(typeof t == "string" ? this._measurements.find((s) => s.localName === t) : t ?? void 0);
43
43
  }
44
44
  async destroy() {
45
45
  await this.manager.destroy();
46
46
  }
47
47
  load() {
48
- this.manager.onLifecycle(() => (this.#o(), () => {
49
- this.#s = m(this.#s), this.#n = void 0;
48
+ this.manager.onLifecycle(() => (this.#r(), () => {
49
+ this.#s = u(this.#s), this.#n = void 0;
50
50
  }));
51
51
  }
52
52
  async #l() {
53
53
  await this.activeAnalysis?.clear();
54
54
  }
55
- #m() {
55
+ #u() {
56
56
  this.closed = !0, this.arcgisClose.emit(), this.autoDestroyDisabled || this.destroy();
57
57
  }
58
- async #u({ target: e }) {
59
- const s = Number(e.selectedActions.at(0)?.dataset.measurementIndex), i = this._measurements[s], a = this.activeAnalysis;
58
+ async #m({ target: t }) {
59
+ const s = Number(t.selectedActions.at(0)?.dataset.measurementIndex), i = this._measurements[s], a = this.activeAnalysis;
60
60
  if (i) {
61
61
  if (i !== a && (!this.preserveAnalysisOnChange || C(a)) && await this.#l(), this.#h(i), this.autoStartDisabled || i.interactionDisabled || this.preserveAnalysisOnChange && i.analysis?.valid)
62
62
  return;
@@ -64,65 +64,65 @@ class $ extends g {
64
64
  } else
65
65
  await this.#l(), this.#h(void 0);
66
66
  }
67
- #r() {
68
- this._activeAnalysisState = this.activeAnalysis ? this.activeAnalysis.state ?? "disabled" : void 0, this.#o(), this.#d(), this.requestUpdate();
67
+ #o() {
68
+ this._activeAnalysisState = this.activeAnalysis ? this.activeAnalysis.state ?? "disabled" : void 0, this.#r(), this.#d(), this.requestUpdate();
69
69
  }
70
- #y({ currentTarget: e }) {
71
- const s = f(e, _), i = this._measurements.filter((t) => !s.includes(t));
72
- for (const t of i) {
73
- const l = this.#t.get(t);
74
- t.hidden = l?.hidden ?? !1, t.hideStartButton = l?.hideStartButton ?? !1, "hideClearButton" in t && (t.hideClearButton = l?.hideClearButton ?? !1), "hideHeader" in t && (t.hideHeader = l?.hideHeader ?? !1), this.#t.delete(t);
70
+ #y({ currentTarget: t }) {
71
+ const s = A(t, _), i = this._measurements.filter((e) => !s.includes(e));
72
+ for (const e of i) {
73
+ const l = this.#e.get(e);
74
+ e.hidden = l?.hidden ?? !1, e.hideStartButton = l?.hideStartButton ?? !1, "hideClearButton" in e && (e.hideClearButton = l?.hideClearButton ?? !1), "hideHeader" in e && (e.hideHeader = l?.hideHeader ?? !1), this.#e.delete(e);
75
75
  }
76
- for (const t of s)
77
- this.#t.has(t) || (this.#t.set(t, {
78
- hidden: t.hidden,
79
- hideClearButton: "hideClearButton" in t ? t.hideClearButton : void 0,
80
- hideStartButton: t.hideStartButton,
81
- hideHeader: "hideHeader" in t ? t.hideHeader : void 0
82
- }), t.componentOnReady().then(() => {
83
- this.isConnected && t.isConnected && this._measurements.includes(t) && this.requestUpdate();
84
- })), t.hideStartButton = !0, "hideClearButton" in t && (t.hideClearButton = !0), "hideHeader" in t && (t.hideHeader = !0);
76
+ for (const e of s)
77
+ this.#e.has(e) || (this.#e.set(e, {
78
+ hidden: e.hidden,
79
+ hideClearButton: "hideClearButton" in e ? e.hideClearButton : void 0,
80
+ hideStartButton: e.hideStartButton,
81
+ hideHeader: "hideHeader" in e ? e.hideHeader : void 0
82
+ }), e.componentOnReady().then(() => {
83
+ this.isConnected && e.isConnected && this._measurements.includes(e) && this.requestUpdate();
84
+ })), e.hideStartButton = !0, "hideClearButton" in e && (e.hideClearButton = !0), "hideHeader" in e && (e.hideHeader = !0);
85
85
  this._measurements = s;
86
86
  let a;
87
- this.#e && (a = s.find((t) => t.localName === this.#e));
87
+ this.#t && (a = s.find((e) => e.localName === this.#t));
88
88
  let c;
89
- !this.#e && s.length === 1 && (c = s[0]);
89
+ !this.#t && s.length === 1 && (c = s[0]);
90
90
  let n;
91
- this.#e ? n = a : this.#i && s.length > 1 ? n = void 0 : this.activeAnalysis && s.includes(this.activeAnalysis) ? n = this.activeAnalysis : n = c, this.#c(n), this.#i = !!c;
91
+ this.#t ? n = a : this.#i && s.length > 1 ? n = void 0 : this.activeAnalysis && s.includes(this.activeAnalysis) ? n = this.activeAnalysis : n = c, this.#c(n), this.#i = !!c;
92
92
  }
93
- #h(e) {
94
- this.#e = void 0, this.#i = !1, this.#c(e);
93
+ #h(t) {
94
+ this.#t = void 0, this.#i = !1, this.#c(t);
95
95
  }
96
- #c(e) {
96
+ #c(t) {
97
97
  const s = this.#a;
98
- this.#a = e, this.el.toggleAttribute("data-content-open", !!e), this.requestUpdate("activeAnalysis", s), this.#v();
98
+ this.#a = t, this.el.toggleAttribute("data-content-open", !!t), this.requestUpdate("activeAnalysis", s), this.#v();
99
99
  }
100
100
  #v() {
101
- this._activeAnalysisState = this.activeAnalysis ? this.activeAnalysis.state ?? "disabled" : void 0, this.#o(), this.#d();
101
+ this._activeAnalysisState = this.activeAnalysis ? this.activeAnalysis.state ?? "disabled" : void 0, this.#r(), this.#d();
102
102
  }
103
103
  #d() {
104
- for (const e of this._measurements)
105
- e.hidden = e !== this.activeAnalysis || (this.#t.get(e)?.hidden ?? !1) || e === this.activeAnalysis && this._activeAnalysisState === "ready";
104
+ for (const t of this._measurements)
105
+ t.hidden = t !== this.activeAnalysis || (this.#e.get(t)?.hidden ?? !1) || t === this.activeAnalysis && this._activeAnalysisState === "ready";
106
106
  }
107
107
  async #g() {
108
108
  await this.activeAnalysis?.start();
109
109
  }
110
- #o() {
111
- const e = this.activeAnalysis?.analysis;
112
- if (!(e === this.#n && (e == null || this.#s))) {
113
- if (this.#s = m(this.#s), this.#n = e, !e) {
110
+ #r() {
111
+ const t = this.activeAnalysis?.analysis;
112
+ if (!(t === this.#n && (t == null || this.#s))) {
113
+ if (this.#s = u(this.#s), this.#n = t, !t) {
114
114
  this._activeAnalysisHasInput = !1;
115
115
  return;
116
116
  }
117
- this.#s = v(() => e.valid, (s) => this._activeAnalysisHasInput = s, { initial: !0, sync: !0 });
117
+ this.#s = v(() => t.valid, (s) => this._activeAnalysisHasInput = s, { initial: !0, sync: !0 });
118
118
  }
119
119
  }
120
120
  render() {
121
- const { showCloseButton: e, showCollapseButton: s, showHeading: i } = this, a = this._activeAnalysisState === "disabled", c = this._measurements.length > 1, n = this.activeAnalysis?.label || this._messages.componentLabel;
122
- return r`<calcite-panel .closed=${this.closed} .heading=${i ? this._messages.componentLabel : void 0} .collapsible=${s} .closable=${e} @calcitePanelClose=${this.#m}><div .hidden=${!c}><calcite-action-bar expand-toggle-disabled layout=horizontal .overflowMode=${!i && !this.activeAnalysis ? "none" : "collapse"}><calcite-action-group .label=${this._messages.toolbarLabel} @calciteActionGroupChange=${this.#u} selection-mode=single>${this._measurements.map((t, l) => r`<calcite-action .active=${t === this.activeAnalysis} data-measurement-index=${l ?? d} .icon=${t.icon} .label=${t.label} .text=${t.label ?? ""} title=${t.label ?? d}></calcite-action>`)}</calcite-action-group></calcite-action-bar></div><div class="measurement-container" .hidden=${!this.activeAnalysis || a}><calcite-block class="measurement-content" .expanded=${this.isConnected && !!this.activeAnalysis && !a} .heading=${n}><slot @slotchange=${this.#y.bind(this)}></slot></calcite-block></div>${this.activeAnalysis ? r`<div class="footer" slot=footer><calcite-button appearance=transparent .disabled=${!this._activeAnalysisHasInput} kind=danger @click=${this.#l} width=full>${this._messages.clear}</calcite-button><calcite-button .disabled=${this.activeAnalysis.interactionDisabled || this._activeAnalysisState !== "ready" && !this._activeAnalysisHasInput} @click=${this.#g} width=full>${this.activeAnalysis?.matches("arcgis-elevation-profile") ? this._messages.newProfile : this._messages.newMeasurement}</calcite-button></div>` : null}</calcite-panel>`;
121
+ const { showCloseButton: t, showCollapseButton: s, showHeading: i } = this, a = this._activeAnalysisState === "disabled", c = this._measurements.length > 1, n = this.activeAnalysis?.label || this._messages.componentLabel;
122
+ return o`<calcite-panel .closed=${this.closed} .heading=${i ? this._messages.componentLabel : void 0} .collapsible=${s} .closable=${t} @calcitePanelClose=${this.#u}><div .hidden=${!c}><calcite-action-bar expand-toggle-disabled layout=horizontal .overflowMode=${!i && !this.activeAnalysis ? "none" : "collapse"}><calcite-action-group .label=${this._messages.toolbarLabel} @calciteActionGroupChange=${this.#m} .selectionMode=${this.requireActiveAnalysis ? "single-persist" : "single"}>${this._measurements.map((e, l) => o`<calcite-action .active=${e === this.activeAnalysis} data-measurement-index=${l ?? d} .icon=${e.icon} .label=${e.label} .text=${e.label ?? ""} title=${e.label ?? d}></calcite-action>`)}</calcite-action-group></calcite-action-bar></div><div class="measurement-container" .hidden=${!this.activeAnalysis || a}><calcite-block class="measurement-content" .expanded=${this.isConnected && !!this.activeAnalysis && !a} .heading=${n}><slot @slotchange=${this.#y.bind(this)}></slot></calcite-block></div>${this.activeAnalysis ? o`<div class="footer" slot=footer><calcite-button appearance=transparent .disabled=${!this._activeAnalysisHasInput} kind=danger @click=${this.#l} width=full>${this._messages.clear}</calcite-button><calcite-button .disabled=${this.activeAnalysis.interactionDisabled || this._activeAnalysisState !== "ready" && !this._activeAnalysisHasInput} @click=${this.#g} width=full>${this.activeAnalysis?.matches("arcgis-elevation-profile") ? this._messages.newProfile : this._messages.newMeasurement}</calcite-button></div>` : null}</calcite-panel>`;
123
123
  }
124
124
  }
125
- u("arcgis-exploratory-analysis", $);
125
+ m("arcgis-exploratory-analysis", $);
126
126
  export {
127
127
  $ as ArcgisExploratoryAnalysis
128
128
  };