@arcgis/portal-components 6.0.0-next.5 → 6.0.0-next.7
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/26PILQCA.js +2 -0
- package/dist/cdn/2RDQX6UR.js +2 -0
- package/dist/cdn/IERTEUOU.js +2 -0
- package/dist/cdn/MRJO2LXU.js +2 -0
- package/dist/cdn/RDXUP624.js +2 -0
- package/dist/cdn/ULFFGJXZ.js +2 -0
- package/dist/cdn/WWEK2CFY.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/portal-related-items-list-item.js +1 -1
- package/dist/components/arcgis-portal-delete-items/customElement.d.ts +7 -3
- package/dist/components/arcgis-portal-delete-items/customElement.js +334 -258
- package/dist/components/arcgis-portal-delete-items/index.js +0 -1
- package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
- package/dist/components/arcgis-portal-field-delete/customElement.js +31 -29
- package/dist/components/arcgis-portal-field-delete/index.js +1 -1
- package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
- package/dist/components/arcgis-portal-review-related-items/customElement.js +21 -18
- package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
- package/dist/components/portal-related-items-list-item/customElement.js +15 -13
- package/dist/components/portal-related-items-list-item/index.js +1 -1
- 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/loader.js +2 -2
- package/dist/types/lumina.d.ts +3 -3
- package/dist/types/preact.d.ts +3 -3
- package/dist/types/react.d.ts +3 -3
- package/dist/types/stencil.d.ts +3 -3
- package/dist/utils/types.d.ts +10 -0
- package/package.json +7 -7
- package/dist/cdn/3CQKCUM5.js +0 -2
- package/dist/cdn/CD5UWSCP.js +0 -2
- package/dist/cdn/DYO5P3F2.js +0 -2
- package/dist/cdn/FIBQAMJ3.js +0 -2
- package/dist/cdn/N5QLV56W.js +0 -2
- package/dist/cdn/TOICLGFK.js +0 -2
- package/dist/cdn/TOTWYGB3.js +0 -2
|
@@ -5,7 +5,6 @@ import "@esri/calcite-components/components/calcite-list-item";
|
|
|
5
5
|
import "../arcgis-portal-item-type/index.js";
|
|
6
6
|
import "@esri/calcite-components/components/calcite-block";
|
|
7
7
|
import "@esri/calcite-components/components/calcite-icon";
|
|
8
|
-
import "@esri/calcite-components/components/calcite-chip";
|
|
9
8
|
import "@esri/calcite-components/components/calcite-notice";
|
|
10
9
|
import "../arcgis-portal-review-related-items/index.js";
|
|
11
10
|
import "@esri/calcite-components/components/calcite-button";
|
|
@@ -8,6 +8,7 @@ export interface RecycleStatus extends DeleteCheckResult {
|
|
|
8
8
|
export interface DeleteCheckResult {
|
|
9
9
|
item: PortalItem;
|
|
10
10
|
usedByItems: PortalItem[];
|
|
11
|
+
usedByItemsCount: number;
|
|
11
12
|
sourceData: PortalItem | null;
|
|
12
13
|
replacementItemFor: PortalItem[] | null;
|
|
13
14
|
resultData: PortalItem[] | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as k } from "../../chunks/runtime.js";
|
|
3
|
-
import { html as
|
|
3
|
+
import { html as c, css as M } from "lit";
|
|
4
4
|
import { LitElement as P, createEvent as T, renderElement as $ } from "@arcgis/lumina";
|
|
5
5
|
import { createRef as N, ref as D } from "lit/directives/ref.js";
|
|
6
6
|
import { Task as O } from "@lit/task";
|
|
@@ -31,7 +31,7 @@ n.set("date-only", "calendar");
|
|
|
31
31
|
n.set("time-only", "clock");
|
|
32
32
|
n.set("timestamp-offset", "time-zone");
|
|
33
33
|
n.set("string", "string");
|
|
34
|
-
const H = ({ fieldType:
|
|
34
|
+
const H = ({ fieldType: w }) => c`<calcite-icon scale=s .icon=${n.get(w)}></calcite-icon>`, K = [
|
|
35
35
|
"esrignss_speed",
|
|
36
36
|
"esrignss_direction",
|
|
37
37
|
"esrisnsr_azimuth",
|
|
@@ -166,7 +166,7 @@ class X extends P {
|
|
|
166
166
|
if (this.options?.ignorePopupTemplate)
|
|
167
167
|
return this.getFieldDisplayNameFromLayerFields(e);
|
|
168
168
|
{
|
|
169
|
-
const o = (s.popupTemplate ?? s.createPopupTemplate())
|
|
169
|
+
const o = (s.popupTemplate ?? s.createPopupTemplate())?.fieldInfos?.find((a) => a.fieldName === e);
|
|
170
170
|
return o ? J(s, o, t) : this.getFieldDisplayNameFromLayerFields(e);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
@@ -196,8 +196,8 @@ class X extends P {
|
|
|
196
196
|
if (h) {
|
|
197
197
|
const i = h.data;
|
|
198
198
|
this.currentLayerInfo = h.data, i && (this.updateTypesAndTemplatesOnLayer(), s.forEach((r) => {
|
|
199
|
-
i.templates?.length ? i.templates.forEach((
|
|
200
|
-
|
|
199
|
+
i.templates?.length ? i.templates.forEach((p) => delete p.prototype.attributes[r]) : i.types?.forEach((p) => {
|
|
200
|
+
p.templates.forEach((u) => delete u.prototype.attributes[r]);
|
|
201
201
|
});
|
|
202
202
|
}), this.updateFeatureService(i));
|
|
203
203
|
} else
|
|
@@ -226,8 +226,8 @@ class X extends P {
|
|
|
226
226
|
const g = {};
|
|
227
227
|
s.fields.forEach((i) => {
|
|
228
228
|
let r = !1;
|
|
229
|
-
for (let
|
|
230
|
-
if (o.prototype.attributes[
|
|
229
|
+
for (let p = 0; p < o.prototype.attributes.length; p++)
|
|
230
|
+
if (o.prototype.attributes[p] === i.name) {
|
|
231
231
|
r = !0, g[i.name] = o.prototype.attributes[i.name];
|
|
232
232
|
break;
|
|
233
233
|
}
|
|
@@ -256,15 +256,15 @@ class X extends P {
|
|
|
256
256
|
if (g.data?.success) {
|
|
257
257
|
const h = `${A(this.portal)}content/items/${this.item.id}/data`;
|
|
258
258
|
if (this.options?.ignorePopupTemplate || t.forEach((i) => {
|
|
259
|
-
s.popupTemplate?.fieldInfos && (s.popupTemplate.fieldInfos = s.popupTemplate.fieldInfos.filter((r) => r.fieldName !== i)), s.popupTemplate?.content?.forEach((r,
|
|
260
|
-
r.type === "fields" && r.fieldInfos && ((s.popupTemplate?.content)[
|
|
259
|
+
s.popupTemplate?.fieldInfos && (s.popupTemplate.fieldInfos = s.popupTemplate.fieldInfos.filter((r) => r.fieldName !== i)), s.popupTemplate?.content?.forEach((r, p) => {
|
|
260
|
+
r.type === "fields" && r.fieldInfos && ((s.popupTemplate?.content)[p].fieldInfos = (s.popupTemplate?.content)[p].fieldInfos?.filter((u) => u.fieldName !== i));
|
|
261
261
|
});
|
|
262
262
|
}), s.attributeTableTemplate) {
|
|
263
263
|
const i = s.attributeTableTemplate.clone();
|
|
264
264
|
i.elements = i.elements.filter((r) => !(r.type === "field" && t.includes(r.fieldName))), i.orderByFields = i.orderByFields.filter((r) => !t.includes(r.field)), s.attributeTableTemplate = i;
|
|
265
265
|
}
|
|
266
266
|
if (s.fieldConfigurations?.length) {
|
|
267
|
-
const r = L.clone(s.fieldConfigurations).filter((
|
|
267
|
+
const r = L.clone(s.fieldConfigurations).filter((p) => !t.includes(p.name));
|
|
268
268
|
s.fieldConfigurations = r;
|
|
269
269
|
}
|
|
270
270
|
await y(h, {
|
|
@@ -273,9 +273,9 @@ class X extends P {
|
|
|
273
273
|
}).then(async (i) => {
|
|
274
274
|
const r = i.data;
|
|
275
275
|
if (r?.layers || r?.tables) {
|
|
276
|
-
const
|
|
276
|
+
const p = s.isTable, u = p ? r.tables : r.layers, f = u?.find((m) => m.id === s.layerId);
|
|
277
277
|
if (t.forEach((m) => {
|
|
278
|
-
|
|
278
|
+
f?.attributeTableInfo?.attributeTableElements && (f.attributeTableInfo.attributeTableElements = f.attributeTableInfo.attributeTableElements.map((d) => {
|
|
279
279
|
if (d.type === "field")
|
|
280
280
|
return d.fieldName === m ? void 0 : d;
|
|
281
281
|
if (d.type === "group" && Array.isArray(d.attributeTableElements)) {
|
|
@@ -286,15 +286,15 @@ class X extends P {
|
|
|
286
286
|
} : void 0;
|
|
287
287
|
}
|
|
288
288
|
return d;
|
|
289
|
-
}).filter(Boolean),
|
|
290
|
-
}),
|
|
289
|
+
}).filter(Boolean), f.attributeTableInfo.orderByFields = f.attributeTableInfo.orderByFields.filter((d) => d.field !== m));
|
|
290
|
+
}), f?.layerDefinition?.fieldConfigurations && (f.layerDefinition.fieldConfigurations = f.layerDefinition.fieldConfigurations.filter((m) => !t.includes(m.name))), f?.popupInfo) {
|
|
291
291
|
t.forEach((_) => {
|
|
292
|
-
|
|
293
|
-
F.type === "fields" && F.fieldInfos && (
|
|
292
|
+
f.popupInfo.fieldInfos = f.popupInfo.fieldInfos.filter((F) => F.fieldName !== _), f.popupInfo.popupElements?.forEach((F, I) => {
|
|
293
|
+
F.type === "fields" && F.fieldInfos && (f.popupInfo.popupElements[I].fieldInfos = f.popupInfo.popupElements[I].fieldInfos.filter((x) => x.fieldName !== _));
|
|
294
294
|
});
|
|
295
295
|
});
|
|
296
296
|
const m = `${A(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`, d = {};
|
|
297
|
-
|
|
297
|
+
p ? (d.tables = u, r.layers && (d.layers = r.layers)) : (d.layers = u, r.tables && (d.tables = r.tables));
|
|
298
298
|
const v = {
|
|
299
299
|
f: "json",
|
|
300
300
|
text: JSON.stringify(d)
|
|
@@ -323,44 +323,46 @@ class X extends P {
|
|
|
323
323
|
}
|
|
324
324
|
displaySuccessAlert() {
|
|
325
325
|
const { messages: e, fieldNames: s } = this;
|
|
326
|
-
this.successAlertNode && (this.successAlertNode.parentElement?.removeChild(this.successAlertNode), this.successAlertNode = void 0), this.successAlertNode = $(
|
|
326
|
+
this.successAlertNode && (this.successAlertNode.parentElement?.removeChild(this.successAlertNode), this.successAlertNode = void 0), this.successAlertNode = $(c`<calcite-alert .label=${s.length === 1 ? e.fieldDeleted : e.fieldsDeleted} kind=success icon=check-circle auto-close open><div slot=message>${s.length === 1 ? e.fieldDeleted : e.fieldsDeleted}</div></calcite-alert>`), document.body.append(this.successAlertNode);
|
|
327
327
|
}
|
|
328
328
|
displayErrorAlert() {
|
|
329
329
|
const { messages: e } = this;
|
|
330
|
-
this.errorAlertNode && (this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode), this.errorAlertNode = void 0), this.errorAlertNode = $(
|
|
330
|
+
this.errorAlertNode && (this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode), this.errorAlertNode = void 0), this.errorAlertNode = $(c`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close open><div slot=message>${e.fieldDeletionUnsuccessful}</div></calcite-alert>`), document.body.append(this.errorAlertNode);
|
|
331
331
|
}
|
|
332
332
|
displayReadOnlyErrorAlert() {
|
|
333
333
|
const { messages: e, portal: s } = this;
|
|
334
|
-
this.errorAlertNode && (this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode), this.errorAlertNode = void 0), this.errorAlertNode = $(
|
|
334
|
+
this.errorAlertNode && (this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode), this.errorAlertNode = void 0), this.errorAlertNode = $(c`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close auto-close-duration=slow open><div slot=title>${e.error}</div><div slot=message>${s.isPortal ? e.readOnlyErrorMessageEnterprise : e.readOnlyErrorMessage}</div>${!s.isPortal && c`<calcite-link slot=link target=_blank href=https://status.arcgis.com>${e.healthDashboard}</calcite-link>` || ""}</calcite-alert>`), document.body.append(this.errorAlertNode);
|
|
335
335
|
}
|
|
336
336
|
render() {
|
|
337
337
|
const { messages: e, fieldsAreDeletable: s, fieldNames: t, deleteInProgress: l } = this;
|
|
338
|
-
return this._propWatcherTask.render({
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
return c`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${() => this.arcgisClose.emit()} .heading=${t?.length === 1 ? e.deleteField : e.deleteFields} ${D(this.dialogNode)}>${this._propWatcherTask.render({
|
|
339
|
+
pending: () => c`<div class="dialog-content-wrapper hide-overflow"><div class="loader-container active"><calcite-loader class="loader" .label=${e.fields}></calcite-loader></div></div>`,
|
|
340
|
+
error: () => c`<div class="dialog-content-wrapper">${this.renderError()}</div>`,
|
|
341
|
+
complete: () => (s || (t?.length ? t?.length === 1 ? b("error", this, "Field cannot be deleted") : b("error", this, "One or more fields cannot be deleted") : b("error", this, G("fieldNames"))), s ? c`<div class=${`dialog-content-wrapper ${l ? "hide-overflow" : ""}`}>${this.renderDeleteLoader()}<calcite-label>${t.length === 1 ? e.deletePrompt : e.deleteMultiplePrompt}</calcite-label>${this.renderFieldsPreview()}</div>${this.renderCancelButton()}${this.renderDeleteButton()}` : c`<div class="dialog-content-wrapper">${this.renderError()}</div>`)
|
|
342
|
+
})}</calcite-dialog>`;
|
|
341
343
|
}
|
|
342
344
|
renderError() {
|
|
343
345
|
const { messages: e } = this;
|
|
344
|
-
return
|
|
346
|
+
return c`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`;
|
|
345
347
|
}
|
|
346
348
|
renderDeleteLoader() {
|
|
347
349
|
const { messages: e, fieldNames: s, deleteInProgress: t } = this;
|
|
348
|
-
return
|
|
350
|
+
return c`<div class=${`loader-container ${t ? "active" : ""}`}><calcite-loader class="loader" .label=${s.length === 1 ? e.deletingField : e.deletingFields} .hidden=${!t}></calcite-loader><div class="loader-text">${s.length === 1 ? e.deletingField : e.deletingFields}</div></div>`;
|
|
349
351
|
}
|
|
350
352
|
renderFieldsPreview() {
|
|
351
353
|
const { fieldNames: e, layerFields: s, layerFieldsMap: t, arcadeExpMap: l, messages: o } = this;
|
|
352
|
-
return
|
|
354
|
+
return c`<calcite-list .label=${o.fields}>${e.map((a) => {
|
|
353
355
|
const g = s.find((h) => h.name === a);
|
|
354
|
-
return
|
|
356
|
+
return c`<calcite-list-item .label=${this.getFieldLabel(a)} .description=${`{${a}}`} .value=${a} .disabled=${!g.editable}><div slot=actions-end class="field-icons">${H({ fieldType: W(a, t, l) })}</div></calcite-list-item>`;
|
|
355
357
|
})}</calcite-list>`;
|
|
356
358
|
}
|
|
357
359
|
renderCancelButton() {
|
|
358
360
|
const { messages: e } = this;
|
|
359
|
-
return
|
|
361
|
+
return c`<calcite-button @click=${() => this.dialogNode.value.open = !1} slot=footer-end appearance=outline ${D(this.cancelNode)}>${e.cancel}</calcite-button>`;
|
|
360
362
|
}
|
|
361
363
|
renderDeleteButton() {
|
|
362
364
|
const { messages: e, fieldNames: s } = this;
|
|
363
|
-
return
|
|
365
|
+
return c`<calcite-button kind=danger slot=footer-end @click=${async (t) => {
|
|
364
366
|
const { portal: l } = this;
|
|
365
367
|
t.currentTarget.disabled = !0, this.cancelNode.value.disabled = !0, this.dialogNode.value.closeDisabled = !0, l.sourceJSON?.isReadOnly ? this.handleError(!0) : (this.deleteInProgress = !0, this.requestUpdate(), this.arcgisBeforeDelete.emit(), await this.deleteFields());
|
|
366
368
|
}}>${s.length === 1 ? e.deleteField : e.deleteFieldsWithNumber.replace("${number}", `${s.length}`)}</calcite-button>`;
|
|
@@ -2,8 +2,8 @@ import "@esri/calcite-components/components/calcite-icon";
|
|
|
2
2
|
import "@esri/calcite-components/components/calcite-alert";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-link";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-dialog";
|
|
5
|
-
import "@esri/calcite-components/components/calcite-label";
|
|
6
5
|
import "@esri/calcite-components/components/calcite-loader";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-label";
|
|
7
7
|
import "@esri/calcite-components/components/calcite-list";
|
|
8
8
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
9
9
|
import "@esri/calcite-components/components/calcite-button";
|
|
@@ -6,6 +6,336 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
6
6
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
7
7
|
|
|
8
8
|
export abstract class ArcgisPortalReviewRelatedItems extends LitElement {
|
|
9
|
+
/** @internal */
|
|
10
|
+
protected browserMessages: {
|
|
11
|
+
browser: {
|
|
12
|
+
refineContent: string;
|
|
13
|
+
filters: string;
|
|
14
|
+
pageRange: string;
|
|
15
|
+
pageRangeAria: string;
|
|
16
|
+
pageRangeWithRecycleBin: string;
|
|
17
|
+
pageRangeAriaWithRecycleBin: string;
|
|
18
|
+
totalSize: string;
|
|
19
|
+
loading: string;
|
|
20
|
+
close: string;
|
|
21
|
+
};
|
|
22
|
+
actions: { more: string; };
|
|
23
|
+
filter: { clear: string; };
|
|
24
|
+
filterDate: {
|
|
25
|
+
today: string;
|
|
26
|
+
yesterday: string;
|
|
27
|
+
last7: string;
|
|
28
|
+
last30: string;
|
|
29
|
+
never: string;
|
|
30
|
+
custom: string;
|
|
31
|
+
title: {
|
|
32
|
+
created: string;
|
|
33
|
+
modified: string;
|
|
34
|
+
joined: string;
|
|
35
|
+
lastLogin: string;
|
|
36
|
+
};
|
|
37
|
+
created: string;
|
|
38
|
+
modified: string;
|
|
39
|
+
joined: string;
|
|
40
|
+
lastLogin: string;
|
|
41
|
+
};
|
|
42
|
+
pagination: {
|
|
43
|
+
next: string;
|
|
44
|
+
prev: string;
|
|
45
|
+
};
|
|
46
|
+
search: {
|
|
47
|
+
label: string;
|
|
48
|
+
search: string;
|
|
49
|
+
clear: string;
|
|
50
|
+
wildcard: string;
|
|
51
|
+
};
|
|
52
|
+
sort: {
|
|
53
|
+
sortDirection: string;
|
|
54
|
+
title: string;
|
|
55
|
+
relevance: string;
|
|
56
|
+
modified: string;
|
|
57
|
+
deleted: string;
|
|
58
|
+
created: string;
|
|
59
|
+
added: string;
|
|
60
|
+
size: string;
|
|
61
|
+
owner: string;
|
|
62
|
+
sizeAsc: string;
|
|
63
|
+
sizeDesc: string;
|
|
64
|
+
numviews: string;
|
|
65
|
+
numAsc: string;
|
|
66
|
+
numDesc: string;
|
|
67
|
+
alphabeticalAsc: string;
|
|
68
|
+
alphabeticalDesc: string;
|
|
69
|
+
recentAsc: string;
|
|
70
|
+
recentDesc: string;
|
|
71
|
+
sort: string;
|
|
72
|
+
sortBy: string;
|
|
73
|
+
sortByColon: string;
|
|
74
|
+
fullname: string;
|
|
75
|
+
username: string;
|
|
76
|
+
name: string;
|
|
77
|
+
membertype: string;
|
|
78
|
+
joined: string;
|
|
79
|
+
lastlogin: string;
|
|
80
|
+
dataset: string;
|
|
81
|
+
mfaenabled: string;
|
|
82
|
+
description: string;
|
|
83
|
+
lastSyncFailureCount: string;
|
|
84
|
+
invitationsPendingCount: string;
|
|
85
|
+
participantGroupLinksCount: string;
|
|
86
|
+
defaultAsc: string;
|
|
87
|
+
defaultDesc: string;
|
|
88
|
+
};
|
|
89
|
+
topBar: { filter: string; };
|
|
90
|
+
filterStatus: {
|
|
91
|
+
clear: string;
|
|
92
|
+
filters: string;
|
|
93
|
+
additional: string;
|
|
94
|
+
clearAllFilters: string;
|
|
95
|
+
};
|
|
96
|
+
} & T9nMeta<{
|
|
97
|
+
browser: {
|
|
98
|
+
refineContent: string;
|
|
99
|
+
filters: string;
|
|
100
|
+
pageRange: string;
|
|
101
|
+
pageRangeAria: string;
|
|
102
|
+
pageRangeWithRecycleBin: string;
|
|
103
|
+
pageRangeAriaWithRecycleBin: string;
|
|
104
|
+
totalSize: string;
|
|
105
|
+
loading: string;
|
|
106
|
+
close: string;
|
|
107
|
+
};
|
|
108
|
+
actions: { more: string; };
|
|
109
|
+
filter: { clear: string; };
|
|
110
|
+
filterDate: {
|
|
111
|
+
today: string;
|
|
112
|
+
yesterday: string;
|
|
113
|
+
last7: string;
|
|
114
|
+
last30: string;
|
|
115
|
+
never: string;
|
|
116
|
+
custom: string;
|
|
117
|
+
title: {
|
|
118
|
+
created: string;
|
|
119
|
+
modified: string;
|
|
120
|
+
joined: string;
|
|
121
|
+
lastLogin: string;
|
|
122
|
+
};
|
|
123
|
+
created: string;
|
|
124
|
+
modified: string;
|
|
125
|
+
joined: string;
|
|
126
|
+
lastLogin: string;
|
|
127
|
+
};
|
|
128
|
+
pagination: {
|
|
129
|
+
next: string;
|
|
130
|
+
prev: string;
|
|
131
|
+
};
|
|
132
|
+
search: {
|
|
133
|
+
label: string;
|
|
134
|
+
search: string;
|
|
135
|
+
clear: string;
|
|
136
|
+
wildcard: string;
|
|
137
|
+
};
|
|
138
|
+
sort: {
|
|
139
|
+
sortDirection: string;
|
|
140
|
+
title: string;
|
|
141
|
+
relevance: string;
|
|
142
|
+
modified: string;
|
|
143
|
+
deleted: string;
|
|
144
|
+
created: string;
|
|
145
|
+
added: string;
|
|
146
|
+
size: string;
|
|
147
|
+
owner: string;
|
|
148
|
+
sizeAsc: string;
|
|
149
|
+
sizeDesc: string;
|
|
150
|
+
numviews: string;
|
|
151
|
+
numAsc: string;
|
|
152
|
+
numDesc: string;
|
|
153
|
+
alphabeticalAsc: string;
|
|
154
|
+
alphabeticalDesc: string;
|
|
155
|
+
recentAsc: string;
|
|
156
|
+
recentDesc: string;
|
|
157
|
+
sort: string;
|
|
158
|
+
sortBy: string;
|
|
159
|
+
sortByColon: string;
|
|
160
|
+
fullname: string;
|
|
161
|
+
username: string;
|
|
162
|
+
name: string;
|
|
163
|
+
membertype: string;
|
|
164
|
+
joined: string;
|
|
165
|
+
lastlogin: string;
|
|
166
|
+
dataset: string;
|
|
167
|
+
mfaenabled: string;
|
|
168
|
+
description: string;
|
|
169
|
+
lastSyncFailureCount: string;
|
|
170
|
+
invitationsPendingCount: string;
|
|
171
|
+
participantGroupLinksCount: string;
|
|
172
|
+
defaultAsc: string;
|
|
173
|
+
defaultDesc: string;
|
|
174
|
+
};
|
|
175
|
+
topBar: { filter: string; };
|
|
176
|
+
filterStatus: {
|
|
177
|
+
clear: string;
|
|
178
|
+
filters: string;
|
|
179
|
+
additional: string;
|
|
180
|
+
clearAllFilters: string;
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
/** @internal */
|
|
184
|
+
protected deleteMessages: {
|
|
185
|
+
deleteItem: string;
|
|
186
|
+
deleteItems: string;
|
|
187
|
+
selectedItems: string;
|
|
188
|
+
reviewItemsCount: string;
|
|
189
|
+
reviewItemsDescription: string;
|
|
190
|
+
delete: string;
|
|
191
|
+
permanentlyDelete: string;
|
|
192
|
+
permanentlyDeleteInstead: string;
|
|
193
|
+
deprecate: string;
|
|
194
|
+
confirm: string;
|
|
195
|
+
cancel: string;
|
|
196
|
+
moreInfo: string;
|
|
197
|
+
bucketItems: string;
|
|
198
|
+
directlyUsedBy: string;
|
|
199
|
+
usedByOtherItems: {
|
|
200
|
+
single: string;
|
|
201
|
+
multiple: string;
|
|
202
|
+
unknown: string;
|
|
203
|
+
};
|
|
204
|
+
usedByPopover: string;
|
|
205
|
+
deleteDiscouraged: string;
|
|
206
|
+
learnMoreAboutDeletingSourceItems: string;
|
|
207
|
+
reviewRelatedItems: { multiple: string; };
|
|
208
|
+
reviewItems: string;
|
|
209
|
+
reviewItemsList: string;
|
|
210
|
+
exclude: string;
|
|
211
|
+
deprecateInstead: string;
|
|
212
|
+
proceedToDelete: string;
|
|
213
|
+
proceedWithDeletion: string;
|
|
214
|
+
relatedItemsReviewed: string;
|
|
215
|
+
reviewImpactedItems: string;
|
|
216
|
+
summary: {
|
|
217
|
+
willBeRecycled: string;
|
|
218
|
+
deprecate: {
|
|
219
|
+
label: string;
|
|
220
|
+
message: string;
|
|
221
|
+
};
|
|
222
|
+
exclude: {
|
|
223
|
+
label: string;
|
|
224
|
+
message: string;
|
|
225
|
+
};
|
|
226
|
+
cannotDelete: string;
|
|
227
|
+
permanentlyDelete: string;
|
|
228
|
+
canBeRecovered: { single: string; };
|
|
229
|
+
permanentDelete: {
|
|
230
|
+
delete: string;
|
|
231
|
+
notSupported: { single: string; };
|
|
232
|
+
default: { single: string; };
|
|
233
|
+
};
|
|
234
|
+
protectedGroup: {
|
|
235
|
+
deleteProtectedDescription: string;
|
|
236
|
+
hasDependentItemsDescription: {
|
|
237
|
+
singleOneDependentItem: string;
|
|
238
|
+
singleMultipleDependentItems: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
areYouSure: { multiple: string; };
|
|
243
|
+
deletingWillImpactOtherItems: string;
|
|
244
|
+
itemsDependingOnThisItem: string;
|
|
245
|
+
dependentItems: string;
|
|
246
|
+
dependentItemsWillBeDeletedTogether: string;
|
|
247
|
+
impactedItems: {
|
|
248
|
+
title: string;
|
|
249
|
+
itemsYouHaveAccessTo: string;
|
|
250
|
+
"View usage": string;
|
|
251
|
+
"View full list": string;
|
|
252
|
+
};
|
|
253
|
+
replacementItem: {
|
|
254
|
+
isReplacementFor: {
|
|
255
|
+
single: string;
|
|
256
|
+
multiple: string;
|
|
257
|
+
unknown: string;
|
|
258
|
+
};
|
|
259
|
+
itemIsReplacedBySelectedItem: string;
|
|
260
|
+
};
|
|
261
|
+
} & T9nMeta<{
|
|
262
|
+
deleteItem: string;
|
|
263
|
+
deleteItems: string;
|
|
264
|
+
selectedItems: string;
|
|
265
|
+
reviewItemsCount: string;
|
|
266
|
+
reviewItemsDescription: string;
|
|
267
|
+
delete: string;
|
|
268
|
+
permanentlyDelete: string;
|
|
269
|
+
permanentlyDeleteInstead: string;
|
|
270
|
+
deprecate: string;
|
|
271
|
+
confirm: string;
|
|
272
|
+
cancel: string;
|
|
273
|
+
moreInfo: string;
|
|
274
|
+
bucketItems: string;
|
|
275
|
+
directlyUsedBy: string;
|
|
276
|
+
usedByOtherItems: {
|
|
277
|
+
single: string;
|
|
278
|
+
multiple: string;
|
|
279
|
+
unknown: string;
|
|
280
|
+
};
|
|
281
|
+
usedByPopover: string;
|
|
282
|
+
deleteDiscouraged: string;
|
|
283
|
+
learnMoreAboutDeletingSourceItems: string;
|
|
284
|
+
reviewRelatedItems: { multiple: string; };
|
|
285
|
+
reviewItems: string;
|
|
286
|
+
reviewItemsList: string;
|
|
287
|
+
exclude: string;
|
|
288
|
+
deprecateInstead: string;
|
|
289
|
+
proceedToDelete: string;
|
|
290
|
+
proceedWithDeletion: string;
|
|
291
|
+
relatedItemsReviewed: string;
|
|
292
|
+
reviewImpactedItems: string;
|
|
293
|
+
summary: {
|
|
294
|
+
willBeRecycled: string;
|
|
295
|
+
deprecate: {
|
|
296
|
+
label: string;
|
|
297
|
+
message: string;
|
|
298
|
+
};
|
|
299
|
+
exclude: {
|
|
300
|
+
label: string;
|
|
301
|
+
message: string;
|
|
302
|
+
};
|
|
303
|
+
cannotDelete: string;
|
|
304
|
+
permanentlyDelete: string;
|
|
305
|
+
canBeRecovered: { single: string; };
|
|
306
|
+
permanentDelete: {
|
|
307
|
+
delete: string;
|
|
308
|
+
notSupported: { single: string; };
|
|
309
|
+
default: { single: string; };
|
|
310
|
+
};
|
|
311
|
+
protectedGroup: {
|
|
312
|
+
deleteProtectedDescription: string;
|
|
313
|
+
hasDependentItemsDescription: {
|
|
314
|
+
singleOneDependentItem: string;
|
|
315
|
+
singleMultipleDependentItems: string;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
areYouSure: { multiple: string; };
|
|
320
|
+
deletingWillImpactOtherItems: string;
|
|
321
|
+
itemsDependingOnThisItem: string;
|
|
322
|
+
dependentItems: string;
|
|
323
|
+
dependentItemsWillBeDeletedTogether: string;
|
|
324
|
+
impactedItems: {
|
|
325
|
+
title: string;
|
|
326
|
+
itemsYouHaveAccessTo: string;
|
|
327
|
+
"View usage": string;
|
|
328
|
+
"View full list": string;
|
|
329
|
+
};
|
|
330
|
+
replacementItem: {
|
|
331
|
+
isReplacementFor: {
|
|
332
|
+
single: string;
|
|
333
|
+
multiple: string;
|
|
334
|
+
unknown: string;
|
|
335
|
+
};
|
|
336
|
+
itemIsReplacedBySelectedItem: string;
|
|
337
|
+
};
|
|
338
|
+
}>;
|
|
9
339
|
/** @internal */
|
|
10
340
|
protected messages: {
|
|
11
341
|
itemsDirectlyUsing: string;
|
|
@@ -22,6 +352,9 @@ export abstract class ArcgisPortalReviewRelatedItems extends LitElement {
|
|
|
22
352
|
}>;
|
|
23
353
|
accessor portal: Portal | undefined;
|
|
24
354
|
accessor relatedItems: PortalItem[];
|
|
355
|
+
accessor relatedItemsCount: number | undefined;
|
|
356
|
+
/** @default false */
|
|
357
|
+
accessor showDependentItems: boolean;
|
|
25
358
|
accessor sourceItem: PortalItem | null;
|
|
26
359
|
accessor user: PortalUser | null | undefined;
|
|
27
360
|
}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
class
|
|
2
|
+
import { c as n } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as m, html as o } from "lit";
|
|
4
|
+
import { LitElement as d } from "@arcgis/lumina";
|
|
5
|
+
import { s as p } from "../../chunks/portal-related-items-list-item.js";
|
|
6
|
+
import { u as t } from "../../chunks/useT9n.js";
|
|
7
|
+
import { RelatedItemsListItem as h } from "../portal-related-items-list-item/customElement.js";
|
|
8
|
+
import { b as u } from "../../chunks/url.js";
|
|
9
|
+
const g = m`:host{display:block}.items-directly-using{display:flex;justify-content:space-between;align-items:center;padding-block-end:.75rem}.impacted-items-labels{display:flex;flex-direction:column}.impacted-items-title{font-weight:500}.impacted-items-access-count{font-size:var(--calcite-font-size--2)}calcite-block{--calcite-block-icon-start-color: var(--calcite-color-status-warning)}calcite-list{max-block-size:250px;overflow-y:auto}`;
|
|
10
|
+
class b extends d {
|
|
11
11
|
constructor() {
|
|
12
|
-
super(...arguments), this.messages =
|
|
12
|
+
super(...arguments), this.messages = t({ blocking: !0 }), this.browserMessages = t({ name: "portal-browser", blocking: !0 }), this.deleteMessages = t({ name: "portal-delete-items", blocking: !0 }), this.sourceItem = null, this.relatedItems = [], this.showDependentItems = !1;
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
|
-
this.properties = { sourceItem: 0, relatedItems: 0, portal: 0, user: 0 };
|
|
15
|
+
this.properties = { sourceItem: 0, relatedItems: 0, relatedItemsCount: 9, showDependentItems: 5, portal: 0, user: 0 };
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
|
-
this.styles = [
|
|
18
|
+
this.styles = [g, p];
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const s = this.relatedItemsCount ?? this.relatedItems.length;
|
|
22
|
+
if (!s)
|
|
23
|
+
return null;
|
|
24
|
+
const i = new Intl.NumberFormat(this.deleteMessages._t9nLocale), a = i.format(s), e = this.showDependentItems ? this.deleteMessages.dependentItems : this.deleteMessages.impactedItems.title, c = this.showDependentItems ? this.deleteMessages.itemsDependingOnThisItem : this.deleteMessages.deletingWillImpactOtherItems, l = this.portal && this.sourceItem ? `${u({ portal: this.portal })}/item.html?id=${this.sourceItem.id}#usage` : void 0;
|
|
25
|
+
return o`<calcite-block .heading=${c.replace("{count}", a)} collapsible .label=${e} icon-start=exclamation-mark-triangle><div class="items-directly-using"><div class="impacted-items-labels"><span class="impacted-items-title">${e}</span>${!this.showDependentItems && o`<span class="impacted-items-access-count">${this.deleteMessages.impactedItems.itemsYouHaveAccessTo.replace("{accessCount}", i.format(this.relatedItems.length)).replace("{totalCount}", a)}</span>` || ""}</div><calcite-button appearance=transparent icon-end=launch @click=${() => {
|
|
26
|
+
l && window.open(l, "_blank");
|
|
27
|
+
}}>${this.deleteMessages.impactedItems["View usage"]}</calcite-button></div><calcite-list .label=${e}>${this.relatedItems.map((r) => h({ item: r, portal: this.portal, user: this.user, lang: this.messages._lang, modifiedLabel: this.browserMessages.filterDate.modified }))}</calcite-list></calcite-block>`;
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
|
-
|
|
30
|
+
n("arcgis-portal-review-related-items", b);
|
|
28
31
|
export {
|
|
29
|
-
|
|
32
|
+
b as ArcgisPortalReviewRelatedItems
|
|
30
33
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { html as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { html as i } from "lit";
|
|
3
|
+
import { formatDate as v } from "@arcgis/core/intl.js";
|
|
4
|
+
import { nothing as h } from "@arcgis/lumina";
|
|
5
|
+
import { g as y } from "../../chunks/user2.js";
|
|
6
|
+
import { b as u } from "../../chunks/url.js";
|
|
7
|
+
function B({ item: e, portal: t, user: c, lang: p, modifiedLabel: n, showAccessInfo: m = !0, relatedItemsCount: d = 0, relatedItemsCountTitle: s, onRelatedItemsClick: $ }) {
|
|
8
|
+
const a = "inRecycleBin" in e && e.inRecycleBin === !0, o = t && !a ? `${u({ portal: t })}/item.html?id=${e.id}` : void 0, l = e.title ?? "", r = v(e.modified ?? void 0, { dateStyle: "medium" }), _ = n ? n.replace("${date}", r ?? "") : r ?? "", f = {
|
|
7
9
|
public: "globe",
|
|
8
|
-
private: "
|
|
10
|
+
private: "user",
|
|
9
11
|
org: "organization",
|
|
10
12
|
shared: "group"
|
|
11
|
-
}[
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}}><span slot=content-start><arcgis-portal-item-type .item=${
|
|
15
|
-
|
|
16
|
-
}}>${
|
|
13
|
+
}[e.access];
|
|
14
|
+
return i`<calcite-list-item .label=${l} @calciteListItemSelect=${() => {
|
|
15
|
+
o && window.open(o, "_blank", "noopener,noreferrer");
|
|
16
|
+
}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${t} .user=${c} hide-text></arcgis-portal-item-type></span><div slot=content class="item"><div class="item__content"><span class="item__title">${l}</span><div class="item__details"><span class="item__type"><arcgis-portal-item-type .item=${e} .user=${c} .portal=${t} scale=s hide-icon></arcgis-portal-item-type></span>|<span class="item__details-owner">${y(c, p) ?? e.owner}</span>|<span class="item__details-modified">${_}</span></div></div></div><div slot=content-end class="item__content-end">${a && i`<calcite-icon class="item__status-icon" icon=recycle-bin scale=s></calcite-icon>` || ""}${d > 0 && i`<calcite-chip .label=${s} title=${s ?? h} icon=launch @click=${(g) => {
|
|
17
|
+
g.stopPropagation(), $?.();
|
|
18
|
+
}}>${s}</calcite-chip>` || ""}${m && !a && i`<span class="item__access"><calcite-icon .icon=${f} scale=s class="item__access-icon"></calcite-icon></span>` || ""}</div></calcite-list-item>`;
|
|
17
19
|
}
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
B as RelatedItemsListItem
|
|
20
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
2
2
|
import "../arcgis-portal-item-type/index.js";
|
|
3
|
-
import "@esri/calcite-components/components/calcite-chip";
|
|
4
3
|
import "@esri/calcite-components/components/calcite-icon";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-chip";
|
|
5
5
|
export * from "./customElement.js";
|