@arcgis/map-components 5.2.0-next.0 → 5.2.0-next.2

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 (82) hide show
  1. package/dist/cdn/24UHFJSD.js +2 -0
  2. package/dist/cdn/2MJTTQRU.js +2 -0
  3. package/dist/cdn/{J23UDIAN.js → 43Q3TUPX.js} +1 -1
  4. package/dist/cdn/72IUGDSR.js +2 -0
  5. package/dist/cdn/A7P3DUN2.js +2 -0
  6. package/dist/cdn/AEV7DYPK.js +2 -0
  7. package/dist/cdn/{CZ3FVANK.js → AOC4VUP6.js} +1 -1
  8. package/dist/cdn/EWYSBOXF.js +2 -0
  9. package/dist/cdn/GVOCIBLC.js +2 -0
  10. package/dist/cdn/JBRTOHPW.js +2 -0
  11. package/dist/cdn/JBWWGDI5.js +2 -0
  12. package/dist/cdn/L5DJYP26.js +2 -0
  13. package/dist/cdn/P2YOSZ4V.js +2 -0
  14. package/dist/cdn/{NGGYUKKX.js → PRZ7EKB7.js} +1 -1
  15. package/dist/cdn/PYZZBY6S.js +2 -0
  16. package/dist/cdn/RL5PFJGE.js +2 -0
  17. package/dist/cdn/S37FED24.js +2 -0
  18. package/dist/cdn/THRRGHTM.js +2 -0
  19. package/dist/cdn/ZF7CLHYV.js +2 -0
  20. package/dist/cdn/index.js +1 -1
  21. package/dist/chunks/esri-main.js +2 -2
  22. package/dist/chunks/slots.js +1 -1
  23. package/dist/chunks/useArcgisViewReadyError.js +60 -111
  24. package/dist/chunks/useLayerById.js +5 -5
  25. package/dist/components/arcgis-daylight/customElement.d.ts +1 -0
  26. package/dist/components/arcgis-daylight/customElement.js +98 -112
  27. package/dist/components/arcgis-directions/customElement.d.ts +5 -5
  28. package/dist/components/arcgis-directions/customElement.js +3 -3
  29. package/dist/components/arcgis-feature/customElement.d.ts +4 -1
  30. package/dist/components/arcgis-feature-next/customElement.d.ts +27 -65
  31. package/dist/components/arcgis-feature-table/customElement.d.ts +35 -20
  32. package/dist/components/arcgis-feature-table/customElement.js +36 -30
  33. package/dist/components/arcgis-features/customElement.d.ts +10 -11
  34. package/dist/components/arcgis-features-next/customElement.d.ts +61 -126
  35. package/dist/components/arcgis-features-next/customElement.js +69 -63
  36. package/dist/components/arcgis-features-next/index.js +1 -0
  37. package/dist/components/arcgis-link-chart/customElement.d.ts +10 -3
  38. package/dist/components/arcgis-link-chart/customElement.js +11 -11
  39. package/dist/components/arcgis-link-chart-nonspatial-visibility-toggle/customElement.js +1 -1
  40. package/dist/components/arcgis-map/customElement.d.ts +10 -3
  41. package/dist/components/arcgis-map/customElement.js +9 -9
  42. package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +12 -12
  43. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +23 -20
  44. package/dist/components/arcgis-popup/customElement.d.ts +7 -9
  45. package/dist/components/arcgis-popup/customElement.js +9 -9
  46. package/dist/components/arcgis-scene/customElement.d.ts +10 -3
  47. package/dist/components/arcgis-scene/customElement.js +24 -24
  48. package/dist/components/arcgis-search/customElement.d.ts +7 -0
  49. package/dist/components/arcgis-search/customElement.js +38 -38
  50. package/dist/components/arcgis-video/customElement.d.ts +15 -2
  51. package/dist/components/arcgis-video/customElement.js +5 -5
  52. package/dist/components/arcgis-video-player/customElement.d.ts +7 -0
  53. package/dist/components/arcgis-video-player/customElement.js +14 -11
  54. package/dist/components/arcgis-video-player-controls-group/customElement.js +19 -17
  55. package/dist/components/arcgis-video-player-settings/customElement.js +20 -18
  56. package/dist/components/arcgis-video-player-settings/index.js +1 -0
  57. package/dist/docs/api.json +1 -1
  58. package/dist/docs/docs.json +1 -1
  59. package/dist/docs/vscode.html-custom-data.json +1 -1
  60. package/dist/docs/web-types.json +1 -1
  61. package/dist/loader.js +11 -11
  62. package/dist/types/lumina.d.ts +8 -8
  63. package/dist/types/preact.d.ts +8 -8
  64. package/dist/types/react.d.ts +8 -8
  65. package/dist/types/stencil.d.ts +8 -8
  66. package/package.json +4 -4
  67. package/dist/cdn/25DYY7HH.js +0 -2
  68. package/dist/cdn/274IEJH2.js +0 -2
  69. package/dist/cdn/4XR7RDUC.js +0 -2
  70. package/dist/cdn/7LPXFLXF.js +0 -2
  71. package/dist/cdn/AKNID6WJ.js +0 -2
  72. package/dist/cdn/CPQQEWKH.js +0 -2
  73. package/dist/cdn/IGXBF2RY.js +0 -2
  74. package/dist/cdn/IHDWD72J.js +0 -2
  75. package/dist/cdn/M4CPJTHZ.js +0 -2
  76. package/dist/cdn/NLHFLEWT.js +0 -2
  77. package/dist/cdn/OFUAKDTE.js +0 -2
  78. package/dist/cdn/TFLKRVDZ.js +0 -2
  79. package/dist/cdn/UZ3CMTNE.js +0 -2
  80. package/dist/cdn/WTGXVWSL.js +0 -2
  81. package/dist/cdn/YMUQ7JSB.js +0 -2
  82. package/dist/cdn/ZCULSTYU.js +0 -2
