@arcgis/common-components 5.2.0-next.3 → 5.2.0-next.30

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 (174) hide show
  1. package/dist/cdn/{232BH3SJ.js → 2XA6O2MP.js} +1 -1
  2. package/dist/cdn/3P53QRGS.js +2 -0
  3. package/dist/cdn/4W7JZPB6.js +2 -0
  4. package/dist/cdn/{YG4PY2H3.js → 5KS7T5BY.js} +1 -1
  5. package/dist/cdn/{OOBX2C2L.js → AFBKMYU6.js} +1 -1
  6. package/dist/cdn/EDYH6JAL.js +2 -0
  7. package/dist/cdn/FNF3USON.js +2 -0
  8. package/dist/cdn/GVOQ2CB7.js +2 -0
  9. package/dist/cdn/{F45Q3BRT.js → IUJ4ILLQ.js} +1 -1
  10. package/dist/cdn/{WJ3TYWP2.js → JLPZ3OR2.js} +1 -1
  11. package/dist/cdn/L2JNUMXB.js +2 -0
  12. package/dist/cdn/L5RMOAO3.js +2 -0
  13. package/dist/cdn/LBD3GPSD.js +2 -0
  14. package/dist/cdn/LKUOAV7B.js +2 -0
  15. package/dist/cdn/{YVCGEEMG.js → MCZBUYS5.js} +1 -1
  16. package/dist/cdn/N7C4DINF.js +2 -0
  17. package/dist/cdn/OBIWQRXY.js +2 -0
  18. package/dist/cdn/Q6B36HJB.js +2 -0
  19. package/dist/cdn/{BDF4ZLUF.js → TXYPZ6MB.js} +1 -1
  20. package/dist/cdn/{6XE5JNJ7.js → V5SIP2PW.js} +2 -2
  21. package/dist/cdn/{MINFRX4Y.js → VQLI4IE7.js} +1 -1
  22. package/dist/cdn/WEKRF34E.js +2 -0
  23. package/dist/cdn/WLYFLEI6.js +2 -0
  24. package/dist/cdn/XRARFMJ7.js +2 -0
  25. package/dist/cdn/YGG3CY7R.js +2 -0
  26. package/dist/cdn/Z5QBBHLD.js +2 -0
  27. package/dist/cdn/ZDMNUSIJ.js +2 -0
  28. package/dist/cdn/ZFQOATQO.js +2 -0
  29. package/dist/cdn/ZPPRHEY3.js +2 -0
  30. package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
  31. package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
  32. package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
  33. package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
  34. package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
  35. package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
  36. package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
  37. package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
  38. package/dist/cdn/assets/value-picker/t9n/messages.en.json +1 -0
  39. package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
  40. package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
  41. package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
  42. package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
  43. package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
  44. package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
  45. package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
  46. package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
  47. package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
  48. package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
  49. package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
  50. package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
  51. package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
  52. package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
  53. package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
  54. package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
  55. package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
  56. package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
  57. package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
  58. package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
  59. package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
  60. package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
  61. package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
  62. package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
  63. package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
  64. package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
  65. package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
  66. package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
  67. package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
  68. package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
  69. package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
  70. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
  71. package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
  72. package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
  73. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
  74. package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
  75. package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
  76. package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
  77. package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
  78. package/dist/cdn/assets/value-picker-combobox/t9n/messages.en.json +1 -0
  79. package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
  80. package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
  81. package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
  82. package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
  83. package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
  84. package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
  85. package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
  86. package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
  87. package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
  88. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
  89. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
  90. package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
  91. package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
  92. package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
  93. package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
  94. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
  95. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
  96. package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
  97. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
  98. package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
  99. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
  100. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
  101. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
  102. package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
  103. package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
  104. package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
  105. package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
  106. package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
  107. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
  108. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
  109. package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
  110. package/dist/cdn/index.js +1 -1
  111. package/dist/cdn/main.css +1 -1
  112. package/dist/chunks/layer-utils.js +52 -40
  113. package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
  114. package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
  115. package/dist/components/arcgis-color-input/customElement.js +6 -6
  116. package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
  117. package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
  118. package/dist/components/arcgis-field-info/customElement.js +166 -162
  119. package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
  120. package/dist/components/arcgis-field-pick-list/customElement.js +43 -51
  121. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
  122. package/dist/components/arcgis-histogram/customElement.js +13 -9
  123. package/dist/components/arcgis-picker-input/customElement.d.ts +6 -2
  124. package/dist/components/arcgis-picker-input/customElement.js +7 -7
  125. package/dist/components/arcgis-slider/customElement.d.ts +4 -3
  126. package/dist/components/arcgis-slider/customElement.js +303 -284
  127. package/dist/components/arcgis-unique-values-list/customElement.js +26 -26
  128. package/dist/components/arcgis-value-picker/customElement.d.ts +377 -0
  129. package/dist/components/arcgis-value-picker/customElement.js +87 -0
  130. package/dist/components/arcgis-value-picker/index.d.ts +1 -0
  131. package/dist/components/arcgis-value-picker/index.js +3 -0
  132. package/dist/components/arcgis-value-picker/types.d.ts +69 -0
  133. package/dist/components/arcgis-value-picker-collection/customElement.d.ts +113 -0
  134. package/dist/components/arcgis-value-picker-collection/customElement.js +43 -0
  135. package/dist/components/arcgis-value-picker-collection/index.d.ts +1 -0
  136. package/dist/components/arcgis-value-picker-collection/index.js +1 -0
  137. package/dist/components/arcgis-value-picker-combobox/customElement.d.ts +90 -0
  138. package/dist/components/arcgis-value-picker-combobox/customElement.js +55 -0
  139. package/dist/components/arcgis-value-picker-combobox/index.d.ts +1 -0
  140. package/dist/components/arcgis-value-picker-combobox/index.js +3 -0
  141. package/dist/components/arcgis-value-picker-label/customElement.d.ts +81 -0
  142. package/dist/components/arcgis-value-picker-label/customElement.js +51 -0
  143. package/dist/components/arcgis-value-picker-label/index.d.ts +1 -0
  144. package/dist/components/arcgis-value-picker-label/index.js +1 -0
  145. package/dist/components/arcgis-value-picker-slider/customElement.d.ts +173 -0
  146. package/dist/components/arcgis-value-picker-slider/customElement.js +60 -0
  147. package/dist/components/arcgis-value-picker-slider/index.d.ts +1 -0
  148. package/dist/components/arcgis-value-picker-slider/index.js +3 -0
  149. package/dist/docs/api.json +1 -1
  150. package/dist/docs/docs.json +1 -1
  151. package/dist/docs/vscode.css-custom-data.json +1 -1
  152. package/dist/docs/vscode.html-custom-data.json +1 -1
  153. package/dist/docs/web-types.json +1 -1
  154. package/dist/index.d.ts +50 -0
  155. package/dist/loader.js +8 -3
  156. package/dist/types/lumina.d.ts +36 -0
  157. package/dist/types/preact.d.ts +41 -0
  158. package/dist/types/react.d.ts +46 -0
  159. package/dist/types/stencil.d.ts +36 -0
  160. package/package.json +5 -5
  161. package/dist/cdn/2MN6S2HH.js +0 -2
  162. package/dist/cdn/4BJYJUMR.js +0 -2
  163. package/dist/cdn/5I5ODGDD.js +0 -2
  164. package/dist/cdn/AGGCAE6P.js +0 -2
  165. package/dist/cdn/GEWXC2ZR.js +0 -2
  166. package/dist/cdn/HWEOBUAY.js +0 -2
  167. package/dist/cdn/IRIB5DXG.js +0 -2
  168. package/dist/cdn/KPJCYYYQ.js +0 -2
  169. package/dist/cdn/ORSF6IOL.js +0 -2
  170. package/dist/cdn/QEW7H22O.js +0 -2
  171. package/dist/cdn/UMIMGOKS.js +0 -2
  172. package/dist/cdn/VUQJROFR.js +0 -2
  173. package/dist/cdn/YSXFXVP6.js +0 -2
  174. package/dist/cdn/YVWFGK4M.js +0 -2
