@arcgis/map-components 5.1.0-next.123 → 5.1.0-next.125

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 (45) hide show
  1. package/dist/cdn/{RH4PIMHF.js → APG5BPBC.js} +1 -1
  2. package/dist/cdn/K4QY44EL.js +2 -0
  3. package/dist/cdn/{XYUG5M3W.js → T6JFYEP2.js} +1 -1
  4. package/dist/cdn/V4FMJCXV.js +2 -0
  5. package/dist/cdn/YJT2XNV5.js +2 -0
  6. package/dist/cdn/ZJINX5IW.js +2 -0
  7. package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -1
  8. package/dist/cdn/index.js +1 -1
  9. package/dist/components/arcgis-daylight/customElement.d.ts +1 -1
  10. package/dist/components/arcgis-daylight/customElement.js +34 -27
  11. package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +20 -20
  12. package/dist/components/arcgis-feature-templates/customElement.d.ts +10 -8
  13. package/dist/components/arcgis-feature-templates/customElement.js +198 -247
  14. package/dist/components/arcgis-features/customElement.d.ts +4 -17
  15. package/dist/components/arcgis-layer-list/customElement.d.ts +3 -0
  16. package/dist/components/arcgis-layer-list-next/customElement.d.ts +319 -32
  17. package/dist/components/arcgis-layer-list-next/customElement.js +5 -1
  18. package/dist/components/arcgis-link-chart/customElement.d.ts +24 -0
  19. package/dist/components/arcgis-map/customElement.d.ts +24 -0
  20. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +3 -3
  21. package/dist/components/arcgis-paste/PasteViewModel.d.ts +2 -2
  22. package/dist/components/arcgis-popup/customElement.d.ts +13 -20
  23. package/dist/components/arcgis-scene/customElement.d.ts +24 -0
  24. package/dist/components/arcgis-slider-binary-color-size-legacy/customElement.d.ts +10 -10
  25. package/dist/components/arcgis-slider-classed-color-legacy/customElement.d.ts +6 -6
  26. package/dist/components/arcgis-slider-classed-size-legacy/customElement.d.ts +6 -6
  27. package/dist/components/arcgis-slider-color-legacy/customElement.d.ts +10 -10
  28. package/dist/components/arcgis-slider-color-size-legacy/customElement.d.ts +10 -10
  29. package/dist/components/arcgis-slider-opacity-legacy/customElement.d.ts +10 -10
  30. package/dist/components/arcgis-slider-scale-range/customElement.d.ts +1 -1
  31. package/dist/components/arcgis-slider-scale-range/customElement.js +65 -31
  32. package/dist/components/arcgis-slider-size-legacy/customElement.d.ts +10 -10
  33. package/dist/components/arcgis-template-image/customElement.d.ts +2 -2
  34. package/dist/components/arcgis-version-management/customElement.js +21 -20
  35. package/dist/components/arcgis-version-management/index.js +1 -0
  36. package/dist/docs/api.json +1 -1
  37. package/dist/docs/docs.json +1 -1
  38. package/dist/docs/vscode.html-custom-data.json +1 -1
  39. package/dist/docs/web-types.json +1 -1
  40. package/package.json +5 -5
  41. package/dist/cdn/4IQZ7YKM.js +0 -2
  42. package/dist/cdn/DZMN2UH5.js +0 -2
  43. package/dist/cdn/OCMGQ4AF.js +0 -2
  44. package/dist/cdn/WFL2WTJK.js +0 -2
  45. package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +0 -33