@@ -1,23 +1,23 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { html as c } from "lit";
3
- import { when as n, watch as r } from "@arcgis/core/core/reactiveUtils.js";
4
- import { GenericController as u, useDirection as m, makeGenericController as l } from "@arcgis/lumina/controllers";
5
- import { getSlotAssignedElements as d } from "@arcgis/toolkit/dom";
6
- import { createRef as E } from "lit/directives/ref.js";
7
- import { c as f, S as w } from "./slots.js";
8
- import { createEvent as a } from "@arcgis/lumina";
9
- class y extends u {
2
+ import { html as u } from "lit";
3
+ import { when as r, watch as s } from "@arcgis/core/core/reactiveUtils.js";
4
+ import { GenericController as h, useDirection as c, makeGenericController as a } from "@arcgis/lumina/controllers";
5
+ import { getSlotAssignedElements as m } from "@arcgis/toolkit/dom";
6
+ import { createRef as f } from "lit/directives/ref.js";
7
+ import { c as d, S as E } from "./slots.js";
8
+ import { createEvent as l } from "@arcgis/lumina";
9
+ class C extends h {
10
10
  //#endregion
11
11
  //#region Lifecycle
12
- constructor(e) {
13
- super(e), this.direction = m(), this.popupRef = E(), this.slotGroupRefs = f(), this.attributionHeight = 0, this._uiContainer = null, this.component.listen("arcgisViewClick", (o) => {
14
- const t = o.detail.native;
15
- o.detail.button !== 0 || t?.ctrlKey || t?.metaKey || this._handleOpenPopup(o.detail);
16
- }), this.component.listenOn(globalThis, "unhandledrejection", (o) => {
17
- const t = o.reason;
18
- if (t?.name === "webgl:required") {
19
- const { name: p } = t;
20
- this.webGLError = { name: p };
12
+ constructor(o) {
13
+ super(o), this.direction = c(), this.popupRef = f(), this.slotGroupRefs = d(), this.attributionHeight = 0, this._uiContainer = null, this.component.listen("arcgisViewClick", (t) => {
14
+ const e = t.detail.native;
15
+ t.detail.button !== 0 || e?.ctrlKey || e?.metaKey || this._handleOpenPopup(t.detail);
16
+ }), this.component.listenOn(globalThis, "unhandledrejection", (t) => {
17
+ const e = t.reason;
18
+ if (e?.name === "webgl:required") {
19
+ const { name: i } = e;
20
+ this.webGLError = { name: i };
21
21
  }
22
22
  });
23
23
  }
@@ -25,22 +25,22 @@ class y extends u {
25
25
  //#region Private Methods
26
26
  hostLifecycle() {
27
27
  return [
28
- n(() => this.component.view.ready, () => {
28
+ r(() => this.component.view.ready, () => {
29
29
  this._assignDefaultPopup();
30
30
  }),
31
31
  // Close component popup when view popup is opened
32
- n(() => this.component.view.popup?.visible, () => {
32
+ r(() => this.component.view.popup?.visible, () => {
33
33
  this.popupElement?.open && (this.popupElement.open = !1);
34
34
  })
35
35
  ];
36
36
  }
37
- async openPopup(e) {
37
+ async openPopup(o) {
38
38
  if (this._assignDefaultPopup(), this.closePopup(), this.popupElement) {
39
39
  await this.popupElement.componentOnReady(), this.popupElement.open = !0;
40
- const { fetchFeatures: o } = e;
41
- delete e.fetchFeatures, Object.assign(this.popupElement, e), o && this.popupElement.fetchFeatures();
40
+ const { fetchFeatures: t } = o;
41
+ delete o.fetchFeatures, Object.assign(this.popupElement, o), t && this.popupElement.fetchFeatures();
42
42
  } else
43
- await this.component.view.openPopup(e);
43
+ await this.component.view.openPopup(o);
44
44
  }
45
45
  closePopup() {
46
46
  this.popupElement && (this.popupElement.open = !1), this.component.view.closePopup();
@@ -48,11 +48,11 @@ class y extends u {
48
48
  _assignDefaultPopup() {
49
49
  this.popupRef.value && !this.popupElement && (this.popupElement = this.popupRef.value, this.popupElement.referenceElement = this.component.el, this.popupElement.view = this.component.view);
50
50
  }
51
- handleAttributionHeightChange(e) {
52
- if (!(this.attributionHeight === e || !this.component.el.shadowRoot)) {
53
- if (this.attributionHeight = e, !this._uiContainer) {
54
- const o = this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");
55
- this._uiContainer = o;
51
+ handleAttributionHeightChange(o) {
52
+ if (!(this.attributionHeight === o || !this.component.el.shadowRoot)) {
53
+ if (this.attributionHeight = o, !this._uiContainer) {
54
+ const t = this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");
55
+ this._uiContainer = t;
56
56
  }
57
57
  this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top", `${this.attributionHeight}px`);
58
58
  }
@@ -63,112 +63,61 @@ class y extends u {
63
63
  _maybeResetViewPopup() {
64
64
  this.component.view && this.previousViewPopupEnabled !== void 0 && (this.component.view.popupEnabled = this.previousViewPopupEnabled, this.previousViewPopupEnabled = void 0);
65
65
  }
66
- async _handleOpenPopup(e) {
66
+ async _handleOpenPopup(o) {
67
67
  if (this._assignDefaultPopup(), !this.component.popupDisabled) {
68
68
  if (this._maybeDisableViewPopup(), this.popupElement) {
69
- const { location: o, promises: t } = await this.popupElement?.handleViewClick(e) ?? {};
70
- t?.length ? this.openPopup({ location: o, promises: t }) : this.popupElement?.open && this.closePopup();
69
+ const { location: t, promises: e } = await this.popupElement?.handleViewClick(o) ?? {};
70
+ e?.length ? this.openPopup({ location: t, promises: e }) : this.popupElement?.open && this.closePopup();
71
71
  }
72
72
  this._maybeResetViewPopup();
73
73
  }
74
74
  }
75
- _handlePopupSlotChange(e) {
76
- const o = d(e.target, "arcgis-popup");
77
- !this.popupElement && o.length ? this.popupElement = o[0] : o.length || (this.popupElement = void 0);
75
+ _handlePopupSlotChange(o) {
76
+ const t = m(o.target, "arcgis-popup");
77
+ !this.popupElement && t.length ? this.popupElement = t[0] : t.length || (this.popupElement = void 0);
78
78
  }
79
79
  _webGLErrorAlert() {
80
- return this.webGLError ? c`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>` : null;
80
+ return this.webGLError ? u`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>` : null;
81
81
  }
82
82
  //#endregion
83
83
  //#region Rendering
84
84
  render() {
85
- return w({ direction: this.direction, popupComponentEnabled: this.component.popupComponentEnabled, slotGroupRefs: this.slotGroupRefs, handlePopupSlotChange: (e) => this._handlePopupSlotChange(e), webGLErrorElement: this._webGLErrorAlert(), popupElement: this.popupRef });
85
+ return E({ direction: this.direction, popupComponentEnabled: this.component.popupComponentEnabled, slotGroupRefs: this.slotGroupRefs, handlePopupSlotChange: (o) => this._handlePopupSlotChange(o), webGLErrorElement: this._webGLErrorAlert(), popupElement: this.popupRef });
86
86
  }
87
87
  }
88
- const V = l((i, e) => {
89
- const o = a();
90
- return e.onLifecycle(
91
- () => r(
88
+ const R = a((p, o) => {
89
+ const t = l();
90
+ return o.onLifecycle(
91
+ () => s(
92
92
  () => {
93
- const { map: t } = i;
94
- if (!t || t.destroyed)
93
+ const { map: e } = p;
94
+ if (!e || e.destroyed)
95
95
  return [];
96
- const p = [];
97
- return t.loadError && p.push(t), t.basemap?.loadError && p.push(t.basemap), t.ground.loadError && p.push(t.ground), [...t.allLayers, ...t.allTables].forEach((s) => {
98
- s.loadError && p.push(s);
99
- }), p;
96
+ const i = [];
97
+ return e.loadError && i.push(e), e.basemap?.loadError && i.push(e.basemap), e.ground.loadError && i.push(e.ground), [...e.allLayers, ...e.allTables].forEach((n) => {
98
+ n.loadError && i.push(n);
99
+ }), i;
100
100
  },
101
- (t) => {
102
- t.length && (i.loadErrorSources = t, o.emit());
101
+ (e) => {
102
+ e.length && (p.loadErrorSources = e, t.emit());
103
103
  }
104
104
  )
105
- ), o;
106
- });
107
- function h(i = document) {
108
- const e = i.activeElement;
109
- if (e)
110
- return e.shadowRoot && e.shadowRoot.activeElement !== null ? h(e.shadowRoot) : e;
111
- }
112
- class L extends u {
113
- #e;
114
- #t;
115
- #o;
116
- focusPopup() {
117
- const e = h();
118
- this.#i(), this.component.popupElement && (this.component.popupElement.setFocus(), this.#e = this._watchPopupElementClose(() => {
119
- this.#e = void 0, this.focusOnReturnFocusElement(e);
120
- })), this.#o = this._watchViewPopupOpen(() => {
121
- this.#o = void 0, this._popup?.focus(), this.#t = this._watchViewPopupClose(() => {
122
- this.#t = void 0, this.focusOnReturnFocusElement(e);
123
- });
124
- });
125
- }
126
- focusOnReturnFocusElement(e) {
127
- e && "setFocus" in e ? e.setFocus?.() : e?.focus();
128
- }
129
- hostDisconnected() {
130
- this.#i();
131
- }
132
- get _popup() {
133
- return this.component.popup ?? this.component.view?.popup;
134
- }
135
- #i() {
136
- this.#e?.remove(), this.#t?.remove(), this.#o?.remove(), this.#e = void 0, this.#t = void 0, this.#o = void 0;
137
- }
138
- _watchPopupElementClose(e) {
139
- return this.component.popupElement?.addEventListener("arcgisClose", e, { once: !0 }), {
140
- remove: () => {
141
- this.component.popupElement?.removeEventListener("arcgisClose", e);
142
- }
143
- };
144
- }
145
- _watchViewPopupOpen(e) {
146
- return n(() => this._popup?.visible, e, { once: !0, initial: !0, sync: !0 });
147
- }
148
- _watchViewPopupClose(e) {
149
- return this._popup?.container?.addEventListener("calciteFlowItemClose", e, { once: !0 }), {
150
- remove: () => {
151
- this._popup?.container?.removeEventListener("calciteFlowItemClose", e);
152
- }
153
- };
154
- }
155
- }
156
- const G = l(
157
- (i, e) => {
158
- const o = a();
159
- return e.onLifecycle(
160
- () => r(
161
- () => i.view?.readyState,
162
- (t) => {
163
- (t === "map-content-error" || t === "rendering-error") && o.emit();
105
+ ), t;
106
+ }), G = a(
107
+ (p, o) => {
108
+ const t = l();
109
+ return o.onLifecycle(
110
+ () => s(
111
+ () => p.view?.readyState,
112
+ (e) => {
113
+ (e === "map-content-error" || e === "rendering-error") && t.emit();
164
114
  }
165
115
  )
166
- ), o;
116
+ ), t;
167
117
  }
168
118
  );
169
119
  export {
170
- L as P,
171
- y as U,
120
+ C as U,
172
121
  G as a,
173
- V as u
122
+ R as u
174
123
  };
@@ -2,14 +2,14 @@
2
2
  import { watch as u } from "@arcgis/core/core/reactiveUtils.js";
3
3
  import { makeController as y } from "@arcgis/lumina/controllers";
4
4
  function v(r, e) {
5
- return y((f, t) => (t.onLifecycle(
5
+ return y((f, a) => (a.onLifecycle(
6
6
  () => u(
7
7
  () => ({
8
- layerId: r.layerId,
8
+ layerId: r.mapLayerId,
9
9
  viewReady: r.view?.ready
10
10
  }),
11
- ({ layerId: i, viewReady: a }) => {
12
- if (!a)
11
+ ({ layerId: i, viewReady: t }) => {
12
+ if (!t)
13
13
  return;
14
14
  const d = r.view;
15
15
  if (!i) {
@@ -22,7 +22,7 @@ function v(r, e) {
22
22
  initial: !0
23
23
  }
24
24
  )
25
- ), r.layerId));
25
+ ), r.mapLayerId));
26
26
  }
27
27
  export {
28
28
  v as u
@@ -145,6 +145,7 @@ export abstract class ArcgisDaylight extends LitElement {
145
145
  */
146
146
  get localDate(): Date;
147
147
  set localDate(value: Date | number | string);
148
+ get localDateAsString(): string;
148
149
  /** @internal */
149
150
  protected messages: {
150
151
  componentLabel: string;