@arcgis/portal-components 5.2.0-next.4 → 5.2.0-next.40
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/2C475EKD.js +2 -0
- package/dist/cdn/3J46PXFF.js +3 -0
- package/dist/cdn/3MBOA5WF.js +2 -0
- package/dist/cdn/{GQFWFZXP.js → 3OBIA66A.js} +1 -1
- package/dist/cdn/3Z3ZPFGJ.js +2 -0
- package/dist/cdn/5NMFQE4U.js +2 -0
- package/dist/cdn/5VPTTFBP.js +451 -0
- package/dist/cdn/{7WZHZP6U.js → 63THOLAY.js} +9 -3
- package/dist/cdn/6AGZRMJC.js +2 -0
- package/dist/cdn/6DYBW2C6.js +2 -0
- package/dist/cdn/6RK4FBHZ.js +2 -0
- package/dist/cdn/6W2IHKCA.js +2 -0
- package/dist/cdn/7E5GJIZV.js +2 -0
- package/dist/cdn/A4CT6D4Y.js +2 -0
- package/dist/cdn/AL57LV4E.js +2 -0
- package/dist/cdn/{LQ3DMZ3K.js → AXM6XCZD.js} +1 -1
- package/dist/cdn/AYR65LXN.js +65 -0
- package/dist/cdn/BUJPYZSX.js +2 -0
- package/dist/cdn/{DKBTJJMW.js → C7ZFXRPS.js} +1 -1
- package/dist/cdn/D76KMXZD.js +2 -0
- package/dist/cdn/DFTUMKSN.js +3 -0
- package/dist/cdn/EI6BAXCQ.js +2 -0
- package/dist/cdn/FXIP4QXJ.js +2 -0
- package/dist/cdn/GE75KDIM.js +2 -0
- package/dist/cdn/GJTJLK6T.js +2 -0
- package/dist/cdn/GKOXTQHB.js +2 -0
- package/dist/cdn/GQMPPCEL.js +2 -0
- package/dist/cdn/GXJU3U7U.js +2 -0
- package/dist/cdn/HMBSJR37.js +2 -0
- package/dist/cdn/HZ5W3DBR.js +2 -0
- package/dist/cdn/{V2EOXGK2.js → I234NUZ5.js} +1 -1
- package/dist/cdn/I5HSJRM3.js +2 -0
- package/dist/cdn/IBP5XPD5.js +2 -0
- package/dist/cdn/IC65R4QE.js +2 -0
- package/dist/cdn/IHSJ4MKS.js +2 -0
- package/dist/cdn/IJ3CLFAU.js +22 -0
- package/dist/cdn/IWUJRI4G.js +2 -0
- package/dist/cdn/{ZTHTFEYA.js → IXVR3KMC.js} +1 -1
- package/dist/cdn/{QNUYUNEY.js → JS45DWQ3.js} +1 -1
- package/dist/cdn/{DHHSKOUY.js → JV23HJTE.js} +1 -1
- package/dist/cdn/{LAFNDBTQ.js → JYIPREIH.js} +1 -1
- package/dist/cdn/JZKBUYPV.js +2 -0
- package/dist/cdn/KM5XGRXL.js +2 -0
- package/dist/cdn/{3PAHY5KA.js → KNRJ3WXR.js} +1 -1
- package/dist/cdn/L4DRNGOL.js +2 -0
- package/dist/cdn/{F6V7MLPY.js → L6KBBJEC.js} +1 -1
- package/dist/cdn/NJ2WDAJM.js +2 -0
- package/dist/cdn/NWIIOJEG.js +2 -0
- package/dist/cdn/{53MSUMA3.js → OT4PZJNB.js} +17 -1
- package/dist/cdn/QE4CNVDQ.js +34 -0
- package/dist/cdn/{AQWTJKUH.js → QKCV7CY2.js} +10 -8
- package/dist/cdn/RKNDXSVK.js +2 -0
- package/dist/cdn/SLTFLCVR.js +99 -0
- package/dist/cdn/SUPKZF5M.js +2 -0
- package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
- package/dist/cdn/TJAX7J4T.js +2 -0
- package/dist/cdn/{DXCPWJU4.js → TKCE4WYE.js} +1 -1
- package/dist/cdn/TMRF4W62.js +637 -0
- package/dist/cdn/U3FVMN32.js +2 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/{RR4BIAPA.js → V4EYW3O6.js} +1 -1
- package/dist/cdn/{74XFARCV.js → VW7DSKPH.js} +1 -1
- package/dist/cdn/W2SYL7IJ.js +71 -0
- package/dist/cdn/{W6PSG4GX.js → W4FGRGLV.js} +10 -5
- package/dist/cdn/{SYJSVUUR.js → W4SAWMXS.js} +1 -1
- package/dist/cdn/WBZLQZYR.js +134 -0
- package/dist/cdn/WGZZB2DJ.js +2 -0
- package/dist/cdn/WO23VQK3.js +2 -0
- package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
- package/dist/cdn/WSWHK6LB.js +2 -0
- package/dist/cdn/{WOZDQW3S.js → WX65MRDH.js} +1 -1
- package/dist/cdn/XEK22IDA.js +2 -0
- package/dist/cdn/ZPIXIG3Z.js +2 -0
- package/dist/cdn/ZVFNCDG5.js +2 -0
- package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-user-popup/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/dom.js +36 -0
- package/dist/chunks/functionalities.js +5 -4
- package/dist/chunks/groups.js +7 -83
- package/dist/chunks/item2.js +86 -0
- package/dist/chunks/portal.js +48 -8
- package/dist/chunks/store.js +18 -0
- package/dist/chunks/ui.js +10 -0
- package/dist/chunks/user2.js +26 -25
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +797 -488
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
- package/dist/components/arcgis-portal-browser/customElement.d.ts +235 -0
- package/dist/components/arcgis-portal-browser/customElement.js +201 -0
- package/dist/components/arcgis-portal-browser/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser/index.js +6 -0
- package/dist/components/arcgis-portal-browser/utils/store.d.ts +31 -0
- package/dist/components/arcgis-portal-browser/utils/types.d.ts +18 -0
- package/dist/components/arcgis-portal-browser-actions/customElement.d.ts +187 -0
- package/dist/components/arcgis-portal-browser-actions/customElement.js +70 -0
- package/dist/components/arcgis-portal-browser-actions/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-actions/index.js +6 -0
- package/dist/components/arcgis-portal-browser-actions/types.d.ts +9 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +226 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.js +32 -0
- package/dist/components/arcgis-portal-browser-filter/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter/index.js +4 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +233 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +117 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +193 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.js +56 -0
- package/dist/components/arcgis-portal-browser-filter-status/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-status/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +7 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.js +29 -0
- package/dist/components/arcgis-portal-browser-filters/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filters/index.js +2 -0
- package/dist/components/arcgis-portal-browser-pagination/customElement.d.ts +194 -0
- package/dist/components/arcgis-portal-browser-pagination/customElement.js +51 -0
- package/dist/components/arcgis-portal-browser-pagination/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-pagination/index.js +2 -0
- package/dist/components/arcgis-portal-browser-search/customElement.d.ts +195 -0
- package/dist/components/arcgis-portal-browser-search/customElement.js +65 -0
- package/dist/components/arcgis-portal-browser-search/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-search/index.js +3 -0
- package/dist/components/arcgis-portal-browser-sort/customElement.d.ts +196 -0
- package/dist/components/arcgis-portal-browser-sort/customElement.js +93 -0
- package/dist/components/arcgis-portal-browser-sort/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-sort/index.js +9 -0
- package/dist/components/arcgis-portal-browser-sort/utils.d.ts +3 -0
- package/dist/components/arcgis-portal-browser-top-bar/customElement.d.ts +184 -0
- package/dist/components/arcgis-portal-browser-top-bar/customElement.js +51 -0
- package/dist/components/arcgis-portal-browser-top-bar/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-top-bar/index.js +3 -0
- package/dist/components/arcgis-portal-browser-view/customElement.d.ts +21 -0
- package/dist/components/arcgis-portal-browser-view/customElement.js +30 -0
- package/dist/components/arcgis-portal-browser-view/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-view/index.js +5 -0
- package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
- package/dist/components/arcgis-portal-group-badges/customElement.js +50 -0
- package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-badges/index.js +3 -0
- package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
- package/dist/components/arcgis-portal-group-card/customElement.d.ts +167 -0
- package/dist/components/arcgis-portal-group-card/customElement.js +183 -0
- package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-card/index.js +8 -0
- package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
- package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
- package/dist/components/arcgis-portal-item-type/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-item-type/customElement.js +45 -37
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -42
- package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
- package/dist/components/arcgis-portal-user-popup/customElement.js +224 -0
- package/dist/components/arcgis-portal-user-popup/index.d.ts +1 -0
- package/dist/components/arcgis-portal-user-popup/index.js +5 -0
- package/dist/components/arcgis-portal-voice-input/customElement.d.ts +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/index.d.ts +122 -2
- package/dist/loader.js +19 -4
- package/dist/types/group.d.ts +13 -13
- package/dist/types/item.d.ts +77 -2
- package/dist/types/lumina.d.ts +93 -1
- package/dist/types/preact.d.ts +108 -1
- package/dist/types/react.d.ts +123 -1
- package/dist/types/search.d.ts +27 -0
- package/dist/types/stencil.d.ts +93 -1
- package/dist/types/tracking.d.ts +10 -0
- package/dist/types/user.d.ts +2 -2
- package/package.json +11 -11
- package/dist/cdn/5DPWJ7DI.js +0 -2
- package/dist/cdn/5VSDGPHH.js +0 -2
- package/dist/cdn/72N3KAXN.js +0 -2
- package/dist/cdn/ANPXRYLV.js +0 -5
- package/dist/cdn/B7633S2A.js +0 -422
- package/dist/cdn/BEHLBKKM.js +0 -2
- package/dist/cdn/CI5ENGVT.js +0 -2
- package/dist/cdn/EVDOPN3G.js +0 -54
- package/dist/cdn/G47ZZQYL.js +0 -2
- package/dist/cdn/GAHILDQF.js +0 -45
- package/dist/cdn/GHQ3ZW4U.js +0 -2
- package/dist/cdn/GNOZCQ34.js +0 -2
- package/dist/cdn/JNRN6DTV.js +0 -2
- package/dist/cdn/K3HS2LQ7.js +0 -2
- package/dist/cdn/KEKBRUUC.js +0 -2
- package/dist/cdn/N6G6Z7BF.js +0 -516
- package/dist/cdn/OQDPULPD.js +0 -2
- package/dist/cdn/RNLVNDGG.js +0 -2
- package/dist/cdn/SM4GWLRA.js +0 -66
- package/dist/cdn/TMYTUOSS.js +0 -2
- package/dist/cdn/YG5YYL6X.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
- package/dist/cdn/YL7PGYWC.js +0 -5
- package/dist/cdn/YMPTDKT6.js +0 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c
|
|
3
|
-
import { css as o, html as
|
|
4
|
-
import { LitElement as u, createEvent as
|
|
2
|
+
import { c } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as o, html as a } from "lit";
|
|
4
|
+
import { LitElement as u, createEvent as n } from "@arcgis/lumina";
|
|
5
5
|
import m from "@esri/arcgis-html-sanitizer";
|
|
6
6
|
import { unsafeHTML as p } from "lit/directives/unsafe-html.js";
|
|
7
7
|
import { marked as r } from "marked";
|
|
8
8
|
import { u as g } from "../../chunks/useT9n.js";
|
|
9
9
|
import { a as d } from "../../chunks/functionalities.js";
|
|
10
|
-
const h = o`.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}
|
|
10
|
+
const h = o`.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}.interrupt-message :where(p){margin:0}.interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}`;
|
|
11
11
|
r.use({ gfm: !0, breaks: !0, async: !1 });
|
|
12
12
|
const f = new m();
|
|
13
13
|
class b extends u {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.#t = [], this._messages = g({ blocking: !0 }), this.arcgisCancel =
|
|
15
|
+
super(...arguments), this.#t = [], this._messages = g({ blocking: !0 }), this.arcgisCancel = n(), this.arcgisSubmit = n();
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.properties = { type: 1, message: 1, options: 0 };
|
|
@@ -29,11 +29,11 @@ class b extends u {
|
|
|
29
29
|
const { _messages: t, type: i, options: s } = this;
|
|
30
30
|
switch (i) {
|
|
31
31
|
case "single-select":
|
|
32
|
-
return
|
|
32
|
+
return a`<calcite-list class="interrupt-list" .label=${t.singleSelectLabel} selection-mode=single-persist @calciteListChange=${(e) => this.#t = e.target.selectedItems[0]?.value}>${s?.map((e) => a`<calcite-list-item .label=${e} .value=${e}></calcite-list-item>`)}</calcite-list>`;
|
|
33
33
|
case "multi-select":
|
|
34
|
-
return
|
|
34
|
+
return a`<calcite-list class="interrupt-list" .label=${t.multiSelectLabel} selection-mode=multiple @calciteListChange=${(e) => this.#t = e.target.selectedItems.map((l) => l.value)}>${s?.map((e) => a`<calcite-list-item .label=${e} .value=${e}></calcite-list-item>`)}</calcite-list>`;
|
|
35
35
|
case "text-input":
|
|
36
|
-
return
|
|
36
|
+
return a`<calcite-input class="interrupt-input" .label=${t.textInputLabel} @calciteInputInput=${(e) => this.#t = e.target.value}></calcite-input>`;
|
|
37
37
|
case "boolean-choice":
|
|
38
38
|
return null;
|
|
39
39
|
default:
|
|
@@ -42,10 +42,10 @@ class b extends u {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
const { _messages: t, type: i } = this, s = i === "boolean-choice";
|
|
45
|
-
return
|
|
45
|
+
return a`<div class="interrupt-container"><calcite-notice open kind=neutral width=full><div slot=title>${s ? t.titleConfirm : t.titleInput}</div><div slot=message class="interrupt-message">${p(this._renderMessageContent())}</div></calcite-notice>${this._renderInterruptInput()}<div class="interrupt-actions"><calcite-button appearance=outline @click=${() => this.arcgisCancel.emit()}>${s ? t.cancelButton : t.skipButton}</calcite-button><calcite-button appearance=solid @click=${() => this.arcgisSubmit.emit(i === "boolean-choice" ? !0 : this.#t)}>${s ? t.confirmButton : t.submitButton}</calcite-button></div></div>`;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
c("arcgis-portal-ai-assistant-interrupt", b);
|
|
49
49
|
export {
|
|
50
50
|
b as ArcgisPortalAiAssistantInterrupt
|
|
51
51
|
};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { SearchResultGroup } from "../../types/group.js";
|
|
4
|
+
import type { SearchResultItem } from "../../types/item.js";
|
|
5
|
+
import type { SearchResult } from "../../types/search.js";
|
|
6
|
+
import type { SearchResultUser } from "../../types/user.js";
|
|
7
|
+
import type { PortalBrowserStore } from "./utils/store.js";
|
|
8
|
+
import type { RangeFormatter } from "./utils/types.js";
|
|
9
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
10
|
+
|
|
11
|
+
export abstract class ArcgisPortalBrowser extends LitElement {
|
|
12
|
+
/** @internal */
|
|
13
|
+
protected _messages: {
|
|
14
|
+
browser: {
|
|
15
|
+
refineContent: string;
|
|
16
|
+
filters: string;
|
|
17
|
+
pageRange: string;
|
|
18
|
+
pageRangeAria: string;
|
|
19
|
+
pageRangeWithRecycleBin: string;
|
|
20
|
+
pageRangeAriaWithRecycleBin: string;
|
|
21
|
+
totalSize: string;
|
|
22
|
+
loading: string;
|
|
23
|
+
close: string;
|
|
24
|
+
};
|
|
25
|
+
actions: { more: string; };
|
|
26
|
+
filter: { clear: string; };
|
|
27
|
+
filterDate: {
|
|
28
|
+
today: string;
|
|
29
|
+
yesterday: string;
|
|
30
|
+
last7: string;
|
|
31
|
+
last30: string;
|
|
32
|
+
never: string;
|
|
33
|
+
custom: string;
|
|
34
|
+
title: {
|
|
35
|
+
created: string;
|
|
36
|
+
modified: string;
|
|
37
|
+
joined: string;
|
|
38
|
+
lastLogin: string;
|
|
39
|
+
};
|
|
40
|
+
created: string;
|
|
41
|
+
modified: string;
|
|
42
|
+
joined: string;
|
|
43
|
+
lastLogin: string;
|
|
44
|
+
};
|
|
45
|
+
pagination: {
|
|
46
|
+
next: string;
|
|
47
|
+
prev: string;
|
|
48
|
+
};
|
|
49
|
+
search: {
|
|
50
|
+
label: string;
|
|
51
|
+
search: string;
|
|
52
|
+
clear: string;
|
|
53
|
+
wildcard: string;
|
|
54
|
+
};
|
|
55
|
+
sort: {
|
|
56
|
+
sortDirection: string;
|
|
57
|
+
title: string;
|
|
58
|
+
relevance: string;
|
|
59
|
+
modified: string;
|
|
60
|
+
deleted: string;
|
|
61
|
+
created: string;
|
|
62
|
+
added: string;
|
|
63
|
+
size: string;
|
|
64
|
+
owner: string;
|
|
65
|
+
sizeAsc: string;
|
|
66
|
+
sizeDesc: string;
|
|
67
|
+
numviews: string;
|
|
68
|
+
numAsc: string;
|
|
69
|
+
numDesc: string;
|
|
70
|
+
alphabeticalAsc: string;
|
|
71
|
+
alphabeticalDesc: string;
|
|
72
|
+
recentAsc: string;
|
|
73
|
+
recentDesc: string;
|
|
74
|
+
sort: string;
|
|
75
|
+
sortBy: string;
|
|
76
|
+
sortByColon: string;
|
|
77
|
+
fullname: string;
|
|
78
|
+
username: string;
|
|
79
|
+
name: string;
|
|
80
|
+
membertype: string;
|
|
81
|
+
joined: string;
|
|
82
|
+
lastlogin: string;
|
|
83
|
+
dataset: string;
|
|
84
|
+
mfaenabled: string;
|
|
85
|
+
description: string;
|
|
86
|
+
lastSyncFailureCount: string;
|
|
87
|
+
invitationsPendingCount: string;
|
|
88
|
+
participantGroupLinksCount: string;
|
|
89
|
+
defaultAsc: string;
|
|
90
|
+
defaultDesc: string;
|
|
91
|
+
};
|
|
92
|
+
topBar: { filter: string; };
|
|
93
|
+
filterStatus: {
|
|
94
|
+
clear: string;
|
|
95
|
+
filters: string;
|
|
96
|
+
additional: string;
|
|
97
|
+
clearAllFilters: string;
|
|
98
|
+
};
|
|
99
|
+
} & T9nMeta<{
|
|
100
|
+
browser: {
|
|
101
|
+
refineContent: string;
|
|
102
|
+
filters: string;
|
|
103
|
+
pageRange: string;
|
|
104
|
+
pageRangeAria: string;
|
|
105
|
+
pageRangeWithRecycleBin: string;
|
|
106
|
+
pageRangeAriaWithRecycleBin: string;
|
|
107
|
+
totalSize: string;
|
|
108
|
+
loading: string;
|
|
109
|
+
close: string;
|
|
110
|
+
};
|
|
111
|
+
actions: { more: string; };
|
|
112
|
+
filter: { clear: string; };
|
|
113
|
+
filterDate: {
|
|
114
|
+
today: string;
|
|
115
|
+
yesterday: string;
|
|
116
|
+
last7: string;
|
|
117
|
+
last30: string;
|
|
118
|
+
never: string;
|
|
119
|
+
custom: string;
|
|
120
|
+
title: {
|
|
121
|
+
created: string;
|
|
122
|
+
modified: string;
|
|
123
|
+
joined: string;
|
|
124
|
+
lastLogin: string;
|
|
125
|
+
};
|
|
126
|
+
created: string;
|
|
127
|
+
modified: string;
|
|
128
|
+
joined: string;
|
|
129
|
+
lastLogin: string;
|
|
130
|
+
};
|
|
131
|
+
pagination: {
|
|
132
|
+
next: string;
|
|
133
|
+
prev: string;
|
|
134
|
+
};
|
|
135
|
+
search: {
|
|
136
|
+
label: string;
|
|
137
|
+
search: string;
|
|
138
|
+
clear: string;
|
|
139
|
+
wildcard: string;
|
|
140
|
+
};
|
|
141
|
+
sort: {
|
|
142
|
+
sortDirection: string;
|
|
143
|
+
title: string;
|
|
144
|
+
relevance: string;
|
|
145
|
+
modified: string;
|
|
146
|
+
deleted: string;
|
|
147
|
+
created: string;
|
|
148
|
+
added: string;
|
|
149
|
+
size: string;
|
|
150
|
+
owner: string;
|
|
151
|
+
sizeAsc: string;
|
|
152
|
+
sizeDesc: string;
|
|
153
|
+
numviews: string;
|
|
154
|
+
numAsc: string;
|
|
155
|
+
numDesc: string;
|
|
156
|
+
alphabeticalAsc: string;
|
|
157
|
+
alphabeticalDesc: string;
|
|
158
|
+
recentAsc: string;
|
|
159
|
+
recentDesc: string;
|
|
160
|
+
sort: string;
|
|
161
|
+
sortBy: string;
|
|
162
|
+
sortByColon: string;
|
|
163
|
+
fullname: string;
|
|
164
|
+
username: string;
|
|
165
|
+
name: string;
|
|
166
|
+
membertype: string;
|
|
167
|
+
joined: string;
|
|
168
|
+
lastlogin: string;
|
|
169
|
+
dataset: string;
|
|
170
|
+
mfaenabled: string;
|
|
171
|
+
description: string;
|
|
172
|
+
lastSyncFailureCount: string;
|
|
173
|
+
invitationsPendingCount: string;
|
|
174
|
+
participantGroupLinksCount: string;
|
|
175
|
+
defaultAsc: string;
|
|
176
|
+
defaultDesc: string;
|
|
177
|
+
};
|
|
178
|
+
topBar: { filter: string; };
|
|
179
|
+
filterStatus: {
|
|
180
|
+
clear: string;
|
|
181
|
+
filters: string;
|
|
182
|
+
additional: string;
|
|
183
|
+
clearAllFilters: string;
|
|
184
|
+
};
|
|
185
|
+
}>;
|
|
186
|
+
/** @default false */
|
|
187
|
+
accessor alwaysShowContent: boolean;
|
|
188
|
+
/** @default false */
|
|
189
|
+
accessor alwaysShowPagination: boolean | undefined;
|
|
190
|
+
/** @default false */
|
|
191
|
+
accessor alwaysShowSelection: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* @deprecated Preserved for legacy arcgis-browser parity.
|
|
194
|
+
* @default 4
|
|
195
|
+
*/
|
|
196
|
+
accessor api: number;
|
|
197
|
+
/** @default "large" */
|
|
198
|
+
accessor formFactor: "large" | "small";
|
|
199
|
+
/**
|
|
200
|
+
* Height sizing strategy for the browser to use
|
|
201
|
+
* full height will be 100% the height of its parent and scroll internally
|
|
202
|
+
* auto height will grow with the contents of the browser
|
|
203
|
+
*
|
|
204
|
+
* @default "full"
|
|
205
|
+
*/
|
|
206
|
+
accessor height: "auto" | "full";
|
|
207
|
+
/** @default false */
|
|
208
|
+
accessor hideContentTop: boolean;
|
|
209
|
+
/** @default false */
|
|
210
|
+
accessor hideFilters: boolean | undefined;
|
|
211
|
+
/** @default false */
|
|
212
|
+
accessor hideTopBar: boolean | undefined;
|
|
213
|
+
/** @default false */
|
|
214
|
+
accessor loading: boolean;
|
|
215
|
+
/** @default false */
|
|
216
|
+
accessor panel: boolean;
|
|
217
|
+
/** @default false */
|
|
218
|
+
accessor preview: boolean;
|
|
219
|
+
accessor rangeFormatter: RangeFormatter | undefined;
|
|
220
|
+
accessor response: SearchResult<SearchResultGroup | SearchResultItem | SearchResultUser>;
|
|
221
|
+
/** @default "" */
|
|
222
|
+
accessor searchTerm: string;
|
|
223
|
+
accessor selected: SearchResultGroup[] | SearchResultItem[] | SearchResultUser[] | undefined;
|
|
224
|
+
/** @default false */
|
|
225
|
+
accessor showPreSearch: boolean | undefined;
|
|
226
|
+
accessor store: PortalBrowserStore;
|
|
227
|
+
scrollToTop(): Promise<void>;
|
|
228
|
+
readonly arcgisAriaUpdate: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
229
|
+
/** @deprecated Use arcgisAriaUpdate instead. */
|
|
230
|
+
readonly ariaUpdate: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
231
|
+
readonly "@eventTypes": {
|
|
232
|
+
arcgisAriaUpdate: ArcgisPortalBrowser["arcgisAriaUpdate"]["detail"];
|
|
233
|
+
ariaUpdate: ArcgisPortalBrowser["ariaUpdate"]["detail"];
|
|
234
|
+
};
|
|
235
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as y } from "../../chunks/runtime.js";
|
|
3
|
+
import { watch as n } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
|
+
import * as c from "@arcgis/core/intl.js";
|
|
5
|
+
import { LitElement as $, createEvent as w, safeClassMap as r, safeStyleMap as v } from "@arcgis/lumina";
|
|
6
|
+
import { css as F, html as o } from "lit";
|
|
7
|
+
import { createRef as S, ref as P } from "lit/directives/ref.js";
|
|
8
|
+
import { u as k } from "../../chunks/useT9n.js";
|
|
9
|
+
import { c as g } from "../../chunks/dom.js";
|
|
10
|
+
import { i as B } from "../../chunks/functionalities.js";
|
|
11
|
+
import "../arcgis-portal-browser-filter/customElement.js";
|
|
12
|
+
import "../arcgis-portal-browser-filter-date/customElement.js";
|
|
13
|
+
import "../arcgis-portal-browser-filters/customElement.js";
|
|
14
|
+
import "../arcgis-portal-browser-filter-status/customElement.js";
|
|
15
|
+
import { c as R, o as C, a as E, i as T } from "../../chunks/store.js";
|
|
16
|
+
const W = F`:host{position:relative;display:flex;height:100%;flex-direction:column;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-color-background);--arcgis-browser-max-width: 100%;--arcgis-browser-pane-width: 18.75rem;--arcgis-browser-pane-z-index: 11}:host([height="auto"]){height:auto;min-height:100%;flex:1 1 100%}.wrapper{display:flex;height:100%;flex-direction:column;overflow:hidden}.wrapper--fixed{overflow:hidden}.wrapper--auto{flex:1 1 100%}.wrapper--full{transform:translate(0)}.panel{display:flex;height:100%;flex-direction:column;overflow:hidden}.panel--fixed{transform:translateZ(0)}.top-bar{position:sticky;top:0;right:0;left:0;z-index:20;flex-shrink:0;flex-grow:0;border-bottom:1px solid var(--calcite-color-border-3)}.scrolling{position:relative;display:flex;min-height:0px;width:100%;flex:1 1 0%;flex-direction:column}.scrolling--panel{overflow-y:scroll}@supports (scrollbar-gutter: stable){.scrolling--panel{scrollbar-gutter:stable;overflow-y:auto}}.scrolling--full{overflow:hidden}.preview-position{position:absolute;inset:0;margin-inline:auto;width:100%;max-width:var(--arcgis-browser-max-width)}.preview-position--with-top-bar{top:3rem}.preview-desktop{width:100%}.two-up{margin-left:auto;margin-right:auto;display:flex;width:100%;flex:1 1 auto;flex-direction:row;max-width:var(--arcgis-browser-max-width)}.two-up.small{margin-top:-1px}.two-up--fullscreen{height:100%;overflow:hidden}.content__start{margin-inline-end:.25rem;padding-inline:1rem}.content{position:relative;display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}.content--full{overflow-y:scroll}@supports (scrollbar-gutter: stable){.content--full{scrollbar-gutter:stable;overflow-y:auto}}.content__top{position:relative;display:flex;height:1.5rem;flex-grow:0;align-items:center;justify-content:space-between;padding-top:1.25rem;padding-bottom:.75rem;font-size:1.125rem;color:var(--calcite-color-text-1);z-index:2}.content__top__end{margin-inline-start:auto;display:grid;gap:.5rem;grid-auto-flow:column}.actions,.filter-status{flex:1 1 0%}.content__view{margin-inline-end:.25rem;min-width:0px;flex:1 1 0%;padding-inline:var(--arcgis-browser-content-padding, 1rem)}.content__view--padded-bottom{padding-bottom:1rem}.content__view--no-filters{margin-inline-start:.25rem;padding-inline-start:var(--arcgis-browser-content-padding, 1rem)}.pane{pointer-events:none;visibility:hidden;display:flex;height:100%;background-color:var(--calcite-color-background);opacity:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:transform,visibility,opacity;border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.pane--open{pointer-events:auto;visibility:visible;opacity:1;transform:translate(0);box-shadow:4px 0 16px #0000000f}.preview{width:0px;flex-shrink:0;flex-grow:0;position:absolute;top:0;bottom:0;inset-inline-start:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:width;z-index:var(--arcgis-browser-pane-z-index)}.preview--fixed{position:fixed}.preview--active{overflow:auto;width:var(--arcgis-browser-pane-width);box-shadow:#0000000f 4px 0 16px}.filter-panel,.preview-panel{position:relative;height:100%;background-color:var(--calcite-color-background)}.filter-panel__content{padding:.75rem 1rem 0}.filter-status--mobile{width:100%}.filter-status--active{display:block}.popover-contents{width:var(--arcgis-browser-popover-width);height:var(--arcgis-browser-popover-height)}.sheet{pointer-events:none;position:fixed;inset:0;z-index:110}.sheet--top-bar{top:3rem;overflow:hidden}.sheet__background{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;background-color:#0003}.sheet__background--hidden{display:none}.sheet--active .sheet__background{opacity:1}.sheet--active{pointer-events:auto;opacity:1}.sheet__contents{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;top:3rem;transform:translate3d(0,24px,0)}.sheet__contents--full{top:0;--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-inline-end:auto;width:var(--arcgis-browser-pane-width);border:1px solid var(--calcite-color-border-3);border-inline-start:none;transform:translate3d(-24px,0,0)}.sheet--active .sheet__contents{opacity:1;transform:translateZ(0)}.hide{display:none}.aria-hidden{height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;position:absolute;top:0;bottom:0;width:0px;inset-inline-end:0}.content__view--flex{display:flex;flex-direction:column}.cover{display:flex;flex:1 1 0%;align-items:flex-start;justify-content:center;overflow:auto;padding-bottom:1rem;padding-top:.25rem}.no-results{height:100%;width:100%;flex:1 1 0%;text-align:center;font-size:1.125rem;color:var(--calcite-color-text-2)}::slotted([slot="no-results"]){width:100%}::slotted([slot="no-content"]){width:100%}.results-wrapper{flex:1 1 0%}.results-wrapper--spaced{padding-top:1.5rem}.loader{margin-top:min(8rem,30vh);--calcite-loader-padding: 0}.filters{box-sizing:border-box;flex-grow:0;padding-inline:1.5rem 0;width:var(--arcgis-browser-pane-width)}.filters--sticky{position:sticky;top:0;height:100%}.filters__content{overflow-y:auto;height:100%;padding-top:1.5rem;box-sizing:border-box;scrollbar-gutter:stable}.filters--empty{display:none}.filters--active{opacity:1;transform:translateZ(0)}.filters__title{margin:0 0 1rem;padding:0 0 1rem;font-size:1.125rem;font-weight:500;color:var(--calcite-color-text-1);padding-inline-start:.75rem;border-bottom:1px solid var(--calcite-color-border-3)}.range{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;color:var(--calcite-color-text-1)}.container{display:flex;height:100%;width:100%;flex-direction:column;background-color:var(--calcite-color-background)}.container__header{display:flex;flex:0 1 auto;flex-direction:row;background-color:var(--calcite-color-foreground-1);border-bottom:1px solid var(--calcite-color-border-3)}.container__header__text{margin:0;flex:1 1 0%;padding:.875rem .75rem;font-size:1rem;font-weight:500;color:var(--calcite-color-text-2)}.container__content{flex:1 1 0%;overflow:auto}.container__footer{box-sizing:border-box;width:100%;flex:0 1 auto;background-color:var(--calcite-color-foreground-1);padding:.5rem}.small .filters{padding:0}.small .filters__content{padding-left:1rem;padding-right:1rem}.small .content__view{padding-inline:.5rem;margin-inline:0}.small .content__view--panel{padding-inline:0}.small .content__start{margin-inline:0;padding-inline:.5rem}@media screen and (max-width:640px){:host{--arcgis-browser-pane-width: 100%}}.scrim__find{margin-top:3.5rem;opacity:.6;transition-property:opacity;transition-duration:.15s;--calcite-scrim-background: rgba(0, 0, 0, .6)}`;
|
|
17
|
+
function z(h) {
|
|
18
|
+
const t = Math.max(h?.total ?? 0, 0), e = h?.results?.length ?? 0;
|
|
19
|
+
if (!t || !e)
|
|
20
|
+
return { start: 0, end: 0, total: t };
|
|
21
|
+
const i = Math.max(h?.start ?? 1, 1), s = Math.min(i + e - 1, t);
|
|
22
|
+
return { start: i, end: s, total: t };
|
|
23
|
+
}
|
|
24
|
+
const U = 49;
|
|
25
|
+
class q extends $ {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments), this._messages = k({ blocking: !0 }), this._previewContainer = S(), this.toggleScrim = (t) => {
|
|
28
|
+
this.scrimActive = t.detail;
|
|
29
|
+
}, this.checkFlowItem = () => {
|
|
30
|
+
this.flowItem = g(this.el, "calcite-flow-item");
|
|
31
|
+
}, this.handleResize = () => {
|
|
32
|
+
requestAnimationFrame(this.updatePreviewPosition);
|
|
33
|
+
}, this.updatePreviewPosition = () => {
|
|
34
|
+
if (this.formFactor === "small" || this.height !== "auto" || !this._previewContainer)
|
|
35
|
+
return;
|
|
36
|
+
this.checkFlowItem();
|
|
37
|
+
const t = this._previewContainer.value?.getBoundingClientRect();
|
|
38
|
+
if (!t)
|
|
39
|
+
return;
|
|
40
|
+
const { x: e, y: i, height: s, right: a, width: l } = t, p = s + i, d = window.innerWidth - document.body.offsetWidth, m = window.innerWidth < l || window.innerWidth < window.outerWidth && window.innerWidth <= l + d;
|
|
41
|
+
this.previewBoundingBox = {
|
|
42
|
+
top: Math.max(i, 0),
|
|
43
|
+
left: e,
|
|
44
|
+
right: m ? 0 : window.outerWidth - a - d,
|
|
45
|
+
bottom: p > window.innerHeight ? 0 : window.innerHeight - p
|
|
46
|
+
};
|
|
47
|
+
}, this.pageRangeText = "", this.noResults = !1, this.initialHide = !0, this.scrimActive = !1, this.panel = !1, this.preview = !1, this.loading = !1, this.hideContentTop = !1, this.alwaysShowSelection = !1, this.alwaysShowContent = !1, this.response = {
|
|
48
|
+
nextStart: -1,
|
|
49
|
+
num: 0,
|
|
50
|
+
results: [],
|
|
51
|
+
start: 1,
|
|
52
|
+
total: 0
|
|
53
|
+
}, this.store = R(), this.formFactor = "large", this.searchTerm = "", this.height = "full", this.api = 4, this.arcgisAriaUpdate = w(), this.ariaUpdate = w();
|
|
54
|
+
}
|
|
55
|
+
static {
|
|
56
|
+
this.properties = { pageRangeText: 16, noResults: 16, previewBoundingBox: 16, initialHide: 16, scrimActive: 16, flowItem: 16, panel: 5, preview: 5, loading: 5, hideContentTop: 5, hideTopBar: 5, selected: 0, alwaysShowSelection: 5, alwaysShowContent: 5, response: 0, store: 0, formFactor: 1, searchTerm: 1, height: 3, hideFilters: 5, showPreSearch: 5, rangeFormatter: 0, alwaysShowPagination: 5, api: 9 };
|
|
57
|
+
}
|
|
58
|
+
static {
|
|
59
|
+
this.styles = W;
|
|
60
|
+
}
|
|
61
|
+
async scrollToTop() {
|
|
62
|
+
this.renderRoot.querySelector(".top-bar")?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
63
|
+
}
|
|
64
|
+
connectedCallback() {
|
|
65
|
+
super.connectedCallback(), window.addEventListener("scroll", this.handleResize), window.addEventListener("resize", this.handleResize), this.el.addEventListener("arcgisItemBrowserScrimToggle", this.toggleScrim), this.checkFlowItem(), this.attachStoreWatchers();
|
|
66
|
+
}
|
|
67
|
+
willUpdate(t) {
|
|
68
|
+
t.has("store") && this.attachStoreWatchers(), t.has("response") && this.updatePage(this.response);
|
|
69
|
+
}
|
|
70
|
+
firstUpdated() {
|
|
71
|
+
requestAnimationFrame(this.updatePreviewPosition);
|
|
72
|
+
}
|
|
73
|
+
disconnectedCallback() {
|
|
74
|
+
this.removePreviewWatcher?.(), this.removeStoreWatcher?.(), window.removeEventListener("resize", this.handleResize), window.removeEventListener("scroll", this.handleResize), this.el.removeEventListener("arcgisItemBrowserScrimToggle", this.toggleScrim), super.disconnectedCallback();
|
|
75
|
+
}
|
|
76
|
+
attachStoreWatchers() {
|
|
77
|
+
if (this.removePreviewWatcher?.(), this.removeStoreWatcher?.(), !this.store)
|
|
78
|
+
return;
|
|
79
|
+
this.removePreviewWatcher = C(this.store, this.updatePreviewPosition);
|
|
80
|
+
const t = [
|
|
81
|
+
n(() => this.store.type, () => this.requestUpdate()),
|
|
82
|
+
n(() => this.store.width, () => this.requestUpdate()),
|
|
83
|
+
n(() => this.store.height, () => this.requestUpdate()),
|
|
84
|
+
n(() => this.store.filtersEmpty, () => this.requestUpdate()),
|
|
85
|
+
n(() => this.store.topbarEmpty, () => this.requestUpdate()),
|
|
86
|
+
n(() => this.store.sortEmpty, () => this.requestUpdate()),
|
|
87
|
+
n(() => this.store.filtersExpanded, () => this.requestUpdate()),
|
|
88
|
+
n(() => this.store.panel, () => this.requestUpdate()),
|
|
89
|
+
n(() => this.store.preview, () => this.requestUpdate()),
|
|
90
|
+
n(() => this.store.searchTerm, () => this.requestUpdate()),
|
|
91
|
+
n(() => this.store.hiddenFilters, () => this.requestUpdate()),
|
|
92
|
+
n(() => this.store.filters, () => this.requestUpdate()),
|
|
93
|
+
n(() => this.store.recycleBin, () => this.requestUpdate())
|
|
94
|
+
];
|
|
95
|
+
this.removeStoreWatcher = () => {
|
|
96
|
+
t.forEach((e) => e.remove());
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
async updatePage(t) {
|
|
100
|
+
const [e, i] = await this.updatePageRange(t);
|
|
101
|
+
this.pageRangeText = e, this.arcgisAriaUpdate.emit(i), this.el.dispatchEvent(new CustomEvent("ariaUpdate", { detail: i })), this.noResults = E(this.store) && this.store.recycleBin ? t.results.length === 0 : (t?.total ?? 0) === 0, this.initialHide = !1;
|
|
102
|
+
}
|
|
103
|
+
async updatePageRange(t) {
|
|
104
|
+
const { start: e, end: i, total: s } = z(t), a = c.formatNumber(e, { maximumFractionDigits: 0 }), l = c.formatNumber(i, { maximumFractionDigits: 0 }), d = `${c.formatNumber(s, { maximumFractionDigits: 0 })}${s >= 1e4 ? "+" : ""}`, m = c.formatNumber(t.results?.length ?? 0, { maximumFractionDigits: 0 }), u = c.formatNumber(Math.max(Math.ceil(e / Math.max(t.num || 1, 1)), 1), {
|
|
105
|
+
maximumFractionDigits: 0
|
|
106
|
+
});
|
|
107
|
+
if (this.rangeFormatter)
|
|
108
|
+
return await this.rangeFormatter({
|
|
109
|
+
start: a,
|
|
110
|
+
end: l,
|
|
111
|
+
total: d,
|
|
112
|
+
results: { items: m, page: u }
|
|
113
|
+
});
|
|
114
|
+
const f = this._messages.browser.pageRange, x = this._messages.browser.pageRangeAria, b = f.replace("${start}", a).replace("${end}", l).replace("${total}", d), _ = x.replace("${start}", a).replace("${end}", l).replace("${total}", d);
|
|
115
|
+
return [b, _];
|
|
116
|
+
}
|
|
117
|
+
hasActiveFilter(t) {
|
|
118
|
+
return Object.values(t.filters).filter(({ id: e }) => !B(T, e)).some((e) => !!e.value || e.id === "collaborations");
|
|
119
|
+
}
|
|
120
|
+
removeFilter(t) {
|
|
121
|
+
const e = this.store.filters[t];
|
|
122
|
+
if (!e)
|
|
123
|
+
return;
|
|
124
|
+
const i = { ...e, value: void 0 };
|
|
125
|
+
"additionalParams" in e && (i.additionalParams = void 0);
|
|
126
|
+
const s = { ...this.store.filters, [t]: i };
|
|
127
|
+
this.store.filters = s;
|
|
128
|
+
}
|
|
129
|
+
clearFilters() {
|
|
130
|
+
const t = Object.entries(this.store.filters).reduce((e, [i, s]) => this.store.hiddenFilters?.includes(i) || s.id === "folder" || s.id === "group" || s.id === "contentType" ? (e[i] = s, e) : (e[i] = {
|
|
131
|
+
...s,
|
|
132
|
+
value: void 0,
|
|
133
|
+
..."additionalParams" in s ? { additionalParams: void 0 } : {}
|
|
134
|
+
}, e), {});
|
|
135
|
+
this.store.filters = t;
|
|
136
|
+
}
|
|
137
|
+
renderNoResults() {
|
|
138
|
+
const t = this.noResults && !this.loading && !this.showPreSearch, e = this.hasActiveFilter(this.store) || !!this.searchTerm;
|
|
139
|
+
return t ? o`<div class="cover"><div class="no-results">${e ? o`<slot name=no-results></slot>` : o`<slot name=no-content></slot>`}</div></div>` : null;
|
|
140
|
+
}
|
|
141
|
+
renderPopoverContents(t, e, i) {
|
|
142
|
+
const s = this.flowItem ? this.flowItem.offsetHeight : this.store.height, a = this.formFactor === "small" && this.hasActiveFilter(this.store) && !this.hideFilters;
|
|
143
|
+
return this.el.style.setProperty("--arcgis-browser-popover-width", i ? "100%" : `${this.store.width || 0}px`), this.el.style.setProperty("--arcgis-browser-popover-height", i ? "100%" : `${s || 0}px`), o`<div class="popover-contents"><div class=${r({ hide: !e, "preview-panel": !0 })}><slot name=preview></slot></div><div class=${r({ hide: !t, "filter-panel": !0 })}><article class="container"><header class="container__header"><h2 class="container__header__text">${this._messages.browser?.refineContent}</h2><calcite-action .text=${this._messages.browser?.close} scale=m icon=x @click=${() => {
|
|
144
|
+
this.store.filtersExpanded = !1;
|
|
145
|
+
}}></calcite-action></header><div class="container__content"><div class="container__content__scroll"><slot name=filters-top></slot>${(this.store.panel || i) && o`<div class="filter-container__content"><slot name=sort></slot></div>` || ""}<slot name=filters></slot></div></div><div class=${r({ "filter-status--mobile": !0, container__footer: !0, hide: !a })}><arcgis-portal-browser-filter-status class="filter-status" .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters || []} .componentWidth=${this.store.width || this.flowItem?.offsetWidth || window.innerWidth} .browserWidth=${window.innerWidth} @arcgisBrowserFilterClear=${() => this.clearFilters()} @arcgisBrowserFilterRemove=${(l) => this.removeFilter(l.detail)}></arcgis-portal-browser-filter-status></div></article></div></div>`;
|
|
146
|
+
}
|
|
147
|
+
renderFlow() {
|
|
148
|
+
const t = !!this.store.panel, e = !!this.store.filtersExpanded && (!this.store.filtersEmpty || !this.store.sortEmpty && t), i = !!this.store.preview, s = !this.store.panel && document.documentElement.clientWidth > (this.store.width || 0);
|
|
149
|
+
return o`<div class=${r({ panel: !0, "panel--fixed": s })}>${!this.hideTopBar && o`<div class=${r({ "top-bar": !0, "top-bar--small": this.formFactor === "small" })}><slot name=top-bar></slot></div>` || ""}<div class="scrolling scrolling--panel"><div class=${r({ "two-up": !0, [this.formFactor]: !0 })}><div class="content"><div><slot name=primary-filter></slot></div><div class="content__start"><slot name=content-start></slot></div>${this.loading && !this.alwaysShowContent && o`<div class="content__view content__view--flex"><div class="cover"><calcite-loader class="loader" label></calcite-loader></div></div>` || ""}${this.noResults && !this.loading && o`<div class="content__view content__view--flex"><div class="cover">${this.renderNoResults()}</div></div>` || ""}<div class=${r({
|
|
150
|
+
hide: this.loading || this.noResults,
|
|
151
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
152
|
+
content__view: !0,
|
|
153
|
+
"content__view--panel": !!this.store.panel,
|
|
154
|
+
"content__view--flex": !this.loading && !this.noResults
|
|
155
|
+
})}>${!this.store.panel && !this.hideContentTop && o`<div class="content__top"><span class=${r({ selection: !0, hide: !this.alwaysShowSelection })}><slot name=selection></slot></span>${!this.loading && o`<span class="range">${this.pageRangeText}</span>` || ""}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot>${!t && o`<slot name=sort></slot>` || ""}</div></div>` || ""}<div class="flow-content"><slot name=content></slot></div><slot name=pagination></slot><slot name=content-end></slot></div></div></div><slot name=scroll-end></slot></div>${!this.store.panel || window.innerWidth < (this.store.width || 0) * 2 ? o`<div class=${r({
|
|
156
|
+
sheet: !0,
|
|
157
|
+
"sheet--active": e || i,
|
|
158
|
+
"sheet--top-bar": s
|
|
159
|
+
})}><div class=${r({ sheet__background: !0, "sheet__background--hidden": s })}></div><div class=${r({ sheet__contents: !0, "sheet__contents--full": s })}>${this.renderPopoverContents(e, i, !0)}</div></div>` : o`<calcite-popover overlay-positioning=fixed .open=${i || e} label=filters .referenceElement=${this.flowItem || this.el} offset-skidding=0 offset-distance=0 trigger-disabled pointer-disabled .placement=${this.store.panel ? "trailing" : "auto"} @calcitePopoverOpen=${(a) => {
|
|
160
|
+
(!this.store.panel || window.innerWidth < (this.store.width || 0) * 2) && (a.currentTarget.style.transform = "none");
|
|
161
|
+
}} .focusTrapOptions=${{
|
|
162
|
+
setReturnFocus: (a) => {
|
|
163
|
+
if (!(a instanceof HTMLElement))
|
|
164
|
+
return a;
|
|
165
|
+
const l = g(a, "arcgis-portal-item-card, arcgis-portal-group-card");
|
|
166
|
+
return l?.restoreFocus ? (l.restoreFocus(), !1) : a;
|
|
167
|
+
}
|
|
168
|
+
}}>${this.renderPopoverContents(e, i)}</calcite-popover>`}</div>`;
|
|
169
|
+
}
|
|
170
|
+
render() {
|
|
171
|
+
const t = this.height === "auto", e = this.height === "full", i = `${(this.store.height || window.innerHeight) - U}px`, s = t ? {} : { maxHeight: i };
|
|
172
|
+
return this.formFactor === "small" ? this.renderFlow() : o`<div class=${r({
|
|
173
|
+
wrapper: !0,
|
|
174
|
+
"wrapper--fixed": !!this.store.filtersExpanded,
|
|
175
|
+
"wrapper--auto": t,
|
|
176
|
+
"wrapper--full": e
|
|
177
|
+
})}>${!this.hideTopBar && o`<div class="top-bar"><slot name=top-bar></slot></div>` || ""}<slot name=top-bar-end></slot><div class=${r({ "preview-position": !0, "preview-position--with-top-bar": !this.store.topbarEmpty })} ${P(this._previewContainer)}><div class=${r({ preview: !0, "preview--active": !!this.store.preview, "preview--fixed": t })} style=${v(t && this.previewBoundingBox ? {
|
|
178
|
+
top: `${this.previewBoundingBox.top || 0}px`,
|
|
179
|
+
...document.dir === "rtl" ? { right: `${this.previewBoundingBox.right || 0}px` } : { left: `${this.previewBoundingBox.left || 0}px` },
|
|
180
|
+
bottom: `${this.previewBoundingBox.bottom || 0}px`
|
|
181
|
+
} : {})}><div class=${r({ pane: !0, "pane--open": !!this.store.preview })}><div class="preview-desktop"><slot name=preview></slot></div></div></div></div><div class=${r({ scrolling: !0, "scrolling--full": !t || this.panel })}>${this.scrimActive && o`<calcite-scrim class="scrim__find"></calcite-scrim>` || ""}<div class=${r({ "two-up": !0, "two-up--fullscreen": e, [this.formFactor]: !0 })}><div class=${r({
|
|
182
|
+
filters: !0,
|
|
183
|
+
"filters--sticky": !t,
|
|
184
|
+
"filters--empty": this.store.filtersEmpty && !this.store.preview,
|
|
185
|
+
"filters--active": !!this.store.filtersExpanded
|
|
186
|
+
})} style=${v(e ? {} : s)}><div class="filters__content" style=${v(e ? {} : s)}><slot name=filters></slot></div></div><div class=${r({ content: !0, "content--full": e })}><div class="content__start"><slot name=content-start></slot></div><div class=${r({
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
188
|
+
content__view: !0,
|
|
189
|
+
"content__view--no-filters": this.store.filtersEmpty && !this.store.preview,
|
|
190
|
+
"content__view--flex": !0
|
|
191
|
+
})}>${!this.hideContentTop && o`<div class="content__top">${this.showPreSearch ? null : o`<div class="content__top__summary"><span class=${r({ selection: !0, hide: !this.alwaysShowSelection })}><slot name=selection></slot></span>${!this.loading && o`<span class="range">${this.pageRangeText}<slot name=range-end></slot></span>` || ""}</div>`}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot><slot name=sort></slot></div></div>` || ""}${this.loading && (!this.alwaysShowContent || this.initialHide) && o`<div class="cover"><calcite-loader class="loader" .label=${this._messages.browser?.loading ?? ""}></calcite-loader></div>` || ""}${this.renderNoResults()}${!this.loading && this.showPreSearch && o`<div class="cover"><div class="no-results"><slot name=pre-search></slot></div></div>` || ""}<div class=${r({
|
|
192
|
+
hide: !!this.showPreSearch || this.loading && !this.alwaysShowContent || !this.loading && this.noResults || this.initialHide,
|
|
193
|
+
"results-wrapper--spaced": this.hideContentTop,
|
|
194
|
+
"results-wrapper": !0
|
|
195
|
+
})}><slot name=content></slot></div><div class=${r({ hide: this.loading || this.noResults && !this.alwaysShowPagination })}><slot name=pagination></slot><slot name=content-end></slot></div></div></div></div><slot name=scroll-end></slot></div></div>`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
y("arcgis-portal-browser", q);
|
|
199
|
+
export {
|
|
200
|
+
q as ArcgisPortalBrowser
|
|
201
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
2
|
+
import "../arcgis-portal-browser-filter-status/index.js";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-popover";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-scrim";
|
|
6
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type Accessor from "@arcgis/core/core/Accessor.js";
|
|
2
|
+
import type { Accordion as Accordion } from "@esri/calcite-components/components/calcite-accordion";
|
|
3
|
+
|
|
4
|
+
export type PortalBrowserFilterDetail = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value: unknown;
|
|
8
|
+
additionalParams?: unknown;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type PortalBrowserStore = ReturnType<typeof createPortalBrowserStore>;
|
|
12
|
+
|
|
13
|
+
/** @param initialState */
|
|
14
|
+
export function createPortalBrowserStore(initialState?: Partial<PortalBrowserState>): Accessor & PortalBrowserState;
|
|
15
|
+
|
|
16
|
+
export interface PortalBrowserState {
|
|
17
|
+
type?: "group-browser" | "item-browser" | "member-browser";
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
filterElement?: Accordion;
|
|
21
|
+
filtersEmpty?: boolean;
|
|
22
|
+
topbarEmpty?: boolean;
|
|
23
|
+
sortEmpty?: boolean;
|
|
24
|
+
filtersExpanded?: boolean;
|
|
25
|
+
panel?: boolean;
|
|
26
|
+
preview?: string;
|
|
27
|
+
searchTerm?: string;
|
|
28
|
+
hiddenFilters?: string[];
|
|
29
|
+
filters: Record<string, PortalBrowserFilterDetail>;
|
|
30
|
+
recycleBin?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @param input */
|
|
2
|
+
export type RangeFormatter = (input: RangeFormatInput) => Promise<[string, string]>;
|
|
3
|
+
|
|
4
|
+
export interface BrowserPageDetail {
|
|
5
|
+
start: number;
|
|
6
|
+
total: number;
|
|
7
|
+
num: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface RangeFormatInput {
|
|
11
|
+
start: string;
|
|
12
|
+
end: string;
|
|
13
|
+
total: string;
|
|
14
|
+
results: {
|
|
15
|
+
items: string;
|
|
16
|
+
page: string;
|
|
17
|
+
};
|
|
18
|
+
}
|