@arcgis/map-components 5.2.0-next.5 → 5.2.0-next.7

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 (112) hide show
  1. package/dist/cdn/{32HC6PWY.js → 2EOQ5G2R.js} +1 -1
  2. package/dist/cdn/{Z5YGVWFI.js → 3AZCF2P5.js} +1 -1
  3. package/dist/cdn/{QEPCYJLX.js → 52XUYHPM.js} +1 -1
  4. package/dist/cdn/{WTL3FIGS.js → 55JA345T.js} +1 -1
  5. package/dist/cdn/{KUHPQGH3.js → 5T3MHTWU.js} +1 -1
  6. package/dist/cdn/5UUUR4LF.js +2 -0
  7. package/dist/cdn/ABPHGXQN.js +2 -0
  8. package/dist/cdn/{PNBNM2CX.js → BJF74GDX.js} +1 -1
  9. package/dist/cdn/CZXCSL3K.js +2 -0
  10. package/dist/cdn/{L4EHCDIJ.js → DITXUZMH.js} +1 -1
  11. package/dist/cdn/FGSOMLKL.js +2 -0
  12. package/dist/cdn/L34RL7Y3.js +2 -0
  13. package/dist/cdn/LM56QFP5.js +2 -0
  14. package/dist/cdn/{7DIC4O5E.js → NOHLNRB4.js} +1 -1
  15. package/dist/cdn/{MF5STJJO.js → RJM52R4G.js} +1 -1
  16. package/dist/cdn/W42XLSER.js +2 -0
  17. package/dist/cdn/WMH7TCIP.js +2 -0
  18. package/dist/cdn/{VNYFKVJ2.js → WQDUJLSY.js} +1 -1
  19. package/dist/cdn/{4XVCI45D.js → XF5VBSRX.js} +1 -1
  20. package/dist/cdn/assets/feature-templates/t9n/messages.ar.json +1 -0
  21. package/dist/cdn/assets/feature-templates/t9n/messages.bg.json +1 -0
  22. package/dist/cdn/assets/feature-templates/t9n/messages.bs.json +1 -0
  23. package/dist/cdn/assets/feature-templates/t9n/messages.ca.json +1 -0
  24. package/dist/cdn/assets/feature-templates/t9n/messages.cs.json +1 -0
  25. package/dist/cdn/assets/feature-templates/t9n/messages.da.json +1 -0
  26. package/dist/cdn/assets/feature-templates/t9n/messages.de.json +1 -0
  27. package/dist/cdn/assets/feature-templates/t9n/messages.el.json +1 -0
  28. package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -0
  29. package/dist/cdn/assets/feature-templates/t9n/messages.es.json +1 -0
  30. package/dist/cdn/assets/feature-templates/t9n/messages.et.json +1 -0
  31. package/dist/cdn/assets/feature-templates/t9n/messages.fi.json +1 -0
  32. package/dist/cdn/assets/feature-templates/t9n/messages.fr.json +1 -0
  33. package/dist/cdn/assets/feature-templates/t9n/messages.he.json +1 -0
  34. package/dist/cdn/assets/feature-templates/t9n/messages.hr.json +1 -0
  35. package/dist/cdn/assets/feature-templates/t9n/messages.hu.json +1 -0
  36. package/dist/cdn/assets/feature-templates/t9n/messages.id.json +1 -0
  37. package/dist/cdn/assets/feature-templates/t9n/messages.it.json +1 -0
  38. package/dist/cdn/assets/feature-templates/t9n/messages.ja.json +1 -0
  39. package/dist/cdn/assets/feature-templates/t9n/messages.ko.json +1 -0
  40. package/dist/cdn/assets/feature-templates/t9n/messages.lt.json +1 -0
  41. package/dist/cdn/assets/feature-templates/t9n/messages.lv.json +1 -0
  42. package/dist/cdn/assets/feature-templates/t9n/messages.nl.json +1 -0
  43. package/dist/cdn/assets/feature-templates/t9n/messages.no.json +1 -0
  44. package/dist/cdn/assets/feature-templates/t9n/messages.pl.json +1 -0
  45. package/dist/cdn/assets/feature-templates/t9n/messages.pt-BR.json +1 -0
  46. package/dist/cdn/assets/feature-templates/t9n/messages.pt-PT.json +1 -0
  47. package/dist/cdn/assets/feature-templates/t9n/messages.ro.json +1 -0
  48. package/dist/cdn/assets/feature-templates/t9n/messages.ru.json +1 -0
  49. package/dist/cdn/assets/feature-templates/t9n/messages.sk.json +1 -0
  50. package/dist/cdn/assets/feature-templates/t9n/messages.sl.json +1 -0
  51. package/dist/cdn/assets/feature-templates/t9n/messages.sr.json +1 -0
  52. package/dist/cdn/assets/feature-templates/t9n/messages.sv.json +1 -0
  53. package/dist/cdn/assets/feature-templates/t9n/messages.th.json +1 -0
  54. package/dist/cdn/assets/feature-templates/t9n/messages.tr.json +1 -0
  55. package/dist/cdn/assets/feature-templates/t9n/messages.uk.json +1 -0
  56. package/dist/cdn/assets/feature-templates/t9n/messages.vi.json +1 -0
  57. package/dist/cdn/assets/feature-templates/t9n/messages.zh-CN.json +1 -0
  58. package/dist/cdn/assets/feature-templates/t9n/messages.zh-HK.json +1 -0
  59. package/dist/cdn/assets/feature-templates/t9n/messages.zh-TW.json +1 -0
  60. package/dist/cdn/index.js +1 -1
  61. package/dist/cdn/main.css +1 -1
  62. package/dist/chunks/time-utils.js +14 -14
  63. package/dist/components/arcgis-daylight/customElement.d.ts +1 -1
  64. package/dist/components/arcgis-daylight/customElement.js +242 -203
  65. package/dist/components/arcgis-elevation-profile/customElement.d.ts +14 -0
  66. package/dist/components/arcgis-elevation-profile/customElement.js +77 -75
  67. package/dist/components/arcgis-feature-table/customElement.d.ts +1 -0
  68. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  69. package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +33 -0
  70. package/dist/components/arcgis-feature-templates/customElement.d.ts +275 -0
  71. package/dist/components/arcgis-feature-templates/customElement.js +560 -0
  72. package/dist/components/arcgis-feature-templates/index.d.ts +1 -0
  73. package/dist/components/arcgis-feature-templates/index.js +13 -0
  74. package/dist/components/arcgis-features-next/customElement.d.ts +7 -1
  75. package/dist/components/arcgis-layer-list/customElement.d.ts +3 -0
  76. package/dist/components/arcgis-layer-list-next/customElement.d.ts +319 -32
  77. package/dist/components/arcgis-layer-list-next/customElement.js +5 -1
  78. package/dist/components/arcgis-legend/customElement.js +6 -6
  79. package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
  80. package/dist/components/arcgis-legend-classic-view/customElement.js +16 -16
  81. package/dist/components/arcgis-map/customElement.d.ts +47 -4
  82. package/dist/components/arcgis-paste/PasteViewModel.d.ts +1 -1
  83. package/dist/components/arcgis-paste/customElement.js +27 -38
  84. package/dist/components/arcgis-paste/index.js +1 -1
  85. package/dist/components/arcgis-popup/customElement.d.ts +7 -1
  86. package/dist/components/arcgis-slider-scale-range/customElement.d.ts +1 -1
  87. package/dist/components/arcgis-slider-scale-range/customElement.js +65 -31
  88. package/dist/components/arcgis-template-image/customElement.d.ts +14 -0
  89. package/dist/components/arcgis-template-image/customElement.js +119 -0
  90. package/dist/components/arcgis-template-image/index.d.ts +1 -0
  91. package/dist/components/arcgis-template-image/index.js +1 -0
  92. package/dist/components/arcgis-version-management/customElement.d.ts +9 -1
  93. package/dist/components/arcgis-version-management/customElement.js +21 -20
  94. package/dist/components/arcgis-version-management/index.js +1 -0
  95. package/dist/components/arcgis-weather/customElement.js +96 -94
  96. package/dist/docs/api.json +1 -1
  97. package/dist/docs/docs.json +1 -1
  98. package/dist/docs/vscode.html-custom-data.json +1 -1
  99. package/dist/docs/web-types.json +1 -1
  100. package/dist/index.d.ts +14 -0
  101. package/dist/loader.js +3 -1
  102. package/dist/types/lumina.d.ts +15 -1
  103. package/dist/types/preact.d.ts +17 -1
  104. package/dist/types/react.d.ts +19 -1
  105. package/dist/types/stencil.d.ts +15 -1
  106. package/package.json +7 -7
  107. package/dist/cdn/AOC4VUP6.js +0 -2
  108. package/dist/cdn/IBTOXDST.js +0 -2
  109. package/dist/cdn/JFVZHHIX.js +0 -2
  110. package/dist/cdn/MHRXFE7S.js +0 -2
  111. package/dist/cdn/RAQVHNVI.js +0 -2
  112. package/dist/cdn/YJCBT5VK.js +0 -2