@@ -6,10 +6,10 @@ import { LitElement as K, createEvent as I } from "@arcgis/lumina";
6
6
  import { Task as Q } from "@lit/task";
7
7
  import { createRef as X, ref as L } from "lit/directives/ref.js";
8
8
  import { log as D, composeMissingPropertyMessage as N } from "@arcgis/toolkit/log";
9
- import { formatDate as F, convertDateFormatToIntlOptions as b, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as U, formatNumber as te } from "@arcgis/core/intl.js";
9
+ import { formatDate as F, convertDateFormatToIntlOptions as $, formatDateOnly as Y, formatTimeOnly as ee, formatTimestamp as U, formatNumber as te } from "@arcgis/core/intl.js";
10
10
  import ie from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
11
11
  import { clone as O } from "@arcgis/core/core/lang.js";
12
- import { g as T, i as h } from "../../chunks/commonFunctions.js";
12
+ import { g as E, i as h } from "../../chunks/commonFunctions.js";
13
13
  import { f as S, e as z, k as B, d as Z } from "../../chunks/layer-utils.js";
14
14
  import { u as se } from "../../chunks/useT9n.js";
15
15
  function k(i) {
@@ -21,38 +21,38 @@ function R(i) {
21
21
  function ne(i, e, s) {
22
22
  let t;
23
23
  return e === "unknown" ? t = F(i, {
24
- ...b("short-date-short-time"),
24
+ ...$("short-date-short-time"),
25
25
  timeZone: "utc",
26
26
  timeZoneName: "shortOffset"
27
27
  }) : t = F(i, {
28
- ...b("short-date-short-time"),
28
+ ...$("short-date-short-time"),
29
29
  timeZone: e
30
30
  }), t;
31
31
  }
32
32
  function oe(i) {
33
- return i ? Y(i, b("short-date")) : "";
33
+ return i ? Y(i, $("short-date")) : "";
34
34
  }
35
35
  function ae(i) {
36
36
  let e;
37
- return typeof i == "string" ? e = ee(i, b("short-date-long-time")) : e = F(i, {
38
- ...b("long-time"),
37
+ return typeof i == "string" ? e = ee(i, $("short-date-long-time")) : e = F(i, {
38
+ ...$("long-time"),
39
39
  timeZone: "utc"
40
40
  }), e;
41
41
  }
42
42
  function le(i, e) {
43
43
  return typeof i == "string" ? e && "timeZone" in e && e.timeZone === "unknown" ? U(i, {
44
- ...b("short-date-short-time"),
44
+ ...$("short-date-short-time"),
45
45
  timeZone: "utc",
46
46
  timeZoneName: "shortOffset"
47
47
  }) : U(i, {
48
- ...b("short-date-short-time"),
48
+ ...$("short-date-short-time"),
49
49
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
50
50
  }) : e && "timeZone" in e && e.timeZone === "unknown" ? F(i, {
51
- ...b("short-date-short-time"),
51
+ ...$("short-date-short-time"),
52
52
  timeZone: "utc",
53
53
  timeZoneName: "shortOffset"
54
54
  }) : F(i, {
55
- ...b("short-date-short-time"),
55
+ ...$("short-date-short-time"),
56
56
  timeZone: e && "timeZone" in e && e.timeZone ? e.timeZone : "system"
57
57
  });
58
58
  }
@@ -60,7 +60,7 @@ function A(i, e, s) {
60
60
  if (!S(i) && !z(i) && !B(i) && !Z(i))
61
61
  return;
62
62
  let t;
63
- return T(i, s).fields.forEach((p) => {
63
+ return E(i, s).fields.forEach((p) => {
64
64
  const a = p.name, r = "domain" in p ? p.domain : void 0;
65
65
  if (!Z(i) && i.subtypeField === a) {
66
66
  let c;
@@ -107,7 +107,7 @@ function A(i, e, s) {
107
107
  }
108
108
  }), t;
109
109
  }
110
- function E(i, e) {
110
+ function T(i, e) {
111
111
  const s = e;
112
112
  if (s) {
113
113
  let t = "";
@@ -151,7 +151,7 @@ class ue extends K {
151
151
  const u = h(e) && h(s) || h(t);
152
152
  if (!h(t) && !h(e) && !h(s) ? D("error", this, N("uniqueValues")) : h(t) || (h(e) || D("error", this, N("layer")), h(s) || D("error", this, N("fieldName"))), h(e) && h(s)) {
153
153
  const { visualizationSource: p } = this;
154
- if (!T(e, p).fields?.filter((c) => c.name === s))
154
+ if (!E(e, p).fields?.filter((c) => c.name === s))
155
155
  throw D("error", this, "Field could not be found."), new Error();
156
156
  }
157
157
  if (!u)
@@ -185,7 +185,7 @@ class ue extends K {
185
185
  this.layer && this.fieldInfo && (setTimeout(() => this.initialRender = !1, 800), this.listNode?.setFocus());
186
186
  }
187
187
  async processProps() {
188
- const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ? T(e, u) : void 0)?.fields?.filter((r) => r.name === s)?.[0];
188
+ const { layer: e, fieldName: s, view: t, visualizationSource: u } = this, a = (e ? E(e, u) : void 0)?.fields?.filter((r) => r.name === s)?.[0];
189
189
  if (h(this.uniqueValues))
190
190
  this.fieldInfo = {
191
191
  layerField: a,
@@ -260,20 +260,20 @@ class ue extends K {
260
260
  if (!l?.length)
261
261
  return "";
262
262
  const g = n ? ["small-integer", "big-integer", "integer", "single", "double", "long", "oid"].includes(n) : !1, v = n ? ["date", "date-only", "time-only"].includes(n) : !1, _ = (y) => {
263
- y.sort(($, m) => $.count <= m.count ? 1 : -1);
263
+ y.sort((m, f) => m.count <= f.count ? 1 : -1);
264
264
  }, M = (y) => {
265
- const $ = c?.length;
266
- y.sort((m, f) => {
267
- if (!$ && g)
268
- return (typeof m.value == "string" ? Number.parseFloat(m.value) : m.value) - (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value);
265
+ const m = c?.length;
266
+ y.sort((f, b) => {
267
+ if (!m && g)
268
+ return (typeof f.value == "string" ? Number.parseFloat(f.value) : f.value) - (typeof b.value == "string" ? Number.parseFloat(b.value) : b.value);
269
269
  {
270
- const q = $ ? E(m.value, c) : m.label ?? m.value, V = $ ? E(f.value, c) : f.label ?? f.value;
270
+ const q = m ? T(f.value, c) : f.label ?? f.value, V = m ? T(b.value, c) : b.label ?? b.value;
271
271
  return `${q}`.startsWith("_") ? 1 : `${V}`.startsWith("_") ? -1 : `${q}`.localeCompare(`${V}`);
272
272
  }
273
273
  });
274
- }, P = (y, $) => {
275
- y.sort((m, f) => {
276
- const q = $?.indexOf(m.value) ?? -1, V = $?.indexOf(f.value) ?? -1;
274
+ }, P = (y, m) => {
275
+ y.sort((f, b) => {
276
+ const q = m?.indexOf(f.value) ?? -1, V = m?.indexOf(b.value) ?? -1;
277
277
  return q === V || q > -1 && V > -1 ? 0 : q > V ? -1 : 1;
278
278
  });
279
279
  };
@@ -281,7 +281,7 @@ class ue extends K {
281
281
  const W = l.map((y) => this.renderUniqueValue(y));
282
282
  let x;
283
283
  return d && !p && (x = w`<div class="unique-values-content-list-msg">${r.errors.tooManyUniqueValues}</div>`), w`<div class="container"><calcite-list .label=${r.values} class="popover-unique-list" .filterEnabled=${l.length >= a} .selectionMode=${u ? "multiple" : "single"} .filterPlaceholder=${r.searchValues} @calciteListChange=${(y) => {
284
- let m = y.target.selectedItems.map((f) => f.value);
284
+ let m = y.currentTarget.selectedItems.map((f) => f.value);
285
285
  !c && n === "date-only" ? m = m?.map((f) => R(f)) : !c && n === "time-only" ? m = m?.map((f) => k(f)) : n && ["date", "oid", "small-integer", "big-integer", "integer", "long"].includes(n) ? m = m?.map((f) => Number.parseInt(f)) : n && ["single", "double"].includes(n) && (m = m?.map((f) => Number.parseFloat(f))), !this.isSameLists(m, this.selectedValues) && (this.selectedValues = m, this.arcgisChange.emit(m));
286
286
  }} @calciteListFilter=${() => {
287
287
  this.dropdownNode.value && (this.dropdownNode.value.disabled = this.listNode.filteredItems.length < 4);
@@ -295,7 +295,7 @@ class ue extends K {
295
295
  return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${L(this.dropdownNode)}><calcite-action slot=trigger .label=${u.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>${u.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "name"} data-value=name>${e || s ? u.sortAscending : u.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t === "selected"} data-value=selected>${u.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
296
296
  }
297
297
  renderUniqueValue(e) {
298
- const { selectedValues: s, initialRender: t, view: u, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: r, uniqueValueInfos: c, simpleType: l } = p, d = u && "timeZone" in u && u.timeZone || "system", o = r?.length ? E(e.value, r) : l === "date" ? ne(e.value, d) : l === "date-only" ? oe(e.value) : l === "time-only" ? ae(e.value) : l === "timestamp-offset" ? le(e.value, u) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(r?.length ? e.value : R(e.value)) : l === "time-only" ? s.includes(r?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
298
+ const { selectedValues: s, initialRender: t, view: u, fieldInfo: p, numberFormatOptions: a } = this, { fieldDomains: r, uniqueValueInfos: c, simpleType: l } = p, d = u && "timeZone" in u && u.timeZone || "system", o = r?.length ? T(e.value, r) : l === "date" ? ne(e.value, d) : l === "date-only" ? oe(e.value) : l === "time-only" ? ae(e.value) : l === "timestamp-offset" ? le(e.value, u) : typeof e.value == "number" ? te(e.value, a) : e.label ?? e.value, n = s ? l === "date-only" ? s.includes(r?.length ? e.value : R(e.value)) : l === "time-only" ? s.includes(r?.length ? e.value : k(e.value)) : s.includes(e.value) : !1;
299
299
  return J(`list-item_${e.value}`, w`<calcite-list-item .label=${`${o}`} .value=${`${e.value}`} .selected=${n}>${h(e.count) && (c.length > 200 && !t || c.length <= 200) ? w`<div class="count" slot=actions-end>${`${e.count}`}</div>` : null}</calcite-list-item>`);
300
300
  }
301
301
  }
@@ -0,0 +1,377 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
+ import type { IconName, AnimateEvent, ArcgisValuePickerSubcomponent, Layout } from "./types.js";
4
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
5
+
6
+ /**
7
+ * The Value Picker component allows users to step or play through an iterable set of data. The component alone acts as a shell, consisting
8
+ * of a play/pause button, a next button, a previous button, and a slot for adding a component to Value Picker. Value Picker is not associated with a
9
+ * [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/) nor does it require that the dataset adheres to a specific structure
10
+ * for it to function. The [arcgis-value-picker-label](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-label/), [arcgis-value-picker-slider](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/),
11
+ * [arcgis-value-picker-combobox](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-combobox/), and [arcgis-value-picker-collection](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-collection/) components provide the user with a few different options
12
+ * for placing their data into a Value Picker with minimal configuration. Value Picker handles the different shapes of these components automatically by asserting
13
+ * that all slotted components will extend the
14
+ * [ArcgisValuePickerSubcomponent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-value-picker/types/#ArcgisValuePickerSubcomponent)
15
+ * interface, which allows Value picker to send and receive generic sets of instructions that are interpreted by the slotted component.
16
+ *
17
+ * ### Configuring Value Picker
18
+ *
19
+ * #### Configuring Value Picker without slotted components
20
+ *
21
+ * ![value-picker-nodata](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-nodata.avif)
22
+ *
23
+ * ```html
24
+ * <arcgis-map itemId="462c629e8e604c15baf45627c4f337d6">
25
+ * <arcgis-value-picker slot="top-right"></arcgis-value-picker>
26
+ * </arcgis-map>
27
+ * ```
28
+ *
29
+ * If a user wishes to use Value Picker with a component or dataset that can't be accurately represented by the slottable components, the component may be placed
30
+ * adjacent to the empty Value Picker, and events fired by Value Picker can be used to orchestrate the behavior of the adjacent component.
31
+ * For example, when the user clicks the play button, Value Picker will emit [@arcgisAnimate](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#event-arcgisAnimate) each time
32
+ * [playRate](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#playRate) ms have elapsed since the button was clicked, which the user could listen to and iterate the index of
33
+ * their dataset on an interval as a result.
34
+ *
35
+ * ```js
36
+ * const valuePicker = document.querySelector("arcgis-value-picker");
37
+ * const basemapGallery = document.querySelector("arcgis-basemap-gallery");
38
+ *
39
+ * const basemaps = new Collection([
40
+ * Basemap.fromId("topo-vector"),
41
+ * Basemap.fromId("hybrid"),
42
+ * Basemap.fromId("streets"),
43
+ * Basemap.fromId("satellite"),
44
+ * Basemap.fromId("oceans"),
45
+ * ]);
46
+ *
47
+ * basemapGallery.source = new LocalBasemapsSource({ basemaps });
48
+ * basemapGallery.activeBasemap = basemaps.getItemAt(0);
49
+ *
50
+ * valuePicker.addEventListener("arcgisAnimate", () => {
51
+ * const currentIndex = basemaps.indexOf(basemapGallery.activeBasemap);
52
+ * basemapGallery.activeBasemap = basemaps.getItemAt(currentIndex + 1);
53
+ * });
54
+ * ```
55
+ *
56
+ * #### Configuring Value Picker with slotted components
57
+ *
58
+ * A single component may be placed into the Value Picker slot by placing one element inside of the other:
59
+ *
60
+ * ```html
61
+ * <arcgis-value-picker>
62
+ * <arcgis-value-picker-slider></arcgis-value-picker-slider>
63
+ * </arcgis-value-picker>
64
+ * ```
65
+ *
66
+ * #### 1. Using a label component to step through a list of items
67
+ *
68
+ * Consider using the [arcgis-value-picker-label](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-label/) component to step through a small, fixed list of predefined values. This component provides a strict
69
+ * interface that steps back and forth, so it's a good option for temporal data, or data that shows progression dependent on the element's position in the list.
70
+ *
71
+ * ![value-picker-label](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-label.avif)
72
+ *
73
+ * ```js
74
+ * const mapElement = document.querySelector("arcgis-map");
75
+ * const valuePickerLabel = document.querySelector("arcgis-value-picker-label");
76
+ *
77
+ * const labelItems = [
78
+ * { value: "2017", label: "Tree cover in 2017" },
79
+ * { value: "2018", label: "Tree cover in 2018" },
80
+ * { value: "2019", label: "Tree cover in 2019" },
81
+ * { value: "2020", label: "Tree cover in 2020" },
82
+ * { value: "2021", label: "Tree cover in 2021" }
83
+ * ];
84
+ *
85
+ * valuePickerLabel.items = labelItems;
86
+ *
87
+ * valuePickerLabel.currentValue = labelItems[0];
88
+ * ```
89
+ *
90
+ * The user's interaction can be handled by monitoring the [arcgis-value-picker-label.currentValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-label/#currentValue) property.
91
+ *
92
+ * ```js
93
+ * valuePickerLabel.addEventListener("arcgisPropertyChange", () => {
94
+ * const year = Number(valuePickerLabel.currentValue.value);
95
+ * mapElement.view.timeExtent = {
96
+ * start: new Date(year, 0, 1),
97
+ * end: new Date(year + 1, 0, 1),
98
+ * };
99
+ * console.log("The current year is: ", valuePickerLabel.currentValue.value);
100
+ * });
101
+ * ```
102
+ *
103
+ * #### 2. Using a slider component to traverse a list of items
104
+ *
105
+ * Consider using the [arcgis-value-picker-slider](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/) component to quickly traverse through a set of data
106
+ * that can be represented along a fixed numeric range. This is a good option for sets of elements spaced along an interval, or mutating
107
+ * a continuous parameter such as layer opacity.
108
+ *
109
+ * ![value-picker-slider](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-slider.avif)
110
+ *
111
+ * ```js
112
+ * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
113
+ *
114
+ * valuePickerSlider.steps = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
115
+ * valuePickerSlider.labels = [0, 20, 40, 60, 80, 100];
116
+ * valuePickerSlider.majorTicks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
117
+ * valuePickerSlider.minorTicks = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95];
118
+ * valuePickerSlider.currentValue = 100;
119
+ * valuePickerSlider.labelFormatter = (value) => `${value}%`;
120
+ * ```
121
+ *
122
+ * The user's interaction can be handled by monitoring the [arcgis-value-picker-slider.currentValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#currentValue) property.
123
+ *
124
+ * ```js
125
+ * valuePickerSlider.addEventListener("arcgisPropertyChange", () => {
126
+ * layer.opacity = valuePickerSlider.currentValue / 100;
127
+ * console.log("The current layer opacity is: ", valuePickerSlider.currentValue / 100);
128
+ * });
129
+ * ```
130
+ *
131
+ * Note that [arcgis-value-picker-slider.labels](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#labels), [arcgis-value-picker-slider.majorTicks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#majorTicks), and [arcgis-value-picker-slider.minorTicks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-slider/#minorTicks)
132
+ * are all independent of each other and optional.
133
+ *
134
+ * #### 3. Using a combobox component to select from a list of items
135
+ *
136
+ * Consider using the [arcgis-value-picker-combobox](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-combobox/) component to step through a longer list of items that cannot be clicked through
137
+ * one by one. The combobox component allows the user to open the list as a dropdown and make a selection, or narrow the size of the list by searching for an element or keyword.
138
+ *
139
+ * ![value-picker-combobox](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-combobox.avif)
140
+ *
141
+ * ```js
142
+ * const valuePickerCombobox = document.querySelector("arcgis-value-picker-combobox");
143
+ *
144
+ * const comboboxItems = [
145
+ * { value: "Bare", label: "Isolate Bare Ground Areas" },
146
+ * { value: "Built", label: "Isolate Built Areas" },
147
+ * { value: "Trees", label: "Isolate Trees" },
148
+ * { value: "Water", label: "Isolate Water Areas" },
149
+ * { value: "Crops", label: "Isolate Crop Areas" },
150
+ * ];
151
+ *
152
+ * valuePickerCombobox.items = comboboxItems;
153
+ *
154
+ * valuePickerCombobox.currentValue = comboboxItems[0];
155
+ * ```
156
+ *
157
+ * The user's interaction can be handled by monitoring the [arcgis-value-picker-combobox.currentValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-combobox/#currentValue) property.
158
+ *
159
+ * ```js
160
+ * valuePickerCombobox.addEventListener("arcgisPropertyChange", () => {
161
+ * layer.rasterFunction = {
162
+ * functionName: valuePickerCombobox.currentValue.value,
163
+ * };
164
+ * console.log("The current land cover category is: ", valuePickerCombobox.currentValue.value);
165
+ * });
166
+ * ```
167
+ *
168
+ * #### 4. Using a collection component to step through an arbitrary set of data
169
+ *
170
+ * Consider using the [arcgis-value-picker-collection](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-collection/) component when a visual representation for the dataset is not necessary.
171
+ * This is also a good option for datasets already in the form of a [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
172
+ *
173
+ * ![value-picker-collection](https://developers.arcgis.com/javascript/latest/assets/references/components/value-picker/value-picker-collection.avif)
174
+ *
175
+ * ```js
176
+ * const Collection = (await import("@arcgis/core/core/Collection.js")).default;
177
+ *
178
+ * const mapElement = document.querySelector("arcgis-map");
179
+ * const valuePickerCollection = document.querySelector("arcgis-value-picker-collection");
180
+ *
181
+ * const basemapCollection = new Collection(["topo-vector", "streets", "osm"]);
182
+ *
183
+ * valuePickerCollection.items = basemapCollection;
184
+ *
185
+ * valuePickerCollection.currentValue = "topo-vector";
186
+ * ```
187
+ *
188
+ * The user's interaction can be handled by monitoring the [arcgis-value-picker-collection.currentValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker-collection/#currentValue) property.
189
+ *
190
+ * ```js
191
+ * valuePickerCollection.addEventListener("arcgisPropertyChange", () => {
192
+ * mapElement.basemap = valuePickerCollection.currentValue;
193
+ * console.log("The current basemap is: ", valuePickerCollection.currentValue);
194
+ * });
195
+ * ```
196
+ *
197
+ * @slot - Default slot for adding a component to value-picker. User is responsible for positioning the content via CSS.
198
+ * @since 5.2
199
+ */
200
+ export abstract class ArcgisValuePicker extends LitElement {
201
+ /**
202
+ * If true, the component will not be destroyed automatically when it is
203
+ * disconnected from the document. This is useful when you want to move the
204
+ * component to a different place on the page, or temporarily hide it. If this
205
+ * is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#destroy) method when you are done to
206
+ * prevent memory leaks.
207
+ *
208
+ * @default false
209
+ */
210
+ accessor autoDestroyDisabled: boolean;
211
+ /**
212
+ * When true, the component is visually withdrawn and cannot be interacted with. If the slotted component also has a `disabled` property,
213
+ * it will be kept in sync with this property.
214
+ *
215
+ * @default false
216
+ */
217
+ accessor disabled: boolean;
218
+ /**
219
+ * When set to `true`, the next button is not displayed.
220
+ *
221
+ * @default false
222
+ */
223
+ accessor hideNextButton: boolean;
224
+ /**
225
+ * When set to `true`, the play/pause button is not displayed.
226
+ *
227
+ * @default false
228
+ */
229
+ accessor hidePlayButton: boolean;
230
+ /**
231
+ * When set to `true`, the previous button is not displayed.
232
+ *
233
+ * @default false
234
+ */
235
+ accessor hidePreviousButton: boolean;
236
+ /**
237
+ * Icon which represents the component.
238
+ *
239
+ * @default "list-rectangle"
240
+ */
241
+ accessor icon: IconName;
242
+ /**
243
+ * The component's default label.
244
+ *
245
+ * @default ""
246
+ */
247
+ accessor label: string | undefined;
248
+ /**
249
+ * Indicates the axis that the Value Picker buttons should be oriented along.
250
+ *
251
+ * Horizontal layouts are best for wider components that don't require a lot of vertical space,
252
+ * or components that iterate from left to right over a dataset. Some examples of these are
253
+ * horizontal sliders, collapsable dropdowns, or label components.
254
+ *
255
+ * Vertical layouts are best for taller components or components that should iterate vertically.
256
+ * Some examples include vertical sliders or list components that require a larger space to allow the user to scroll through the list.
257
+ *
258
+ * @default "horizontal"
259
+ */
260
+ accessor layout: Layout;
261
+ /**
262
+ * When set to `true`, playback will restart from the first element of the slotted component's dataset
263
+ * once it reaches the end. Note that this will not allow the Value Picker buttons to be used to manually loop back to the first element.
264
+ *
265
+ * @default false
266
+ */
267
+ accessor loop: boolean;
268
+ /** @internal */
269
+ protected messages: {
270
+ componentLabel: string;
271
+ next: string;
272
+ previous: string;
273
+ play: string;
274
+ pause: string;
275
+ } & T9nMeta<{
276
+ componentLabel: string;
277
+ next: string;
278
+ previous: string;
279
+ play: string;
280
+ pause: string;
281
+ }>;
282
+ /**
283
+ * Specifies the interval, in milliseconds, on which the component will call `step("next")` on the slotted component.
284
+ *
285
+ * @default 1000
286
+ */
287
+ accessor playRate: number;
288
+ /** The current state of the component. */
289
+ get state(): "playing" | "ready";
290
+ /** Permanently destroys the component. */
291
+ destroy(): Promise<void>;
292
+ /**
293
+ * Selects the next index from the slotted component's dataset.
294
+ *
295
+ * @example
296
+ * ```js
297
+ * const valuePicker = document.querySelector("arcgis-value-picker");
298
+ * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
299
+ *
300
+ * valuePickerSlider.steps = [1, 2, 3, 4, 5];
301
+ * valuePickerSlider.currentValue = 1;
302
+ *
303
+ * console.log(`Current value: ${valuePickerSlider.currentValue}`); // "Current value: 1"
304
+ * valuePicker.next();
305
+ * console.log(`Current value: ${valuePickerSlider.currentValue}`); // "Current value: 2"
306
+ * ```
307
+ */
308
+ next(): void;
309
+ /** Stops the component from playing. */
310
+ pause(): void;
311
+ /**
312
+ * Start playing. Value Picker will call `step("next")` on the slotted component at an interval defined by [playRate](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#playRate).
313
+ *
314
+ * @example
315
+ * ```js
316
+ * // Start a continuously looping ValuePicker.
317
+ * const valuePicker = document.querySelector("arcgis-value-picker");
318
+ * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
319
+ *
320
+ * valuePickerSlider.steps = [1, 2, 3];
321
+ * valuePickerSlider.currentValue = 1;
322
+ * valuePicker.loop = true;
323
+ *
324
+ * valuePickerSlider.addEventListener("arcgisPropertyChange", () => {
325
+ * console.log(valuePickerSlider.currentValue);
326
+ * });
327
+ *
328
+ * valuePicker.play();
329
+ * // output: 1, 2, 3, 1, 2, 3, 1...
330
+ * ```
331
+ */
332
+ play(): void;
333
+ /**
334
+ * Selects the previous index from the slotted component's dataset.
335
+ *
336
+ * @example
337
+ * ```js
338
+ * const valuePicker = document.querySelector("arcgis-value-picker");
339
+ * const valuePickerSlider = document.querySelector("arcgis-value-picker-slider");
340
+ *
341
+ * valuePickerSlider.steps = [1, 2, 3, 4, 5];
342
+ * valuePickerSlider.currentValue = 3;
343
+ *
344
+ * console.log(`Current value: ${valuePickerSlider.currentValue}`); // "Current value: 3"
345
+ * valuePicker.previous();
346
+ * console.log(`Current value: ${valuePickerSlider.currentValue}`); // "Current value: 2"
347
+ * ```
348
+ */
349
+ previous(): void;
350
+ /**
351
+ * Fires on each playback tick after the user presses the play button. The event payload contains `{ first: boolean }` and fires for
352
+ * the first time after [playRate](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#playRate) ms have elapsed since the user pressed the play button. Users should
353
+ * listen to this event to manually iterate an external dataset on an interval.
354
+ */
355
+ readonly arcgisAnimate: import("@arcgis/lumina").TargetedEvent<this, AnimateEvent>;
356
+ /** Fires when the Value Picker's next button is pressed or when the [next()](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#next) method is invoked. */
357
+ readonly arcgisNext: import("@arcgis/lumina").TargetedEvent<this, void>;
358
+ /** Fires when the Value Picker's pause button is pressed or when the [pause()](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#pause) method is invoked. */
359
+ readonly arcgisPause: import("@arcgis/lumina").TargetedEvent<this, void>;
360
+ /** Fires when the Value Picker's play button is pressed or when the [play()](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#play) method is invoked. */
361
+ readonly arcgisPlay: import("@arcgis/lumina").TargetedEvent<this, void>;
362
+ /** Fires when the Value Picker's previous button is pressed or when the [previous()](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-value-picker/#previous) method is invoked. */
363
+ readonly arcgisPrevious: import("@arcgis/lumina").TargetedEvent<this, void>;
364
+ /** @copyDoc */
365
+ readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "layout" | "loop" | "playRate" | "state"; }>;
366
+ /** Fires when the contents of Value Picker's slot changes. */
367
+ readonly arcgisSlottedElementChange: import("@arcgis/lumina").TargetedEvent<this, { slottedElement: ArcgisValuePickerSubcomponent | undefined; }>;
368
+ readonly "@eventTypes": {
369
+ arcgisAnimate: ArcgisValuePicker["arcgisAnimate"]["detail"];
370
+ arcgisNext: ArcgisValuePicker["arcgisNext"]["detail"];
371
+ arcgisPause: ArcgisValuePicker["arcgisPause"]["detail"];
372
+ arcgisPlay: ArcgisValuePicker["arcgisPlay"]["detail"];
373
+ arcgisPrevious: ArcgisValuePicker["arcgisPrevious"]["detail"];
374
+ arcgisPropertyChange: ArcgisValuePicker["arcgisPropertyChange"]["detail"];
375
+ arcgisSlottedElementChange: ArcgisValuePicker["arcgisSlottedElementChange"]["detail"];
376
+ };
377
+ }
@@ -0,0 +1,87 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as o } from "../../chunks/runtime.js";
3
+ import { LitElement as n, createEvent as i, nothing as l, safeClassMap as h } from "@arcgis/lumina";
4
+ import { getSlotAssignedElements as r } from "@arcgis/toolkit/dom";
5
+ import { css as c, html as s } from "lit";
6
+ import { u as d } from "../../chunks/useT9n.js";
7
+ import { usePropertyChange as m } from "@arcgis/lumina/controllers";
8
+ const p = c`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]) slot{min-inline-size:300px;min-block-size:48px}:host([layout="vertical"]) slot{min-inline-size:300px;min-block-size:144px}slot{display:flex}slot.empty{display:none}.container{display:flex;flex-direction:column;background-color:var(--calcite-color-foreground-1)}.root{display:flex;flex-direction:row;align-items:stretch}calcite-action{width:var(--calcite-font-line-height-fixed-4xl);height:var(--calcite-font-line-height-fixed-4xl)}calcite-action-bar{--calcite-action-bar-items-space: var(--calcite-space-none);--calcite-spacing-sm: var(--calcite-space-none);background-color:var(--calcite-color-foreground-1)}.separator{border-inline-end:solid 1px var(--calcite-color-border-3);width:1px}`;
9
+ class u extends n {
10
+ constructor() {
11
+ super(), this.messages = d({ blocking: !0 }), this._isPlaying = !1, this.autoDestroyDisabled = !1, this.disabled = !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.arcgisPropertyChange = m()("layout", "loop", "playRate", "state"), this.arcgisAnimate = i(), this.arcgisNext = i(), this.arcgisPrevious = i(), this.arcgisPlay = i(), this.arcgisPause = i(), this.arcgisSlottedElementChange = i(), this.listen("arcgisPropertyChange", () => this.requestUpdate());
12
+ }
13
+ static {
14
+ this.properties = { _isPlaying: 16, _slottedElement: 16, autoDestroyDisabled: 5, disabled: 5, hideNextButton: 5, hidePlayButton: 5, hidePreviousButton: 5, icon: 1, label: 1, layout: 3, loop: 5, playRate: 9, state: 32 };
15
+ }
16
+ static {
17
+ this.styles = p;
18
+ }
19
+ get state() {
20
+ return this._isPlaying ? "playing" : "ready";
21
+ }
22
+ async destroy() {
23
+ await this.manager.destroy();
24
+ }
25
+ next() {
26
+ this.arcgisNext.emit(), this._slottedElement?.canNext && this._slottedElement.step("next");
27
+ }
28
+ pause() {
29
+ this._isPlaying = !1, this.arcgisPause.emit();
30
+ }
31
+ play() {
32
+ this._isPlaying || (this._isPlaying = !0, this.arcgisPlay.emit(), this._startPlayRate(!0));
33
+ }
34
+ previous() {
35
+ this.arcgisPrevious.emit(), this._slottedElement?.canPrevious && this._slottedElement.step("previous");
36
+ }
37
+ disconnectedCallback() {
38
+ super.disconnectedCallback(), this._isPlaying && this.pause();
39
+ }
40
+ willUpdate(t) {
41
+ t.has("layout") && this._isElementWithLayout(this._slottedElement) && (this._slottedElement.layout = this.layout), t.has("disabled") && this._isElementWithDisabled(this._slottedElement) && (this._slottedElement.disabled = this.disabled);
42
+ }
43
+ _handleSlotChange(t) {
44
+ const [e] = r(t);
45
+ this._slottedElement = e, this.arcgisSlottedElementChange.emit({ slottedElement: e }), !e && this._isPlaying && this.pause(), this._isElementWithLayout(e) && (e.layout = this.layout), this._isElementWithDisabled(e) && (e.disabled = this.disabled), this._isElementWithComponentOnReady(e) && e.componentOnReady().then(() => {
46
+ this._slottedElement === e && this.requestUpdate();
47
+ });
48
+ }
49
+ _isElementWithComponentOnReady(t) {
50
+ return !!t && "componentOnReady" in t;
51
+ }
52
+ _isElementWithLayout(t) {
53
+ return !!t && "layout" in t;
54
+ }
55
+ _isElementWithDisabled(t) {
56
+ return !!t && "disabled" in t;
57
+ }
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);
68
+ }
69
+ }, this.playRate);
70
+ }
71
+ render() {
72
+ const t = !!this._slottedElement && !this._slottedElement.hidden, e = this.state === "playing";
73
+ return s`<div class="container"><div class="root"><calcite-action-bar expand-disabled .layout=${this.layout}>${!this.hidePlayButton && s`<calcite-action alignment=center .disabled=${this.disabled || this._slottedElement && !this._slottedElement.canPlay} .icon=${e ? "pause" : "play"} .text=${e ? this.messages.pause : this.messages.play} title=${(e ? this.messages.pause : this.messages.play) ?? l} @click=${() => {
74
+ if (this._slottedElement && !this._slottedElement.canNext && !this.loop) {
75
+ this._slottedElement.reset(), this.play();
76
+ return;
77
+ }
78
+ e ? this.pause() : this.play();
79
+ }}></calcite-action>` || ""}${!this.hidePreviousButton && s`<calcite-action alignment=center .disabled=${this.disabled || e || this._slottedElement && !this._slottedElement.canPrevious} .icon=${this.layout === "horizontal" ? "chevron-left" : "chevron-up"} .text=${this.messages.previous} title=${this.messages.previous ?? l} @click=${this.previous}></calcite-action>` || ""}${!this.hideNextButton && s`<calcite-action alignment=center .disabled=${this.disabled || e || this._slottedElement && !this._slottedElement.canNext} .icon=${this.layout === "horizontal" ? "chevron-right" : "chevron-down"} .text=${this.messages.next} title=${this.messages.next ?? l} @click=${this.next}></calcite-action>` || ""}</calcite-action-bar>${t && s`<div class="separator"></div>` || ""}<slot @slotchange=${({ currentTarget: a }) => {
80
+ this._handleSlotChange(a);
81
+ }} class=${h(t ? "component-slot" : "empty")}></slot></div></div>`;
82
+ }
83
+ }
84
+ o("arcgis-value-picker", u);
85
+ export {
86
+ u as ArcgisValuePicker
87
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,3 @@
1
+ import "@esri/calcite-components/components/calcite-action-bar";
2
+ import "@esri/calcite-components/components/calcite-action";
3
+ export * from "./customElement.js";