@arcgis/portal-components 6.0.0-next.4 → 6.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/26PILQCA.js +2 -0
- package/dist/cdn/2RDQX6UR.js +2 -0
- package/dist/cdn/MRJO2LXU.js +2 -0
- package/dist/cdn/RDXUP624.js +2 -0
- package/dist/cdn/SVROAT3Z.js +1 -1
- 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-navigation/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/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;
|
|
@@ -8,8 +8,8 @@ import "@esri/calcite-components/components/calcite-list";
|
|
|
8
8
|
import "../arcgis-portal-item-type/index.js";
|
|
9
9
|
import "@esri/calcite-components/components/calcite-loader";
|
|
10
10
|
import "@esri/calcite-components/components/calcite-button";
|
|
11
|
-
import "@esri/calcite-components/components/calcite-input";
|
|
12
11
|
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
12
|
+
import "@esri/calcite-components/components/calcite-input";
|
|
13
13
|
import "@esri/calcite-components/components/calcite-dropdown";
|
|
14
14
|
import "../arcgis-portal-user-avatar/index.js";
|
|
15
15
|
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
@@ -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";
|