@arcgis/common-components 6.0.0-next.4 → 6.0.0-next.40

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 (144) hide show
  1. package/dist/cdn/{B33S3YBM.js → 24FE5GMT.js} +1 -1
  2. package/dist/cdn/2XTXXTEZ.js +2 -0
  3. package/dist/cdn/3QTMLOOM.js +2 -0
  4. package/dist/cdn/4X2SOHYB.js +2 -0
  5. package/dist/cdn/{OTWADB4M.js → 4ZVHN3V7.js} +1 -1
  6. package/dist/cdn/55VDXBLV.js +2 -0
  7. package/dist/cdn/5YQK5TCH.js +2 -0
  8. package/dist/cdn/{EB5MDEWF.js → 7S4ZZPSA.js} +1 -1
  9. package/dist/cdn/7VGSZDT7.js +2 -0
  10. package/dist/cdn/ABDFJWQO.js +2 -0
  11. package/dist/cdn/BAMK6STW.js +2 -0
  12. package/dist/cdn/CC74AHNF.js +2 -0
  13. package/dist/cdn/CCJ7MF3B.js +2 -0
  14. package/dist/cdn/{TO3YFXVJ.js → EYOJNGUG.js} +1 -1
  15. package/dist/cdn/{MFGUTQRR.js → F5IBLVYU.js} +1 -1
  16. package/dist/cdn/HMGFS4YI.js +2 -0
  17. package/dist/cdn/HYR5WUUX.js +2 -0
  18. package/dist/cdn/JAMYEW7N.js +2 -0
  19. package/dist/cdn/JCWKK6FB.js +2 -0
  20. package/dist/cdn/LIFJOO55.js +2 -0
  21. package/dist/cdn/{LNXO5YIS.js → LPKRIISW.js} +1 -1
  22. package/dist/cdn/LRP7XW5X.js +2 -0
  23. package/dist/cdn/{KDCSDIUQ.js → LZPZYGFW.js} +1 -1
  24. package/dist/cdn/{JTQN5KMG.js → MWQVR7SB.js} +1 -1
  25. package/dist/cdn/N5YNSPMD.js +2 -0
  26. package/dist/cdn/NEJQBOXB.js +8207 -0
  27. package/dist/cdn/NSTQTWS5.js +2 -0
  28. package/dist/cdn/ONYZMGVN.js +2 -0
  29. package/dist/cdn/OQRMI3K5.js +2 -0
  30. package/dist/cdn/{34AP2EEB.js → OVW45JGX.js} +1 -1
  31. package/dist/cdn/Q73UFMJY.js +4 -0
  32. package/dist/cdn/{BZFAYVKR.js → RBTFN5SR.js} +1 -1
  33. package/dist/cdn/RU4PILTH.js +2 -0
  34. package/dist/cdn/RU722XDV.js +2 -0
  35. package/dist/cdn/S2EORL4N.js +2 -0
  36. package/dist/cdn/S3GK6UB7.js +2 -0
  37. package/dist/cdn/T7LZIFNY.js +2 -0
  38. package/dist/cdn/TZBDDGN3.js +2 -0
  39. package/dist/cdn/UOXUUCE7.js +3 -0
  40. package/dist/cdn/VLVINHT3.js +2 -0
  41. package/dist/cdn/WDQV5Y4K.js +2 -0
  42. package/dist/cdn/{OMROUY3L.js → X44CHGA6.js} +1 -1
  43. package/dist/cdn/XMMFL5H3.js +2 -0
  44. package/dist/cdn/{IECXEZNI.js → Y72KV72H.js} +1 -1
  45. package/dist/cdn/{D4UHHQ35.js → YOPZGJMF.js} +1 -1
  46. package/dist/cdn/ZJMMAZFG.js +2 -0
  47. package/dist/cdn/assets/layer-replace/t9n/messages.en.json +1 -0
  48. package/dist/cdn/index.js +1 -1
  49. package/dist/cdn/main.css +1 -1
  50. package/dist/chunks/sharedCacheDirective.js +74 -0
  51. package/dist/chunks/utils.js +75 -37
  52. package/dist/chunks/utils2.js +9 -14
  53. package/dist/chunks/well-known-sizes-controller.js +42 -0
  54. package/dist/components/arcgis-ckeditor5/customElement.d.ts +0 -9
  55. package/dist/components/arcgis-ckeditor5/customElement.js +1336 -1339
  56. package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +0 -6
  57. package/dist/components/arcgis-ckeditor5-popover/customElement.js +14 -17
  58. package/dist/components/arcgis-color-input/customElement.d.ts +0 -20
  59. package/dist/components/arcgis-color-input/customElement.js +33 -33
  60. package/dist/components/arcgis-color-input/index.js +2 -1
  61. package/dist/components/arcgis-field-info/customElement.d.ts +0 -3
  62. package/dist/components/arcgis-field-info/customElement.js +41 -41
  63. package/dist/components/arcgis-field-pick-list/customElement.d.ts +0 -28
  64. package/dist/components/arcgis-field-pick-list/customElement.js +114 -127
  65. package/dist/components/arcgis-field-pick-list/index.js +1 -1
  66. package/dist/components/arcgis-html-content/customElement.d.ts +42 -0
  67. package/dist/components/arcgis-html-content/customElement.js +71 -0
  68. package/dist/components/arcgis-html-content/index.d.ts +1 -0
  69. package/dist/components/arcgis-html-content/index.js +1 -0
  70. package/dist/components/arcgis-label-input/customElement.js +1 -1
  71. package/dist/components/arcgis-layer-replace/customElement.d.ts +437 -0
  72. package/dist/components/arcgis-layer-replace/customElement.js +376 -0
  73. package/dist/components/arcgis-layer-replace/index.d.ts +1 -0
  74. package/dist/components/arcgis-layer-replace/index.js +7 -0
  75. package/dist/components/arcgis-slider/customElement.js +546 -451
  76. package/dist/components/arcgis-slider-field/customElement.d.ts +43 -41
  77. package/dist/components/arcgis-slider-field/customElement.js +45 -39
  78. package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +21 -19
  79. package/dist/components/arcgis-slider-histogram-range/customElement.js +28 -22
  80. package/dist/components/arcgis-slider-input/customElement.d.ts +0 -3
  81. package/dist/components/arcgis-slider-input/customElement.js +13 -13
  82. package/dist/components/arcgis-ticks/customElement.js +8 -8
  83. package/dist/components/arcgis-toolbar/customElement.d.ts +25 -2
  84. package/dist/components/arcgis-toolbar/customElement.js +55 -46
  85. package/dist/components/arcgis-toolbar/types.d.ts +21 -1
  86. package/dist/components/arcgis-toolbar-action/customElement.js +17 -18
  87. package/dist/components/arcgis-toolbar-group/customElement.js +20 -17
  88. package/dist/components/arcgis-toolbar-item/customElement.d.ts +2 -2
  89. package/dist/components/arcgis-toolbar-item/customElement.js +14 -14
  90. package/dist/components/arcgis-toolbar-more-button/customElement.js +28 -26
  91. package/dist/components/arcgis-toolbar-split-button/customElement.js +34 -34
  92. package/dist/components/arcgis-toolbar-stack/customElement.d.ts +9 -2
  93. package/dist/components/arcgis-toolbar-stack/customElement.js +63 -125
  94. package/dist/components/arcgis-unique-values-list/customElement.js +11 -11
  95. package/dist/components/arcgis-unique-values-list/index.js +1 -1
  96. package/dist/components/arcgis-value-picker/customElement.js +22 -26
  97. package/dist/components/arcgis-value-picker-combobox/customElement.js +4 -4
  98. package/dist/components/arcgis-value-picker-label/customElement.js +5 -5
  99. package/dist/components/arcgis-value-picker-slider/customElement.d.ts +12 -19
  100. package/dist/components/arcgis-value-picker-slider/customElement.js +17 -17
  101. package/dist/docs/api.json +1 -1
  102. package/dist/docs/docs.json +1 -1
  103. package/dist/docs/vscode.css-custom-data.json +1 -1
  104. package/dist/docs/vscode.html-custom-data.json +1 -1
  105. package/dist/docs/web-types.json +1 -1
  106. package/dist/index.d.ts +15 -20
  107. package/dist/index.js +8 -5
  108. package/dist/loader.js +10 -8
  109. package/dist/types/lumina.d.ts +17 -19
  110. package/dist/types/preact.d.ts +19 -19
  111. package/dist/types/react.d.ts +21 -19
  112. package/dist/types/stencil.d.ts +17 -19
  113. package/dist/utils/sharedCacheDirective.d.ts +68 -0
  114. package/dist/utils/types.d.ts +0 -12
  115. package/package.json +7 -7
  116. package/dist/cdn/32MHBJSZ.js +0 -2
  117. package/dist/cdn/3AFEXHZ5.js +0 -2
  118. package/dist/cdn/5EA7SGHX.js +0 -2
  119. package/dist/cdn/5XRYXPOX.js +0 -2
  120. package/dist/cdn/735FTIBP.js +0 -2
  121. package/dist/cdn/ATLXGXTH.js +0 -2
  122. package/dist/cdn/BCN6LPOG.js +0 -4
  123. package/dist/cdn/CKGWDI7B.js +0 -2
  124. package/dist/cdn/DPJGC3YQ.js +0 -2
  125. package/dist/cdn/DR2THZQU.js +0 -8208
  126. package/dist/cdn/EM4OQXFS.js +0 -2
  127. package/dist/cdn/GDRW3MIZ.js +0 -2
  128. package/dist/cdn/HJ3EJZFF.js +0 -2
  129. package/dist/cdn/HYFFUYAU.js +0 -2
  130. package/dist/cdn/LLATF73T.js +0 -2
  131. package/dist/cdn/M2J3GPM4.js +0 -2
  132. package/dist/cdn/M3SFEFPX.js +0 -2
  133. package/dist/cdn/OIGA7XBZ.js +0 -2
  134. package/dist/cdn/QCUF7B3I.js +0 -2
  135. package/dist/cdn/S4XOD4YS.js +0 -2
  136. package/dist/cdn/TXQKK4DJ.js +0 -2
  137. package/dist/cdn/UIBTY5FF.js +0 -2
  138. package/dist/cdn/X6DNIKWY.js +0 -2
  139. package/dist/cdn/XUPA27AW.js +0 -2
  140. package/dist/cdn/XX2ZCFWI.js +0 -2
  141. package/dist/cdn/YEFEVEP6.js +0 -2
  142. package/dist/cdn/ZCVP2N2O.js +0 -2
  143. package/dist/cdn/ZGYD3GAS.js +0 -2
  144. package/dist/chunks/toolbar.js +0 -9
