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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/cdn/5DNVHLO6.js +2 -0
  2. package/dist/cdn/{KUHPQGH3.js → 5T3MHTWU.js} +1 -1
  3. package/dist/cdn/{AOC4VUP6.js → 6OOQ7GIC.js} +1 -1
  4. package/dist/cdn/ABPHGXQN.js +2 -0
  5. package/dist/cdn/CZXCSL3K.js +2 -0
  6. package/dist/cdn/L34RL7Y3.js +2 -0
  7. package/dist/cdn/{4XVCI45D.js → XF5VBSRX.js} +1 -1
  8. package/dist/cdn/assets/feature-templates/t9n/messages.ar.json +1 -0
  9. package/dist/cdn/assets/feature-templates/t9n/messages.bg.json +1 -0
  10. package/dist/cdn/assets/feature-templates/t9n/messages.bs.json +1 -0
  11. package/dist/cdn/assets/feature-templates/t9n/messages.ca.json +1 -0
  12. package/dist/cdn/assets/feature-templates/t9n/messages.cs.json +1 -0
  13. package/dist/cdn/assets/feature-templates/t9n/messages.da.json +1 -0
  14. package/dist/cdn/assets/feature-templates/t9n/messages.de.json +1 -0
  15. package/dist/cdn/assets/feature-templates/t9n/messages.el.json +1 -0
  16. package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -0
  17. package/dist/cdn/assets/feature-templates/t9n/messages.es.json +1 -0
  18. package/dist/cdn/assets/feature-templates/t9n/messages.et.json +1 -0
  19. package/dist/cdn/assets/feature-templates/t9n/messages.fi.json +1 -0
  20. package/dist/cdn/assets/feature-templates/t9n/messages.fr.json +1 -0
  21. package/dist/cdn/assets/feature-templates/t9n/messages.he.json +1 -0
  22. package/dist/cdn/assets/feature-templates/t9n/messages.hr.json +1 -0
  23. package/dist/cdn/assets/feature-templates/t9n/messages.hu.json +1 -0
  24. package/dist/cdn/assets/feature-templates/t9n/messages.id.json +1 -0
  25. package/dist/cdn/assets/feature-templates/t9n/messages.it.json +1 -0
  26. package/dist/cdn/assets/feature-templates/t9n/messages.ja.json +1 -0
  27. package/dist/cdn/assets/feature-templates/t9n/messages.ko.json +1 -0
  28. package/dist/cdn/assets/feature-templates/t9n/messages.lt.json +1 -0
  29. package/dist/cdn/assets/feature-templates/t9n/messages.lv.json +1 -0
  30. package/dist/cdn/assets/feature-templates/t9n/messages.nl.json +1 -0
  31. package/dist/cdn/assets/feature-templates/t9n/messages.no.json +1 -0
  32. package/dist/cdn/assets/feature-templates/t9n/messages.pl.json +1 -0
  33. package/dist/cdn/assets/feature-templates/t9n/messages.pt-BR.json +1 -0
  34. package/dist/cdn/assets/feature-templates/t9n/messages.pt-PT.json +1 -0
  35. package/dist/cdn/assets/feature-templates/t9n/messages.ro.json +1 -0
  36. package/dist/cdn/assets/feature-templates/t9n/messages.ru.json +1 -0
  37. package/dist/cdn/assets/feature-templates/t9n/messages.sk.json +1 -0
  38. package/dist/cdn/assets/feature-templates/t9n/messages.sl.json +1 -0
  39. package/dist/cdn/assets/feature-templates/t9n/messages.sr.json +1 -0
  40. package/dist/cdn/assets/feature-templates/t9n/messages.sv.json +1 -0
  41. package/dist/cdn/assets/feature-templates/t9n/messages.th.json +1 -0
  42. package/dist/cdn/assets/feature-templates/t9n/messages.tr.json +1 -0
  43. package/dist/cdn/assets/feature-templates/t9n/messages.uk.json +1 -0
  44. package/dist/cdn/assets/feature-templates/t9n/messages.vi.json +1 -0
  45. package/dist/cdn/assets/feature-templates/t9n/messages.zh-CN.json +1 -0
  46. package/dist/cdn/assets/feature-templates/t9n/messages.zh-HK.json +1 -0
  47. package/dist/cdn/assets/feature-templates/t9n/messages.zh-TW.json +1 -0
  48. package/dist/cdn/index.js +1 -1
  49. package/dist/cdn/main.css +1 -1
  50. package/dist/components/arcgis-daylight/customElement.d.ts +1 -1
  51. package/dist/components/arcgis-daylight/customElement.js +34 -27
  52. package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +33 -0
  53. package/dist/components/arcgis-feature-templates/customElement.d.ts +275 -0
  54. package/dist/components/arcgis-feature-templates/customElement.js +560 -0
  55. package/dist/components/arcgis-feature-templates/index.d.ts +1 -0
  56. package/dist/components/arcgis-feature-templates/index.js +13 -0
  57. package/dist/components/arcgis-layer-list/customElement.d.ts +3 -0
  58. package/dist/components/arcgis-layer-list-next/customElement.d.ts +319 -32
  59. package/dist/components/arcgis-layer-list-next/customElement.js +5 -1
  60. package/dist/components/arcgis-paste/PasteViewModel.d.ts +1 -1
  61. package/dist/components/arcgis-paste/customElement.js +27 -38
  62. package/dist/components/arcgis-paste/index.js +1 -1
  63. package/dist/components/arcgis-slider-scale-range/customElement.js +16 -16
  64. package/dist/components/arcgis-template-image/customElement.d.ts +14 -0
  65. package/dist/components/arcgis-template-image/customElement.js +119 -0
  66. package/dist/components/arcgis-template-image/index.d.ts +1 -0
  67. package/dist/components/arcgis-template-image/index.js +1 -0
  68. package/dist/components/arcgis-version-management/customElement.js +21 -20
  69. package/dist/components/arcgis-version-management/index.js +1 -0
  70. package/dist/docs/api.json +1 -1
  71. package/dist/docs/docs.json +1 -1
  72. package/dist/docs/vscode.html-custom-data.json +1 -1
  73. package/dist/docs/web-types.json +1 -1
  74. package/dist/index.d.ts +14 -0
  75. package/dist/loader.js +2 -0
  76. package/dist/types/lumina.d.ts +14 -0
  77. package/dist/types/preact.d.ts +16 -0
  78. package/dist/types/react.d.ts +18 -0
  79. package/dist/types/stencil.d.ts +14 -0
  80. package/package.json +5 -5
  81. package/dist/cdn/IBTOXDST.js +0 -2
  82. package/dist/cdn/YJCBT5VK.js +0 -2
