@arcgis/map-components 5.1.0-next.120 → 5.1.0-next.122
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.
- package/dist/cdn/{ZZORY2UI.js → 2GDVOK6V.js} +1 -1
- package/dist/cdn/3M2OCTTN.js +2 -0
- package/dist/cdn/43B43AY2.js +2 -0
- package/dist/cdn/{A6P7RDWG.js → 4AQ43ENS.js} +1 -1
- package/dist/cdn/{BQDL5AKD.js → 6RUN7OSM.js} +1 -1
- package/dist/cdn/{6OHXFH4A.js → 6SY6H3FZ.js} +1 -1
- package/dist/cdn/{JA7RPLTP.js → 6WV5RHUP.js} +2 -2
- package/dist/cdn/{QZMJWS2B.js → ADWNNODV.js} +1 -1
- package/dist/cdn/CH6EZH77.js +2 -0
- package/dist/cdn/CNNVHQTZ.js +4 -0
- package/dist/cdn/CPQRCYUD.js +2 -0
- package/dist/cdn/CRJEQWDO.js +2 -0
- package/dist/cdn/DCNSXS23.js +2 -0
- package/dist/cdn/DZMN2UH5.js +2 -0
- package/dist/cdn/EJAWFQRM.js +2 -0
- package/dist/cdn/FKJU4SJG.js +2 -0
- package/dist/cdn/FWSLFWOH.js +2 -0
- package/dist/cdn/{Q4753YCY.js → GD7MA2TO.js} +1 -1
- package/dist/cdn/HBE3W2BQ.js +2 -0
- package/dist/cdn/IJYN5YEP.js +2 -0
- package/dist/cdn/JOOGE4FT.js +2 -0
- package/dist/cdn/{VRLY2I2M.js → MASUN7EL.js} +1 -1
- package/dist/cdn/{X5TD4KCW.js → MZBCMFYH.js} +1 -1
- package/dist/cdn/{FMTWGY6C.js → NJHOCKLL.js} +1 -1
- package/dist/cdn/OZJJULKI.js +2 -0
- package/dist/cdn/{J4TYGEI3.js → RIRETHHL.js} +1 -1
- package/dist/cdn/{PO3NMPKS.js → SXWQBHG3.js} +1 -1
- package/dist/cdn/TCUFYIIZ.js +2 -0
- package/dist/cdn/VHJSRDE4.js +2 -0
- package/dist/cdn/{7I7G7KRT.js → W4SQ3QCZ.js} +1 -1
- package/dist/cdn/WFL2WTJK.js +2 -0
- package/dist/cdn/X5UAYUNL.js +2 -0
- package/dist/cdn/{L77C4X4F.js → XYUG5M3W.js} +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +60 -111
- package/dist/components/arcgis-daylight/customElement.d.ts +1 -0
- package/dist/components/arcgis-daylight/customElement.js +98 -112
- package/dist/components/arcgis-feature-table/customElement.d.ts +8 -0
- package/dist/components/arcgis-feature-table/customElement.js +28 -28
- package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +33 -0
- package/dist/components/arcgis-feature-templates/customElement.d.ts +275 -0
- package/dist/components/arcgis-feature-templates/customElement.js +560 -0
- package/dist/components/arcgis-feature-templates/index.d.ts +1 -0
- package/dist/components/arcgis-feature-templates/index.js +13 -0
- package/dist/components/arcgis-features-next/customElement.d.ts +2 -0
- package/dist/components/arcgis-features-next/customElement.js +69 -63
- package/dist/components/arcgis-features-next/index.js +1 -0
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +23 -23
- package/dist/components/arcgis-link-chart/customElement.d.ts +11 -4
- package/dist/components/arcgis-link-chart/customElement.js +11 -11
- package/dist/components/arcgis-map/customElement.d.ts +10 -3
- package/dist/components/arcgis-map/customElement.js +9 -9
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +3 -3
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +1 -1
- package/dist/components/arcgis-paste/customElement.js +27 -38
- package/dist/components/arcgis-paste/index.js +1 -1
- package/dist/components/arcgis-popup/customElement.d.ts +2 -0
- package/dist/components/arcgis-popup/customElement.js +9 -9
- package/dist/components/arcgis-scene/customElement.d.ts +10 -3
- package/dist/components/arcgis-scene/customElement.js +24 -24
- package/dist/components/arcgis-search/customElement.js +6 -6
- package/dist/components/arcgis-template-image/customElement.d.ts +14 -0
- package/dist/components/arcgis-template-image/customElement.js +119 -0
- package/dist/components/arcgis-template-image/index.d.ts +1 -0
- package/dist/components/arcgis-template-image/index.js +1 -0
- package/dist/components/arcgis-video/customElement.d.ts +15 -2
- package/dist/components/arcgis-video/customElement.js +5 -5
- package/dist/components/arcgis-video-player/customElement.d.ts +7 -0
- package/dist/components/arcgis-video-player/customElement.js +14 -11
- package/dist/components/arcgis-video-player-controls-group/customElement.js +19 -17
- package/dist/components/arcgis-video-player-settings/customElement.js +20 -18
- package/dist/components/arcgis-video-player-settings/index.js +1 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/loader.js +10 -8
- package/dist/types/lumina.d.ts +18 -4
- package/dist/types/preact.d.ts +20 -4
- package/dist/types/react.d.ts +22 -4
- package/dist/types/stencil.d.ts +18 -4
- package/package.json +4 -4
- package/dist/cdn/3X33RWNO.js +0 -2
- package/dist/cdn/5QATVROE.js +0 -2
- package/dist/cdn/CLFGHCMB.js +0 -2
- package/dist/cdn/COKJF3EH.js +0 -2
- package/dist/cdn/E33LBHQA.js +0 -4
- package/dist/cdn/E6IL4F2M.js +0 -2
- package/dist/cdn/G56TPBPA.js +0 -2
- package/dist/cdn/GCFIJLPC.js +0 -2
- package/dist/cdn/JUIA2RF6.js +0 -2
- package/dist/cdn/L4RTHLN4.js +0 -2
- package/dist/cdn/OYP56BNC.js +0 -2
- package/dist/cdn/QKPKTEN4.js +0 -2
- package/dist/cdn/R45DWBFZ.js +0 -2
- package/dist/cdn/RPMEM4UV.js +0 -2
- package/dist/cdn/RZHHKFQG.js +0 -2
- package/dist/cdn/SM4Y3DFU.js +0 -2
- package/dist/cdn/ZVTOXQKI.js +0 -2
- /package/dist/cdn/{GJ5TOPT3.js → 2CZRXPMB.js} +0 -0
- /package/dist/cdn/{DPU3VHST.js → 2RIDZVJS.js} +0 -0
- /package/dist/cdn/{SUNN2JJ2.js → 3DVOY4BQ.js} +0 -0
- /package/dist/cdn/{NDMFLRTB.js → 3NSVHKCX.js} +0 -0
- /package/dist/cdn/{O6LYJEON.js → 3WCEFKJX.js} +0 -0
- /package/dist/cdn/{MC2YUGXZ.js → 3X2K6TOS.js} +0 -0
- /package/dist/cdn/{KCP3JSEI.js → 5U45EC5U.js} +0 -0
- /package/dist/cdn/{OKNXBCUX.js → 6TIWCGNI.js} +0 -0
- /package/dist/cdn/{U3TSRIEI.js → ACZBI3TS.js} +0 -0
- /package/dist/cdn/{L54L4XXE.js → BALE27RC.js} +0 -0
- /package/dist/cdn/{W52ULASU.js → CSLP3Y5Q.js} +0 -0
- /package/dist/cdn/{URTOVAT4.js → FVOWGP5P.js} +0 -0
- /package/dist/cdn/{772IZDK4.js → HHVQ6PZP.js} +0 -0
- /package/dist/cdn/{7LWMV5A2.js → IIQPDHOL.js} +0 -0
- /package/dist/cdn/{KDLK5QD5.js → KODINAEM.js} +0 -0
- /package/dist/cdn/{KRMRVJFP.js → KOSOMJZF.js} +0 -0
- /package/dist/cdn/{7IB6AI2V.js → LCL6A5WY.js} +0 -0
- /package/dist/cdn/{VUQCK6IF.js → M3RQA7LC.js} +0 -0
- /package/dist/cdn/{GNOAUTDK.js → NFC5RKO7.js} +0 -0
- /package/dist/cdn/{NRMPFAXY.js → NY56F774.js} +0 -0
- /package/dist/cdn/{IL63OQEZ.js → OKZBZTFG.js} +0 -0
- /package/dist/cdn/{XUZ43MBE.js → PFWDUC5T.js} +0 -0
- /package/dist/cdn/{KOZ67YXN.js → PS4ID2TE.js} +0 -0
- /package/dist/cdn/{AVFPVB7U.js → QBLPJW3F.js} +0 -0
- /package/dist/cdn/{UHA7OYN5.js → R6G7YQAK.js} +0 -0
- /package/dist/cdn/{TKKD4742.js → RT5PKDE3.js} +0 -0
- /package/dist/cdn/{H76ZEZDT.js → S372YWXF.js} +0 -0
- /package/dist/cdn/{3MSBRZSL.js → S6ARJLXF.js} +0 -0
- /package/dist/cdn/{GMSP2RYI.js → ST4PUEOI.js} +0 -0
- /package/dist/cdn/{ZRRRSIMH.js → SYVTOG2B.js} +0 -0
- /package/dist/cdn/{FV53P5VQ.js → U5WUAQYQ.js} +0 -0
- /package/dist/cdn/{F6ZBUVU3.js → UGILYDTR.js} +0 -0
- /package/dist/cdn/{NI4PVDRC.js → VOI7MTIP.js} +0 -0
- /package/dist/cdn/{QGYTLHWY.js → VZLSY2HC.js} +0 -0
- /package/dist/cdn/{KAJYVAAI.js → WDDHDMHF.js} +0 -0
- /package/dist/cdn/{HEP3BHHQ.js → XPGK3YXK.js} +0 -0
- /package/dist/cdn/{2KBFRAA3.js → XQ5DUVE2.js} +0 -0
- /package/dist/cdn/{LSPV526S.js → XVEQWFE4.js} +0 -0
- /package/dist/cdn/{CK5XEDZS.js → YDOV4SQ2.js} +0 -0
- /package/dist/cdn/{PZSA4K32.js → YGVTAUE6.js} +0 -0
- /package/dist/cdn/{7D5T777O.js → YSJ2NU2N.js} +0 -0
- /package/dist/cdn/{OWF5OCZY.js → ZHJBZYZ4.js} +0 -0
|
@@ -0,0 +1,560 @@
|
|
|
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;
|
|
21
|
+
};
|
|
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) {
|
|
73
|
+
switch (t) {
|
|
74
|
+
case "point":
|
|
75
|
+
case "multipoint":
|
|
76
|
+
case "polyline":
|
|
77
|
+
case "polygon":
|
|
78
|
+
case "extent":
|
|
79
|
+
case "mesh":
|
|
80
|
+
return t;
|
|
81
|
+
}
|
|
82
|
+
return "noneSpecified";
|
|
83
|
+
}
|
|
84
|
+
const V = (t) => P(t.layer.geometryType ?? "");
|
|
85
|
+
let a = class extends b {
|
|
86
|
+
//#region Lifecycle
|
|
87
|
+
constructor(t) {
|
|
88
|
+
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 = [];
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region Public methods
|
|
92
|
+
/*
|
|
93
|
+
* The template source has changed. This maybe because layers
|
|
94
|
+
* have been added or removed, the map changed or application templates
|
|
95
|
+
* supplied.
|
|
96
|
+
*/
|
|
97
|
+
async handleTemplateSourceDefinitionChanged() {
|
|
98
|
+
if (this._hasRunInitialLoad = !1, this.applicationTemplates) {
|
|
99
|
+
await this._restore();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
this.fetchingTemplateMetaData = !0;
|
|
104
|
+
const t = this.activeLayers;
|
|
105
|
+
if (await Promise.allSettled(t.map((e) => e.load())), this.sharedTemplatesDisabled) {
|
|
106
|
+
const e = [];
|
|
107
|
+
for (const i of t) {
|
|
108
|
+
const r = x(i);
|
|
109
|
+
r.length > 0 && e.push({
|
|
110
|
+
layer: i,
|
|
111
|
+
templates: r
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
this.mapTemplates = e;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.mapTemplates = await B(t, this.view, void 0, {
|
|
118
|
+
returnVisibleTemplatesOnly: !0
|
|
119
|
+
}), await this._restore();
|
|
120
|
+
} catch {
|
|
121
|
+
this.mapTemplates = [];
|
|
122
|
+
} finally {
|
|
123
|
+
this.fetchingTemplateMetaData = !1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
get loading() {
|
|
127
|
+
return !this._hasRunInitialLoad || this.layers !== void 0 || this.applicationTemplates !== void 0 || !this.view?.ready;
|
|
128
|
+
}
|
|
129
|
+
/*
|
|
130
|
+
* Add a favorite
|
|
131
|
+
*/
|
|
132
|
+
async addFavorite(t) {
|
|
133
|
+
this.favorites.add(t.id), this.favorites = new Set(this.favorites);
|
|
134
|
+
}
|
|
135
|
+
/*
|
|
136
|
+
* Remove a favorite
|
|
137
|
+
*/
|
|
138
|
+
async removeFavorite(t) {
|
|
139
|
+
this.favorites.delete(t.id), this.favorites = new Set(this.favorites);
|
|
140
|
+
}
|
|
141
|
+
/*
|
|
142
|
+
* Add a recently selected Template
|
|
143
|
+
*/
|
|
144
|
+
addRecent(t) {
|
|
145
|
+
if (!this.recentlyUsedEnabled)
|
|
146
|
+
return;
|
|
147
|
+
const e = this.recentlyUsed.filter((i) => i !== t.id);
|
|
148
|
+
e.unshift(t.id) > 20 && (e.length = 20), this.recentlyUsed = e;
|
|
149
|
+
}
|
|
150
|
+
/*
|
|
151
|
+
* Remove a favorite
|
|
152
|
+
*/
|
|
153
|
+
async removeRecent(t) {
|
|
154
|
+
this.recentlyUsed = this.recentlyUsed.filter((e) => e !== t.id);
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region Private methods
|
|
158
|
+
/*
|
|
159
|
+
* Restore favorites and recents, if there is a provider.
|
|
160
|
+
*/
|
|
161
|
+
async _restore() {
|
|
162
|
+
try {
|
|
163
|
+
if (this.favoritesEnabled && this.restoreFavorites) {
|
|
164
|
+
const t = await this.restoreFavorites();
|
|
165
|
+
this.favorites = new Set(t ?? []);
|
|
166
|
+
}
|
|
167
|
+
} catch {
|
|
168
|
+
}
|
|
169
|
+
try {
|
|
170
|
+
if (this.recentlyUsedEnabled && this.restoreRecentlyUsed) {
|
|
171
|
+
const t = await this.restoreRecentlyUsed();
|
|
172
|
+
this.recentlyUsed = t ?? [];
|
|
173
|
+
}
|
|
174
|
+
} catch {
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/*
|
|
178
|
+
* Sort the templates based on a function or alphabetical.
|
|
179
|
+
*/
|
|
180
|
+
_sortTemplates(t) {
|
|
181
|
+
if (this.templateSortByFunction) {
|
|
182
|
+
const e = this.templateSortByFunction(t) ?? null;
|
|
183
|
+
return e === null ? t : e;
|
|
184
|
+
}
|
|
185
|
+
return this.templateSortBy === "alphabetical" ? t.toSorted((e, i) => e.label.localeCompare(i.label)) : t;
|
|
186
|
+
}
|
|
187
|
+
/*
|
|
188
|
+
* Sort the sections based on a function or alphabetical, and sort the templates within the sections as well.
|
|
189
|
+
*/
|
|
190
|
+
_sortSections(t) {
|
|
191
|
+
if (this.sectionSortByFunction) {
|
|
192
|
+
const e = this.sectionSortByFunction(t);
|
|
193
|
+
e && (t = e);
|
|
194
|
+
} else if (this.sectionSortBy === "alphabetical")
|
|
195
|
+
t = t.toSorted((e, i) => e.sectionName.localeCompare(i.sectionName));
|
|
196
|
+
else if (this.groupBy === "geometry" && !this.groupByFunction) {
|
|
197
|
+
const e = {
|
|
198
|
+
point: 1,
|
|
199
|
+
multipoint: 2,
|
|
200
|
+
polyline: 3,
|
|
201
|
+
polygon: 4,
|
|
202
|
+
extent: 5,
|
|
203
|
+
mesh: 6,
|
|
204
|
+
noneSpecified: 7
|
|
205
|
+
};
|
|
206
|
+
t = t.toSorted((i, r) => {
|
|
207
|
+
const o = e[i.sectionName] ?? 10, p = e[r.sectionName] ?? 10;
|
|
208
|
+
return o - p;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
for (const e of t)
|
|
212
|
+
e.templates = this._sortTemplates(e.templates);
|
|
213
|
+
return t;
|
|
214
|
+
}
|
|
215
|
+
_layerIsVisibleAtCurrentScale(t) {
|
|
216
|
+
if (!this.view)
|
|
217
|
+
return !0;
|
|
218
|
+
let e = t;
|
|
219
|
+
v(t) && (e = t.parent);
|
|
220
|
+
const i = this.view.allLayerViews.find((r) => r.layer === e);
|
|
221
|
+
if (!i)
|
|
222
|
+
return !0;
|
|
223
|
+
if (v(t)) {
|
|
224
|
+
const r = this.view.scale;
|
|
225
|
+
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;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return i.visibleAtCurrentScale;
|
|
232
|
+
}
|
|
233
|
+
get activeLayers() {
|
|
234
|
+
const t = [];
|
|
235
|
+
for (const e of this.layers ?? [])
|
|
236
|
+
if (T(e))
|
|
237
|
+
for (const i of e.sublayers)
|
|
238
|
+
t.push(i);
|
|
239
|
+
else
|
|
240
|
+
t.push(e);
|
|
241
|
+
if (this.layers === void 0 || this.layers === null) {
|
|
242
|
+
for (const e of [
|
|
243
|
+
...this.view?.map?.allLayers?.slice(0).reverse() ?? [],
|
|
244
|
+
...this.excludeTables ? [] : this.view?.map?.allTables?.slice(0).reverse() ?? []
|
|
245
|
+
])
|
|
246
|
+
if (e.type === "feature" || e.type === "scene" || e.type === "geojson" || e.type === "oriented-imagery" || e.type === "knowledge-graph")
|
|
247
|
+
t.push(e);
|
|
248
|
+
else if (T(e))
|
|
249
|
+
for (const i of e.sublayers)
|
|
250
|
+
t.push(i);
|
|
251
|
+
}
|
|
252
|
+
return t;
|
|
253
|
+
}
|
|
254
|
+
get selectedTemplate() {
|
|
255
|
+
return this.allTemplates.find((t) => t.id === this.selectedTemplateId);
|
|
256
|
+
}
|
|
257
|
+
get effectiveTemplates() {
|
|
258
|
+
return this.templates.map((t) => ({ ...t, templates: t.templates.filter((e) => this.inclusionFilter(e)) })).filter((t) => t.templates.length > 0);
|
|
259
|
+
}
|
|
260
|
+
get templateList() {
|
|
261
|
+
return this._sortTemplates(this.effectiveTemplates.flatMap((t) => t.templates));
|
|
262
|
+
}
|
|
263
|
+
get allTemplates() {
|
|
264
|
+
return this._sortTemplates(this.templates.flatMap((t) => t.templates));
|
|
265
|
+
}
|
|
266
|
+
inclusionFilter(t) {
|
|
267
|
+
if (this.excludeTables && u(t.layer) || this.applicationFilterFunction?.(t) === !1)
|
|
268
|
+
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));
|
|
271
|
+
}
|
|
272
|
+
get templateSetKey() {
|
|
273
|
+
return this._sortTemplates(this.allTemplates).map((t) => t.id).join(",");
|
|
274
|
+
}
|
|
275
|
+
get disabledTemplates() {
|
|
276
|
+
const t = /* @__PURE__ */ new Set();
|
|
277
|
+
for (const e of this.allTemplates) {
|
|
278
|
+
if (this.applicationDisabledFunction && this.applicationDisabledFunction(e)) {
|
|
279
|
+
t.add(e);
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
if (!u(e.layer)) {
|
|
283
|
+
if (this.disableTemplatesMode === "visible" && !e.layer.visible) {
|
|
284
|
+
t.add(e);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (this.disableTemplatesMode === "scale" && this.view && !this._layerIsVisibleAtCurrentScale(e.layer)) {
|
|
288
|
+
t.add(e);
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return t;
|
|
294
|
+
}
|
|
295
|
+
get templates() {
|
|
296
|
+
return this.applicationTemplates ?? this.organizedMapTemplates;
|
|
297
|
+
}
|
|
298
|
+
get organizedMapTemplates() {
|
|
299
|
+
if (this.groupByFunction || this.groupBy === "geometry") {
|
|
300
|
+
const t = !this.groupByFunction, e = this.groupByFunction ?? V, i = /* @__PURE__ */ new Map();
|
|
301
|
+
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);
|
|
307
|
+
else {
|
|
308
|
+
const m = {
|
|
309
|
+
sectionName: n,
|
|
310
|
+
...t ? { autoTranslate: !0 } : {},
|
|
311
|
+
templates: [p]
|
|
312
|
+
};
|
|
313
|
+
i.set(n, m);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return this._sortSections(Array.from(i.values()));
|
|
317
|
+
}
|
|
318
|
+
return this._sortSections(
|
|
319
|
+
(this.mapTemplates ?? []).map(({ layer: t, templates: e }) => ({
|
|
320
|
+
sectionName: t.title ?? "",
|
|
321
|
+
templates: e.map((i) => new d({ layer: t, template: i }))
|
|
322
|
+
})).filter((t) => t.templates.length > 0)
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
get updating() {
|
|
326
|
+
return this.fetchingTemplateMetaData;
|
|
327
|
+
}
|
|
328
|
+
get favoriteTemplates() {
|
|
329
|
+
const t = [];
|
|
330
|
+
for (const e of this.effectiveTemplates)
|
|
331
|
+
for (const i of e.templates)
|
|
332
|
+
this.favorites.has(i.id) && t.push(i);
|
|
333
|
+
return t;
|
|
334
|
+
}
|
|
335
|
+
get recentTemplates() {
|
|
336
|
+
const t = /* @__PURE__ */ new Map();
|
|
337
|
+
for (const i of this.effectiveTemplates)
|
|
338
|
+
for (const r of i.templates)
|
|
339
|
+
t.set(r.id, r);
|
|
340
|
+
const e = [];
|
|
341
|
+
for (const i of this.recentlyUsed)
|
|
342
|
+
t.has(i) && e.push(t.get(i));
|
|
343
|
+
return e;
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
};
|
|
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 {
|
|
481
|
+
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();
|
|
483
|
+
}
|
|
484
|
+
static {
|
|
485
|
+
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 };
|
|
486
|
+
}
|
|
487
|
+
static {
|
|
488
|
+
this.styles = E;
|
|
489
|
+
}
|
|
490
|
+
async destroy() {
|
|
491
|
+
await this.manager.destroy();
|
|
492
|
+
}
|
|
493
|
+
loaded() {
|
|
494
|
+
this.manager.onLifecycle(() => [
|
|
495
|
+
// Ensure the view is always mapped to the viewmodel
|
|
496
|
+
y(() => this.view, () => {
|
|
497
|
+
this.viewModel.view = this.view;
|
|
498
|
+
}, { initial: !0 }),
|
|
499
|
+
y(() => this.viewModel.templateSetKey, () => {
|
|
500
|
+
this.arcgisTemplatesChanged.emit();
|
|
501
|
+
}),
|
|
502
|
+
// Watch if the list of active layers changes. This will trigger a reload
|
|
503
|
+
y(() => [
|
|
504
|
+
this.viewModel.activeLayers?.map((e) => e.id).join(","),
|
|
505
|
+
this.viewModel?.applicationTemplates,
|
|
506
|
+
this.viewModel?.sharedTemplatesDisabled
|
|
507
|
+
], U(() => (
|
|
508
|
+
// Trigger refetching of templates
|
|
509
|
+
this.viewModel.handleTemplateSourceDefinitionChanged()
|
|
510
|
+
), 10), { initial: !0 })
|
|
511
|
+
]);
|
|
512
|
+
}
|
|
513
|
+
_handleSelectTemplate(e) {
|
|
514
|
+
this.selectedTemplateId = e.id, this.arcgisSelectTemplate.emit({ template: e }), this.viewModel.addRecent(e);
|
|
515
|
+
}
|
|
516
|
+
_removeTemplateFromList(e, i) {
|
|
517
|
+
if (i === "favorites") {
|
|
518
|
+
this.viewModel.removeFavorite(e);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
this.viewModel.removeRecent(e);
|
|
522
|
+
}
|
|
523
|
+
_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) => {
|
|
525
|
+
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=${() => {
|
|
527
|
+
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=${() => {
|
|
529
|
+
this._handleSelectTemplate(e);
|
|
530
|
+
}}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`;
|
|
531
|
+
}
|
|
532
|
+
_renderAddFavorite(e) {
|
|
533
|
+
return this.viewModel.favoritesEnabled ? c`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id) ? "heart-f" : "heart"} @click=${() => {
|
|
534
|
+
this.viewModel.favorites.has(e.id) ? this.viewModel.removeFavorite(e) : this.viewModel.addFavorite(e);
|
|
535
|
+
}} .text=${this._messages.addFavorite ?? ""}></calcite-action>` : "";
|
|
536
|
+
}
|
|
537
|
+
_renderList(e) {
|
|
538
|
+
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) => {
|
|
540
|
+
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=${() => {
|
|
542
|
+
this._handleSelectTemplate(r);
|
|
543
|
+
}}><arcgis-template-image slot=content-start .template=${r}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${() => {
|
|
544
|
+
this._removeTemplateFromList(r, e);
|
|
545
|
+
}} .text=${(e === "favorites" ? this._messages.removeFavorite : this._messages.removeRecent) ?? ""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`;
|
|
546
|
+
}
|
|
547
|
+
_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>`;
|
|
549
|
+
}
|
|
550
|
+
_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();
|
|
552
|
+
}
|
|
553
|
+
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>`;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
w("arcgis-feature-templates", N);
|
|
558
|
+
export {
|
|
559
|
+
N as ArcgisFeatureTemplates
|
|
560
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-notice";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-list";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-list-item-group";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-list-item";
|
|
5
|
+
import "../arcgis-template-image/index.js";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-tabs";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-tab-nav";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-tab-title";
|
|
10
|
+
import "@esri/calcite-components/components/calcite-tab";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-scrim";
|
|
12
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
13
|
+
export * from "./customElement.js";
|
|
@@ -159,6 +159,8 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
159
159
|
* @default 20
|
|
160
160
|
*/
|
|
161
161
|
accessor featuresPerPage: number;
|
|
162
|
+
/** @default false */
|
|
163
|
+
accessor focusTrapEnabled: boolean;
|
|
162
164
|
/**
|
|
163
165
|
* This function provides the ability to override either the [arcgis-map.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) or [arcgis-scene.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#goTo) methods.
|
|
164
166
|
*
|