@@ -1,36 +1,36 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import { c as y } from "../../chunks/runtime.js";
3
3
  import { ref as $ } from "lit/directives/ref.js";
4
- import { html as d } from "lit";
5
- import { LitElement as _, nothing as h, safeClassMap as a } from "@arcgis/lumina";
4
+ import { html as h } from "lit";
5
+ import { LitElement as _, nothing as a, safeClassMap as d } from "@arcgis/lumina";
6
6
  import { E as L } from "../../chunks/element-reference-controller.js";
7
- import { L as f } from "../../chunks/types.js";
8
- import { a as C, u as R, g as E } from "../../chunks/utils2.js";
9
- import { b as k } from "../../chunks/utils3.js";
10
- import { W as O } from "../../chunks/utils.js";
11
- class S extends _ {
7
+ import { L as u } from "../../chunks/types.js";
8
+ import { u as R, g as k } from "../../chunks/utils2.js";
9
+ import { g as b, f as E } from "../../chunks/utils.js";
10
+ import { b as O } from "../../chunks/utils3.js";
11
+ class T extends _ {
12
12
  constructor() {
13
- super(...arguments), this._elementReferenceController = new L(this), this._childrenObserver = new MutationObserver(() => this._syncChildren()), this.priority = f.Medium, this.menuAppearance = "dropdown", this.overflowActionLabel = "More actions";
13
+ super(...arguments), this._elementReferenceController = new L(this), this._childrenObserver = new MutationObserver(() => this._syncChildren()), this.priority = u.Medium, this.menuAppearance = "dropdown", this.overflowActionLabel = "More actions";
14
14
  }
15
15
  static {
16
16
  this.properties = { _children: 16, priority: 9, menuAppearance: 1, overflowActionLabel: 1 };
17
17
  }
18
18
  measure(e) {
19
- const { priority: n, _children: i } = this, r = i?.length ?? 0;
20
- if (!r)
19
+ const { priority: t, _children: r } = this, l = r?.length ?? 0;
20
+ if (!l)
21
21
  return [0];
22
- const o = C(e), s = r * o;
23
- if (!(n < f.NeverCollapse) || r <= 1)
24
- return [s];
25
- const l = o + W(e);
26
- return n <= f.ForceCollapse ? [l] : R([l, s]);
22
+ const o = b(e), i = l * o;
23
+ if (!(t < u.NeverCollapse) || l <= 1)
24
+ return [i];
25
+ const s = o + P(e);
26
+ return t <= u.ForceCollapse ? [s] : R([s, i]);
27
27
  }
28
- proxiedRender(e, n) {
29
- const i = this._children;
30
- if (!i)
28
+ proxiedRender(e, t) {
29
+ const r = this._children;
30
+ if (!r)
31
31
  return;
32
- const { visible: r, hidden: o } = this._resolveActionsFromBudget(i, e, n, this.menuAppearance === "dropdown"), s = T(e), t = this.overflowActionLabel, l = e.tooltipAppearance, m = l !== "native", v = this._elementReferenceController.element, A = l === "calcite-dark" ? "calcite-mode-dark" : void 0, g = "split-anchor", b = o.length ? "split-menu" : "", u = E(e), w = this.menuAppearance === "action-menu" ? d`<calcite-action-menu class=${a(b)} .label=${t} overlay-positioning=fixed .placement=${u}><calcite-action class=${a(g)} data-layout=${e.layout ?? h} .icon=${s} .label=${t} .scale=${e.scale} slot=trigger .text=${t} title=${t ?? h} ${$(this._elementReferenceController.ref)}></calcite-action>${o.map((c) => c.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : d`<calcite-action class=${a(g)} data-layout=${e.layout ?? h} .icon=${s} .label=${t} .scale=${e.scale} .text=${l === "native" ? t : ""} title=${t ?? h} ${$(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown class=${a(b)} overlay-positioning=fixed .placement=${u} .referenceElement=${v} .scale=${e.scale}><calcite-dropdown-group selection-mode=single>${o.map((c) => c.proxiedRender(e, "dropdown-item", c === r.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;
33
- return d`<div class="split-host">${r.map((c) => c.proxiedRender(e, "collapsed-action"))}${o.length ? w : void 0}${o.length && m ? d`<calcite-tooltip class=${a(A)} close-on-click overlay-positioning=fixed .placement=${u} .referenceElement=${v}><span>${t}</span></calcite-tooltip>` : void 0}</div>`;
32
+ const { visible: l, hidden: o } = this._resolveActionsFromBudget(r, e, t, this.menuAppearance === "dropdown"), i = B(e), n = this.overflowActionLabel, s = e.tooltipAppearance, C = s !== "native", f = this._elementReferenceController.element, A = s === "calcite-dark" ? "calcite-mode-dark" : void 0, v = "split-anchor", g = o.length ? "split-menu" : "", m = k(e), w = this.menuAppearance === "action-menu" ? h`<calcite-action-menu class=${d(g)} .label=${n} overlay-positioning=fixed .placement=${m}><calcite-action class=${d(v)} data-layout=${e.layout ?? a} data-scale=${e.scale ?? a} .icon=${i} .label=${n} .scale=${e.scale} slot=trigger .text=${n} title=${n ?? a} ${$(this._elementReferenceController.ref)}></calcite-action>${o.map((c) => c.proxiedRender(e, "expanded-action"))}</calcite-action-menu>` : h`<calcite-action class=${d(v)} data-layout=${e.layout ?? a} data-scale=${e.scale ?? a} .icon=${i} .label=${n} .scale=${e.scale} .text=${s === "native" ? n : ""} title=${n ?? a} ${$(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown class=${d(g)} overlay-positioning=fixed .placement=${m} .referenceElement=${f} .scale=${e.scale}><calcite-dropdown-group selection-mode=single>${o.map((c) => c.proxiedRender(e, "dropdown-item", c === l.at(0)))}</calcite-dropdown-group></calcite-dropdown>`;
33
+ return h`<div class="split-host">${l.map((c) => c.proxiedRender(e, "collapsed-action"))}${o.length ? w : void 0}${o.length && C ? h`<calcite-tooltip class=${d(A)} close-on-click overlay-positioning=fixed .placement=${m} .referenceElement=${f}><span>${n}</span></calcite-tooltip>` : void 0}</div>`;
34
34
  }
35
35
  connectedCallback() {
36
36
  super.connectedCallback(), this._childrenObserver.observe(this.el, { childList: !0 }), this._syncChildren();
@@ -38,30 +38,30 @@ class S extends _ {
38
38
  disconnectedCallback() {
39
39
  this._childrenObserver.disconnect(), super.disconnectedCallback();
40
40
  }
41
- _resolveActionsFromBudget(e, n, i, r) {
42
- const o = e.find((m) => m.active) ?? e?.toSorted(k)?.at(0);
43
- if (Math.floor(i / C(n)) >= e.length)
41
+ _resolveActionsFromBudget(e, t, r, l) {
42
+ const o = e.find((s) => s.active) ?? e?.toSorted(O)?.at(0);
43
+ if (E(e.length * b(t), r))
44
44
  return { visible: [...e], hidden: [] };
45
- if (r)
45
+ if (l)
46
46
  return { visible: [o ?? e[0]], hidden: [...e] };
47
- const t = [...e];
48
- return { visible: t.splice(t.indexOf(o), 1), hidden: t };
47
+ const i = [...e];
48
+ return { visible: i.splice(i.indexOf(o), 1), hidden: i };
49
49
  }
50
50
  _syncChildren() {
51
51
  this._componentWaitAbortController?.abort();
52
- const e = Array.from(this.el.querySelectorAll("arcgis-toolbar-item")), n = new AbortController();
53
- this._componentWaitAbortController = n, Promise.all(e.map((i) => i.componentOnReady())).then(() => {
54
- !this.isConnected || n.signal.aborted || (this._children = e);
52
+ const e = Array.from(this.el.querySelectorAll("arcgis-toolbar-item")), t = new AbortController();
53
+ this._componentWaitAbortController = t, Promise.all(e.map((r) => r.componentOnReady())).then(() => {
54
+ !this.isConnected || t.signal.aborted || (this._children = e);
55
55
  });
56
56
  }
57
57
  }
58
- function T({ layout: p, relativePosition: e }) {
58
+ function B({ layout: p, relativePosition: e }) {
59
59
  return p === "horizontal" ? e.startsWith("top") ? "chevron-down" : "chevron-up" : e.endsWith("left") ? "chevron-right" : "chevron-left";
60
60
  }
61
- function W({ layout: p, scale: e }) {
62
- return O.splitButtonPart[p][e];
61
+ function P({ layout: p, scale: e, sizes: t }) {
62
+ return t.splitButtonPart[p][e];
63
63
  }
64
- y("arcgis-toolbar-split-button", S);
64
+ y("arcgis-toolbar-split-button", T);
65
65
  export {
66
- S as ArcgisToolbarSplitButton
66
+ T as ArcgisToolbarSplitButton
67
67
  };
@@ -7,8 +7,8 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
7
7
  * This is intended to be relatively simple; toolbars are 'stacked' vertically and horizontally
8
8
  * according to layout, docking behavior, and available space.
9
9
  *
10
- * A single ruler element is shared across toolbars to simplify the calculations and avoid
11
- * issues (e.g. if the toolbar is offset relative to another toolbar, that would affect the positioning of the ruler element).
10
+ * The stack observes its own content box or accepts an external allocation, so every
11
+ * toolbar receives the same available length regardless of its position within the stack.
12
12
  *
13
13
  * The general rule is the input order of the toolbar elements determines the semantic priority. Based on that priority,
14
14
  * higher priority elements are stuck to the outside, with smaller/lower priority elements flowing towards the center.
@@ -16,6 +16,13 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
16
16
  * @internal
17
17
  */
18
18
  export abstract class ArcgisToolbarStack extends LitElement {
19
+ /**
20
+ * Main-axis budget in pixels. Undefined (the default) enables intrinsic sizing:
21
+ * CSS determines the stack's size, and its observed content box supplies the budget.
22
+ * Specifying a value, including zero, disables intrinsic sizing and directly controls
23
+ * the budget used to arrange and collapse toolbars. CSS can still constrain the host.
24
+ */
25
+ accessor allocatedLength: number | undefined;
19
26
  /** Toolbar orientation */
20
27
  accessor layout: "horizontal" | "vertical";
21
28
  /**
@@ -1,174 +1,112 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as k } from "../../chunks/runtime.js";
3
- import { ref as _ } from "lit/directives/ref.js";
4
- import { css as C, render as w, nothing as P, html as p } from "lit";
5
- import { LitElement as z, nothing as v } from "@arcgis/lumina";
6
- import { useDirection as L } from "@arcgis/lumina/controllers";
7
- import { s as x, a as T, b as $, c as A } from "../../chunks/toolbar.js";
8
- import { AsyncDirective as R } from "lit/async-directive.js";
9
- import { directive as M, PartType as D } from "lit/directive.js";
10
- import { getCommittedValue as u, clearPart as E, insertPart as b, setCommittedValue as f } from "lit/directive-helpers.js";
11
- const V = C`:host{--calcite-internal-animation-timing-slow: 0}.toolbar-stack{align-items:stretch;display:flex;max-inline-size:min(100cqw,100vw);max-block-size:min(100cqh,100vh);min-inline-size:0;min-block-size:0;gap:8px}.stack{display:flex}.stack[data-horizontal-position=right]{justify-content:right}.stack[data-horizontal-position=left]{justify-content:left}.line{display:flex;flex:none;gap:8px}:host([layout="vertical"]) .line{flex-direction:column;max-height:min(100cqh - var(--arcgis-internal-attribution-space-top) - 2 * var(--calcite-space-lg),100vh - 2 * var(--calcite-space-lg))}:host([layout="horizontal"]) .line{flex-direction:row}.line[data-alignment=top]{justify-content:flex-start}.line[data-alignment=bottom]{justify-content:flex-end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{flex-direction:row}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%;calcite-action-bar{min-width:auto}}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%;calcite-action-bar{min-height:auto}}:host([toolbar-kind="floating"]) .toolbar-shadow-wrapper{box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));min-inline-size:0;min-block-size:0}`;
12
- class j {
13
- constructor(t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set()) {
14
- this.cachedParts = t, this.directives = e;
15
- }
16
- moveAllToCache() {
17
- for (const t of this.directives)
18
- t.moveToCache();
19
- }
20
- }
21
- class S extends R {
22
- #e;
23
- #i;
24
- #t;
25
- constructor(t) {
26
- if (super(t), t.type !== D.CHILD)
27
- throw new Error("sharedCache() can only be used in child expressions");
28
- }
29
- /**
30
- * @param _store Shared store backing this and other caching directives with the shared cache
31
- * @param _key Uniquely identifies the element being rendered
32
- * @param value The content to render
33
- */
34
- render(t, e, o) {
35
- return [o];
36
- }
37
- update(t, [e, o, a]) {
38
- this.#t !== e && (this.#t && this.#t.directives.delete(this), e.directives.add(this), this.#t = e), this.#e = t, this.#i = o;
39
- const i = e.cachedParts.get(o), s = i ? u(i).pop() : void 0;
40
- return s && (E(t), b(t, void 0, s), f(t, [s])), this.render(e, o, a);
41
- }
42
- /**
43
- * During the update phase, a toolbar may need to be pulled from the cache in a situation
44
- * where it was still on the page from the previous render.
45
- *
46
- * To work around this problem, during parent component render phase a pre-caching
47
- * step moves all cacheable elements into the cache. This is the method called by
48
- * that pre-caching step.
49
- *
50
- * @returns
51
- */
52
- moveToCache() {
53
- const t = this.#e, e = this.#t;
54
- if (!t || !e)
55
- return;
56
- const a = u(t).pop();
57
- if (!a)
58
- return;
59
- let i = e.cachedParts.get(this.#i);
60
- if (!i) {
61
- const c = document.createDocumentFragment();
62
- i = w(P, c), e.cachedParts.set(this.#i, i);
63
- }
64
- if (u(i).length > 0)
65
- throw new Error("sharedCache() keys must be unique");
66
- f(i, [a]), b(i, void 0, a);
67
- }
68
- disconnected() {
69
- this.#t?.directives.delete(this);
70
- }
71
- reconnected() {
72
- this.#t?.directives.add(this);
73
- }
74
- }
75
- const q = M(S), O = 8;
76
- class K extends z {
2
+ import { c as f } from "../../chunks/runtime.js";
3
+ import { css as y, html as m } from "lit";
4
+ import { LitElement as k, nothing as z } from "@arcgis/lumina";
5
+ import { useDirection as _ } from "@arcgis/lumina/controllers";
6
+ import { W as L, s as C, a as x, b as S, c as $, r as A } from "../../chunks/well-known-sizes-controller.js";
7
+ import { S as T, s as P } from "../../chunks/sharedCacheDirective.js";
8
+ const R = y`:host{--calcite-internal-animation-timing-slow: 0}.stack{block-size:100%}.toolbar-stack{display:flex;gap:8px}:host([toolbar-kind="docked"]) .toolbar-stack{gap:0}.line{display:flex;gap:8px}:host([layout="vertical"]) .line{block-size:100%;flex-direction:column}:host([layout="vertical"]) .line[data-alignment=bottom]{align-self:end}.line[data-alignment=left]{justify-content:left}.line[data-alignment=right]{justify-content:right}:host([layout="vertical"]) .toolbar-stack{block-size:100%}:host([layout="horizontal"]) .toolbar-stack{flex-direction:column}:host([toolbar-kind="docked"][layout="horizontal"]) .toolbar-stack{min-inline-size:100%}:host([toolbar-kind="docked"][layout="vertical"]) .toolbar-stack{min-block-size:100%}:host(:not([allocated-length])){.toolbar-stack{grid-area:1 / 1;min-inline-size:0;min-block-size:0}.toolbar-grid-wrapper{flex:1 1 auto}}`, g = 8;
9
+ class w extends k {
77
10
  constructor() {
78
- super(), this.#e = new ResizeObserver((t) => this._updateMeasurement(t)), this.#i = new MutationObserver(() => this._syncToolbars()), this.#r = L(), this.#o = new j(), this._layout = "horizontal", this._availableLength = 0, this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
11
+ super(), this.#i = new ResizeObserver((t) => this._updateMeasurement(t)), this.#o = new MutationObserver(() => this._syncToolbars()), this.#a = _(), this.#n = new L(this), this.#t = new T(), this._layout = "horizontal", this.scale = "m", this.tooltipAppearance = "native", this.relativePosition = "top-left", this.toolbarKind = "floating", this.listen("arcgisInternalLayoutUpdate", () => this.requestUpdate());
79
12
  }
80
13
  static {
81
- this.properties = { _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3 };
14
+ this.properties = { _observedSize: 16, _availableLength: 16, _toolbars: 16, effectiveRelativeDirection: 16, layout: 3, scale: 3, tooltipAppearance: 1, relativePosition: 1, toolbarKind: 3, allocatedLength: 11 };
82
15
  }
83
16
  static {
84
- this.styles = [V, x, T, $, A];
17
+ this.styles = [R, C, x, S, $];
85
18
  }
86
- #e;
87
19
  #i;
88
- #t;
89
- #r;
90
20
  #o;
21
+ #s;
91
22
  #a;
23
+ #n;
24
+ #t;
25
+ get _availableLength() {
26
+ return this.allocatedLength ?? (this.layout === "horizontal" ? this._observedSize?.width : this._observedSize?.height) ?? 0;
27
+ }
92
28
  get effectiveRelativeDirection() {
93
- const [t, e] = this.relativePosition.split("-"), o = this.#r;
94
- switch (e) {
29
+ const [t, i] = this.relativePosition.split("-"), e = this.#a;
30
+ switch (i) {
95
31
  case "left":
96
32
  case "right":
97
- return `${t}-${e}`;
33
+ return `${t}-${i}`;
98
34
  case "end":
99
- return `${t}-${o === "ltr" ? "right" : "left"}`;
35
+ return `${t}-${e === "ltr" ? "right" : "left"}`;
100
36
  case "start":
101
- return `${t}-${o === "ltr" ? "left" : "right"}`;
37
+ return `${t}-${e === "ltr" ? "left" : "right"}`;
102
38
  }
103
39
  }
104
40
  get layout() {
105
41
  return this._layout;
106
42
  }
107
43
  set layout(t) {
108
- t !== this._layout && (this._layout = t, this._updateMeasurement());
44
+ t !== this._layout && (this._layout = t);
109
45
  }
110
46
  connectedCallback() {
111
- super.connectedCallback(), this._connectMeasurement(this.#a), this.#i.observe(this.el, { childList: !0 }), this._syncToolbars();
47
+ super.connectedCallback(), this.#i.observe(this.el), this.#o.observe(this.el, { childList: !0 }), this._syncToolbars();
112
48
  }
113
49
  disconnectedCallback() {
114
- this.#e.disconnect(), this.#i.disconnect(), super.disconnectedCallback();
115
- }
116
- _setRulerEl(t) {
117
- this.#a !== t && (this.#a = t, this.isConnected && this._connectMeasurement(t));
118
- }
119
- _connectMeasurement(t) {
120
- this.#e.disconnect(), t && (this.#e.observe(t), this._updateMeasurement());
50
+ this.#i.disconnect(), this.#o.disconnect(), super.disconnectedCallback();
121
51
  }
122
52
  _updateMeasurement(t) {
123
- const e = t?.at(0)?.contentRect ?? this.#a?.getBoundingClientRect();
124
- e && (this._availableLength = this.layout === "horizontal" ? e.width : e.height);
53
+ this._observedSize = t?.at(0)?.contentRect;
125
54
  }
126
55
  _syncToolbars() {
127
- this.#t?.abort();
128
- const t = Array.from(this.el.children).filter(W), e = new AbortController();
129
- this.#t = e, Promise.all(t.map((o) => o.componentOnReady())).then(() => {
130
- !this.isConnected || e.signal.aborted || (this._toolbars = t);
56
+ this.#s?.abort();
57
+ const t = Array.from(this.el.children).filter(K), i = new AbortController();
58
+ this.#s = i, Promise.all(t.map((e) => e.componentOnReady())).then(() => {
59
+ !this.isConnected || i.signal.aborted || (this._toolbars = t);
131
60
  });
132
61
  }
133
- _arrangeToolbarLines(t, e) {
134
- const o = t.map((r) => {
135
- const d = r.allocate(e, this._availableLength);
136
- return { toolbar: r, budget: d.reduce((g, y) => g + y.budget, 0) };
137
- }), a = [];
138
- let i = [], s = 0;
139
- for (const r of o) {
140
- const d = s + (i.length === 0 ? 0 : O) + r.budget;
141
- i.length > 0 && d > this._availableLength ? (a.push(i), i = [r], s = r.budget) : (i.push(r), s = d);
62
+ _arrangeToolbarLines(t, i) {
63
+ const e = t.map((n) => {
64
+ const u = n.allocate(i, this._availableLength);
65
+ return { toolbar: n, budget: u.reduce((p, v) => p + v.budget, 0) };
66
+ }), o = [];
67
+ let s = [], a = 0;
68
+ for (const n of e) {
69
+ const u = a + (s.length === 0 ? 0 : g) + n.budget;
70
+ s.length > 0 && (this.toolbarKind === "docked" || u > this._availableLength) ? (o.push(s), s = [n], a = n.budget) : (s.push(n), a = u);
142
71
  }
143
- i.length > 0 && a.push(i);
144
- const [c, h] = e.relativePosition.split("-"), l = e.layout === "vertical";
145
- return (l ? h === "right" : c === "bottom") && a.reverse(), (l ? c === "bottom" : h === "right") && a.forEach((r) => r.reverse()), a;
72
+ s.length > 0 && o.push(s);
73
+ const [l, d] = i.relativePosition.split("-"), c = i.layout === "vertical";
74
+ return (c ? d === "right" : l === "bottom") && o.reverse(), (c ? l === "bottom" : d === "right") && o.forEach((n) => n.reverse()), o;
75
+ }
76
+ #e;
77
+ _renderIntrinsicSizeContribution(t, i) {
78
+ const e = t.map((a) => a.measureIntrinsicSize(i)), o = this.toolbarKind === "docked" ? Math.max(...e.map(({ maximum: a }) => a)) : e.reduce((a, { maximum: l }) => a + l, 0) + g * (t.length - 1), s = Math.max(...e.map(({ minimum: a }) => a));
79
+ return A(s, o, this.layout);
146
80
  }
147
- #s;
148
81
  render() {
149
82
  const t = this._toolbars;
150
83
  if (!t?.length) {
151
- this.#s?.length && (this.#o.moveAllToCache(), this.#s = []);
84
+ this.#e?.length && (this.#t.moveAllToCache(), this.#e = []);
152
85
  return;
153
86
  }
87
+ const i = this.#n.exports;
88
+ if (!i)
89
+ return;
154
90
  const e = {
91
+ sizes: i,
155
92
  layout: this.layout,
156
93
  relativePosition: this.effectiveRelativeDirection,
157
94
  scale: this.scale,
158
- tooltipAppearance: this.tooltipAppearance
95
+ tooltipAppearance: this.tooltipAppearance,
96
+ toolbarKind: this.toolbarKind
159
97
  }, o = this._arrangeToolbarLines(t, e);
160
- U(this.#s, o) || (this.#o.moveAllToCache(), this.#s = o.map((h) => h.map(({ toolbar: l }) => l)));
161
- const [a, i] = e.relativePosition.split("-"), s = this.layout === "vertical" ? a : i, c = this.#o;
162
- return p`<div class="stack" data-horizontal-position=${i ?? v}><div class="ruler" ${_(this._setRulerEl)}></div><div class="toolbar-stack">${o.map((h) => p`<div class="line" data-alignment=${s ?? v}>${h.map(({ toolbar: l, budget: m }) => q(c, l, l.proxiedRender(e, m, this.toolbarKind)))}</div>`)}</div></div>`;
98
+ I(this.#e, o) || (this.#t.moveAllToCache(), this.#e = o.map((c) => c.map(({ toolbar: h }) => h)));
99
+ const [s, a] = e.relativePosition.split("-"), l = this.layout === "vertical" ? s : a, d = this.#t;
100
+ return m`<div class="stack intrinsic-sizing-container">${this.allocatedLength === void 0 && this._renderIntrinsicSizeContribution(t, e) || ""}<div class="toolbar-stack">${o.map((c) => m`<div class="line" data-alignment=${l ?? z}>${c.map(({ toolbar: h, budget: b }) => P(d, h, h.proxiedRender(e, b, this.toolbarKind, this._availableLength)))}</div>`)}</div></div>`;
163
101
  }
164
102
  }
165
- function W(n) {
166
- return n.localName === "arcgis-toolbar";
103
+ function K(r) {
104
+ return r.localName === "arcgis-toolbar";
167
105
  }
168
- function U(n, t) {
169
- return n?.length === t.length && t.every((e, o) => e.length === n[o].length && e.every(({ toolbar: a }, i) => a === n[o][i]));
106
+ function I(r, t) {
107
+ return r?.length === t.length && t.every((i, e) => i.length === r[e].length && i.every(({ toolbar: o }, s) => o === r[e][s]));
170
108
  }
171
- k("arcgis-toolbar-stack", K);
109
+ f("arcgis-toolbar-stack", w);
172
110
  export {
173
- K as ArcgisToolbarStack
111
+ w as ArcgisToolbarStack
174
112
  };
@@ -1,12 +1,12 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import { c as P } from "../../chunks/runtime.js";
3
3
  import { keyed as G } from "lit/directives/keyed.js";
4
- import { LitElement as J, createEvent as T } from "@arcgis/lumina";
4
+ import { LitElement as J, createEvent as Z } from "@arcgis/lumina";
5
5
  import { Task as K } from "@lit/task";
6
6
  import { css as Q, html as F } from "lit";
7
7
  import { createRef as X, ref as E } from "lit/directives/ref.js";
8
- import { log as S, composeMissingPropertyMessage as Z } from "@arcgis/toolkit/log";
9
- import { formatDate as D, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as z, formatNumber as te } from "@arcgis/core/intl.js";
8
+ import { log as S, composeMissingPropertyMessage as D } from "@arcgis/toolkit/log";
9
+ import { formatDate as T, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as z, formatNumber as te } from "@arcgis/core/intl.js";
10
10
  import ie from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
11
11
  import * as se from "@arcgis/core/core/reactiveUtils.js";
12
12
  import { clone as I } from "@arcgis/core/core/lang.js";
@@ -21,11 +21,11 @@ function B(i) {
21
21
  }
22
22
  function oe(i, e, s) {
23
23
  let t;
24
- return e === "unknown" ? t = D(i, {
24
+ return e === "unknown" ? t = T(i, {
25
25
  ...$("short-date-short-time"),
26
26
  timeZone: "utc",
27
27
  timeZoneName: "shortOffset"
28
- }) : t = D(i, {
28
+ }) : t = T(i, {
29
29
  ...$("short-date-short-time"),
30
30
  timeZone: e
31
31
  }), t;
@@ -35,7 +35,7 @@ function ae(i) {
35
35
  }
36
36
  function le(i) {
37
37
  let e;
38
- return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = D(i, {
38
+ return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = T(i, {
39
39
  ...$("long-time"),
40
40
  timeZone: "utc"
41
41
  }), e;
@@ -48,11 +48,11 @@ function re(i, e) {
48
48
  }) : z(i, {
49
49
  ...$("short-date-short-time"),
50
50
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
51
- }) : e && "timeZone" in e && e.timeZone === "unknown" ? D(i, {
51
+ }) : e && "timeZone" in e && e.timeZone === "unknown" ? T(i, {
52
52
  ...$("short-date-short-time"),
53
53
  timeZone: "utc",
54
54
  timeZoneName: "shortOffset"
55
- }) : D(i, {
55
+ }) : T(i, {
56
56
  ...$("short-date-short-time"),
57
57
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
58
58
  });
@@ -150,7 +150,7 @@ class ce extends J {
150
150
  super(...arguments), this.dropdownNode = X(), this.initialized = !1, this._messages = ne({ blocking: !0 }), this._propWatcherTask = new K(this, {
151
151
  task: async ([e, s, t]) => {
152
152
  const r = h(e) && h(s) || h(t);
153
- if (!h(t) && !h(e) && !h(s) ? S("error", this, Z("uniqueValues")) : h(t) || (h(e) || S("error", this, Z("layer")), h(s) || S("error", this, Z("fieldName"))), h(e) && h(s)) {
153
+ if (!h(t) && !h(e) && !h(s) ? S("error", this, D("uniqueValues")) : h(t) || (h(e) || S("error", this, D("layer")), h(s) || S("error", this, D("fieldName"))), h(e) && h(s)) {
154
154
  const { visualizationSource: p } = this;
155
155
  if (!O(e, p).fields?.filter((c) => c.name === s))
156
156
  throw S("error", this, "Field could not be found."), new Error();
@@ -164,7 +164,7 @@ class ce extends J {
164
164
  this.fieldName,
165
165
  this.uniqueValues
166
166
  ]
167
- }), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = T(), this.arcgisSortByChange = T(), this.arcgisLoad = T();
167
+ }), this.initialRender = !0, this.multiple = !1, this.partialUniqueValues = !1, this.showFilterLength = 10, this.arcgisChange = Z(), this.arcgisSortByChange = Z(), this.arcgisLoad = Z();
168
168
  }
169
169
  static {
170
170
  this.properties = { initialRender: 16, view: 0, layer: 0, visualizationSource: 1, fieldName: 1, uniqueValues: 0, numberFormatOptions: 0, selectedValues: 0, sortBy: 1, multiple: 5, partialUniqueValues: 5, showFilterLength: 9, maxHeight: 9 };
@@ -312,7 +312,7 @@ class ce extends J {
312
312
  }
313
313
  renderSort(e, s) {
314
314
  const { sortBy: t, _messages: r } = this;
315
- return F`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(this.dropdownNode)}><calcite-action slot=trigger .label=${r.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t === "count" || !h(t)} data-value=count>${r.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? r.sortAscending : r.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${r.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
315
+ return F`<calcite-action id=sort-action slot=filter-actions-end .label=${r.sortValues} text><calcite-icon scale=s icon=sort-descending flip-rtl></calcite-icon></calcite-action><calcite-dropdown placement=bottom-end overlay-positioning=fixed reference-element=sort-action @calciteDropdownSelect=${this.onSortMenuSelect} ${E(this.dropdownNode)}><calcite-dropdown-group><calcite-dropdown-item .selected=${t === "count" || !h(t)} data-value=count>${r.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? r.sortAscending : r.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${r.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
316
316
  }
317
317
  renderUniqueValue(e) {
318
318
  const { selectedValues: s, initialRender: t, view: r, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: u, uniqueValueInfos: c, simpleType: l } = p, d = r && "timeZone" in r && r.timeZone || "system", o = u?.length ? x(e.value, u) : l === "date" ? oe(e.value, d) : l === "date-only" ? ae(e.value) : l === "time-only" ? le(e.value) : l === "timestamp-offset" ? re(e.value, r) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(u?.length ? e.value : B(e.value)) : l === "time-only" ? s.includes(u?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
@@ -1,7 +1,7 @@
1
1
  import "@esri/calcite-components/components/calcite-list";
2
- import "@esri/calcite-components/components/calcite-dropdown";
3
2
  import "@esri/calcite-components/components/calcite-action";
4
3
  import "@esri/calcite-components/components/calcite-icon";
4
+ import "@esri/calcite-components/components/calcite-dropdown";
5
5
  import "@esri/calcite-components/components/calcite-dropdown-group";
6
6
  import "@esri/calcite-components/components/calcite-dropdown-item";
7
7
  import "@esri/calcite-components/components/calcite-list-item";
@@ -1,12 +1,12 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as r } from "../../chunks/runtime.js";
3
- import { LitElement as c, createEvent as i, nothing as l, safeClassMap as h } from "@arcgis/lumina";
2
+ import { c } from "../../chunks/runtime.js";
3
+ import { LitElement as h, createEvent as i, nothing as n, safeClassMap as r } from "@arcgis/lumina";
4
4
  import { getSlotAssignedElements as d } from "@arcgis/toolkit/dom/slots";
5
5
  import { css as m, html as s } from "lit";
6
6
  import { u } from "../../chunks/useT9n.js";
7
7
  import { useDirection as y, usePropertyChange as p } from "@arcgis/lumina/controllers";
8
- const g = m`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]) slot{min-block-size:var(--calcite-size-xl)}:host([layout="vertical"]) slot{min-block-size:calc(2 * var(--calcite-size-2xl))}slot{display:flex;min-inline-size:300px}slot.empty{display:none}.container{display:flex;flex-direction:column;block-size:100%}.root{display:flex;flex-direction:row;align-items:stretch;flex:1;background-color:var(--calcite-color-foreground-1)}:host([floating]) .root{border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md));overflow:hidden}calcite-action{align-self:center}:host([layout="vertical"]) calcite-action{margin-block-start:auto}:host([layout="vertical"]) calcite-action:last-of-type{margin-block-end:auto}.separator{border-inline-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}`;
9
- class _ extends c {
8
+ const g = m`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]){min-block-size:var(--calcite-size-xl)}:host([layout="vertical"]){min-inline-size:var(--calcite-size-xl);calcite-action-bar{min-block-size:min-content}}slot{display:flex;flex:1 1 auto;min-block-size:var(--calcite-size-xl);min-inline-size:0}slot.empty{display:none}.container{display:flex;flex-direction:column;block-size:100%;inline-size:100%;min-block-size:0;min-inline-size:0}.root{display:flex;flex-direction:row;align-items:stretch;flex:1;background-color:var(--calcite-color-surface-2);min-block-size:0;min-inline-size:0}.root.vertical-slider{flex-direction:column}.root.vertical-slider slot{flex-direction:column}.root.vertical-slider .separator{border-inline-end:none;border-block-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}calcite-action-bar{flex-shrink:0}:host([floating]) .root{border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md));overflow:hidden}calcite-action{align-self:center}:host([layout="vertical"]) calcite-action{margin-block-start:auto}:host([layout="vertical"]) calcite-action:last-of-type{margin-block-end:auto}.separator{border-inline-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}`;
9
+ class _ extends h {
10
10
  constructor() {
11
11
  super(), this._direction = y(), this.messages = u({ blocking: !0 }), this._isPlaying = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.floating = !1, this.hideNextButton = !1, this.hidePlayButton = !1, this.hidePreviousButton = !1, this.icon = "list-rectangle", this.label = "", this.layout = "horizontal", this.loop = !1, this.playRate = 1e3, this.arcgisAnimate = i(), this.arcgisNext = i(), this.arcgisPause = i(), this.arcgisPlay = i(), this.arcgisPrevious = i(), this.arcgisPropertyChange = p()("layout", "loop", "playRate", "state"), this.arcgisSlottedElementChange = i(), this.listen("arcgisPropertyChange", () => this.requestUpdate());
12
12
  }
@@ -56,36 +56,32 @@ class _ extends c {
56
56
  return !!t && "disabled" in t;
57
57
  }
58
58
  _startPlayRate(t) {
59
- setTimeout(() => {
60
- if (this._isPlaying) {
61
- if (!this._slottedElement?.canNext && this.loop)
62
- this._slottedElement?.reset();
63
- else if (this._slottedElement?.step("next"), this._slottedElement && !this._slottedElement?.canNext && !this.loop) {
64
- this.pause();
65
- return;
66
- }
67
- this.arcgisAnimate.emit({ first: t }), this._startPlayRate(!1);
59
+ if (this._isPlaying) {
60
+ if (!this._slottedElement?.canNext && (this.loop || t))
61
+ this._slottedElement?.reset();
62
+ else if (this._slottedElement?.step("next"), this._slottedElement && !this._slottedElement?.canNext && !this.loop) {
63
+ this.pause();
64
+ return;
68
65
  }
69
- }, this.playRate);
66
+ this.arcgisAnimate.emit({ first: t }), setTimeout(() => {
67
+ this._startPlayRate(!1);
68
+ }, this.playRate);
69
+ }
70
70
  }
71
71
  _renderActions() {
72
- const t = this.state === "playing", e = this.layout === "vertical" && this._slottedElement?.localName === "arcgis-value-picker-slider", a = !this.hidePlayButton && s`<calcite-action alignment=center .disabled=${this.disabled || this._slottedElement && !this._slottedElement.canPlay} .icon=${t ? "pause" : "play"} .text=${t ? this.messages.pause : this.messages.play} title=${(t ? this.messages.pause : this.messages.play) ?? l} @click=${() => {
73
- if (this._slottedElement && !this._slottedElement.canNext && !this.loop) {
74
- this._slottedElement.reset(), this.play();
75
- return;
76
- }
72
+ const t = this.state === "playing", e = this.layout === "vertical" && this._slottedElement?.localName === "arcgis-value-picker-slider", l = !this.hidePlayButton && s`<calcite-action alignment=center .disabled=${this.disabled || this._slottedElement && !this._slottedElement.canPlay} .icon=${t ? "pause" : "play"} .text=${t ? this.messages.pause : this.messages.play} title=${(t ? this.messages.pause : this.messages.play) ?? n} @click=${() => {
77
73
  t ? this.pause() : this.play();
78
- }}></calcite-action>` || "", o = !this.hidePreviousButton && s`<calcite-action alignment=center .disabled=${this.disabled || t || this._slottedElement && !this._slottedElement.canPrevious} .icon=${this.layout === "horizontal" ? "chevron-left" : e ? "chevron-down" : "chevron-up"} .text=${this.messages.previous} title=${this.messages.previous ?? l} @click=${this.previous}></calcite-action>` || "", n = !this.hideNextButton && s`<calcite-action alignment=center .disabled=${this.disabled || t || this._slottedElement && !this._slottedElement.canNext} .icon=${this.layout === "horizontal" ? "chevron-right" : e ? "chevron-up" : "chevron-down"} .text=${this.messages.next} title=${this.messages.next ?? l} @click=${this.next}></calcite-action>` || "";
79
- return (this._direction === "rtl" && this.layout === "horizontal" || e ? [a, n, o] : [a, o, n]).filter(Boolean);
74
+ }}></calcite-action>` || "", a = !this.hidePreviousButton && s`<calcite-action alignment=center .disabled=${this.disabled || t || this._slottedElement && !this._slottedElement.canPrevious} .icon=${this.layout === "horizontal" ? "chevron-left" : e ? "chevron-down" : "chevron-up"} .text=${this.messages.previous} title=${this.messages.previous ?? n} @click=${this.previous}></calcite-action>` || "", o = !this.hideNextButton && s`<calcite-action alignment=center .disabled=${this.disabled || t || this._slottedElement && !this._slottedElement.canNext} .icon=${this.layout === "horizontal" ? "chevron-right" : e ? "chevron-up" : "chevron-down"} .text=${this.messages.next} title=${this.messages.next ?? n} @click=${this.next}></calcite-action>` || "";
75
+ return (this._direction === "rtl" && this.layout === "horizontal" || e ? [l, o, a] : [l, a, o]).filter(Boolean);
80
76
  }
81
77
  render() {
82
- const t = !!this._slottedElement && !this._slottedElement.hidden, e = this._renderActions();
83
- return s`<div class="container"><div class="root"><calcite-action-bar expand-toggle-disabled .layout=${this.layout}>${e}</calcite-action-bar>${t && s`<div class="separator"></div>` || ""}<slot @slotchange=${({ currentTarget: a }) => {
84
- this._handleSlotChange(a);
85
- }} class=${h(t ? "component-slot" : "empty")}></slot></div></div>`;
78
+ const t = !!this._slottedElement && !this._slottedElement.hidden, e = this._renderActions(), l = e.length > 0 && t, a = this.layout === "vertical" && this._slottedElement?.localName === "arcgis-value-picker-slider";
79
+ return s`<div class="container"><div class=${r(a ? "root vertical-slider" : "root")}>${e.length > 0 && s`<calcite-action-bar expand-toggle-disabled .layout=${this.layout}>${e}</calcite-action-bar>` || ""}${l && s`<div class="separator"></div>` || ""}<slot @slotchange=${({ currentTarget: o }) => {
80
+ this._handleSlotChange(o);
81
+ }} class=${r(t ? "component-slot" : "empty")}></slot></div></div>`;
86
82
  }
87
83
  }
88
- r("arcgis-value-picker", _);
84
+ c("arcgis-value-picker", _);
89
85
  export {
90
86
  _ as ArcgisValuePicker
91
87
  };
@@ -1,11 +1,11 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import { c as l } from "../../chunks/runtime.js";
3
- import { LitElement as r } from "@arcgis/lumina";
4
- import { css as n, html as a } from "lit";
3
+ import { LitElement as n } from "@arcgis/lumina";
4
+ import { css as r, html as a } from "lit";
5
5
  import { usePropertyChange as o } from "@arcgis/lumina/controllers";
6
6
  import { u as h } from "../../chunks/useT9n.js";
7
- const u = n`:host{align-items:center;display:flex;flex:auto;min-width:300px;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`;
8
- class m extends r {
7
+ const u = r`:host{align-items:center;display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`;
8
+ class m extends n {
9
9
  constructor() {
10
10
  super(...arguments), this.messages = h({ blocking: !0 }), this.autoDestroyDisabled = !1, this.disabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.arcgisPropertyChange = o()("canNext", "canPlay", "canPrevious", "currentValue");
11
11
  }
@@ -1,12 +1,12 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import { c as a } from "../../chunks/runtime.js";
3
3
  import { LitElement as r } from "@arcgis/lumina";
4
- import { css as n, html as c } from "lit";
5
- import { usePropertyChange as l } from "@arcgis/lumina/controllers";
6
- const o = n`:host{display:flex;flex:auto;min-width:300px;padding:var(--calcite-space-sm)}:host([disabled]){opacity:var(--calcite-opacity-disabled);pointer-events:none}.container{align-items:center;border:solid var(--calcite-border-width-sm) var(--calcite-color-border-3);display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}.text{color:var(--calcite-color-text-1);flex:auto;font-family:inherit;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--calcite-space-none)}`;
4
+ import { css as n, html as l } from "lit";
5
+ import { usePropertyChange as c } from "@arcgis/lumina/controllers";
6
+ const o = n`:host{display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding:var(--calcite-space-sm)}:host([disabled]){opacity:var(--calcite-opacity-disabled);pointer-events:none}.container{align-items:center;border:solid var(--calcite-border-width-sm) var(--calcite-color-border-3);display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}.text{color:var(--calcite-color-text-1);flex:auto;font-family:inherit;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-regular);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--calcite-space-none)}`;
7
7
  class h extends r {
8
8
  constructor() {
9
- super(...arguments), this.autoDestroyDisabled = !1, this.disabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.arcgisPropertyChange = l()("canNext", "canPlay", "canPrevious", "currentValue");
9
+ super(...arguments), this.autoDestroyDisabled = !1, this.disabled = !1, this.canNext = !1, this.canPlay = !1, this.canPrevious = !1, this.arcgisPropertyChange = c()("canNext", "canPlay", "canPrevious", "currentValue");
10
10
  }
11
11
  static {
12
12
  this.properties = { autoDestroyDisabled: 5, disabled: 7, items: 0, currentValue: 0, canNext: 5, canPlay: 5, canPrevious: 5 };
@@ -42,7 +42,7 @@ class h extends r {
42
42
  this.canNext = e < this.items.length - 1, this.canPrevious = e > 0;
43
43
  }
44
44
  render() {
45
- return c`<div class="container"><div class="text">${this.currentValue?.label}</div></div>`;
45
+ return l`<div class="container"><div class="text">${this.currentValue?.label}</div></div>`;
46
46
  }
47
47
  }
48
48
  a("arcgis-value-picker-label", h);