@@ -10,11 +10,11 @@ import { createRef as G, ref as Y } from "lit/directives/ref.js";
10
10
  import { u as be } from "../../chunks/useT9n.js";
11
11
  import { u as ve } from "../../chunks/useView.js";
12
12
  import { m as N } from "../../chunks/handle.js";
13
- import { o as P, i as f, b as q, d as z, g as we } from "../../chunks/time-utils.js";
13
+ import { o as D, i as f, b as q, d as z, g as we } from "../../chunks/time-utils.js";
14
14
  import { r as ye, b as xe, d as Se } from "../../chunks/async-utils.js";
15
15
  import { createTrackingTarget as De, runTracked as Z, signal as Te } from "@arcgis/core/applications/Components/reactiveUtils.js";
16
16
  import { C as W } from "../../chunks/component-wrapper.js";
17
- import { V as D } from "../../chunks/visible-element.js";
17
+ import { V as T } from "../../chunks/visible-element.js";
18
18
  function ke(i, e) {
19
19
  return i / 15;
20
20
  }
@@ -64,19 +64,19 @@ class Ce {
64
64
  function A(i) {
65
65
  return new Ce(i);
66
66
  }
67
- var U = Math.PI, u = Math.sin, T = Math.cos, ze = Math.asin, Me = Math.acos, y = U / 180, ne = 1e3 * 60 * 60 * 24, se = 2440588, oe = 2451545;
68
- function Oe(i) {
67
+ var U = Math.PI, u = Math.sin, k = Math.cos, ze = Math.asin, Oe = Math.acos, y = U / 180, ne = 1e3 * 60 * 60 * 24, se = 2440588, oe = 2451545;
68
+ function Me(i) {
69
69
  return i.valueOf() / ne - 0.5 + se;
70
70
  }
71
- function M(i) {
71
+ function O(i) {
72
72
  return new Date((i + 0.5 - se) * ne);
73
73
  }
74
74
  function Le(i) {
75
- return Oe(i) - oe;
75
+ return Me(i) - oe;
76
76
  }
77
77
  var K = y * 23.4397;
78
78
  function Ue(i, e) {
79
- return ze(u(e) * T(K) + T(e) * u(K) * u(i));
79
+ return ze(u(e) * k(K) + k(e) * u(K) * u(i));
80
80
  }
81
81
  function Ee(i) {
82
82
  return y * (357.5291 + 0.98560028 * i);
@@ -116,7 +116,7 @@ function X(i, e, t) {
116
116
  return oe + i + 53e-4 * u(e) - 69e-4 * u(2 * t);
117
117
  }
118
118
  function Ne(i, e, t) {
119
- return Me((u(i) - u(e) * u(t)) / (T(e) * T(t)));
119
+ return Oe((u(i) - u(e) * u(t)) / (k(e) * k(t)));
120
120
  }
121
121
  S.getTimes = function(i, e, t) {
122
122
  var r = y * -t, n = y * e, s = Le(i), o = Ie(s, r), a = Q(0, r, o), c = Ee(a), d = He(c), l = Ae(c, d), h = Ue(l, 0), g = X(a, c, l);
@@ -125,16 +125,16 @@ S.getTimes = function(i, e, t) {
125
125
  return X(le, c, l);
126
126
  }
127
127
  function x(H) {
128
- var C = (u(H) - u(n) * u(h)) / (T(n) * T(h));
128
+ var C = (u(H) - u(n) * u(h)) / (k(n) * k(h));
129
129
  return C < -1 ? S.PolarException.MIDNIGHT_SUN : C > 1 ? S.PolarException.POLAR_NIGHT : S.PolarException.NORMAL;
130
130
  }
131
131
  var _ = {
132
- solarNoon: M(g),
133
- nadir: M(g - 0.5),
132
+ solarNoon: O(g),
133
+ nadir: O(g - 0.5),
134
134
  polarException: S.PolarException.NORMAL
135
135
  }, b, m, $, E, F;
136
136
  for (b = 0, m = I.length; b < m; b += 1)
137
- $ = I[b], E = w($[0] * y), F = g - (E - g), _[$[1]] = M(F), _[$[2]] = M(E);
137
+ $ = I[b], E = w($[0] * y), F = g - (E - g), _[$[1]] = O(F), _[$[2]] = O(E);
138
138
  return _.polarException = x(I[0][0] * y), _;
139
139
  };
140
140
  const Je = {
@@ -147,7 +147,7 @@ const Je = {
147
147
  winter: { dayOfMonth: 21, month: 11 }
148
148
  // Northern Winter solstice in 2014 - December 21
149
149
  }, J = ["spring", "summer", "fall", "winter"];
150
- function k(i, e, t) {
150
+ function P(i, e, t) {
151
151
  const r = V(e, t), { dayOfMonth: n, month: s } = Je[r], o = new Date(i.getTime());
152
152
  return o.setMonth(s, n), o;
153
153
  }
@@ -156,7 +156,7 @@ function Re(i, e) {
156
156
  return V(t, e);
157
157
  }
158
158
  function Ve(i) {
159
- const e = i.getTime(), t = k(i, "spring", "northern").getTime(), r = k(i, "summer", "northern").getTime(), n = k(i, "fall", "northern").getTime(), s = k(i, "winter", "northern").getTime();
159
+ const e = i.getTime(), t = P(i, "spring", "northern").getTime(), r = P(i, "summer", "northern").getTime(), n = P(i, "fall", "northern").getTime(), s = P(i, "winter", "northern").getTime();
160
160
  return e >= t && e < r ? "spring" : e >= r && e < n ? "summer" : e >= n && e < s ? "fall" : "winter";
161
161
  }
162
162
  function V(i, e) {
@@ -171,7 +171,7 @@ function Fe(i) {
171
171
  }
172
172
  const je = 1440, Be = 864e5;
173
173
  function Ge(i, e, t, r) {
174
- const n = S.getTimes(i, e, t), s = n.sunrise, o = n.sunset, a = P(i, r), c = P(s, r), d = P(o, r);
174
+ const n = S.getTimes(i, e, t), s = n.sunrise, o = n.sunset, a = D(i, r), c = D(s, r), d = D(o, r);
175
175
  if (a.getUTCDate() !== c.getUTCDate() || a.getUTCDate() !== d.getUTCDate()) {
176
176
  const l = a.getTime() - c.getTime() > 0 ? 1 : -1;
177
177
  s.setUTCDate(s.getUTCDate() + l), o.setUTCDate(o.getUTCDate() + l);
@@ -181,7 +181,7 @@ function Ge(i, e, t, r) {
181
181
  sunset: o
182
182
  };
183
183
  }
184
- const Ye = 100, qe = 1e3, v = 12e5, O = 72e5;
184
+ const Ye = 100, qe = 1e3, v = 12e5, M = 72e5;
185
185
  function te(i, e) {
186
186
  return re(i + e, 24);
187
187
  }
@@ -225,7 +225,7 @@ function We(i, e, t, r) {
225
225
  } = r, a = n * L, c = s * L, d = o * L;
226
226
  if (i == null || e == null || Number.isNaN(i.getTime()) && Number.isNaN(e.getTime()))
227
227
  return a;
228
- const l = t.getTime(), h = i.getTime(), g = e.getTime(), w = h - O / 2, x = h + O / 2, _ = g - O / 3 * 2, b = g + O / 3;
228
+ const l = t.getTime(), h = i.getTime(), g = e.getTime(), w = h - M / 2, x = h + M / 2, _ = g - M / 3 * 2, b = g + M / 3;
229
229
  let m = a;
230
230
  return l >= w && l <= x ? l - w <= v ? m = c - (l - w) / v * (c - d) : x - l <= v / 2 ? m = a - (x - l) / v * 2 * (a - d) : m = d : l >= _ && l <= b ? l - _ <= v / 2 ? m = a - (l - _) / v * 2 * (a - d) : b - l <= v ? m = c - (b - l) / v * (c - d) : m = d : (l < h || l > g) && (m = c), m;
231
231
  }
@@ -270,7 +270,7 @@ class Xe extends fe {
270
270
  return;
271
271
  const e = ye(() => {
272
272
  if (this.#i?.remove(), f(this._lighting)) {
273
- const t = this.utcOffset ?? 0, r = this.timeSliderPosition ?? 0, n = this.localDate, s = r - t * 60, o = P(n, s, "minutes");
273
+ const t = this.utcOffset ?? 0, r = this.timeSliderPosition ?? 0, n = this.localDate, s = r - t * 60, o = D(n, s, "minutes");
274
274
  this._lighting.date = o, this._lighting.displayUTCOffset = t;
275
275
  }
276
276
  }, { timeout: this.#d });
@@ -283,7 +283,7 @@ class Xe extends fe {
283
283
  return p`<calcite-label .scale=${e} class="date-picker-container">${r.date}${et({ disabled: t, scale: e, date: this.localDateAsString, onDateChange: (n) => {
284
284
  const s = n.currentTarget.value, o = Array.isArray(s) ? s[0] : s;
285
285
  this._stopPlaying(), this.localDate = o, this._emitUserDateTimeChangeEvent();
286
- } })}</calcite-label>${D({ hidden: this.hidePlayButtons, children: ie({ playing: this.yearPlaying, disabled: t, label: r.playYear, onClick: () => {
286
+ } })}</calcite-label>${T({ hidden: this.hidePlayButtons, children: ie({ playing: this.yearPlaying, disabled: t, label: r.playYear, onClick: () => {
287
287
  this._playingState === "year" ? this._playingState = "none" : this._playingState = "year";
288
288
  }, scale: e }) })}`;
289
289
  }
@@ -298,7 +298,7 @@ class Xe extends fe {
298
298
  return this.#l?.value?.startTime;
299
299
  }
300
300
  get localDateAsString() {
301
- return this._localDate.value ?? "";
301
+ return this._localDate.value ?? void 0;
302
302
  }
303
303
  get _playingState() {
304
304
  return this.#r;
@@ -326,7 +326,14 @@ class Xe extends fe {
326
326
  f(r) && (s.cameraTrackingEnabled = r.cameraTrackingEnabled);
327
327
  const o = e ? "virtual" : "sun";
328
328
  let a;
329
- n?.type === o ? a = n : a = e ? new me() : new pe(), a.set(s), t.lighting = a, e || (this._stopPlaying(), this.#o.value && (this.#o.value.open = !1));
329
+ n?.type === o ? a = n : a = e ? new me() : new pe({
330
+ date: D(
331
+ D(this.localDate, this.timeSliderPosition ?? 0, "minutes"),
332
+ // this.localDate already includes the UTC offset, so we need to remove the offset to get the correct UTC date for the SunLighting configuration
333
+ this.utcOffset ?? 0
334
+ ),
335
+ displayUTCOffset: this.utcOffset
336
+ }), a.set(s), t.lighting = a, e || (this._stopPlaying(), this.#o.value && (this.#o.value.open = !1));
330
337
  }
331
338
  get currentSeason() {
332
339
  const e = this._view?.camera?.position?.latitude ?? 0, t = ee(e);
@@ -335,7 +342,7 @@ class Xe extends fe {
335
342
  set currentSeason(e) {
336
343
  this._stopPlaying();
337
344
  const t = this._view?.camera?.position?.latitude ?? 0, r = ee(t), n = V(e, r);
338
- this.localDate = k(this.localDate, n, "northern"), this._emitUserDateTimeChangeEvent();
345
+ this.localDate = P(this.localDate, n, "northern"), this._emitUserDateTimeChangeEvent();
339
346
  }
340
347
  get dayPlaying() {
341
348
  return this._playingState === "day";
@@ -406,7 +413,7 @@ class Xe extends fe {
406
413
  }
407
414
  willUpdate(e) {
408
415
  if (super.willUpdate(e), !!this.#c && f(this._lighting) && e.has("utcOffset")) {
409
- const t = this.utcOffset ?? 0, r = this._lighting.displayUTCOffset ?? 0, n = this.timeSliderPosition ?? 0, s = this.localDate, o = n - r * 60, a = P(s, o, "minutes"), { minutesSinceMidnight: c, localDate: d } = z(a, t);
416
+ const t = this.utcOffset ?? 0, r = this._lighting.displayUTCOffset ?? 0, n = this.timeSliderPosition ?? 0, s = this.localDate, o = n - r * 60, a = D(s, o, "minutes"), { minutesSinceMidnight: c, localDate: d } = z(a, t);
410
417
  this._timesliderPosition.mutate(c), this._localDate.mutate(d);
411
418
  }
412
419
  }
@@ -481,14 +488,14 @@ class Xe extends fe {
481
488
  const o = (this.utcOffset ?? 0) * 60, a = this.view?.ready === !0, c = Array.isArray(this.timeSliderSteps) ? this.timeSliderSteps.at(0) : this.timeSliderSteps;
482
489
  return W({ class: { root: !0, loading: !a }, label: e.componentLabel, title: e.title, hideHeader: this.hideHeader, headingLevel: this.headingLevel, children: p`${a ? void 0 : p`<calcite-scrim loading></calcite-scrim>`}<div class="time-configuration" style=${B({ columnGap: this.hidePlayButtons ? "0" : void 0 })}><calcite-label class="slider-container" .scale=${n}>${e.timeSliderLabel}<arcgis-time-of-day-slider class="slider" .disabled=${this._sunlightingDisabled} mode=single .startTime=${this.timeSliderPosition ?? 0} .steps=${c} style=${B({ gridArea: "slider" })} @arcgisTimeChange=${({ currentTarget: d }) => {
483
490
  this._stopPlaying(), this._emitUserDateTimeChangeEvent(), this.timeSliderPosition = d.startTime;
484
- }} ${Y(this.#l)}></arcgis-time-of-day-slider></calcite-label>${D({ hidden: this.hidePlayButtons, children: ie({ disabled: this._sunlightingDisabled, playing: this.dayPlaying, label: e.playDay, onClick: () => {
491
+ }} ${Y(this.#l)}></arcgis-time-of-day-slider></calcite-label>${T({ hidden: this.hidePlayButtons, children: ie({ disabled: this._sunlightingDisabled, playing: this.dayPlaying, label: e.playDay, onClick: () => {
485
492
  this._playingState === "day" ? this._stopPlaying() : this._playingState = "day";
486
- }, scale: n }) })}${D({ hidden: this.hideTimezone, children: p`<calcite-label .scale=${n} class="timezone-input-container">${e.timezone}<calcite-input-time-zone mode=offset overlay-positioning=fixed .scale=${n} .disabled=${this._sunlightingDisabled} .value=${`${o}`} .referenceDate=${this.localDateAsString} @calciteInputTimeZoneChange=${(d) => {
493
+ }, scale: n }) })}${T({ hidden: this.hideTimezone, children: p`<calcite-label .scale=${n} class="timezone-input-container">${e.timezone}<calcite-input-time-zone mode=offset overlay-positioning=fixed .scale=${n} .disabled=${this._sunlightingDisabled} .value=${`${o}`} .referenceDate=${this.localDateAsString} @calciteInputTimeZoneChange=${(d) => {
487
494
  const l = +d.target.value;
488
495
  this.utcOffset = l / 60, this._stopPlaying();
489
- }} ${Y(this.#o)}></calcite-input-time-zone></calcite-label><span></span>` })}${D({ hidden: this.hideDatePicker, children: t === "date" ? this.#g({ scale: n, disabled: r }) : this.#u({ scale: n, disabled: r }) })}</div>${D({ hidden: this.hideSunLightingToggle, children: it({ scale: n, messages: e.sunLightingToggle, sunlightingEnabled: !this._sunlightingDisabled, onSunLightingToggle: (d) => {
496
+ }} ${Y(this.#o)}></calcite-input-time-zone></calcite-label><span></span>` })}${T({ hidden: this.hideDatePicker, children: t === "date" ? this.#g({ scale: n, disabled: r }) : this.#u({ scale: n, disabled: r }) })}</div>${T({ hidden: this.hideSunLightingToggle, children: it({ scale: n, messages: e.sunLightingToggle, sunlightingEnabled: !this._sunlightingDisabled, onSunLightingToggle: (d) => {
490
497
  this._sunlightingDisabled = !d;
491
- } }) })}${D({ hidden: this.hideShadowsToggle, children: rt({ scale: n, messages: e.shadowsToggle, onShadowCheckboxChange: (d) => {
498
+ } }) })}${T({ hidden: this.hideShadowsToggle, children: rt({ scale: n, messages: e.shadowsToggle, onShadowCheckboxChange: (d) => {
492
499
  this._directShadowsDisabled = !d;
493
500
  }, shadowEnabled: !this._directShadowsDisabled }) })}` });
494
501
  }
@@ -0,0 +1,33 @@
1
+ import type Accessor from "@arcgis/core/core/Accessor.js";
2
+ import type SharedTemplateMetadata from "@arcgis/core/editing/sharedTemplates/SharedTemplateMetadata.js";
3
+ import type FeatureTemplate from "@arcgis/core/layers/support/FeatureTemplate.js";
4
+ import type { LayerWithFeatureTemplatesUnion } from "@arcgis/core/layers/types.js";
5
+
6
+ export interface TemplateItemProperties extends Partial<Pick<TemplateItem, "layer" | "template" | "thumbnail">> {}
7
+
8
+ /**
9
+ * The item displayed within the FeatureTemplates component.
10
+ *
11
+ * @since 5.1
12
+ */
13
+ export default class TemplateItem extends Accessor {
14
+ constructor(properties?: TemplateItemProperties);
15
+ /**
16
+ * The description that is displayed for the template item.
17
+ * This is similar to the description provided in layers/support/FeatureTemplate#description.
18
+ */
19
+ get description(): string;
20
+ get id(): string;
21
+ /** The label that is displayed for the template item. */
22
+ get label(): string;
23
+ /** The layer associated with the template item. */
24
+ accessor layer: LayerWithFeatureTemplatesUnion;
25
+ get supportsUpload(): boolean;
26
+ /** The associated FeatureTemplate for the item. */
27
+ accessor template: FeatureTemplate | SharedTemplateMetadata;
28
+ /**
29
+ * An object used to create a thumbnail image that represents a feature type in the feature template.
30
+ * This is similar to layers/support/FeatureTemplate#thumbnail.
31
+ */
32
+ accessor thumbnail: HTMLElement | undefined;
33
+ }
@@ -0,0 +1,275 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type MapView from "@arcgis/core/views/MapView.js";
3
+ import type SceneView from "@arcgis/core/views/SceneView.js";
4
+ import type TemplateItem from "./TemplateItem.js";
5
+ import type SubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer.js";
6
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
7
+ import type { ArcgisReferenceElement } from "../types.js";
8
+ import type { LayerWithFeatureTemplatesUnion } from "@arcgis/core/layers/types.js";
9
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
10
+
11
+ /**
12
+ * The FeatureTemplates component is part of an editing workflow. Its main purpose is to display [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) templates from one or more feature layers.
13
+ *
14
+ * @since 5.1
15
+ * @internal
16
+ */
17
+ export abstract class ArcgisFeatureTemplates extends LitElement {
18
+ /** @internal */
19
+ protected _messages: Partial<{
20
+ componentLabel: string;
21
+ templates: string;
22
+ recent: string;
23
+ favorites: string;
24
+ updating: string;
25
+ point: string;
26
+ multipoint: string;
27
+ polyline: string;
28
+ polygon: string;
29
+ extent: string;
30
+ mesh: string;
31
+ noneSpecified: string;
32
+ removeFavorite: string;
33
+ removeRecent: string;
34
+ addFavorite: string;
35
+ noFavorites: string;
36
+ noTemplates: string;
37
+ noRecent: string;
38
+ noMatchingTemplates: string;
39
+ }> & T9nMeta<{
40
+ componentLabel: string;
41
+ templates: string;
42
+ recent: string;
43
+ favorites: string;
44
+ updating: string;
45
+ point: string;
46
+ multipoint: string;
47
+ polyline: string;
48
+ polygon: string;
49
+ extent: string;
50
+ mesh: string;
51
+ noneSpecified: string;
52
+ removeFavorite: string;
53
+ removeRecent: string;
54
+ addFavorite: string;
55
+ noFavorites: string;
56
+ noTemplates: string;
57
+ noRecent: string;
58
+ noMatchingTemplates: string;
59
+ }>;
60
+ /** Provide a function to dynamically enable or disable templates in the component. */
61
+ accessor applicationDisabledFunction: ((template: TemplateItem) => boolean) | undefined;
62
+ /** Provide a function to dynamically hide/remove templates from the component. */
63
+ accessor applicationFilterFunction: ((template: TemplateItem) => boolean) | undefined;
64
+ /** Provide a list of sections and templates. If not supplied, the component will load the templates from the layers in the view. */
65
+ accessor applicationTemplates: Array<ITemplateSection> | undefined;
66
+ /**
67
+ * If true, the component will not be destroyed automatically when it is
68
+ * disconnected from the document. This is useful when you want to move the
69
+ * component to a different place on the page, or temporarily hide it. If this
70
+ * is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-templates/#destroy) method when you are done to
71
+ * prevent memory leaks.
72
+ *
73
+ * @default false
74
+ */
75
+ accessor autoDestroyDisabled: boolean;
76
+ /**
77
+ * When true, the component is visually withdrawn and cannot receive user interaction.
78
+ *
79
+ * @default false
80
+ */
81
+ accessor disabled: boolean;
82
+ /**
83
+ * Decide if templates should be disabled when the layer is not visible, or not visible at the current scale.
84
+ *
85
+ * @default "never"
86
+ */
87
+ accessor disableTemplatesMode: "never" | "scale" | "visible";
88
+ /**
89
+ * Determine if templates should be shown grouped, or in a single flat list
90
+ *
91
+ * @default "grouped"
92
+ */
93
+ accessor display: "flat" | "grouped";
94
+ /** The list of templates in the component */
95
+ get effectiveTemplates(): Array<ITemplateSection>;
96
+ /**
97
+ * Determines if feature templates for tables should be shown
98
+ *
99
+ * @default false
100
+ */
101
+ accessor excludeTables: boolean;
102
+ /**
103
+ * The list of templates in the component
104
+ *
105
+ * @interface
106
+ */
107
+ get favorites(): Set<string>;
108
+ /**
109
+ * Include a favorites used tab
110
+ *
111
+ * @default false
112
+ * @internal
113
+ */
114
+ accessor favoritesEnabled: boolean;
115
+ /**
116
+ * The text the user has entered to filter the list on the favorites tab
117
+ *
118
+ * @default ""
119
+ * @internal
120
+ */
121
+ accessor favoritesFilterText: string;
122
+ /**
123
+ * The text the user has entered to filter the list
124
+ *
125
+ * @default ""
126
+ */
127
+ accessor filterText: string;
128
+ /**
129
+ * When templates are grouped, determine the group by policy. Note: if the component has been supplied with applicationTemplates, the templates will keep the supplied groupings.
130
+ *
131
+ * @default "layer"
132
+ */
133
+ accessor groupBy: "geometry" | "layer";
134
+ /** If a group by function is supplied, then the templates will be grouped by this function. */
135
+ accessor groupByFunction: ((template: TemplateItem) => string) | undefined;
136
+ /**
137
+ * Determine if the template description should be displayed
138
+ *
139
+ * @default false
140
+ */
141
+ accessor hideTemplateDescription: boolean;
142
+ /**
143
+ * Decide if templates should be hidden when the layer is not visible, or not visible at the current scale.
144
+ *
145
+ * @default "never"
146
+ */
147
+ accessor hideTemplatesMode: "never" | "scale" | "visible";
148
+ /** List of layers for which to show Templates. If not provided, the layers will be derived from the View. */
149
+ accessor layers: (LayerWithFeatureTemplatesUnion | SubtypeGroupLayer)[] | undefined;
150
+ /**
151
+ * The text the user has entered to filter the list on the recent tab
152
+ *
153
+ * @default ""
154
+ * @internal
155
+ */
156
+ accessor recentFilterText: string;
157
+ /**
158
+ * The list of recently used template ids.
159
+ *
160
+ * @interface
161
+ */
162
+ get recentlyUsed(): Array<string>;
163
+ /**
164
+ * Include a recently used tab
165
+ *
166
+ * @default false
167
+ * @internal
168
+ */
169
+ accessor recentlyUsedEnabled: boolean;
170
+ /**
171
+ * By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
172
+ *
173
+ * @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)
174
+ */
175
+ accessor referenceElement: ArcgisReferenceElement | string | undefined;
176
+ /**
177
+ * Function which restores the list of favorites from a previous session
178
+ *
179
+ * @internal
180
+ */
181
+ accessor restoreFavorites: (() => Promise<Array<string>>) | undefined;
182
+ /**
183
+ * Function which restores the list of recently used templates from a previous session
184
+ *
185
+ * @internal
186
+ */
187
+ accessor restoreRecentlyUsed: (() => Promise<Array<string>>) | undefined;
188
+ /**
189
+ * When templates are grouped, determine how the groups are sorted. If the component has been supplied with a sectionSortByFunction then this will be used instead.
190
+ *
191
+ * @default "system"
192
+ */
193
+ accessor sectionSortBy: "alphabetical" | "system";
194
+ /** If provided, this function can be used to re-order the sections. */
195
+ accessor sectionSortByFunction: ((sections: ITemplateSection[]) => ITemplateSection[]) | undefined;
196
+ /** Currently selected template */
197
+ get selectedTemplate(): TemplateItem | undefined;
198
+ /** Currently selected template id */
199
+ accessor selectedTemplateId: string | undefined;
200
+ /**
201
+ * Fetch shared templates, if the layer's in the view have shared Templates.
202
+ *
203
+ * @default false
204
+ * @internal
205
+ */
206
+ accessor sharedTemplatesDisabled: boolean;
207
+ /**
208
+ * Indicates whether to display the collapse button.
209
+ *
210
+ * @default false
211
+ * @since 5.1
212
+ */
213
+ accessor showCollapseButton: boolean;
214
+ /**
215
+ * Indicates whether to show the templates filter
216
+ *
217
+ * @default false
218
+ * @since 5.1
219
+ */
220
+ accessor showFilter: boolean;
221
+ /**
222
+ * Determines how templates are ordered. This will either be in alphabetical order
223
+ * or the order they are defined in the layer schema.
224
+ *
225
+ * @default "alphabetical"
226
+ */
227
+ accessor templateSortBy: "alphabetical" | "system";
228
+ /** If provided, this function can be used to re-order the templates. */
229
+ accessor templateSortByFunction: ((templates: TemplateItem[]) => TemplateItem[]) | undefined;
230
+ /**
231
+ * Determine if the templates list is updating.
232
+ *
233
+ * @default false
234
+ */
235
+ get updating(): boolean;
236
+ /**
237
+ * The view associated with the component.
238
+ * > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-feature-templates component will be associated with a map or scene component rather than using the `view` property.
239
+ */
240
+ accessor view: MapView | SceneView | undefined;
241
+ /** Permanently destroy the component */
242
+ destroy(): Promise<void>;
243
+ /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
244
+ readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "effectiveTemplates" | "filterText" | "recentlyUsed" | "favorites"; }>;
245
+ /** Emitted when the component associated with a map or scene view is ready to be interacted with. */
246
+ readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
247
+ /** The user has selected a template */
248
+ readonly arcgisSelectTemplate: import("@arcgis/lumina").TargetedEvent<this, { template: TemplateItem; }>;
249
+ /** The source of templates has changed. */
250
+ readonly arcgisTemplatesChanged: import("@arcgis/lumina").TargetedEvent<this, void>;
251
+ readonly "@eventTypes": {
252
+ arcgisPropertyChange: ArcgisFeatureTemplates["arcgisPropertyChange"]["detail"];
253
+ arcgisReady: ArcgisFeatureTemplates["arcgisReady"]["detail"];
254
+ arcgisSelectTemplate: ArcgisFeatureTemplates["arcgisSelectTemplate"]["detail"];
255
+ arcgisTemplatesChanged: ArcgisFeatureTemplates["arcgisTemplatesChanged"]["detail"];
256
+ };
257
+ }
258
+
259
+ /**
260
+ * Template section
261
+ *
262
+ * @internal
263
+ */
264
+ export type ITemplateSection = {
265
+ /** Name of the section */
266
+ sectionName: string;
267
+ /**
268
+ * Whether to translate the section name
269
+ *
270
+ * @internal
271
+ */
272
+ autoTranslate?: boolean;
273
+ /** List of Template items in the section */
274
+ templates: TemplateItem[];
275
+ };