@@ -0,0 +1,119 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as h } from "../../chunks/runtime.js";
3
+ import g from "@arcgis/core/Graphic.js";
4
+ import { css as p, html as s } from "lit";
5
+ import { createRef as d, ref as f } from "lit/directives/ref.js";
6
+ import { unsafeHTML as _ } from "lit/directives/unsafe-html.js";
7
+ import { LitElement as b, safeStyleMap as y } from "@arcgis/lumina";
8
+ import * as l from "@arcgis/toolkit/log";
9
+ import { isSharedTemplateMetadata as u, isStandardFeatureTemplate as v } from "@arcgis/core/applications/Components/templateUtils.js";
10
+ import "@arcgis/core/editing/sharedTemplates/SharedTemplateMetadata.js";
11
+ import { renderPreviewHTML as w } from "@arcgis/core/symbols/support/symbolUtils.js";
12
+ const I = p`.esri-thumbnail-preview{width:3%;height:32px;background-size:contain;background-position:center}.template-image-container{width:32px;height:32px;display:flex;align-items:center;justify-content:center}`;
13
+ async function D(e, t, i) {
14
+ if (u(e) && e.thumbnail) {
15
+ const c = `data:image/png;base64,${e.thumbnail.imageData}`;
16
+ return s`<div class="esri-thumbnail-preview" style=${y({ backgroundImage: `url(${c})` })}></div>`;
17
+ }
18
+ const r = await x(t, e);
19
+ if (r == null)
20
+ return null;
21
+ const n = { maxSize: 24, ariaLabel: i?.ariaLabel };
22
+ v(e) && "renderer" in t && t.renderer?.type === "dictionary" && (n.fieldMap = t.renderer.fieldMap ?? void 0, n.feature = {
23
+ attributes: e.prototype.attributes ?? {}
24
+ });
25
+ const o = await w(r, n);
26
+ return o ? s`${_(o.outerHTML)}` : null;
27
+ }
28
+ async function x(e, t) {
29
+ if (u(t))
30
+ return await m(e);
31
+ if ("renderer" in e && e.renderer) {
32
+ const { renderer: i } = e, r = new g({ attributes: t.prototype.attributes });
33
+ if ("getSymbolAsync" in i) {
34
+ const a = await i.getSymbolAsync(r);
35
+ if (a)
36
+ return a;
37
+ }
38
+ }
39
+ return await m(e);
40
+ }
41
+ async function T(e) {
42
+ const t = e === "point" || e === "multipoint" ? await import("@arcgis/core/symbols/SimpleMarkerSymbol.js") : e === "polyline" ? await import("@arcgis/core/symbols/SimpleLineSymbol.js") : e === "polygon" || e === "mesh" || e === "multipatch" ? await import("@arcgis/core/symbols/SimpleFillSymbol.js") : null;
43
+ return t ? new t.default() : null;
44
+ }
45
+ async function m(e) {
46
+ return "geometryType" in e && e.geometryType ? await T(e.geometryType) : null;
47
+ }
48
+ class C extends b {
49
+ constructor() {
50
+ super(...arguments), this._lastRun = 0, this._attempted = !1, this._isCurrentlyInView = !1, this._intersectionObserver = null, this._imageContainerDiv = d(), this._generatedImageData = null;
51
+ }
52
+ static {
53
+ this.properties = { _generatedImageData: 16, template: 0 };
54
+ }
55
+ static {
56
+ this.styles = I;
57
+ }
58
+ get rootLayer() {
59
+ return this.template?.layer?.type === "subtype-sublayer" ? this.template.layer.parent : this.template?.layer;
60
+ }
61
+ willUpdate(t) {
62
+ t.has("template") && (this.hasUpdated || this.template !== null) && this._resetData();
63
+ }
64
+ updated() {
65
+ !this._attempted && this._isCurrentlyInView && (this._attempted = !0, this._handleImage().catch((t) => {
66
+ l.log("warn", this, "Failed processing image");
67
+ }));
68
+ }
69
+ loaded() {
70
+ this.manager.onLifecycle(() => (this._addIntersectionObserver(), () => {
71
+ this._removeIntersectionObserver();
72
+ }));
73
+ }
74
+ _resetData() {
75
+ this._generatedImageData = null, this._attempted = !1;
76
+ }
77
+ async _generateImage() {
78
+ return this.template ? await D(this.template.template, this.template.layer) : "";
79
+ }
80
+ async _handleImage() {
81
+ const t = ++this._lastRun;
82
+ if (!this._generatedImageData || this._generatedImageData === "")
83
+ try {
84
+ const i = await this._generateImage();
85
+ if (this._lastRun !== t || this._generatedImageData === i)
86
+ return;
87
+ this._generatedImageData = i;
88
+ } finally {
89
+ this._attempted = !0;
90
+ }
91
+ }
92
+ _addIntersectionObserver() {
93
+ const t = {
94
+ // If the image gets within 50px in the Y axis, start the download.
95
+ rootMargin: "50px 0px",
96
+ threshold: 0.01
97
+ };
98
+ this._imageContainerDiv.value && requestAnimationFrame(() => {
99
+ this.isConnected && (this._intersectionObserver = new IntersectionObserver((i) => {
100
+ let r = !1;
101
+ i.forEach((a) => {
102
+ a.intersectionRatio > 0 && !r ? (r = !0, this._isCurrentlyInView = !0, this._handleImage().catch((n) => {
103
+ l.log("warn", this, "Failed processing image");
104
+ })) : this._isCurrentlyInView = !1;
105
+ });
106
+ }, t), this._intersectionObserver?.observe(this._imageContainerDiv.value));
107
+ });
108
+ }
109
+ _removeIntersectionObserver() {
110
+ this._intersectionObserver?.disconnect(), this._intersectionObserver = null;
111
+ }
112
+ render() {
113
+ return s`<div class="template-image-container" ${f(this._imageContainerDiv)}>${this._generatedImageData ?? ""}</div>`;
114
+ }
115
+ }
116
+ h("arcgis-template-image", C);
117
+ export {
118
+ C as ArcgisTemplateImage
119
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -204,7 +204,15 @@ export abstract class ArcgisVersionManagement extends LitElement {
204
204
  */
205
205
  accessor referenceElement: ArcgisReferenceElement | string | undefined;
206
206
  /**
207
- * The current state of the component.
207
+ * The current component state.
208
+ *
209
+ * * `disabled` - an error occured during initialization
210
+ * * `executing` - an operation is being performed
211
+ * * `failed` - an error occurred during execution
212
+ * * `loading` - the object is loading
213
+ * * `ready` - object loaded successfully or operation completed successfully
214
+ *
215
+ * When the component is ready, all items in [versioningStates](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-version-management/#versioningStates) are loaded.
208
216
  *
209
217
  * @since 5.0
210
218
  */
@@ -3,21 +3,22 @@ import { c as S } from "../../chunks/runtime.js";
3
3
  import { once as L, watch as P } from "@arcgis/core/core/reactiveUtils.js";
4
4
  import _ from "@arcgis/core/versionManagement/VersionManager.js";
5
5
  import { LitElement as b, createEvent as u } from "@arcgis/lumina";
6
- import { css as C, render as N, html as g } from "lit";
6
+ import { css as N, render as C, html as v } from "lit";
7
7
  import { createRef as F, ref as M } from "lit/directives/ref.js";
8
8
  import { u as k } from "../../chunks/useT9n.js";
9
9
  import { m as x } from "../../chunks/useViewModel.js";
10
- import { rethrowError as $ } from "@arcgis/toolkit/log";
11
- const A = C`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;min-height:var(--arcgis-internal-panel-height-md, 420px);height:100%}calcite-notice{margin:var(--calcite-spacing-md)}`, T = x(_), w = "map-components:version-management";
12
- class O extends b {
10
+ import { d as $ } from "../../chunks/component-utils.js";
11
+ import { rethrowError as A } from "@arcgis/toolkit/log";
12
+ const T = N`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;min-height:var(--arcgis-internal-panel-height-md, 420px);height:100%}calcite-notice{margin:var(--calcite-spacing-md)}`, O = x(_), w = "map-components:version-management";
13
+ class U extends b {
13
14
  constructor() {
14
- super(...arguments), this.flowElement = F(), this.messages = k({ blocking: !0 }), this.viewModel = T(this), this._isInitialVersionInvalid = /* @__PURE__ */ new Map(), this._initialVersionInfos = [], this._showInvalidFeatureServiceNotice = !1, this.allowEditingDisabled = !1, this.autoDestroyDisabled = !1, this.closable = !1, this.pageSize = 5, this.state = this.viewModel.state, this.versioningStates = this.viewModel.versioningStates, this.view = this.viewModel.view, this.arcgisReady = u(), this.arcgisVersioningStateChanged = u();
15
+ super(...arguments), this.flowElement = F(), this.messages = k({ blocking: !0 }), this.viewModel = O(this), this._isInitialVersionInvalid = /* @__PURE__ */ new Map(), this._initialVersionInfos = [], this._showInvalidFeatureServiceNotice = !1, this.allowEditingDisabled = !1, this.autoDestroyDisabled = !1, this.closable = !1, this.pageSize = 5, this.state = this.viewModel.state, this.versioningStates = this.viewModel.versioningStates, this.view = this.viewModel.view, this.arcgisReady = u(), this.arcgisVersioningStateChanged = u();
15
16
  }
16
17
  static {
17
18
  this.properties = { versionList: 16, _showInvalidFeatureServiceNotice: 16, allowEditingDisabled: 5, autoDestroyDisabled: 5, closable: 7, initialVersionInfos: 0, icon: 1, label: 3, messageOverrides: 0, mode: 1, pageSize: 9, referenceElement: 1, state: 32, versioningStates: 0, view: 0 };
18
19
  }
19
20
  static {
20
- this.styles = A;
21
+ this.styles = T;
21
22
  }
22
23
  get initialVersionInfos() {
23
24
  return this._initialVersionInfos;
@@ -37,7 +38,7 @@ class O extends b {
37
38
  try {
38
39
  this._changeToInitialVersion(e);
39
40
  } catch (i) {
40
- $(this)(i);
41
+ A(this)(i);
41
42
  }
42
43
  });
43
44
  }), this.manager.onLifecycle(() => [
@@ -74,7 +75,7 @@ class O extends b {
74
75
  versionInfo: i
75
76
  };
76
77
  this.versionPropertiesContainer = document.createElement("div");
77
- const s = N(g`<arcgis-version-management-version-properties .versionPropertiesElementProps=${o} selected show-back-button></arcgis-version-management-version-properties>`, this.versionPropertiesContainer), a = Array.from(s.parentNode.childNodes).find((c) => c.nodeName.toUpperCase() === "ARCGIS-VERSION-MANAGEMENT-VERSION-PROPERTIES");
78
+ const s = C(v`<arcgis-version-management-version-properties .versionPropertiesElementProps=${o} selected show-back-button></arcgis-version-management-version-properties>`, this.versionPropertiesContainer), a = Array.from(s.parentNode.childNodes).find((c) => c.nodeName.toUpperCase() === "ARCGIS-VERSION-MANAGEMENT-VERSION-PROPERTIES");
78
79
  return this.listenOn(a, "arcgisFlowItemBack", () => {
79
80
  this._removeVersionPropertiesFlowItem(this.flowElement.value);
80
81
  }), this.listenOn(a, "calciteFlowItemBack", (c) => {
@@ -197,37 +198,37 @@ class O extends b {
197
198
  i.nodeName.toUpperCase() === "ARCGIS-VERSION-MANAGEMENT-VERSION-PROPERTIES" && e.removeChild(i);
198
199
  }
199
200
  render() {
200
- const { allowEditingDisabled: e, closable: i, flowElement: { value: r }, initialVersionInfos: t, _isInitialVersionInvalid: n, label: o, messages: s, mode: a, pageSize: c, versionList: m, viewModel: v, viewModel: { loadError: f, state: d } } = this, I = Array.from(v.serviceNameLookup, ([l, h]) => ({ url: l, name: h })), V = d !== "disabled" ? I.map((l) => {
201
+ const { allowEditingDisabled: e, closable: i, flowElement: { value: r }, initialVersionInfos: t, _isInitialVersionInvalid: n, label: o, messages: s, mode: a, pageSize: c, versionList: m, viewModel: d, viewModel: { loadError: f, state: g } } = this, I = Array.from(d.serviceNameLookup, ([l, h]) => ({ url: l, name: h })), V = g !== "disabled" ? I.map((l) => {
201
202
  const h = {
202
203
  allowEditing: !e,
203
204
  closable: i,
204
- currentUser: v.userLookup.get(l.url),
205
- currentVersionIdentifier: v.versioningStateLookup.get(l.url).currentVersionInfo.versionIdentifier,
205
+ currentUser: d.userLookup.get(l.url),
206
+ currentVersionIdentifier: d.versioningStateLookup.get(l.url).currentVersionInfo.versionIdentifier,
206
207
  executionError: void 0,
207
208
  flowElement: r,
208
209
  heading: o,
209
210
  initialVersionInfos: t,
210
211
  isInitialVersionInvalid: n,
211
- isVersionAdministrator: v.versionAdministratorLookup.get(l.url),
212
- isVersioningApiAvailable: (v.serverVersionLookup.get(l.url) ?? 0) >= 11.2,
212
+ isVersionAdministrator: d.versionAdministratorLookup.get(l.url),
213
+ isVersioningApiAvailable: (d.serverVersionLookup.get(l.url) ?? 0) >= 11.2,
213
214
  mode: a,
214
215
  pageSize: c,
215
216
  serviceName: l.name,
216
- state: d,
217
+ state: g,
217
218
  serviceUrl: l.url,
218
219
  strings: s,
219
- versionInfos: v.versioningStateLookup.get(l.url)?.versionInfos ?? []
220
+ versionInfos: d.versioningStateLookup.get(l.url)?.versionInfos ?? []
220
221
  };
221
- return g`<arcgis-version-management-service-item .serviceItemElementProps=${h} @arcgisFlowItemBack=${() => {
222
+ return v`<arcgis-version-management-service-item .serviceItemElementProps=${h} @arcgisFlowItemBack=${() => {
222
223
  r && (this._removeVersionListFlowItem(r), this.versionList = void 0);
223
224
  }} @arcgisFlowItemClose=${() => this._handleFlowItemClose()} @arcgisGetVersions=${async (p) => {
224
225
  await this._refreshVersionList(p.detail.serviceUrl);
225
226
  }} @arcgisManageVersion=${this._handleManageVersionAction} @arcgisNewVersion=${this._handleNewVersionAction} @arcgisCreateVersionList=${(p) => this.versionList = p.detail}></arcgis-version-management-service-item>`;
226
- }) : void 0, E = d === "disabled" && f != null ? g`<calcite-notice kind=warning open scale=s slot=footer width=full><div slot=message>${this._getLoadError(f)}</div></calcite-notice>` : void 0, y = this._showInvalidFeatureServiceNotice ? g`<calcite-notice closable kind=warning open scale=s slot=content-top width=full icon @calciteNoticeClose=${() => this._showInvalidFeatureServiceNotice = !1}><div slot=title>${s.headers.invalidInitialFeatureService}</div><div slot=message>${s.loadErrors.invalidInitialFeatureService}</div></calcite-notice>` : void 0;
227
- return g`<div class="root"><calcite-flow custom-item-selectors="arcgis-version-management-version-list, arcgis-version-management-version-properties" ${M(this.flowElement)}><calcite-flow-item .closable=${this.closable} .heading=${o ?? void 0} @calciteFlowItemClose=${() => this._handleFlowItemClose()} .selected=${!m}>${y}<calcite-panel .loading=${d === "loading" || d === "executing"}>${V}${E}</calcite-panel></calcite-flow-item></calcite-flow></div>`;
227
+ }) : void 0, E = g === "disabled" && f != null ? v`<calcite-notice kind=warning open scale=s slot=footer width=full><div slot=message>${this._getLoadError(f)}</div></calcite-notice>` : void 0, y = this._showInvalidFeatureServiceNotice ? v`<calcite-notice closable kind=warning open scale=s slot=content-top width=full icon @calciteNoticeClose=${() => this._showInvalidFeatureServiceNotice = !1}><div slot=title>${s.headers.invalidInitialFeatureService}</div><div slot=message>${s.loadErrors.invalidInitialFeatureService}</div></calcite-notice>` : void 0;
228
+ return v`<div class="root"><calcite-flow custom-item-selectors="arcgis-version-management-version-list, arcgis-version-management-version-properties" ${M(this.flowElement)}><calcite-flow-item .closable=${this.closable} .heading=${$(o) ? s.label : o} @calciteFlowItemClose=${() => this._handleFlowItemClose()} .selected=${!m}>${y}${g === "loading" || g === "executing" ? v`<calcite-loader .label=${`${s.label} - loading`}></calcite-loader>` : v`<calcite-panel>${V}${E}</calcite-panel>`}</calcite-flow-item></calcite-flow></div>`;
228
229
  }
229
230
  }
230
- S("arcgis-version-management", O);
231
+ S("arcgis-version-management", U);
231
232
  export {
232
- O as ArcgisVersionManagement
233
+ U as ArcgisVersionManagement
233
234
  };
@@ -3,5 +3,6 @@ import "../arcgis-version-management-service-item/index.js";
3
3
  import "@esri/calcite-components/components/calcite-notice";
4
4
  import "@esri/calcite-components/components/calcite-flow";
5
5
  import "@esri/calcite-components/components/calcite-flow-item";
6
+ import "@esri/calcite-components/components/calcite-loader";
6
7
  import "@esri/calcite-components/components/calcite-panel";
7
8
  export * from "./customElement.js";
@@ -2,42 +2,42 @@
2
2
  import { c as T } from "../../chunks/runtime.js";
3
3
  import { css as A, html as c } from "lit";
4
4
  import { ref as O } from "lit/directives/ref.js";
5
- import { useDirection as S, usePropertyChange as B } from "@arcgis/lumina/controllers";
6
- import { classes as L } from "@arcgis/toolkit/dom";
7
- import { LitElement as E, createEvent as F, nothing as v, safeClassMap as b, safeStyleMap as D } from "@arcgis/lumina";
8
- import { u as j } from "../../chunks/useT9n.js";
9
- import { m as R } from "../../chunks/useViewModel.js";
10
- import { H } from "../../chunks/heading.js";
11
- import { g as x } from "../../chunks/globalCss.js";
12
- import P from "@arcgis/core/core/Accessor.js";
13
- import { property as p, subclass as V } from "@arcgis/core/core/accessorSupport/decorators.js";
5
+ import { useDirection as W, usePropertyChange as F } from "@arcgis/lumina/controllers";
6
+ import { classes as B } from "@arcgis/toolkit/dom";
7
+ import { LitElement as L, createEvent as E, nothing as v, safeClassMap as w, safeStyleMap as P } from "@arcgis/lumina";
8
+ import { u as R } from "../../chunks/useT9n.js";
9
+ import { m as V } from "../../chunks/useViewModel.js";
10
+ import { H as D } from "../../chunks/heading.js";
11
+ import { g as z } from "../../chunks/globalCss.js";
12
+ import j from "@arcgis/core/core/Accessor.js";
13
+ import { property as p, subclass as H } from "@arcgis/core/core/accessorSupport/decorators.js";
14
14
  import { watch as I } from "@arcgis/core/core/reactiveUtils.js";
15
15
  import C from "@arcgis/core/views/3d/environment/CloudyWeather.js";
16
16
  import $ from "@arcgis/core/views/3d/environment/FoggyWeather.js";
17
17
  import k from "@arcgis/core/views/3d/environment/RainyWeather.js";
18
- import M from "@arcgis/core/views/3d/environment/SnowyWeather.js";
19
- import z from "@arcgis/core/views/3d/environment/SunnyWeather.js";
20
- const K = A`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);display:flex;flex-wrap:wrap;justify-content:center;width:100%;margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;height:var(--button-size);flex-shrink:0;flex-grow:0;--total-gap: calc((var(--weather-type-count) - 1) * var(--button-gap));--basis: clamp(24px, calc((100% - var(--total-gap)) / var(--weather-type-count)), 64px);flex-basis:round(down,var(--basis),1px)}}@container (max-width: 280px){.weather-type-selector{--button-gap: var(--calcite-spacing-xs)}}@container (max-width: 220px){.weather-type-selector{--button-gap: var(--calcite-spacing-xxs)}}.options{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);calcite-label{--calcite-label-margin-bottom: 0}&.hidden{display:none}}.warning-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}`;
21
- var q = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, d = (o, e, t, i) => {
22
- for (var r = i > 1 ? void 0 : i ? Z(e, t) : e, n = o.length - 1, a; n >= 0; n--)
23
- (a = o[n]) && (r = (i ? a(e, t, r) : a(r)) || r);
24
- return i && r && q(e, t, r), r;
18
+ import S from "@arcgis/core/views/3d/environment/SnowyWeather.js";
19
+ import M from "@arcgis/core/views/3d/environment/SunnyWeather.js";
20
+ const K = A`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);--button-size-min: 24px;--button-size-s-max: 32px;--button-size-m-max: 64px;display:flex;flex-wrap:wrap;justify-content:center;width:100%;margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;flex-shrink:0;flex-grow:0;aspect-ratio:1 / 1;height:fit-content;--total-gap: calc((var(--weather-type-count) - 1) * var(--button-gap));--basis: clamp( var(--button-size-min), calc((100% - var(--total-gap)) / var(--weather-type-count)), var(--button-size-m-max) );flex-basis:round(down,var(--basis),1px)}}@container (max-width: 280px){.weather-type-selector{--button-gap: var(--calcite-spacing-xs)}}@container (max-width: 220px){.weather-type-selector{--button-gap: var(--calcite-spacing-xxs)}}.options{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);calcite-label{--calcite-label-margin-bottom: 0}&.hidden{display:none}}.warning-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}`;
21
+ var N = Object.defineProperty, q = Object.getOwnPropertyDescriptor, d = (o, e, i, t) => {
22
+ for (var r = t > 1 ? void 0 : t ? q(e, i) : e, n = o.length - 1, a; n >= 0; n--)
23
+ (a = o[n]) && (r = (t ? a(e, i, r) : a(r)) || r);
24
+ return t && r && N(e, i, r), r;
25
25
  };
26
- const U = {
27
- sunny: z,
26
+ const G = {
27
+ sunny: M,
28
28
  cloudy: C,
29
29
  rainy: k,
30
- snowy: M,
30
+ snowy: S,
31
31
  foggy: $
32
- }, u = Object.keys(U);
33
- let s = class extends P {
32
+ }, h = Object.keys(G);
33
+ let l = class extends j {
34
34
  //#region Lifecycle
35
35
  constructor(o) {
36
36
  super(o), this._settingWeather = !1, this._weatherByType = {
37
- sunny: new z(),
37
+ sunny: new M(),
38
38
  cloudy: new C(),
39
39
  rainy: new k(),
40
- snowy: new M(),
40
+ snowy: new S(),
41
41
  foggy: new $()
42
42
  };
43
43
  }
@@ -95,70 +95,73 @@ let s = class extends P {
95
95
  };
96
96
  d([
97
97
  p()
98
- ], s.prototype, "view", 2);
98
+ ], l.prototype, "view", 2);
99
99
  d([
100
100
  p()
101
- ], s.prototype, "state", 1);
101
+ ], l.prototype, "state", 1);
102
102
  d([
103
103
  p()
104
- ], s.prototype, "disabled", 1);
104
+ ], l.prototype, "disabled", 1);
105
105
  d([
106
106
  p()
107
- ], s.prototype, "weatherByType", 1);
107
+ ], l.prototype, "weatherByType", 1);
108
108
  d([
109
109
  p()
110
- ], s.prototype, "error", 1);
110
+ ], l.prototype, "error", 1);
111
111
  d([
112
112
  p()
113
- ], s.prototype, "current", 1);
113
+ ], l.prototype, "current", 1);
114
114
  d([
115
115
  p()
116
- ], s.prototype, "_weatherByType", 2);
116
+ ], l.prototype, "_weatherByType", 2);
117
117
  d([
118
118
  p()
119
- ], s.prototype, "_environment", 1);
120
- s = d([
121
- V("components.weather.WeatherViewModel")
122
- ], s);
123
- function g({ label: o, ariaLabel: e, value: t, disabled: i, onChange: r }) {
124
- const n = (l) => {
125
- const h = l.currentTarget.value;
126
- r?.(h ?? 0);
119
+ ], l.prototype, "_environment", 1);
120
+ l = d([
121
+ H("components.weather.WeatherViewModel")
122
+ ], l);
123
+ function u({ label: o, ariaLabel: e, value: i, disabled: t, onChange: r }) {
124
+ const n = (s) => {
125
+ const g = s.currentTarget.value;
126
+ r?.(g ?? 0);
127
127
  };
128
- return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${i} .ariaLabel=${e} .labelText=${o} .value=${t} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${n} @calciteSliderInput=${n}></calcite-slider></calcite-label>`;
128
+ return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${t} .ariaLabel=${e} .labelText=${o} .value=${i} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${n} @calciteSliderInput=${n}></calcite-slider></calcite-label>`;
129
129
  }
130
- const G = R(s), J = {
130
+ const Z = V(l), U = {
131
131
  sunny: "brightness",
132
132
  cloudy: "partly-cloudy",
133
133
  rainy: "rain",
134
134
  snowy: "snow",
135
135
  foggy: "fog"
136
136
  };
137
- class N extends E {
137
+ class J extends L {
138
138
  constructor() {
139
- super(...arguments), this.viewModel = G(this), this.messages = j(), this.direction = S(), this._resizeAnimationFrame = void 0, this._resizeObserver = new ResizeObserver((e) => {
140
- for (const t of e)
141
- t.target instanceof HTMLElement && this._updateButtonMetrics(t.contentRect.width);
142
- }), this._buttonWidth = 0, this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.headingLevel = 4, this.hideHeader = !1, this.icon = "partly-cloudy", this.label = this.messages.componentLabel, this.state = this.viewModel.state, this.arcgisPropertyChange = B()("state"), this.arcgisReady = F();
139
+ super(...arguments), this.viewModel = Z(this), this.messages = R(), this.direction = W(), this._resizeAnimationFrame = void 0, this._weatherTypeSelector = void 0, this._resizeObserver = new ResizeObserver((e) => {
140
+ for (const i of e)
141
+ i.target instanceof HTMLElement && this._updateButtonScale(i.target, i.contentRect.width);
142
+ }), this._buttonScale = "m", this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.headingLevel = 4, this.hideHeader = !1, this.icon = "partly-cloudy", this.label = this.messages.componentLabel, this.state = this.viewModel.state, this.arcgisPropertyChange = F()("state"), this.arcgisReady = E();
143
143
  }
144
144
  static {
145
- this.properties = { _buttonWidth: 16, view: 0, autoDestroyDisabled: 5, headingLevel: 9, hideHeader: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, state: 32 };
145
+ this.properties = { _buttonScale: 16, view: 0, autoDestroyDisabled: 5, headingLevel: 9, hideHeader: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, state: 32 };
146
146
  }
147
147
  static {
148
148
  this.styles = K;
149
149
  }
150
150
  async destroy() {
151
- await this.manager.destroy();
151
+ this._cleanupResizeObserver(), await this.manager.destroy();
152
152
  }
153
- _makeWeatherTypeButtonRef() {
154
- let e;
155
- return (t) => {
156
- t ? (e = t, this._resizeObserver.observe(t), this._updateButtonMetrics(t.clientWidth)) : e && (this._resizeObserver.unobserve(e), e = void 0);
153
+ _cleanupResizeObserver() {
154
+ this._resizeObserver.disconnect(), this._weatherTypeSelector = void 0, this._resizeAnimationFrame && (cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = void 0);
155
+ }
156
+ _makeWeatherTypeSelectorRef() {
157
+ return (e) => {
158
+ e !== this._weatherTypeSelector && (this._weatherTypeSelector && this._resizeObserver.unobserve(this._weatherTypeSelector), this._weatherTypeSelector = e, e && (this._resizeObserver.observe(e), this._updateButtonScale(e, e.clientWidth)));
157
159
  };
158
160
  }
159
- _updateButtonMetrics(e) {
161
+ _updateButtonScale(e, i) {
160
162
  this._resizeAnimationFrame && cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = requestAnimationFrame(() => {
161
- this._buttonWidth = e, this._resizeAnimationFrame = void 0;
163
+ const t = getComputedStyle(e), r = Number.parseFloat(t.getPropertyValue("--button-gap")), n = Number.parseFloat(t.getPropertyValue("--button-size-min")), a = Number.parseFloat(t.getPropertyValue("--button-size-s-max")), s = Number.parseFloat(t.getPropertyValue("--button-size-m-max")), g = (h.length - 1) * r, m = Math.max(n, Math.min((i - g) / h.length, s));
164
+ this._buttonScale = m < a ? "s" : m < s ? "m" : "l", this._resizeAnimationFrame = void 0;
162
165
  });
163
166
  }
164
167
  _getWarningMessage() {
@@ -183,38 +186,37 @@ class N extends E {
183
186
  }
184
187
  }
185
188
  render() {
186
- return c`<div aria-label=${this.messages.componentLabelAccessible ?? v} class=${b({
189
+ return c`<div aria-label=${this.messages.componentLabelAccessible ?? v} class=${w({
187
190
  root: !0,
188
- [x.widget]: !0,
189
- [x.widgetDisabled]: this.viewModel.disabled
191
+ [z.widget]: !0,
192
+ [z.widgetDisabled]: this.viewModel.disabled
190
193
  })} role=region>${this._renderContent()}</div>`;
191
194
  }
192
195
  _renderContent() {
193
- const { headingLevel: e, messages: t, viewModel: i } = this, r = this._getWarningMessage(), n = i.current, a = i.state === "error";
194
- return c`${this.hideHeader ? void 0 : H({ level: e, children: t.componentLabel })}${a ? c`<div>${this._getErrorMessage()}</div>` : void 0}<div class=${b(L({ content: !0, error: a }))}><div .ariaLabel=${t.weatherType} class="weather-type-selector" role=radiogroup style=${D({
195
- "--weather-type-count": String(u.length),
196
- "--button-size": `${this._buttonWidth}px`
197
- })}>${u.map(this._renderWeatherTypeButton, this)}</div>${Object.values(i.weatherByType).map((l) => c`<div class=${b({
196
+ const { headingLevel: e, messages: i, viewModel: t } = this, r = this._getWarningMessage(), n = t.current, a = t.state === "error";
197
+ return c`${this.hideHeader ? void 0 : D({ level: e, children: i.componentLabel })}${a ? c`<div>${this._getErrorMessage()}</div>` : void 0}<div class=${w(B({ content: !0, error: a }))}><div .ariaLabel=${i.weatherType} class="weather-type-selector" role=radiogroup style=${P({
198
+ "--weather-type-count": String(h.length)
199
+ })} ${O(this._makeWeatherTypeSelectorRef())}>${h.map(this._renderWeatherTypeButton, this)}</div>${Object.values(t.weatherByType).map((s) => c`<div class=${w({
198
200
  options: !0,
199
- hidden: l.type !== n?.type
200
- })}>${this._renderOptions(l)}</div>`)}${r ? this._renderWarning(r) : void 0}</div>`;
201
+ hidden: s.type !== n?.type
202
+ })}>${this._renderOptions(s)}</div>`)}${r ? this._renderWarning(r) : void 0}</div>`;
201
203
  }
202
204
  _renderWeatherTypeButton(e) {
203
- const t = this.messages[e]?.label ?? "", { disabled: i } = this.viewModel, r = !i && this.viewModel.current.type === e;
204
- return c`<calcite-button role=radio .label=${t} .name=${t} .appearance=${r ? "solid" : "outline"} .ariaChecked=${r ? "true" : "false"} tabindex=${(r ? void 0 : -1) ?? v} .disabled=${i} .iconStart=${J[e]} .kind=${r ? "brand" : "neutral"} width=full .scale=${this._buttonWidth < 32 ? "s" : this._buttonWidth < 64 ? "m" : "l"} @keydown=${(n) => {
205
+ const i = this.messages[e]?.label ?? "", { disabled: t } = this.viewModel, r = !t && this.viewModel.current.type === e;
206
+ return c`<calcite-button role=radio .label=${i} .name=${i} .appearance=${r ? "solid" : "outline"} .ariaChecked=${r ? "true" : "false"} tabindex=${(r ? void 0 : -1) ?? v} .disabled=${t} .iconStart=${U[e]} .kind=${r ? "brand" : "neutral"} width=full .scale=${this._buttonScale} @keydown=${(n) => {
205
207
  const a = n.key;
206
- let l = ["ArrowRight", "ArrowDown"], h = ["ArrowLeft", "ArrowUp"];
208
+ let s = ["ArrowRight", "ArrowDown"], g = ["ArrowLeft", "ArrowUp"];
207
209
  if (this.direction === "rtl") {
208
- const m = l;
209
- l = h, h = m;
210
+ const b = s;
211
+ s = g, g = b;
210
212
  }
211
- const W = l.includes(a), w = h.includes(a);
212
- if (W || w) {
213
+ const m = s.includes(a), _ = g.includes(a);
214
+ if (m || _) {
213
215
  n.preventDefault();
214
- const m = u.indexOf(e), f = u.length, _ = (m + (w ? -1 : 1) + f) % f;
215
- this.viewModel.setWeatherByType(u[_]);
216
- const y = n.currentTarget.parentElement?.parentElement;
217
- y && Array.from(y.querySelectorAll("calcite-button") ?? [])[_]?.setFocus();
216
+ const b = h.indexOf(e), f = h.length, y = (b + (_ ? -1 : 1) + f) % f;
217
+ this.viewModel.setWeatherByType(h[y]);
218
+ const x = n.currentTarget.parentElement?.parentElement;
219
+ x && Array.from(x.querySelectorAll("calcite-button") ?? [])[y]?.setFocus();
218
220
  }
219
221
  }} @click=${(n) => {
220
222
  if (r)
@@ -224,7 +226,7 @@ class N extends E {
224
226
  requestAnimationFrame(() => {
225
227
  this.viewModel.current.type === e && a.setFocus();
226
228
  });
227
- }} title=${t ?? v} ${O(this._makeWeatherTypeButtonRef())}></calcite-button>`;
229
+ }} title=${i ?? v}></calcite-button>`;
228
230
  }
229
231
  _renderOptions(e) {
230
232
  switch (e.type) {
@@ -241,46 +243,46 @@ class N extends E {
241
243
  }
242
244
  }
243
245
  _renderSunnyOptions(e) {
244
- const t = this.messages.sunny;
245
- return g({ disabled: this.viewModel.disabled, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (i) => {
246
- e.cloudCover = i;
246
+ const i = this.messages.sunny;
247
+ return u({ disabled: this.viewModel.disabled, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (t) => {
248
+ e.cloudCover = t;
247
249
  } });
248
250
  }
249
251
  _renderCloudyOptions(e) {
250
- const t = this.messages.cloudy;
251
- return g({ disabled: this.viewModel.disabled, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (i) => {
252
- e.cloudCover = i;
252
+ const i = this.messages.cloudy;
253
+ return u({ disabled: this.viewModel.disabled, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (t) => {
254
+ e.cloudCover = t;
253
255
  } });
254
256
  }
255
257
  _renderRainyOptions(e) {
256
- const { disabled: t } = this.viewModel, i = this.messages.rainy;
257
- return c`${g({ disabled: t, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (r) => {
258
+ const { disabled: i } = this.viewModel, t = this.messages.rainy;
259
+ return c`${u({ disabled: i, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (r) => {
258
260
  e.cloudCover = r;
259
- } })}${g({ disabled: t, ariaLabel: i?.precipitationAria, label: i?.precipitation, value: e.precipitation, onChange: (r) => {
261
+ } })}${u({ disabled: i, ariaLabel: t?.precipitationAria, label: t?.precipitation, value: e.precipitation, onChange: (r) => {
260
262
  e.precipitation = r;
261
263
  } })}`;
262
264
  }
263
265
  _renderSnowyOptions(e) {
264
- const { disabled: t } = this.viewModel, i = this.messages.snowy;
265
- return c`${g({ disabled: t, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (r) => {
266
+ const { disabled: i } = this.viewModel, t = this.messages.snowy;
267
+ return c`${u({ disabled: i, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (r) => {
266
268
  e.cloudCover = r;
267
- } })}${g({ disabled: t, ariaLabel: i?.precipitationAria, label: i?.precipitation, value: e.precipitation, onChange: (r) => {
269
+ } })}${u({ disabled: i, ariaLabel: t?.precipitationAria, label: t?.precipitation, value: e.precipitation, onChange: (r) => {
268
270
  e.precipitation = r;
269
- } })}<calcite-label layout=inline title=${i?.snowCoverTooltip ?? v}><calcite-checkbox .checked=${e.snowCover === "enabled"} .disabled=${t} @calciteCheckboxChange=${(r) => {
271
+ } })}<calcite-label layout=inline title=${t?.snowCoverTooltip ?? v}><calcite-checkbox .checked=${e.snowCover === "enabled"} .disabled=${i} @calciteCheckboxChange=${(r) => {
270
272
  this.viewModel.setSnowCoverEnabled(r.currentTarget.checked);
271
- }}></calcite-checkbox>${i?.snowCover}</calcite-label>`;
273
+ }}></calcite-checkbox>${t?.snowCover}</calcite-label>`;
272
274
  }
273
275
  _renderFoggyOptions(e) {
274
- const t = this.messages.foggy;
275
- return g({ disabled: this.viewModel.disabled, ariaLabel: t?.fogStrengthAria, label: t?.fogStrength, value: e.fogStrength, onChange: (i) => {
276
- e.fogStrength = i;
276
+ const i = this.messages.foggy;
277
+ return u({ disabled: this.viewModel.disabled, ariaLabel: i?.fogStrengthAria, label: i?.fogStrength, value: e.fogStrength, onChange: (t) => {
278
+ e.fogStrength = t;
277
279
  } });
278
280
  }
279
281
  _renderWarning(e) {
280
282
  return c`<calcite-notice aria-live=polite open icon=exclamation-mark-triangle-f kind=warning><div slot=title class="warning-title">${this.messages.warningTitle}</div><div slot=message>${e}</div></calcite-notice>`;
281
283
  }
282
284
  }
283
- T("arcgis-weather", N);
285
+ T("arcgis-weather", J);
284
286
  export {
285
- N as ArcgisWeather
287
+ J as ArcgisWeather
286
288
  };