@arcgis/map-components 5.2.0-next.76 → 5.2.0-next.78
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/4FN75DFQ.js +2 -0
- package/dist/cdn/{VJIYYZW3.js → D4HG2OIN.js} +1 -1
- package/dist/cdn/FOZXZGEZ.js +2 -0
- package/dist/cdn/HTL73ZTA.js +2 -0
- package/dist/cdn/HZVC4F3N.js +2 -0
- package/dist/cdn/OBHCFXFW.js +2 -0
- package/dist/cdn/S55YL3HD.js +2 -0
- package/dist/cdn/{VQG7S23K.js → SLPJAJDI.js} +1 -1
- package/dist/cdn/UFUUA7WI.js +2 -0
- package/dist/cdn/VGMTHIUW.js +2 -0
- package/dist/cdn/{YJYUG3DP.js → YUJMRIVW.js} +1 -1
- package/dist/cdn/assets/features-next/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-trace-functions-result-item/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-list-item.js +35 -24
- package/dist/chunks/layer-list-next.js +1 -1
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +18 -21
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-basemap-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +19 -14
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +26 -26
- package/dist/components/arcgis-catalog-layer-list-next/index.js +1 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +13 -13
- package/dist/components/arcgis-features-next/customElement.d.ts +9 -0
- package/dist/components/arcgis-features-next/customElement.js +126 -108
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +5 -5
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +12 -12
- package/dist/components/arcgis-layer-list-next/types.d.ts +4 -4
- package/dist/components/arcgis-table-list-next/customElement.d.ts +17 -13
- package/dist/components/arcgis-table-list-next/customElement.js +11 -11
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +30 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +34 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/index.js +4 -0
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +51 -58
- package/dist/components/arcgis-utility-network-trace-results-next/index.js +1 -3
- 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 +4 -0
- package/dist/loader.js +2 -1
- package/dist/types/lumina.d.ts +6 -1
- package/dist/types/preact.d.ts +7 -1
- package/dist/types/react.d.ts +8 -1
- package/dist/types/stencil.d.ts +6 -1
- package/dist/utils/layer-list-utils.d.ts +6 -6
- package/package.json +4 -4
- package/dist/cdn/D6Z3MYCF.js +0 -2
- package/dist/cdn/GVCVI2FM.js +0 -2
- package/dist/cdn/H5BVJ264.js +0 -2
- package/dist/cdn/R5ZY52DF.js +0 -2
- package/dist/cdn/RIZHD5EC.js +0 -2
- package/dist/cdn/TKTHZ2GE.js +0 -2
- package/dist/cdn/ZWAOPC3F.js +0 -2
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { c as O } from "../../chunks/runtime.js";
|
|
3
3
|
import { html as n } from "lit";
|
|
4
4
|
import { repeat as A } from "lit/directives/repeat.js";
|
|
5
|
-
import { keyed as
|
|
5
|
+
import { keyed as I } from "lit/directives/keyed.js";
|
|
6
6
|
import { createReactiveMap as C } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
7
7
|
import u from "@arcgis/core/core/Collection.js";
|
|
8
8
|
import { on as L, watch as R } from "@arcgis/core/core/reactiveUtils.js";
|
|
9
|
-
import N from "@arcgis/core/
|
|
10
|
-
import
|
|
11
|
-
import { LitElement as
|
|
12
|
-
import { usePropertyChange as
|
|
9
|
+
import N from "@arcgis/core/layers/list/CatalogItemCollection.js";
|
|
10
|
+
import x from "@arcgis/core/layers/list/Item.js";
|
|
11
|
+
import { LitElement as D, createEvent as d, renderElement as M, safeClassMap as b, nothing as _ } from "@arcgis/lumina";
|
|
12
|
+
import { usePropertyChange as k } from "@arcgis/lumina/controllers";
|
|
13
13
|
import { reEmitEvent as B } from "@arcgis/lumina/controllers/accessor";
|
|
14
14
|
import { classes as S } from "@arcgis/toolkit/dom";
|
|
15
15
|
import { generateGuid as G } from "@arcgis/toolkit/string";
|
|
@@ -25,8 +25,8 @@ import { c as X } from "../../chunks/css.js";
|
|
|
25
25
|
const m = X, Y = (p) => {
|
|
26
26
|
const e = p?.type;
|
|
27
27
|
return e === "knowledge-graph" || e === "map-image" || e === "tile";
|
|
28
|
-
}, Z = (p) => p?.type === "catalog",
|
|
29
|
-
class se extends
|
|
28
|
+
}, Z = (p) => p?.type === "catalog", P = "nested", ee = u.ofType(x), te = V(N);
|
|
29
|
+
class se extends D {
|
|
30
30
|
constructor() {
|
|
31
31
|
super(...arguments), this.#l = `operational-${G()}`, this.#e = null, this.#o = H(), this.#i = !1, this.#t = !1, this.messages = U(), this.#r = () => {
|
|
32
32
|
this._activeItem = null;
|
|
@@ -41,7 +41,7 @@ class se extends k {
|
|
|
41
41
|
e && this.#L(e);
|
|
42
42
|
}, this.#d = (e) => {
|
|
43
43
|
e && this.#v(e);
|
|
44
|
-
}, this.viewModel = te(this), this._activeItem = null, this._focusRootFlowItem = !1, this._focusPanelFlowItem = !1, this._focusLayerFlowItem = null, this.layerTablesEnabled = new u(["knowledge-graph"]), this.mapImageOptions = null, this.tileOptions = null, this.view = this.viewModel.view, this.hideCatalogLayerList = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.showFilter = !1, this.showHeading = !1, this.hideStatusIndicators = !1, this.showTemporaryLayerIndicators = !1, this.closed = !1, this.topLayerDisabled = !1, this.autoDestroyDisabled = !1, this.state = this.viewModel.state, this.openedLayers = new u(), this.openedLayerLists = new u(), this.collapsed = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.minFilterItems = j, this.selectedItems = new ee(), this.selectionMode = "none", this.visibilityAppearance = "default", this.arcgisPropertyChange =
|
|
44
|
+
}, this.viewModel = te(this), this._activeItem = null, this._focusRootFlowItem = !1, this._focusPanelFlowItem = !1, this._focusLayerFlowItem = null, this.layerTablesEnabled = new u(["knowledge-graph"]), this.mapImageOptions = null, this.tileOptions = null, this.view = this.viewModel.view, this.hideCatalogLayerList = !1, this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.hideNoFilterResultsNotice = !1, this.hideNoItemsNotice = !1, this.showFilter = !1, this.showHeading = !1, this.hideStatusIndicators = !1, this.showTemporaryLayerIndicators = !1, this.closed = !1, this.topLayerDisabled = !1, this.autoDestroyDisabled = !1, this.state = this.viewModel.state, this.openedLayers = new u(), this.openedLayerLists = new u(), this.collapsed = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.listModeDisabled = this.viewModel.listModeDisabled, this.minFilterItems = j, this.selectedItems = new ee(), this.selectionMode = "none", this.visibilityAppearance = "default", this.arcgisPropertyChange = k()("state"), this.arcgisReady = d(), this.arcgisCatalogItemsChange = d(), this.arcgisFilterChange = d(), this.arcgisSelectedItemsChange = d(), this.arcgisOpenedLayersChange = d(), this.arcgisTriggerAction = B(() => this.viewModel, "trigger-action");
|
|
45
45
|
}
|
|
46
46
|
static {
|
|
47
47
|
this.properties = { _catalogLayerList: 16, _activeItem: 16, _focusRootFlowItem: 16, _focusPanelFlowItem: 16, _focusLayerFlowItem: 16, _totalItems: 16, _filterEnabled: 16, _visibleItems: 16, _openedPanelItems: 16, _renderedOpenLayerFlowItems: 16, layerTablesEnabled: 16, mapImageOptions: 16, tileOptions: 16, view: 0, hideCatalogLayerList: 5, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, hideNoFilterResultsNotice: 5, hideNoItemsNotice: 5, showFilter: 5, showHeading: 5, hideStatusIndicators: 5, showTemporaryLayerIndicators: 5, closed: 5, topLayerDisabled: 5, autoDestroyDisabled: 5, referenceElement: 1, state: 32, openedLayers: 32, openedLayerLists: 32, catalogItems: 0, catalogLayer: 0, catalogOptions: 0, collapsed: 5, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, knowledgeGraphOptions: 0, label: 1, listItemCreatedFunction: 0, listModeDisabled: 5, minFilterItems: 9, selectedItems: 0, selectionMode: 1, visibilityAppearance: 1, messageOverrides: 0, onCatalogOpen: 0, onTablesOpen: 0 };
|
|
@@ -95,7 +95,7 @@ class se extends k {
|
|
|
95
95
|
loaded() {
|
|
96
96
|
this.manager.onLifecycle(() => [
|
|
97
97
|
L(() => this.openedLayers, "change", () => {
|
|
98
|
-
this.#
|
|
98
|
+
this.#w();
|
|
99
99
|
}),
|
|
100
100
|
L(() => this.viewModel.catalogItems, "change", () => {
|
|
101
101
|
q(this.selectedItems), this.arcgisCatalogItemsChange.emit();
|
|
@@ -117,7 +117,7 @@ class se extends k {
|
|
|
117
117
|
const a = e.type === "catalog" ? await this.#$(e) : await this.#C(e);
|
|
118
118
|
return t.aborted || !this.isConnected || this.#t ? (a?.destroy?.(), a) : (t.aborted || this.#s.set(e, a), a);
|
|
119
119
|
}
|
|
120
|
-
async #
|
|
120
|
+
async #w() {
|
|
121
121
|
if (!this.isConnected || this.#t)
|
|
122
122
|
return;
|
|
123
123
|
const { openedLayers: e, openedLayerLists: t } = this;
|
|
@@ -133,7 +133,7 @@ class se extends k {
|
|
|
133
133
|
const i = t.at(-1), l = i && "catalogLayer" in i ? i : void 0;
|
|
134
134
|
this._catalogLayerList !== l && (this._catalogLayerList = l), this.arcgisOpenedLayersChange.emit();
|
|
135
135
|
}
|
|
136
|
-
#
|
|
136
|
+
#I(e) {
|
|
137
137
|
e.open = !1, this._focusRootFlowItem = !0;
|
|
138
138
|
}
|
|
139
139
|
#L(e) {
|
|
@@ -147,7 +147,7 @@ class se extends k {
|
|
|
147
147
|
}
|
|
148
148
|
async #$(e) {
|
|
149
149
|
const { headingLevel: t, catalogOptions: s, view: a, referenceElement: o, filterPlaceholder: i, listItemCreatedFunction: l, minFilterItems: r, selectionMode: c, visibilityAppearance: h } = this;
|
|
150
|
-
return M(n`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? i} .listItemCreatedFunction=${s?.listItemCreatedFunction ?? l} .minFilterItems=${s?.minFilterItems ?? r} .selectionMode=${s?.selectionMode ?? c} .visibilityAppearance=${s?.visibilityAppearance ?? h} .showErrors=${s?.
|
|
150
|
+
return M(n`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder ?? i} .listItemCreatedFunction=${s?.listItemCreatedFunction ?? l} .minFilterItems=${s?.minFilterItems ?? r} .selectionMode=${s?.selectionMode ?? c} .visibilityAppearance=${s?.visibilityAppearance ?? h} .showErrors=${s?.showErrors ?? this.showErrors} .showFilter=${s?.showFilter ?? this.showFilter} .hideStatusIndicators=${s?.hideStatusIndicators ?? this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.showTemporaryLayerIndicators ?? this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${(y) => y.stopPropagation()} .catalogLayer=${e} .view=${a} .referenceElement=${o} @catalogOpen=${this.#p} @tablesOpen=${this.#m}></arcgis-catalog-layer-list-next>`);
|
|
151
151
|
}
|
|
152
152
|
#F(e) {
|
|
153
153
|
switch (e.type) {
|
|
@@ -169,7 +169,7 @@ class se extends k {
|
|
|
169
169
|
}
|
|
170
170
|
async #C(e) {
|
|
171
171
|
const { headingLevel: t, selectionMode: s, referenceElement: a, view: o } = this, i = this.#F(e);
|
|
172
|
-
return M(n`<arcgis-table-list .headingLevel=${i?.headingLevel ?? t} .selectionMode=${i?.selectionMode ?? s} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .label=${i?.label} .tables=${i?.tables} .view=${o} .referenceElement=${a} @arcgisReady=${(l) => l.stopPropagation()}></arcgis-table-list>`);
|
|
172
|
+
return M(n`<arcgis-table-list-next .headingLevel=${i?.headingLevel ?? t} .selectionMode=${i?.selectionMode ?? s} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .label=${i?.label} .tables=${i?.tables} .view=${o} .referenceElement=${a} @arcgisReady=${(l) => l.stopPropagation()}></arcgis-table-list-next>`);
|
|
173
173
|
}
|
|
174
174
|
#m(e) {
|
|
175
175
|
if (this.onTablesOpen) {
|
|
@@ -205,16 +205,16 @@ class se extends k {
|
|
|
205
205
|
[f.hidden]: e === "loading",
|
|
206
206
|
[f.disabled]: e === "disabled"
|
|
207
207
|
};
|
|
208
|
-
return n`<div class=${b(S(f.widget, f.panel, t))}>${this._visibleItems?.length ? this.#
|
|
208
|
+
return n`<div class=${b(S(f.widget, f.panel, t))}>${this._visibleItems?.length ? this.#E() : null}${this.#R()}</div>`;
|
|
209
209
|
}
|
|
210
|
-
#
|
|
210
|
+
#P(e) {
|
|
211
211
|
const t = this.#a, s = this.messages;
|
|
212
212
|
return e?.layer ? n`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer.uid)} .topLayerDisabled=${this.topLayerDisabled}>${s.layerIncompatibleTooltip}</calcite-tooltip>` : null;
|
|
213
213
|
}
|
|
214
214
|
#g(e) {
|
|
215
|
-
return e.incompatible ? this.#
|
|
215
|
+
return e.incompatible ? this.#P(e) : e.children?.filter((t) => !t.hidden).toArray().map((t) => this.#g(t));
|
|
216
216
|
}
|
|
217
|
-
#
|
|
217
|
+
#E() {
|
|
218
218
|
return this._visibleItems?.toArray().map((e) => this.#g(e));
|
|
219
219
|
}
|
|
220
220
|
#f() {
|
|
@@ -226,33 +226,33 @@ class se extends k {
|
|
|
226
226
|
#A() {
|
|
227
227
|
const { _openedPanelItems: e, openedLayers: t } = this;
|
|
228
228
|
return A(e.toArray(), ({ uid: s }) => s, (s, a) => {
|
|
229
|
-
const { uid: o, title: i, panel: l } = s, r = () => this.#
|
|
229
|
+
const { uid: o, title: i, panel: l } = s, r = () => this.#I(l);
|
|
230
230
|
return n`<calcite-flow-item .description=${i} .heading=${l.title} .headingLevel=${this.headingLevel} .selected=${!t.length && a === e.length - 1} @calciteFlowItemBack=${(c) => {
|
|
231
231
|
c.preventDefault(), r();
|
|
232
232
|
}} ${g(this.#c)}><arcgis-layer-list-item-panel .item=${s} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent slot=footer-actions width=full @click=${r}>Back</calcite-button></calcite-flow-item>`;
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
#R() {
|
|
236
|
-
const { collapsed: e, _visibleItems: t, _filterEnabled: s, showCloseButton: a, showCollapseButton: o, showHeading: i, selectionMode: l, filterText: r, filterPlaceholder: c, openedLayers: h, _openedPanelItems: y } = this, $ = this.#l, F = this.label ?? this.messages.componentLabel ?? "",
|
|
237
|
-
n`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${i ? F : void 0} .headingLevel=${this.headingLevel} .selected=${!h.length && !y.length} @calciteFlowItemClose=${() => this.closed = !0} ${g(this.#h)}>${t?.length ? n`<calcite-list data-layer-type=${$ ?? _} .displayMode=${
|
|
238
|
-
this.filterText =
|
|
239
|
-
}} @mouseleave=${this.#r} @mouseover=${this.#n} ${g(this.#o)}>${t.toArray().map((
|
|
236
|
+
const { collapsed: e, _visibleItems: t, _filterEnabled: s, showCloseButton: a, showCollapseButton: o, showHeading: i, selectionMode: l, filterText: r, filterPlaceholder: c, openedLayers: h, _openedPanelItems: y } = this, $ = this.#l, F = this.label ?? this.messages.componentLabel ?? "", E = [
|
|
237
|
+
n`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${i ? F : void 0} .headingLevel=${this.headingLevel} .selected=${!h.length && !y.length} @calciteFlowItemClose=${() => this.closed = !0} ${g(this.#h)}>${t?.length ? n`<calcite-list data-layer-type=${$ ?? _} .displayMode=${P} .filterEnabled=${s} .filterPlaceholder=${c} .filterProps=${J} .filterText=${s ? r : ""} .group=${$} .label=${F} @focusin=${this.#n} @focusout=${this.#r} selection-appearance=border .selectionMode=${l} @calciteListChange=${this.#T} @calciteListFilter=${(w) => {
|
|
238
|
+
this.filterText = w.currentTarget?.filterText ?? "", this.arcgisFilterChange.emit();
|
|
239
|
+
}} @mouseleave=${this.#r} @mouseover=${this.#n} ${g(this.#o)}>${t.toArray().map((w) => this.#x(w))}${s && !this.hideNoFilterResultsNotice ? n`<div class=${b(m.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#f()}</calcite-notice></div>` : null}</calcite-list>` : this.#O()}</calcite-flow-item>`,
|
|
240
240
|
this.#A(),
|
|
241
241
|
this._renderedOpenLayerFlowItems
|
|
242
242
|
];
|
|
243
|
-
return this.closed ? null :
|
|
243
|
+
return this.closed ? null : I("root-flow", n`<calcite-flow>${E}</calcite-flow>`);
|
|
244
244
|
}
|
|
245
245
|
#N(e, t) {
|
|
246
246
|
const { openedLayers: s } = this, a = e.title || this.messages.untitledLayer;
|
|
247
|
-
return
|
|
247
|
+
return I(e.uid, n`<calcite-flow-item data-layer-uid=${e.uid ?? _} .description=${a} .heading=${this.messages[e.type === "catalog" ? "catalogLayers" : "tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${(o) => {
|
|
248
248
|
o.preventDefault(), s.pop();
|
|
249
249
|
const i = s.at(-1);
|
|
250
250
|
i ? this._focusLayerFlowItem = i.uid : this._focusRootFlowItem = !0;
|
|
251
251
|
}} ${g(this.#d)}>${this.#s.get(e)}</calcite-flow-item>`);
|
|
252
252
|
}
|
|
253
|
-
#
|
|
253
|
+
#x(e, t, s) {
|
|
254
254
|
const { hideStatusIndicators: a, showCloseButton: o, showCollapseButton: i, showErrors: l, showFilter: r, showHeading: c, showTemporaryLayerIndicators: h } = this;
|
|
255
|
-
return
|
|
255
|
+
return I(e.uid, K({ activeItem: this._activeItem ?? void 0, css: { ...m, itemCatalogIcon: m.itemActionIcon }, displayMode: P, dragEnabled: !1, item: e, layerTablesEnabled: this.layerTablesEnabled, listModeDisabled: this.viewModel.listModeDisabled, messages: this.messages, parent: t, parentTitles: s, rootGroupUid: this.#l, selectedItems: this.selectedItems, selectionMode: this.selectionMode, visibilityAppearance: this.visibilityAppearance, hideStatusIndicators: a, showCloseButton: o, showCollapseButton: i, showErrors: l, showFilter: r, showHeading: c, showTemporaryLayerIndicators: h, handleAction: this.#_.bind(this), handleCatalogOpen: this.#p.bind(this), handleTablesOpen: this.#m.bind(this), handleTooltipReferenceChange: this.#M.bind(this), view: this.view }));
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
O("arcgis-catalog-layer-list-next", se);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ".//index.js";
|
|
2
|
-
import "../arcgis-table-list/index.js";
|
|
2
|
+
import "../arcgis-table-list-next/index.js";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-tooltip";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-notice";
|
|
5
5
|
import "@esri/calcite-components/components/calcite-flow-item";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as y } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as I, html as a } from "lit";
|
|
4
4
|
import L from "@arcgis/core/rest/query/support/AttachmentInfo.js";
|
|
5
5
|
import z from "@arcgis/core/rest/support/AttachmentQuery.js";
|
|
6
6
|
import S from "@arcgis/core/core/Collection.js";
|
|
7
|
-
import
|
|
8
|
-
import { LitElement as P, nothing as h, safeClassMap as
|
|
9
|
-
import { classes as
|
|
7
|
+
import b from "@arcgis/core/core/Error.js";
|
|
8
|
+
import { LitElement as P, nothing as h, safeClassMap as w, safeStyleMap as v } from "@arcgis/lumina";
|
|
9
|
+
import { classes as $ } from "@arcgis/toolkit/dom";
|
|
10
10
|
import { g as u } from "../../chunks/feature-utils.js";
|
|
11
11
|
import { watch as _ } from "@arcgis/core/core/reactiveUtils.js";
|
|
12
|
-
function
|
|
12
|
+
function A(i) {
|
|
13
13
|
const e = i.toLowerCase();
|
|
14
14
|
return e === "image/bmp" || e === "image/emf" || e === "image/exif" || e === "image/gif" || e === "image/x-icon" || e === "image/jpeg" || e === "image/png" || e === "image/tiff" || e === "image/x-wmf";
|
|
15
15
|
}
|
|
16
16
|
function x(i) {
|
|
17
17
|
return i ? i === "text/plain" ? "file-text" : i === "application/pdf" ? "file-pdf" : i === "text/csv" ? "file-csv" : i === "application/gpx+xml" ? "file-gpx" : i === "application/x-dwf" ? "file-cad" : i === "application/postscript" || i === "application/json" || i === "text/xml" || i === "model/vrml" ? "file-code" : i === "application/x-zip-compressed" || i === "application/x-7z-compressed" || i === "application/x-gzip" || i === "application/x-tar" || i === "application/x-gtar" || i === "application/x-bzip2" || i === "application/gzip" || i === "application/x-compress" || i === "application/x-apple-diskimage" || i === "application/x-rar-compressed" || i === "application/zip" ? "file-zip" : i.includes("image/") ? "file-image" : i.includes("audio/") ? "file-sound" : i.includes("video/") ? "file-video" : i.includes("msexcel") || i.includes("ms-excel") || i.includes("spreadsheetml") ? "file-excel" : i.includes("msword") || i.includes("ms-word") || i.includes("wordprocessingml") ? "file-word" : i.includes("powerpoint") || i.includes("presentationml") ? "file-report" : "file" : "file";
|
|
18
18
|
}
|
|
19
|
-
const C = I`.item-link{display:flex;flex-grow:1}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}`, j = S.ofType(L);
|
|
19
|
+
const C = I`.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}`, j = S.ofType(L);
|
|
20
20
|
class R extends P {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments), this._attachmentInfos = new j(), this._attachmentLayer = null, this._supportsImageOrientation = window?.CSS?.supports("image-orientation", "from-image"), this.getAttachmentsPromise = null, this.hideSection = !1, this.headingLevel = 2, this.hidePreviewImageAttachmentName = !1;
|
|
@@ -53,10 +53,10 @@ class R extends P {
|
|
|
53
53
|
async getAttachments() {
|
|
54
54
|
const { _attachmentLayer: e, _attachmentInfos: t, orderByFields: o, attachmentTypes: m, attachmentKeywords: s, _supportsTypeWildcard: g } = this;
|
|
55
55
|
if (!e || typeof e.queryAttachments != "function")
|
|
56
|
-
throw new
|
|
56
|
+
throw new b("invalid-layer", "getAttachments(): A valid layer is required.");
|
|
57
57
|
const d = this.graphic?.getObjectId();
|
|
58
58
|
if (typeof d != "number")
|
|
59
|
-
throw new
|
|
59
|
+
throw new b("invalid-object-id", "getAttachments(): Numeric object id is required");
|
|
60
60
|
const r = o?.map((n) => `${n.field} ${n.order === "descending" ? "DESC" : "ASC"}`), f = new z({
|
|
61
61
|
objectIds: [d],
|
|
62
62
|
returnMetadata: !0,
|
|
@@ -96,17 +96,17 @@ class R extends P {
|
|
|
96
96
|
return e === "preview" ? this.renderAttachmentsPreview(t) : this.renderAttachmentsList(t);
|
|
97
97
|
}
|
|
98
98
|
renderAttachmentListItem(e) {
|
|
99
|
-
const { supportsResizeAttachments: t } = this, { contentType: o, name: m, url: s, size: g } = e, d = 64, r = m || this.messages?.noTitle, f = x(o), c = this.getCSSTransform(e), p = c ? { transform: c, "image-orientation": "none" } : {}, l = t &&
|
|
99
|
+
const { supportsResizeAttachments: t } = this, { contentType: o, name: m, url: s, size: g } = e, d = 64, r = m || this.messages?.noTitle, f = x(o), c = this.getCSSTransform(e), p = c ? { transform: c, "image-orientation": "none" } : {}, l = t && A(o), n = a`<a class=${w($("item-link", "item-link--list", {
|
|
100
100
|
"item-link--list-icon": !l
|
|
101
|
-
}))} slot=content-start href=${s ?? void 0 ?? h} rel=noreferrer target=_blank>${l ? a`<img alt=${m ?? h} src=${`${s}${s?.includes("?") ? "&" : "?"}w=${d}&s=${g}`} style=${
|
|
102
|
-
return a`<calcite-list-item .label=${r}>${n}${
|
|
101
|
+
}))} slot=content-start href=${s ?? void 0 ?? h} rel=noreferrer target=_blank>${l ? a`<img alt=${m ?? h} src=${`${s}${s?.includes("?") ? "&" : "?"}w=${d}&s=${g}`} style=${v(p)} title=${m ?? h}>` : a`<calcite-icon .icon=${f}></calcite-icon>`}</a>`, k = a`<calcite-link slot=content .href=${s ?? void 0} rel=noreferrer target=_blank>${r}</calcite-link>`;
|
|
102
|
+
return a`<calcite-list-item .label=${r}>${n}${k}</calcite-list-item>`;
|
|
103
103
|
}
|
|
104
104
|
renderAttachmentPreviewItem(e) {
|
|
105
|
-
const { supportsResizeAttachments: t } = this, { contentType: o, name: m, url: s, size: g } = e, d = 225, r = m || this.messages?.noTitle, f = x(o), c = this.getCSSTransform(e), p = c ? { transform: c, "image-orientation": "none" } : {}, l = t &&
|
|
105
|
+
const { supportsResizeAttachments: t } = this, { contentType: o, name: m, url: s, size: g } = e, d = 225, r = m || this.messages?.noTitle, f = x(o), c = this.getCSSTransform(e), p = c ? { transform: c, "image-orientation": "none" } : {}, l = t && A(o), n = a`<a class=${w($("item-link", "item-link--preview"))} slot=thumbnail href=${s ?? void 0 ?? h} rel=noreferrer target=_blank aria-label=${r ?? h} title=${r ?? h}>${l ? a`<img alt=${r ?? h} src=${`${s}${s?.includes("?") ? "&" : "?"}w=${d}&s=${g}`} style=${v(p)}>` : a`<calcite-icon scale=l .icon=${f}></calcite-icon>`}</a>`;
|
|
106
106
|
return a`<calcite-card .label=${r}>${n}${this.hidePreviewImageAttachmentName && l ? null : a`<span class="item-description" slot=description>${r}</span>`}</calcite-card>`;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
y("arcgis-feature-attachments", R);
|
|
110
110
|
export {
|
|
111
111
|
R as ArcgisFeatureAttachments
|
|
112
112
|
};
|
|
@@ -378,6 +378,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
378
378
|
accessor messageOverrides: NonNullable<ArcgisFeatureNext["messageOverrides"]> & {
|
|
379
379
|
componentLabel?: string | undefined;
|
|
380
380
|
zoom?: string | undefined;
|
|
381
|
+
zoomLabel?: string | undefined;
|
|
381
382
|
browseAggregatedFeatures?: string | undefined;
|
|
382
383
|
aggregatedFeatures?: string | undefined;
|
|
383
384
|
aggregatedFeaturesPlaceholder?: string | undefined;
|
|
@@ -388,6 +389,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
388
389
|
total?: string | undefined;
|
|
389
390
|
pageText?: string | undefined;
|
|
390
391
|
selectFeature?: string | undefined;
|
|
392
|
+
showAllFeatures?: string | undefined;
|
|
391
393
|
down?: string | undefined;
|
|
392
394
|
first?: string | undefined;
|
|
393
395
|
last?: string | undefined;
|
|
@@ -398,6 +400,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
398
400
|
untitled?: string | undefined;
|
|
399
401
|
loading?: string | undefined;
|
|
400
402
|
back?: string | undefined;
|
|
403
|
+
backLabel?: string | undefined;
|
|
401
404
|
errorMessage?: string | undefined;
|
|
402
405
|
returnToInitialFeature?: string | undefined;
|
|
403
406
|
maxRecordCountHeading?: string | undefined;
|
|
@@ -409,6 +412,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
409
412
|
protected messages: Partial<{
|
|
410
413
|
componentLabel: string;
|
|
411
414
|
zoom: string;
|
|
415
|
+
zoomLabel: string;
|
|
412
416
|
browseAggregatedFeatures: string;
|
|
413
417
|
aggregatedFeatures: string;
|
|
414
418
|
aggregatedFeaturesPlaceholder: string;
|
|
@@ -419,6 +423,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
419
423
|
total: string;
|
|
420
424
|
pageText: string;
|
|
421
425
|
selectFeature: string;
|
|
426
|
+
showAllFeatures: string;
|
|
422
427
|
down: string;
|
|
423
428
|
first: string;
|
|
424
429
|
last: string;
|
|
@@ -429,6 +434,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
429
434
|
untitled: string;
|
|
430
435
|
loading: string;
|
|
431
436
|
back: string;
|
|
437
|
+
backLabel: string;
|
|
432
438
|
errorMessage: string;
|
|
433
439
|
returnToInitialFeature: string;
|
|
434
440
|
maxRecordCountHeading: string;
|
|
@@ -438,6 +444,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
438
444
|
}> & T9nMeta<{
|
|
439
445
|
componentLabel: string;
|
|
440
446
|
zoom: string;
|
|
447
|
+
zoomLabel: string;
|
|
441
448
|
browseAggregatedFeatures: string;
|
|
442
449
|
aggregatedFeatures: string;
|
|
443
450
|
aggregatedFeaturesPlaceholder: string;
|
|
@@ -448,6 +455,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
448
455
|
total: string;
|
|
449
456
|
pageText: string;
|
|
450
457
|
selectFeature: string;
|
|
458
|
+
showAllFeatures: string;
|
|
451
459
|
down: string;
|
|
452
460
|
first: string;
|
|
453
461
|
last: string;
|
|
@@ -458,6 +466,7 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
458
466
|
untitled: string;
|
|
459
467
|
loading: string;
|
|
460
468
|
back: string;
|
|
469
|
+
backLabel: string;
|
|
461
470
|
errorMessage: string;
|
|
462
471
|
returnToInitialFeature: string;
|
|
463
472
|
maxRecordCountHeading: string;
|