@@ -1,75 +1,26 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as w } from "../../chunks/runtime.js";
3
- import { css as F, html as c } from "lit";
4
- import { LitElement as M, createEvent as f } from "@arcgis/lumina";
5
- import { u as S } from "../../chunks/useT9n.js";
6
- import { u as _ } from "../../chunks/useView.js";
7
- import { m as $ } from "../../chunks/useViewModel.js";
8
- import { property as s, subclass as g } from "@arcgis/core/core/accessorSupport/decorators.js";
9
- import b from "@arcgis/core/core/Accessor.js";
10
- import { getAllStandardFeatureTemplatesForLayer as x, getTemplatesForLayers as B } from "@arcgis/core/applications/Components/templateUtils.js";
11
- import { i as v, c as T } from "../../chunks/layer-utils.js";
12
- import { isTable as u, getEffectiveLayerCapabilities as D } from "@arcgis/core/applications/Components/layerUtils.js";
13
- import { usePropertyChange as L } from "@arcgis/lumina/controllers";
14
- import { watch as y } from "@arcgis/core/core/reactiveUtils.js";
15
- import { debounce as U } from "@arcgis/toolkit/function";
16
- const E = F`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`;
17
- var I = Object.defineProperty, C = Object.getOwnPropertyDescriptor, h = (t, e, i, r) => {
18
- for (var o = r > 1 ? void 0 : r ? C(e, i) : e, p = t.length - 1, n; p >= 0; p--)
19
- (n = t[p]) && (o = (r ? n(e, i, o) : n(o)) || o);
20
- return r && o && I(e, i, o), o;
2
+ import { c as T } from "../../chunks/runtime.js";
3
+ import { css as g, html as o } from "lit";
4
+ import { LitElement as b, createEvent as h } from "@arcgis/lumina";
5
+ import { u as w } from "../../chunks/useT9n.js";
6
+ import { u as F } from "../../chunks/useView.js";
7
+ import { m as M } from "../../chunks/useViewModel.js";
8
+ import { property as l, subclass as S } from "@arcgis/core/core/accessorSupport/decorators.js";
9
+ import _ from "@arcgis/core/core/Accessor.js";
10
+ import u from "@arcgis/core/editing/templates/TemplateListItem.js";
11
+ import { getAllStandardFeatureTemplatesForLayer as $, getTemplatesForLayers as x } from "@arcgis/core/applications/Components/templateUtils.js";
12
+ import { i as y, c as v } from "../../chunks/layer-utils.js";
13
+ import { isTable as m, getEffectiveLayerCapabilities as B } from "@arcgis/core/applications/Components/layerUtils.js";
14
+ import { usePropertyChange as D } from "@arcgis/lumina/controllers";
15
+ import { watch as f } from "@arcgis/core/core/reactiveUtils.js";
16
+ import { debounce as L } from "@arcgis/toolkit/function";
17
+ const E = g`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`;
18
+ var U = Object.defineProperty, I = Object.getOwnPropertyDescriptor, a = (t, e, i, r) => {
19
+ for (var n = r > 1 ? void 0 : r ? I(e, i) : e, p = t.length - 1, c; p >= 0; p--)
20
+ (c = t[p]) && (n = (r ? c(e, i, n) : c(n)) || n);
21
+ return r && n && U(e, i, n), n;
21
22
  };
22
- let d = class extends b {
23
- /**
24
- * @public
25
- * @param properties
26
- */
27
- constructor(t) {
28
- super(t), this.layer = null, this.template = null;
29
- }
30
- get description() {
31
- return this.template?.description ?? "";
32
- }
33
- get label() {
34
- return this.template?.name ?? "";
35
- }
36
- get id() {
37
- return `${this.label ?? ""}–${this.layer?.id}`;
38
- }
39
- get supportsUpload() {
40
- return this.layer?.type === "scene";
41
- }
42
- };
43
- h([
44
- s()
45
- ], d.prototype, "description", 1);
46
- h([
47
- s()
48
- ], d.prototype, "label", 1);
49
- h([
50
- s()
51
- ], d.prototype, "layer", 2);
52
- h([
53
- s()
54
- ], d.prototype, "template", 2);
55
- h([
56
- s()
57
- ], d.prototype, "thumbnail", 2);
58
- h([
59
- s()
60
- ], d.prototype, "id", 1);
61
- h([
62
- s()
63
- ], d.prototype, "supportsUpload", 1);
64
- d = h([
65
- g("components.feature-templates.TemplateItem")
66
- ], d);
67
- var R = Object.defineProperty, A = Object.getOwnPropertyDescriptor, l = (t, e, i, r) => {
68
- for (var o = r > 1 ? void 0 : r ? A(e, i) : e, p = t.length - 1, n; p >= 0; p--)
69
- (n = t[p]) && (o = (r ? n(e, i, o) : n(o)) || o);
70
- return r && o && R(e, i, o), o;
71
- };
72
- function P(t) {
23
+ function C(t) {
73
24
  switch (t) {
74
25
  case "point":
75
26
  case "multipoint":
@@ -81,8 +32,8 @@ function P(t) {
81
32
  }
82
33
  return "noneSpecified";
83
34
  }
84
- const V = (t) => P(t.layer.geometryType ?? "");
85
- let a = class extends b {
35
+ const R = (t) => C(t.layer.geometryType ?? "");
36
+ let s = class extends _ {
86
37
  //#region Lifecycle
87
38
  constructor(t) {
88
39
  super(t), this._hasRunInitialLoad = !1, this.favoritesEnabled = !1, this.recentlyUsedEnabled = !1, this.hideTemplateDescription = !1, this.filterText = "", this.recentFilterText = "", this.favoritesFilterText = "", this.display = "grouped", this.groupBy = "layer", this.hideTemplatesMode = "never", this.disableTemplatesMode = "never", this.sectionSortBy = "system", this.templateSortBy = "alphabetical", this.sharedTemplatesDisabled = !1, this.excludeTables = !1, this.favorites = /* @__PURE__ */ new Set(), this.fetchingTemplateMetaData = !1, this.recentlyUsed = [];
@@ -105,7 +56,7 @@ let a = class extends b {
105
56
  if (await Promise.allSettled(t.map((e) => e.load())), this.sharedTemplatesDisabled) {
106
57
  const e = [];
107
58
  for (const i of t) {
108
- const r = x(i);
59
+ const r = $(i);
109
60
  r.length > 0 && e.push({
110
61
  layer: i,
111
62
  templates: r
@@ -114,7 +65,7 @@ let a = class extends b {
114
65
  this.mapTemplates = e;
115
66
  return;
116
67
  }
117
- this.mapTemplates = await B(t, this.view, void 0, {
68
+ this.mapTemplates = await x(t, this.view, void 0, {
118
69
  returnVisibleTemplatesOnly: !0
119
70
  }), await this._restore();
120
71
  } catch {
@@ -204,8 +155,8 @@ let a = class extends b {
204
155
  noneSpecified: 7
205
156
  };
206
157
  t = t.toSorted((i, r) => {
207
- const o = e[i.sectionName] ?? 10, p = e[r.sectionName] ?? 10;
208
- return o - p;
158
+ const n = e[i.sectionName] ?? 10, p = e[r.sectionName] ?? 10;
159
+ return n - p;
209
160
  });
210
161
  }
211
162
  for (const e of t)
@@ -216,16 +167,16 @@ let a = class extends b {
216
167
  if (!this.view)
217
168
  return !0;
218
169
  let e = t;
219
- v(t) && (e = t.parent);
170
+ y(t) && (e = t.parent);
220
171
  const i = this.view.allLayerViews.find((r) => r.layer === e);
221
172
  if (!i)
222
173
  return !0;
223
- if (v(t)) {
174
+ if (y(t)) {
224
175
  const r = this.view.scale;
225
176
  if (i.visibleAtCurrentScale) {
226
- const o = t.minScale, p = t.maxScale;
227
- let n = !o, m = !p;
228
- return !n && r <= o && (n = !0), !m && r >= p && (m = !0), n && m;
177
+ const n = t.minScale, p = t.maxScale;
178
+ let c = !n, d = !p;
179
+ return !c && r <= n && (c = !0), !d && r >= p && (d = !0), c && d;
229
180
  }
230
181
  }
231
182
  return i.visibleAtCurrentScale;
@@ -233,7 +184,7 @@ let a = class extends b {
233
184
  get activeLayers() {
234
185
  const t = [];
235
186
  for (const e of this.layers ?? [])
236
- if (T(e))
187
+ if (v(e))
237
188
  for (const i of e.sublayers)
238
189
  t.push(i);
239
190
  else
@@ -245,7 +196,7 @@ let a = class extends b {
245
196
  ])
246
197
  if (e.type === "feature" || e.type === "scene" || e.type === "geojson" || e.type === "oriented-imagery" || e.type === "knowledge-graph")
247
198
  t.push(e);
248
- else if (T(e))
199
+ else if (v(e))
249
200
  for (const i of e.sublayers)
250
201
  t.push(i);
251
202
  }
@@ -264,10 +215,10 @@ let a = class extends b {
264
215
  return this._sortTemplates(this.templates.flatMap((t) => t.templates));
265
216
  }
266
217
  inclusionFilter(t) {
267
- if (this.excludeTables && u(t.layer) || this.applicationFilterFunction?.(t) === !1)
218
+ if (this.excludeTables && m(t.layer) || this.applicationFilterFunction?.(t) === !1)
268
219
  return !1;
269
- const e = D(t.layer)?.operations;
270
- return e?.supportsEditing === !1 && !e?.supportsAdd ? !1 : u(t.layer) ? !0 : !(this.hideTemplatesMode === "visible" && !t.layer.visible || this.hideTemplatesMode === "scale" && !this._layerIsVisibleAtCurrentScale(t.layer));
220
+ const e = B(t.layer)?.operations;
221
+ return e?.supportsEditing === !1 && !e?.supportsAdd ? !1 : m(t.layer) ? !0 : !(this.hideTemplatesMode === "visible" && !t.layer.visible || this.hideTemplatesMode === "scale" && !this._layerIsVisibleAtCurrentScale(t.layer));
271
222
  }
272
223
  get templateSetKey() {
273
224
  return this._sortTemplates(this.allTemplates).map((t) => t.id).join(",");
@@ -279,7 +230,7 @@ let a = class extends b {
279
230
  t.add(e);
280
231
  continue;
281
232
  }
282
- if (!u(e.layer)) {
233
+ if (!m(e.layer)) {
283
234
  if (this.disableTemplatesMode === "visible" && !e.layer.visible) {
284
235
  t.add(e);
285
236
  continue;
@@ -297,20 +248,20 @@ let a = class extends b {
297
248
  }
298
249
  get organizedMapTemplates() {
299
250
  if (this.groupByFunction || this.groupBy === "geometry") {
300
- const t = !this.groupByFunction, e = this.groupByFunction ?? V, i = /* @__PURE__ */ new Map();
251
+ const t = !this.groupByFunction, e = this.groupByFunction ?? R, i = /* @__PURE__ */ new Map();
301
252
  for (const r of this.mapTemplates ?? [])
302
- for (const o of r.templates) {
303
- const p = new d({ template: o, layer: r.layer }), n = e(p);
304
- if (n != null)
305
- if (i.has(n))
306
- i.get(n)?.templates.push(p);
253
+ for (const n of r.templates) {
254
+ const p = new u({ template: n, layer: r.layer }), c = e(p);
255
+ if (c != null)
256
+ if (i.has(c))
257
+ i.get(c)?.templates.push(p);
307
258
  else {
308
- const m = {
309
- sectionName: n,
259
+ const d = {
260
+ sectionName: c,
310
261
  ...t ? { autoTranslate: !0 } : {},
311
262
  templates: [p]
312
263
  };
313
- i.set(n, m);
264
+ i.set(c, d);
314
265
  }
315
266
  }
316
267
  return this._sortSections(Array.from(i.values()));
@@ -318,7 +269,7 @@ let a = class extends b {
318
269
  return this._sortSections(
319
270
  (this.mapTemplates ?? []).map(({ layer: t, templates: e }) => ({
320
271
  sectionName: t.title ?? "",
321
- templates: e.map((i) => new d({ layer: t, template: i }))
272
+ templates: e.map((i) => new u({ layer: t, template: i }))
322
273
  })).filter((t) => t.templates.length > 0)
323
274
  );
324
275
  }
@@ -344,142 +295,142 @@ let a = class extends b {
344
295
  }
345
296
  //#endregion
346
297
  };
347
- l([
348
- s()
349
- ], a.prototype, "loading", 1);
350
- l([
351
- s()
352
- ], a.prototype, "_hasRunInitialLoad", 2);
353
- l([
354
- s()
355
- ], a.prototype, "activeLayers", 1);
356
- l([
357
- s()
358
- ], a.prototype, "favoritesEnabled", 2);
359
- l([
360
- s()
361
- ], a.prototype, "recentlyUsedEnabled", 2);
362
- l([
363
- s()
364
- ], a.prototype, "hideTemplateDescription", 2);
365
- l([
366
- s()
367
- ], a.prototype, "filterText", 2);
368
- l([
369
- s()
370
- ], a.prototype, "recentFilterText", 2);
371
- l([
372
- s()
373
- ], a.prototype, "favoritesFilterText", 2);
374
- l([
375
- s()
376
- ], a.prototype, "selectedTemplateId", 2);
377
- l([
378
- s()
379
- ], a.prototype, "selectedTemplate", 1);
380
- l([
381
- s()
382
- ], a.prototype, "layers", 2);
383
- l([
384
- s()
385
- ], a.prototype, "restoreFavorites", 2);
386
- l([
387
- s()
388
- ], a.prototype, "restoreRecentlyUsed", 2);
389
- l([
390
- s()
391
- ], a.prototype, "applicationDisabledFunction", 2);
392
- l([
393
- s()
394
- ], a.prototype, "applicationFilterFunction", 2);
395
- l([
396
- s()
397
- ], a.prototype, "display", 2);
398
- l([
399
- s()
400
- ], a.prototype, "groupBy", 2);
401
- l([
402
- s()
403
- ], a.prototype, "hideTemplatesMode", 2);
404
- l([
405
- s()
406
- ], a.prototype, "disableTemplatesMode", 2);
407
- l([
408
- s()
409
- ], a.prototype, "groupByFunction", 2);
410
- l([
411
- s()
412
- ], a.prototype, "sectionSortBy", 2);
413
- l([
414
- s()
415
- ], a.prototype, "templateSortBy", 2);
416
- l([
417
- s()
418
- ], a.prototype, "sectionSortByFunction", 2);
419
- l([
420
- s()
421
- ], a.prototype, "templateSortByFunction", 2);
422
- l([
423
- s()
424
- ], a.prototype, "sharedTemplatesDisabled", 2);
425
- l([
426
- s()
427
- ], a.prototype, "excludeTables", 2);
428
- l([
429
- s()
430
- ], a.prototype, "favorites", 2);
431
- l([
432
- s()
433
- ], a.prototype, "effectiveTemplates", 1);
434
- l([
435
- s()
436
- ], a.prototype, "templateList", 1);
437
- l([
438
- s()
439
- ], a.prototype, "allTemplates", 1);
440
- l([
441
- s()
442
- ], a.prototype, "templateSetKey", 1);
443
- l([
444
- s()
445
- ], a.prototype, "disabledTemplates", 1);
446
- l([
447
- s()
448
- ], a.prototype, "templates", 1);
449
- l([
450
- s()
451
- ], a.prototype, "mapTemplates", 2);
452
- l([
453
- s()
454
- ], a.prototype, "organizedMapTemplates", 1);
455
- l([
456
- s()
457
- ], a.prototype, "fetchingTemplateMetaData", 2);
458
- l([
459
- s()
460
- ], a.prototype, "updating", 1);
461
- l([
462
- s()
463
- ], a.prototype, "applicationTemplates", 2);
464
- l([
465
- s()
466
- ], a.prototype, "favoriteTemplates", 1);
467
- l([
468
- s()
469
- ], a.prototype, "recentTemplates", 1);
470
- l([
471
- s()
472
- ], a.prototype, "recentlyUsed", 2);
473
- l([
474
- s()
475
- ], a.prototype, "view", 2);
476
- a = l([
477
- g("components.feature-templates.FeatureTemplatesViewModel")
478
- ], a);
479
- const O = $(a);
480
- class N extends M {
298
+ a([
299
+ l()
300
+ ], s.prototype, "loading", 1);
301
+ a([
302
+ l()
303
+ ], s.prototype, "_hasRunInitialLoad", 2);
304
+ a([
305
+ l()
306
+ ], s.prototype, "activeLayers", 1);
307
+ a([
308
+ l()
309
+ ], s.prototype, "favoritesEnabled", 2);
310
+ a([
311
+ l()
312
+ ], s.prototype, "recentlyUsedEnabled", 2);
313
+ a([
314
+ l()
315
+ ], s.prototype, "hideTemplateDescription", 2);
316
+ a([
317
+ l()
318
+ ], s.prototype, "filterText", 2);
319
+ a([
320
+ l()
321
+ ], s.prototype, "recentFilterText", 2);
322
+ a([
323
+ l()
324
+ ], s.prototype, "favoritesFilterText", 2);
325
+ a([
326
+ l()
327
+ ], s.prototype, "selectedTemplateId", 2);
328
+ a([
329
+ l()
330
+ ], s.prototype, "selectedTemplate", 1);
331
+ a([
332
+ l()
333
+ ], s.prototype, "layers", 2);
334
+ a([
335
+ l()
336
+ ], s.prototype, "restoreFavorites", 2);
337
+ a([
338
+ l()
339
+ ], s.prototype, "restoreRecentlyUsed", 2);
340
+ a([
341
+ l()
342
+ ], s.prototype, "applicationDisabledFunction", 2);
343
+ a([
344
+ l()
345
+ ], s.prototype, "applicationFilterFunction", 2);
346
+ a([
347
+ l()
348
+ ], s.prototype, "display", 2);
349
+ a([
350
+ l()
351
+ ], s.prototype, "groupBy", 2);
352
+ a([
353
+ l()
354
+ ], s.prototype, "hideTemplatesMode", 2);
355
+ a([
356
+ l()
357
+ ], s.prototype, "disableTemplatesMode", 2);
358
+ a([
359
+ l()
360
+ ], s.prototype, "groupByFunction", 2);
361
+ a([
362
+ l()
363
+ ], s.prototype, "sectionSortBy", 2);
364
+ a([
365
+ l()
366
+ ], s.prototype, "templateSortBy", 2);
367
+ a([
368
+ l()
369
+ ], s.prototype, "sectionSortByFunction", 2);
370
+ a([
371
+ l()
372
+ ], s.prototype, "templateSortByFunction", 2);
373
+ a([
374
+ l()
375
+ ], s.prototype, "sharedTemplatesDisabled", 2);
376
+ a([
377
+ l()
378
+ ], s.prototype, "excludeTables", 2);
379
+ a([
380
+ l()
381
+ ], s.prototype, "favorites", 2);
382
+ a([
383
+ l()
384
+ ], s.prototype, "effectiveTemplates", 1);
385
+ a([
386
+ l()
387
+ ], s.prototype, "templateList", 1);
388
+ a([
389
+ l()
390
+ ], s.prototype, "allTemplates", 1);
391
+ a([
392
+ l()
393
+ ], s.prototype, "templateSetKey", 1);
394
+ a([
395
+ l()
396
+ ], s.prototype, "disabledTemplates", 1);
397
+ a([
398
+ l()
399
+ ], s.prototype, "templates", 1);
400
+ a([
401
+ l()
402
+ ], s.prototype, "mapTemplates", 2);
403
+ a([
404
+ l()
405
+ ], s.prototype, "organizedMapTemplates", 1);
406
+ a([
407
+ l()
408
+ ], s.prototype, "fetchingTemplateMetaData", 2);
409
+ a([
410
+ l()
411
+ ], s.prototype, "updating", 1);
412
+ a([
413
+ l()
414
+ ], s.prototype, "applicationTemplates", 2);
415
+ a([
416
+ l()
417
+ ], s.prototype, "favoriteTemplates", 1);
418
+ a([
419
+ l()
420
+ ], s.prototype, "recentTemplates", 1);
421
+ a([
422
+ l()
423
+ ], s.prototype, "recentlyUsed", 2);
424
+ a([
425
+ l()
426
+ ], s.prototype, "view", 2);
427
+ s = a([
428
+ S("components.feature-templates.FeatureTemplatesViewModel")
429
+ ], s);
430
+ const A = M(s);
431
+ class P extends b {
481
432
  constructor() {
482
- super(...arguments), this._messages = S(), this.viewModel = O(this), this.favoritesEnabled = this.viewModel.favoritesEnabled, this.favorites = this.viewModel.favorites, this.restoreFavorites = this.viewModel.restoreFavorites, this.restoreRecentlyUsed = this.viewModel.restoreRecentlyUsed, this.recentlyUsed = this.viewModel.recentlyUsed, this.sharedTemplatesDisabled = this.viewModel.sharedTemplatesDisabled, this.filterText = this.viewModel.filterText, this.recentFilterText = this.viewModel.recentFilterText, this.favoritesFilterText = this.viewModel.favoritesFilterText, this.recentlyUsedEnabled = this.viewModel.recentlyUsedEnabled, this.excludeTables = this.viewModel.excludeTables, this.effectiveTemplates = this.viewModel.effectiveTemplates, this.applicationTemplates = this.viewModel.applicationTemplates, this.selectedTemplateId = this.viewModel.selectedTemplateId, this.selectedTemplate = this.viewModel.selectedTemplate, this.applicationFilterFunction = this.viewModel.applicationFilterFunction, this.applicationDisabledFunction = this.viewModel.applicationDisabledFunction, this.display = this.viewModel.display, this.groupBy = this.viewModel.groupBy, this.sectionSortBy = this.viewModel.sectionSortBy, this.templateSortBy = this.viewModel.templateSortBy, this.templateSortByFunction = this.viewModel.templateSortByFunction, this.sectionSortByFunction = this.viewModel.sectionSortByFunction, this.hideTemplatesMode = this.viewModel.hideTemplatesMode, this.disableTemplatesMode = this.viewModel.disableTemplatesMode, this.groupByFunction = this.viewModel.groupByFunction, this.hideTemplateDescription = this.viewModel.hideTemplateDescription, this.layers = this.viewModel.layers, this.view = _(this), this.autoDestroyDisabled = !1, this.updating = this.viewModel.updating, this.disabled = !1, this.showCollapseButton = !1, this.showFilter = !1, this.arcgisPropertyChange = L()("effectiveTemplates", "filterText", "recentlyUsed", "favorites"), this.arcgisReady = f(), this.arcgisTemplatesChanged = f(), this.arcgisSelectTemplate = f();
433
+ super(...arguments), this._messages = w(), this.viewModel = A(this), this.favoritesEnabled = this.viewModel.favoritesEnabled, this.favorites = this.viewModel.favorites, this.restoreFavorites = this.viewModel.restoreFavorites, this.restoreRecentlyUsed = this.viewModel.restoreRecentlyUsed, this.recentlyUsed = this.viewModel.recentlyUsed, this.sharedTemplatesDisabled = this.viewModel.sharedTemplatesDisabled, this.filterText = this.viewModel.filterText, this.recentFilterText = this.viewModel.recentFilterText, this.favoritesFilterText = this.viewModel.favoritesFilterText, this.recentlyUsedEnabled = this.viewModel.recentlyUsedEnabled, this.excludeTables = this.viewModel.excludeTables, this.effectiveTemplates = this.viewModel.effectiveTemplates, this.applicationTemplates = this.viewModel.applicationTemplates, this.selectedTemplateId = this.viewModel.selectedTemplateId, this.selectedTemplate = this.viewModel.selectedTemplate, this.applicationFilterFunction = this.viewModel.applicationFilterFunction, this.applicationDisabledFunction = this.viewModel.applicationDisabledFunction, this.display = this.viewModel.display, this.groupBy = this.viewModel.groupBy, this.sectionSortBy = this.viewModel.sectionSortBy, this.templateSortBy = this.viewModel.templateSortBy, this.templateSortByFunction = this.viewModel.templateSortByFunction, this.sectionSortByFunction = this.viewModel.sectionSortByFunction, this.hideTemplatesMode = this.viewModel.hideTemplatesMode, this.disableTemplatesMode = this.viewModel.disableTemplatesMode, this.groupByFunction = this.viewModel.groupByFunction, this.hideTemplateDescription = this.viewModel.hideTemplateDescription, this.layers = this.viewModel.layers, this.view = F(this), this.autoDestroyDisabled = !1, this.updating = this.viewModel.updating, this.disabled = !1, this.showCollapseButton = !1, this.showFilter = !1, this.arcgisPropertyChange = D()("effectiveTemplates", "filterText", "recentlyUsed", "favorites"), this.arcgisReady = h(), this.arcgisTemplatesChanged = h(), this.arcgisSelectTemplate = h();
483
434
  }
484
435
  static {
485
436
  this.properties = { favoritesEnabled: 5, favorites: 32, restoreFavorites: 0, restoreRecentlyUsed: 0, recentlyUsed: 32, sharedTemplatesDisabled: 5, filterText: 1, recentFilterText: 1, favoritesFilterText: 1, recentlyUsedEnabled: 5, excludeTables: 5, effectiveTemplates: 32, applicationTemplates: 0, selectedTemplateId: 1, selectedTemplate: 32, applicationFilterFunction: 0, applicationDisabledFunction: 0, display: 1, groupBy: 1, sectionSortBy: 1, templateSortBy: 1, templateSortByFunction: 0, sectionSortByFunction: 0, hideTemplatesMode: 1, disableTemplatesMode: 1, groupByFunction: 0, hideTemplateDescription: 5, layers: 0, view: 0, referenceElement: 1, autoDestroyDisabled: 5, updating: 32, disabled: 5, showCollapseButton: 5, showFilter: 5 };
@@ -493,18 +444,18 @@ class N extends M {
493
444
  loaded() {
494
445
  this.manager.onLifecycle(() => [
495
446
  // Ensure the view is always mapped to the viewmodel
496
- y(() => this.view, () => {
447
+ f(() => this.view, () => {
497
448
  this.viewModel.view = this.view;
498
449
  }, { initial: !0 }),
499
- y(() => this.viewModel.templateSetKey, () => {
450
+ f(() => this.viewModel.templateSetKey, () => {
500
451
  this.arcgisTemplatesChanged.emit();
501
452
  }),
502
453
  // Watch if the list of active layers changes. This will trigger a reload
503
- y(() => [
454
+ f(() => [
504
455
  this.viewModel.activeLayers?.map((e) => e.id).join(","),
505
456
  this.viewModel?.applicationTemplates,
506
457
  this.viewModel?.sharedTemplatesDisabled
507
- ], U(() => (
458
+ ], L(() => (
508
459
  // Trigger refetching of templates
509
460
  this.viewModel.handleTemplateSourceDefinitionChanged()
510
461
  ), 10), { initial: !0 })
@@ -521,40 +472,40 @@ class N extends M {
521
472
  this.viewModel.removeRecent(e);
522
473
  }
523
474
  _renderTemplates() {
524
- return this.effectiveTemplates.length === 0 ? c`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>` : c`<calcite-list .filterText=${this.filterText} .label=${this._messages?.templates ?? ""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${(e) => {
475
+ return this.effectiveTemplates.length === 0 ? o`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>` : o`<calcite-list .filterPlaceholder=${this._messages.filterPlaceholder ?? ""} .filterText=${this.filterText} .label=${this._messages?.templates ?? ""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${(e) => {
525
476
  this.filterText = e.target.filterText;
526
- }}>${this.display === "grouped" ? this.effectiveTemplates.map((e) => c`<calcite-list-item-group .heading=${e.autoTranslate ? this._messages[e.sectionName] ?? "" : e.sectionName}>${e.templates.map((i) => c`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id === this.selectedTemplateId} .description=${this.hideTemplateDescription ? void 0 : i.description} .value=${i.id} @calciteListItemSelect=${() => {
477
+ }}>${this.display === "grouped" ? this.effectiveTemplates.map((e) => o`<calcite-list-item-group .heading=${e.autoTranslate ? this._messages[e.sectionName] ?? "" : e.sectionName}>${e.templates.map((i) => o`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id === this.selectedTemplateId} .description=${this.hideTemplateDescription ? void 0 : i.description} .value=${i.id} @calciteListItemSelect=${() => {
527
478
  this._handleSelectTemplate(i);
528
- }}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`) : this.viewModel.templateList.map((e) => c`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id === this.selectedTemplateId} .description=${this.hideTemplateDescription ? void 0 : e.description} .value=${e.id} @calciteListItemSelect=${() => {
479
+ }}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`) : this.viewModel.templateList.map((e) => o`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id === this.selectedTemplateId} .description=${this.hideTemplateDescription ? void 0 : e.description} .value=${e.id} @calciteListItemSelect=${() => {
529
480
  this._handleSelectTemplate(e);
530
481
  }}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`;
531
482
  }
532
483
  _renderAddFavorite(e) {
533
- return this.viewModel.favoritesEnabled ? c`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id) ? "heart-f" : "heart"} @click=${() => {
484
+ return this.viewModel.favoritesEnabled ? o`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id) ? "heart-f" : "heart"} @click=${() => {
534
485
  this.viewModel.favorites.has(e.id) ? this.viewModel.removeFavorite(e) : this.viewModel.addFavorite(e);
535
486
  }} .text=${this._messages.addFavorite ?? ""}></calcite-action>` : "";
536
487
  }
537
488
  _renderList(e) {
538
489
  const i = e === "favorites" ? this.viewModel.favoriteTemplates : this.viewModel.recentTemplates;
539
- return i.length === 0 ? c`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e === "favorites" ? this._messages.noFavorites : this._messages.noRecent}</div></calcite-notice>` : c`<calcite-list .filterText=${e === "favorites" ? this.favoritesFilterText : this.recentFilterText} .label=${(e === "favorites" ? this._messages.favorites : this._messages.recent) ?? ""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${(r) => {
490
+ return i.length === 0 ? o`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e === "favorites" ? this._messages.noFavorites : this._messages.noRecent}</div></calcite-notice>` : o`<calcite-list .filterText=${e === "favorites" ? this.favoritesFilterText : this.recentFilterText} .filterPlaceholder=${this._messages.filterPlaceholder ?? ""} .label=${(e === "favorites" ? this._messages.favorites : this._messages.recent) ?? ""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${(r) => {
540
491
  this.filterText = r.target.filterText;
541
- }}>${i.map((r) => c`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(r)} .label=${r.label} .description=${this.hideTemplateDescription ? void 0 : r.description} .value=${r.id} @calciteListItemSelect=${() => {
492
+ }}>${i.map((r) => o`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(r)} .label=${r.label} .description=${this.hideTemplateDescription ? void 0 : r.description} .value=${r.id} @calciteListItemSelect=${() => {
542
493
  this._handleSelectTemplate(r);
543
494
  }}><arcgis-template-image slot=content-start .template=${r}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${() => {
544
495
  this._removeTemplateFromList(r, e);
545
496
  }} .text=${(e === "favorites" ? this._messages.removeFavorite : this._messages.removeRecent) ?? ""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`;
546
497
  }
547
498
  _renderFilteredEmpty() {
548
- return c`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`;
499
+ return o`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`;
549
500
  }
550
501
  _renderContent() {
551
- return this.effectiveTemplates.length === 0 && this.viewModel.loading ? null : this.favoritesEnabled || this.recentlyUsedEnabled ? c`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled ? c`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>` : ""}${this.favoritesEnabled ? c`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>` : ""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>` : this._renderTemplates();
502
+ return this.effectiveTemplates.length === 0 && this.viewModel.loading ? null : this.favoritesEnabled || this.recentlyUsedEnabled ? o`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled ? o`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>` : ""}${this.favoritesEnabled ? o`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>` : ""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>` : this._renderTemplates();
552
503
  }
553
504
  render() {
554
- return c`<div class="root">${this._renderContent()}${this.viewModel.updating || this.disabled ? c`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>` : null}</div>`;
505
+ return o`<div class="root">${this._renderContent()}${this.viewModel.updating || this.disabled ? o`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>` : null}</div>`;
555
506
  }
556
507
  }
557
- w("arcgis-feature-templates", N);
508
+ T("arcgis-feature-templates", P);
558
509
  export {
559
- N as ArcgisFeatureTemplates
510
+ P as ArcgisFeatureTemplates
560
511
  };
@@ -493,6 +493,8 @@ export abstract class ArcgisFeatures extends LitElement {
493
493
  * no pending promises, the value is `null`. When the pending promises are
494
494
  * resolved they are removed from this array and the features they return
495
495
  * are pushed into the [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#features) array.
496
+ *
497
+ * @deprecated since 5.1.
496
498
  */
497
499
  accessor promises: Array<Promise<Array<Graphic>>>;
498
500
  /**
@@ -576,7 +578,6 @@ export abstract class ArcgisFeatures extends LitElement {
576
578
  * - Content is displayed from the popup template of an [aggregate feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) (i.e. a [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) or [bin](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/)).
577
579
  * - Values from `date` and `timestamp-offset` fields should respect the view's [time zone](https://developers.arcgis.com/javascript/latest/references/core/views/View/#timeZone).
578
580
  * Alternatively, set the [timeZone](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#timeZone) property.
579
- * - Using the [fetchFeatures()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#fetchFeatures) method or the `fetchFeatures` option in the [open](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#open) method.
580
581
  * - Using the `Zoom to` default action. If the `view` is not specified, set the [includeDefaultActionsDisabled](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#includeDefaultActionsDisabled) property to `true` to remove this default action.
581
582
  *
582
583
  * @since 4.34
@@ -599,25 +600,11 @@ export abstract class ArcgisFeatures extends LitElement {
599
600
  /**
600
601
  * Use this method to return feature(s) at a given screen location. These features are fetched from all of the [LayerViews](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) in the [view](https://developers.arcgis.com/javascript/latest/references/core/views/View/). In order to use this, a layer must already have an associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) and have its [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#popupEnabled). This method allows a developer to control how the input location is handled. For example, you may want to fetch features on a `click` event or on a `pointer-move` event. This method automatically sets the location based on the input event's screen coordinates.
601
602
  *
603
+ * @deprecated since 5.1. Use the `fetchPopupFeatures` method on the [Map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#fetchPopupFeatures), [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#fetchPopupFeatures), or [Link Chart](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-link-chart/#fetchPopupFeatures) component to fetch features based on a screen location.
602
604
  * @param screenPoint
603
605
  * @param options
606
+ * @deprecated
604
607
  * @see [open](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#open)
605
- * @example
606
- * ```js
607
- * const viewElement = document.querySelector("arcgis-map");
608
- * // Get viewElement's click event
609
- * reactiveUtils.on(()=>viewElement, "arcgisViewClick", async (event)=>{
610
- * // Call fetchFeatures on the component and pass in the click event detail
611
- * await component.fetchFeatures(event.detail);
612
- * });
613
- * // Watch for changes to the features property and open the component when features are available.
614
- * reactiveUtils.watch(
615
- * () => component.features,
616
- * () => {
617
- * component.open = component.features ? true : false;
618
- * },
619
- * );
620
- * ```
621
608
  */
622
609
  fetchFeatures(screenPoint?: ScreenPoint, options?: FetchFeaturesOptions): Promise<void>;
623
610
  /**