@arcgis/portal-components 5.2.0-next.3 → 5.2.0-next.30
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/25UUUQAQ.js +71 -0
- package/dist/cdn/2CP32LP3.js +2 -0
- package/dist/cdn/32CZ4VLI.js +2 -0
- package/dist/cdn/3BJVGCJG.js +637 -0
- package/dist/cdn/{AQWTJKUH.js → 3MQIRMUM.js} +9 -7
- package/dist/cdn/{JNRN6DTV.js → 47NPIL2S.js} +1 -1
- package/dist/cdn/{LQ3DMZ3K.js → 5VHBNEN3.js} +1 -1
- package/dist/cdn/6AGZRMJC.js +2 -0
- package/dist/cdn/6W2IHKCA.js +2 -0
- package/dist/cdn/BZTVED5W.js +65 -0
- package/dist/cdn/CHSZSBO6.js +2 -0
- package/dist/cdn/{WOZDQW3S.js → DBKSQGEI.js} +1 -1
- package/dist/cdn/DFTUMKSN.js +3 -0
- package/dist/cdn/DY5G63YO.js +2 -0
- package/dist/cdn/ECNI2A4K.js +2 -0
- package/dist/cdn/EKO6SVAF.js +2 -0
- package/dist/cdn/EZ3BR2FP.js +134 -0
- package/dist/cdn/{GHQ3ZW4U.js → FI45QCN2.js} +1 -1
- package/dist/cdn/FRDK7SCC.js +2 -0
- package/dist/cdn/GDZZCADX.js +2 -0
- package/dist/cdn/GEIZTD7F.js +2 -0
- package/dist/cdn/GJ26ZIE5.js +2 -0
- package/dist/cdn/GNS7NA7V.js +2 -0
- package/dist/cdn/HB7GO6ST.js +2 -0
- package/dist/cdn/{ZTHTFEYA.js → HGSK6OFA.js} +1 -1
- package/dist/cdn/{LAFNDBTQ.js → HIRM34QB.js} +1 -1
- package/dist/cdn/HMBSJR37.js +2 -0
- package/dist/cdn/{V2EOXGK2.js → I234NUZ5.js} +1 -1
- package/dist/cdn/{5DPWJ7DI.js → KZWW4BWJ.js} +1 -1
- package/dist/cdn/LCZTOHWB.js +2 -0
- package/dist/cdn/M7ABAD7K.js +2 -0
- package/dist/cdn/MLTQECPL.js +2 -0
- package/dist/cdn/NWIIOJEG.js +2 -0
- package/dist/cdn/O7ICV6C7.js +2 -0
- package/dist/cdn/OKHKS5RH.js +2 -0
- package/dist/cdn/{G47ZZQYL.js → OKRYML2G.js} +1 -1
- package/dist/cdn/PFCDINAN.js +2 -0
- package/dist/cdn/{QNUYUNEY.js → QJ2UHWPU.js} +1 -1
- package/dist/cdn/QOFH6DQT.js +2 -0
- package/dist/cdn/RJPBPB45.js +2 -0
- package/dist/cdn/S5XNEB7F.js +99 -0
- package/dist/cdn/S745KWLM.js +34 -0
- package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
- package/dist/cdn/{72N3KAXN.js → TW4LFQA5.js} +1 -1
- package/dist/cdn/U3FVMN32.js +2 -0
- package/dist/cdn/ULD747OT.js +22 -0
- package/dist/cdn/{7WZHZP6U.js → UR7W4CEV.js} +8 -2
- package/dist/cdn/{W6PSG4GX.js → VRXKORTR.js} +9 -4
- package/dist/cdn/VSKX2QMZ.js +2 -0
- package/dist/cdn/VTLIQOV4.js +2 -0
- package/dist/cdn/{DHHSKOUY.js → WJ2NMHDE.js} +1 -1
- package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
- package/dist/cdn/{53MSUMA3.js → XCZSPNKS.js} +16 -0
- package/dist/cdn/{K3HS2LQ7.js → YECI7XG3.js} +1 -1
- package/dist/cdn/YGKPNY5R.js +3 -0
- package/dist/cdn/ZDLFZJBT.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/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 +115 -0
- package/dist/components/arcgis-portal-browser/customElement.js +213 -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 +12 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +57 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.js +34 -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 +121 -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 +81 -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-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 +74 -2
- package/dist/loader.js +13 -4
- package/dist/types/group.d.ts +13 -13
- package/dist/types/item.d.ts +77 -2
- package/dist/types/lumina.d.ts +56 -1
- package/dist/types/preact.d.ts +65 -1
- package/dist/types/react.d.ts +74 -1
- package/dist/types/search.d.ts +27 -0
- package/dist/types/stencil.d.ts +56 -1
- package/dist/types/tracking.d.ts +10 -0
- package/dist/types/user.d.ts +2 -2
- package/package.json +7 -7
- package/dist/cdn/5VSDGPHH.js +0 -2
- package/dist/cdn/ANPXRYLV.js +0 -5
- package/dist/cdn/BEHLBKKM.js +0 -2
- package/dist/cdn/CI5ENGVT.js +0 -2
- package/dist/cdn/EVDOPN3G.js +0 -54
- package/dist/cdn/GAHILDQF.js +0 -45
- package/dist/cdn/GNOZCQ34.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/YL7PGYWC.js +0 -5
- package/dist/cdn/YMPTDKT6.js +0 -2
- /package/dist/cdn/{B7633S2A.js → 5NIJVBS7.js} +0 -0
|
@@ -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,115 @@
|
|
|
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
|
+
close: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
};
|
|
19
|
+
range: {
|
|
20
|
+
summary: string;
|
|
21
|
+
announcement: string;
|
|
22
|
+
};
|
|
23
|
+
filterStatus: {
|
|
24
|
+
filters: string;
|
|
25
|
+
additional: string;
|
|
26
|
+
clearAllFilters: string;
|
|
27
|
+
};
|
|
28
|
+
filterDate: {
|
|
29
|
+
title: {
|
|
30
|
+
created: string;
|
|
31
|
+
modified: string;
|
|
32
|
+
};
|
|
33
|
+
clear: string;
|
|
34
|
+
created: string;
|
|
35
|
+
modified: string;
|
|
36
|
+
today: string;
|
|
37
|
+
yesterday: string;
|
|
38
|
+
last7: string;
|
|
39
|
+
last30: string;
|
|
40
|
+
never: string;
|
|
41
|
+
custom: string;
|
|
42
|
+
};
|
|
43
|
+
} & T9nMeta<{
|
|
44
|
+
browser: {
|
|
45
|
+
refineContent: string;
|
|
46
|
+
close: string;
|
|
47
|
+
loading: string;
|
|
48
|
+
};
|
|
49
|
+
range: {
|
|
50
|
+
summary: string;
|
|
51
|
+
announcement: string;
|
|
52
|
+
};
|
|
53
|
+
filterStatus: {
|
|
54
|
+
filters: string;
|
|
55
|
+
additional: string;
|
|
56
|
+
clearAllFilters: string;
|
|
57
|
+
};
|
|
58
|
+
filterDate: {
|
|
59
|
+
title: {
|
|
60
|
+
created: string;
|
|
61
|
+
modified: string;
|
|
62
|
+
};
|
|
63
|
+
clear: string;
|
|
64
|
+
created: string;
|
|
65
|
+
modified: string;
|
|
66
|
+
today: string;
|
|
67
|
+
yesterday: string;
|
|
68
|
+
last7: string;
|
|
69
|
+
last30: string;
|
|
70
|
+
never: string;
|
|
71
|
+
custom: string;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
/** @default false */
|
|
75
|
+
accessor alwaysShowContent: boolean;
|
|
76
|
+
/** @default false */
|
|
77
|
+
accessor alwaysShowPagination: boolean | undefined;
|
|
78
|
+
/** @default false */
|
|
79
|
+
accessor alwaysShowSelection: boolean;
|
|
80
|
+
/** @default "large" */
|
|
81
|
+
accessor formFactor: "large" | "small";
|
|
82
|
+
/**
|
|
83
|
+
* Height sizing strategy for the browser to use
|
|
84
|
+
* full height will be 100% the height of its parent and scroll internally
|
|
85
|
+
* auto height will grow with the contents of the browser
|
|
86
|
+
*
|
|
87
|
+
* @default "full"
|
|
88
|
+
*/
|
|
89
|
+
accessor height: "auto" | "full";
|
|
90
|
+
/** @default false */
|
|
91
|
+
accessor hideContentTop: boolean;
|
|
92
|
+
/** @default false */
|
|
93
|
+
accessor hideFilters: boolean | undefined;
|
|
94
|
+
/** @default false */
|
|
95
|
+
accessor hideTopBar: boolean | undefined;
|
|
96
|
+
/** @default false */
|
|
97
|
+
accessor loading: boolean;
|
|
98
|
+
/** @default false */
|
|
99
|
+
accessor panel: boolean;
|
|
100
|
+
/** @default false */
|
|
101
|
+
accessor preview: boolean;
|
|
102
|
+
accessor rangeFormatter: RangeFormatter | undefined;
|
|
103
|
+
accessor response: SearchResult<SearchResultGroup | SearchResultItem | SearchResultUser>;
|
|
104
|
+
/** @default "" */
|
|
105
|
+
accessor searchTerm: string;
|
|
106
|
+
accessor selected: SearchResultGroup[] | SearchResultItem[] | SearchResultUser[] | undefined;
|
|
107
|
+
/** @default false */
|
|
108
|
+
accessor showPreSearch: boolean | undefined;
|
|
109
|
+
accessor store: PortalBrowserStore;
|
|
110
|
+
scrollToTop(): Promise<void>;
|
|
111
|
+
readonly arcgisAriaUpdate: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
112
|
+
readonly "@eventTypes": {
|
|
113
|
+
arcgisAriaUpdate: ArcgisPortalBrowser["arcgisAriaUpdate"]["detail"];
|
|
114
|
+
};
|
|
115
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as x } from "../../chunks/runtime.js";
|
|
3
|
+
import { watch as a } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
|
+
import * as h from "@arcgis/core/intl.js";
|
|
5
|
+
import { LitElement as b, createEvent as _, safeStyleMap as p, safeClassMap as o } from "@arcgis/lumina";
|
|
6
|
+
import { css as y, html as r } from "lit";
|
|
7
|
+
import { createRef as $, ref as F } from "lit/directives/ref.js";
|
|
8
|
+
import { u as S } from "../../chunks/useT9n.js";
|
|
9
|
+
import { c as w } from "../../chunks/dom.js";
|
|
10
|
+
import { i as k } 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 { createStore as P } from "@arcgis/lumina/controllers/accessor";
|
|
16
|
+
const B = y`: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}.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 C(d) {
|
|
18
|
+
const t = Math.max(d?.total ?? 0, 0), e = d?.results?.length ?? 0;
|
|
19
|
+
if (!t || !e)
|
|
20
|
+
return { start: 0, end: 0, total: t };
|
|
21
|
+
const i = Math.max(d?.start ?? 1, 1), s = Math.min(i + e - 1, t);
|
|
22
|
+
return { start: i, end: s, total: t };
|
|
23
|
+
}
|
|
24
|
+
const R = ["folder", "group", "contentType"], T = (d) => d.type === "item-browser", E = (d = {}) => P({
|
|
25
|
+
filters: {},
|
|
26
|
+
hiddenFilters: [],
|
|
27
|
+
...d
|
|
28
|
+
});
|
|
29
|
+
function W(d, t) {
|
|
30
|
+
const e = a(() => d.preview, t);
|
|
31
|
+
return () => e.remove();
|
|
32
|
+
}
|
|
33
|
+
const z = 49;
|
|
34
|
+
class U extends b {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments), this._messages = S({ blocking: !0 }), this._previewContainer = $(), this.toggleScrim = (t) => {
|
|
37
|
+
this.scrimActive = t.detail;
|
|
38
|
+
}, this.checkFlowItem = () => {
|
|
39
|
+
this.flowItem = w(this.el, "calcite-flow-item");
|
|
40
|
+
}, this.handleResize = () => {
|
|
41
|
+
requestAnimationFrame(this.updatePreviewPosition);
|
|
42
|
+
}, this.updatePreviewPosition = () => {
|
|
43
|
+
if (this.formFactor === "small" || this.height !== "auto" || !this._previewContainer)
|
|
44
|
+
return;
|
|
45
|
+
this.checkFlowItem();
|
|
46
|
+
const t = this._previewContainer.value?.getBoundingClientRect();
|
|
47
|
+
if (!t)
|
|
48
|
+
return;
|
|
49
|
+
const { x: e, y: i, height: s, right: n, width: l } = t, m = s + i, c = window.innerWidth - document.body.offsetWidth, v = window.innerWidth < l || window.innerWidth < window.outerWidth && window.innerWidth <= l + c;
|
|
50
|
+
this.previewBoundingBox = {
|
|
51
|
+
top: Math.max(i, 0),
|
|
52
|
+
left: e,
|
|
53
|
+
right: v ? 0 : window.outerWidth - n - c,
|
|
54
|
+
bottom: m > window.innerHeight ? 0 : window.innerHeight - m
|
|
55
|
+
};
|
|
56
|
+
}, 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 = {
|
|
57
|
+
nextStart: -1,
|
|
58
|
+
num: 0,
|
|
59
|
+
results: [],
|
|
60
|
+
start: 1,
|
|
61
|
+
total: 0
|
|
62
|
+
}, this.store = E(), this.formFactor = "large", this.searchTerm = "", this.height = "full", this.arcgisAriaUpdate = _();
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
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 };
|
|
66
|
+
}
|
|
67
|
+
static {
|
|
68
|
+
this.styles = B;
|
|
69
|
+
}
|
|
70
|
+
async scrollToTop() {
|
|
71
|
+
this.renderRoot.querySelector(".top-bar")?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
72
|
+
}
|
|
73
|
+
connectedCallback() {
|
|
74
|
+
super.connectedCallback(), window.addEventListener("scroll", this.handleResize), window.addEventListener("resize", this.handleResize), this.el.addEventListener("arcgisItemBrowserScrimToggle", this.toggleScrim), this.checkFlowItem(), this.attachStoreWatchers();
|
|
75
|
+
}
|
|
76
|
+
willUpdate(t) {
|
|
77
|
+
t.has("store") && this.attachStoreWatchers(), t.has("response") && this.updatePage(this.response);
|
|
78
|
+
}
|
|
79
|
+
firstUpdated() {
|
|
80
|
+
requestAnimationFrame(this.updatePreviewPosition);
|
|
81
|
+
}
|
|
82
|
+
disconnectedCallback() {
|
|
83
|
+
this.removePreviewWatcher?.(), this.removeStoreWatcher?.(), window.removeEventListener("resize", this.handleResize), window.removeEventListener("scroll", this.handleResize), this.el.removeEventListener("arcgisItemBrowserScrimToggle", this.toggleScrim), super.disconnectedCallback();
|
|
84
|
+
}
|
|
85
|
+
attachStoreWatchers() {
|
|
86
|
+
if (this.removePreviewWatcher?.(), this.removeStoreWatcher?.(), !this.store)
|
|
87
|
+
return;
|
|
88
|
+
this.removePreviewWatcher = W(this.store, this.updatePreviewPosition);
|
|
89
|
+
const t = [
|
|
90
|
+
a(() => this.store.type, () => this.requestUpdate()),
|
|
91
|
+
a(() => this.store.width, () => this.requestUpdate()),
|
|
92
|
+
a(() => this.store.height, () => this.requestUpdate()),
|
|
93
|
+
a(() => this.store.filtersEmpty, () => this.requestUpdate()),
|
|
94
|
+
a(() => this.store.topbarEmpty, () => this.requestUpdate()),
|
|
95
|
+
a(() => this.store.sortEmpty, () => this.requestUpdate()),
|
|
96
|
+
a(() => this.store.filtersExpanded, () => this.requestUpdate()),
|
|
97
|
+
a(() => this.store.panel, () => this.requestUpdate()),
|
|
98
|
+
a(() => this.store.preview, () => this.requestUpdate()),
|
|
99
|
+
a(() => this.store.searchTerm, () => this.requestUpdate()),
|
|
100
|
+
a(() => this.store.hiddenFilters, () => this.requestUpdate()),
|
|
101
|
+
a(() => this.store.filters, () => this.requestUpdate()),
|
|
102
|
+
a(() => this.store.recycleBin, () => this.requestUpdate())
|
|
103
|
+
];
|
|
104
|
+
this.removeStoreWatcher = () => {
|
|
105
|
+
t.forEach((e) => e.remove());
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
async updatePage(t) {
|
|
109
|
+
const [e, i] = await this.updatePageRange(t);
|
|
110
|
+
this.pageRangeText = e, this.arcgisAriaUpdate.emit(i), this.noResults = T(this.store) && this.store.recycleBin ? t.results.length === 0 : (t?.total ?? 0) === 0, this.initialHide = !1;
|
|
111
|
+
}
|
|
112
|
+
async updatePageRange(t) {
|
|
113
|
+
const { start: e, end: i, total: s } = C(t), n = h.formatNumber(e, { maximumFractionDigits: 0 }), l = h.formatNumber(i, { maximumFractionDigits: 0 }), c = `${h.formatNumber(s, { maximumFractionDigits: 0 })}${s >= 1e4 ? "+" : ""}`, v = h.formatNumber(t.results?.length ?? 0, { maximumFractionDigits: 0 }), g = h.formatNumber(Math.max(Math.ceil(e / Math.max(t.num || 1, 1)), 1), {
|
|
114
|
+
maximumFractionDigits: 0
|
|
115
|
+
});
|
|
116
|
+
if (this.rangeFormatter)
|
|
117
|
+
return await this.rangeFormatter({
|
|
118
|
+
start: n,
|
|
119
|
+
end: l,
|
|
120
|
+
total: c,
|
|
121
|
+
results: { items: v, page: g }
|
|
122
|
+
});
|
|
123
|
+
const u = (this._messages.range?.summary ?? "${start}-${end} of ${total}").replace("${start}", n).replace("${end}", l).replace("${total}", c), f = (this._messages.range?.announcement ?? "Showing ${start} to ${end} of ${total} results").replace("${start}", n).replace("${end}", l).replace("${total}", c);
|
|
124
|
+
return [u, f];
|
|
125
|
+
}
|
|
126
|
+
hasActiveFilter(t) {
|
|
127
|
+
return Object.values(t.filters).filter(({ id: e }) => !k(R, e)).some((e) => !!e.value || e.id === "collaborations");
|
|
128
|
+
}
|
|
129
|
+
removeFilter(t) {
|
|
130
|
+
const e = this.store.filters[t];
|
|
131
|
+
if (!e)
|
|
132
|
+
return;
|
|
133
|
+
const i = { ...e, value: void 0 };
|
|
134
|
+
"additionalParams" in e && (i.additionalParams = void 0);
|
|
135
|
+
const s = { ...this.store.filters, [t]: i };
|
|
136
|
+
this.store.filters = s;
|
|
137
|
+
}
|
|
138
|
+
clearFilters() {
|
|
139
|
+
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] = {
|
|
140
|
+
...s,
|
|
141
|
+
value: void 0,
|
|
142
|
+
..."additionalParams" in s ? { additionalParams: void 0 } : {}
|
|
143
|
+
}, e), {});
|
|
144
|
+
this.store.filters = t;
|
|
145
|
+
}
|
|
146
|
+
renderNoResults() {
|
|
147
|
+
const t = this.noResults && !this.loading && !this.showPreSearch, e = this.hasActiveFilter(this.store) || !!this.searchTerm;
|
|
148
|
+
return t ? r`<div class="cover"><div class="no-results">${e ? r`<slot name=no-results></slot>` : r`<slot name=no-content></slot>`}</div></div>` : null;
|
|
149
|
+
}
|
|
150
|
+
renderPopoverContents(t, e, i) {
|
|
151
|
+
const s = this.flowItem ? this.flowItem.offsetHeight : this.store.height, n = this.formFactor === "small" && this.hasActiveFilter(this.store) && !this.hideFilters;
|
|
152
|
+
return r`<div style=${p({
|
|
153
|
+
width: i ? "100%" : `${this.store.width || 0}px`,
|
|
154
|
+
height: i ? "100%" : `${s || 0}px`
|
|
155
|
+
})}><div class=${o({ hide: !e, "preview-panel": !0 })}><slot name=preview></slot></div><div class=${o({ 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=${() => {
|
|
156
|
+
this.store.filtersExpanded = !1;
|
|
157
|
+
}}></calcite-action></header><div class="container__content"><div class="container__content__scroll"><slot name=filters-top></slot>${(this.store.panel || i) && r`<div class="filter-container__content"><slot name=sort></slot></div>` || ""}<slot name=filters></slot></div></div><div class=${o({ "filter-status--mobile": !0, container__footer: !0, hide: !n })}><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>`;
|
|
158
|
+
}
|
|
159
|
+
renderFlow() {
|
|
160
|
+
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);
|
|
161
|
+
return r`<div class=${o({ panel: !0, "panel--fixed": s })}>${!this.hideTopBar && r`<div class=${o({ "top-bar": !0, "top-bar--small": this.formFactor === "small" })}><slot name=top-bar></slot></div>` || ""}<div class="scrolling scrolling--panel"><div class=${o({ "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 && r`<div class="content__view content__view--flex"><div class="cover"><calcite-loader class="loader" label></calcite-loader></div></div>` || ""}${this.noResults && !this.loading && r`<div class="content__view content__view--flex"><div class="cover">${this.renderNoResults()}</div></div>` || ""}<div class=${o({
|
|
162
|
+
hide: this.loading || this.noResults,
|
|
163
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
164
|
+
content__view: !0,
|
|
165
|
+
"content__view--panel": !!this.store.panel,
|
|
166
|
+
"content__view--flex": !this.loading && !this.noResults
|
|
167
|
+
})}>${!this.store.panel && !this.hideContentTop && r`<div class="content__top"><span class=${o({ selection: !0, hide: !this.alwaysShowSelection })}><slot name=selection></slot></span>${!this.loading && r`<span class="range">${this.pageRangeText}</span>` || ""}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot>${!t && r`<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 ? r`<div class=${o({
|
|
168
|
+
sheet: !0,
|
|
169
|
+
"sheet--active": e || i,
|
|
170
|
+
"sheet--top-bar": s
|
|
171
|
+
})}><div class=${o({ sheet__background: !0, "sheet__background--hidden": s })}></div><div class=${o({ sheet__contents: !0, "sheet__contents--full": s })}>${this.renderPopoverContents(e, i, !0)}</div></div>` : r`<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=${(n) => {
|
|
172
|
+
(!this.store.panel || window.innerWidth < (this.store.width || 0) * 2) && (n.currentTarget.style.transform = "none");
|
|
173
|
+
}} .focusTrapOptions=${{
|
|
174
|
+
setReturnFocus: (n) => {
|
|
175
|
+
if (!(n instanceof HTMLElement))
|
|
176
|
+
return n;
|
|
177
|
+
const l = w(n, "arcgis-portal-item-card, arcgis-portal-group-card");
|
|
178
|
+
return l?.restoreFocus ? (l.restoreFocus(), !1) : n;
|
|
179
|
+
}
|
|
180
|
+
}}>${this.renderPopoverContents(e, i)}</calcite-popover>`}</div>`;
|
|
181
|
+
}
|
|
182
|
+
render() {
|
|
183
|
+
const t = this.height === "auto", e = this.height === "full", i = `${(this.store.height || window.innerHeight) - z}px`, s = t ? {} : { maxHeight: i };
|
|
184
|
+
return this.formFactor === "small" ? this.renderFlow() : r`<div class=${o({
|
|
185
|
+
wrapper: !0,
|
|
186
|
+
"wrapper--fixed": !!this.store.filtersExpanded,
|
|
187
|
+
"wrapper--auto": t,
|
|
188
|
+
"wrapper--full": e
|
|
189
|
+
})}>${!this.hideTopBar && r`<div class="top-bar"><slot name=top-bar></slot></div>` || ""}<slot name=top-bar-end></slot><div class=${o({ "preview-position": !0, "preview-position--with-top-bar": !this.store.topbarEmpty })} ${F(this._previewContainer)}><div class=${o({ preview: !0, "preview--active": !!this.store.preview, "preview--fixed": t })} style=${p(t && this.previewBoundingBox ? {
|
|
190
|
+
top: `${this.previewBoundingBox.top || 0}px`,
|
|
191
|
+
...document.dir === "rtl" ? { right: `${this.previewBoundingBox.right || 0}px` } : { left: `${this.previewBoundingBox.left || 0}px` },
|
|
192
|
+
bottom: `${this.previewBoundingBox.bottom || 0}px`
|
|
193
|
+
} : {})}><div class=${o({ pane: !0, "pane--open": !!this.store.preview })}><div class="preview-desktop"><slot name=preview></slot></div></div></div></div><div class=${o({ scrolling: !0, "scrolling--full": !t || this.panel })}>${this.scrimActive && r`<calcite-scrim class="scrim__find"></calcite-scrim>` || ""}<div class=${o({ "two-up": !0, "two-up--fullscreen": e, [this.formFactor]: !0 })}><div class=${o({
|
|
194
|
+
filters: !0,
|
|
195
|
+
"filters--sticky": !t,
|
|
196
|
+
"filters--empty": this.store.filtersEmpty && !this.store.preview,
|
|
197
|
+
"filters--active": !!this.store.filtersExpanded
|
|
198
|
+
})} style=${p(e ? {} : s)}><div class="filters__content" style=${p(e ? {} : s)}><slot name=filters></slot></div></div><div class=${o({ content: !0, "content--full": e })}><div class="content__start"><slot name=content-start></slot></div><div class=${o({
|
|
199
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
200
|
+
content__view: !0,
|
|
201
|
+
"content__view--no-filters": this.store.filtersEmpty && !this.store.preview,
|
|
202
|
+
"content__view--flex": !0
|
|
203
|
+
})}>${!this.hideContentTop && r`<div class="content__top">${this.showPreSearch ? null : r`<div class="content__top__summary"><span class=${o({ selection: !0, hide: !this.alwaysShowSelection })}><slot name=selection></slot></span>${!this.loading && r`<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) && r`<div class="cover"><calcite-loader class="loader" .label=${this._messages.browser?.loading ?? ""}></calcite-loader></div>` || ""}${this.renderNoResults()}${!this.loading && this.showPreSearch && r`<div class="cover"><div class="no-results"><slot name=pre-search></slot></div></div>` || ""}<div class=${o({
|
|
204
|
+
hide: !!this.showPreSearch || this.loading && !this.alwaysShowContent || !this.loading && this.noResults || this.initialHide,
|
|
205
|
+
"results-wrapper--spaced": this.hideContentTop,
|
|
206
|
+
"results-wrapper": !0
|
|
207
|
+
})}><slot name=content></slot></div><div class=${o({ 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>`;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
x("arcgis-portal-browser", U);
|
|
211
|
+
export {
|
|
212
|
+
U as ArcgisPortalBrowser
|
|
213
|
+
};
|
|
@@ -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,57 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
|
|
4
|
+
export abstract class ArcgisPortalBrowserFilter extends LitElement {
|
|
5
|
+
/**
|
|
6
|
+
* Set to true if the filter is currently being applied.
|
|
7
|
+
*
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
accessor active: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Set to true to disable the clear button.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
accessor clearDisabled: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Label for the clear button.
|
|
19
|
+
*
|
|
20
|
+
* @default "Clear"
|
|
21
|
+
*/
|
|
22
|
+
accessor clearLabel: string;
|
|
23
|
+
/**
|
|
24
|
+
* Set to true to open the filter on first load.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
accessor expanded: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Pass the ID of the filter (used for remove event detail).
|
|
31
|
+
*
|
|
32
|
+
* @default ""
|
|
33
|
+
*/
|
|
34
|
+
accessor filterId: string;
|
|
35
|
+
/**
|
|
36
|
+
* Translated title of the filter.
|
|
37
|
+
*
|
|
38
|
+
* @default ""
|
|
39
|
+
*/
|
|
40
|
+
accessor heading: string;
|
|
41
|
+
/**
|
|
42
|
+
* Set to true when slotting in content that should not have default margins.
|
|
43
|
+
*
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
accessor noPadding: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Use when rendering as a primary filter above the filter set.
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
accessor primary: boolean;
|
|
53
|
+
readonly arcgisBrowserFilterRemove: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
54
|
+
readonly "@eventTypes": {
|
|
55
|
+
arcgisBrowserFilterRemove: ArcgisPortalBrowserFilter["arcgisBrowserFilterRemove"]["detail"];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as i } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as r, html as e } from "lit";
|
|
4
|
+
import { LitElement as a, createEvent as l, safeStyleMap as t, safeClassMap as c } from "@arcgis/lumina";
|
|
5
|
+
const s = r`:host{display:block}.filter--primary{margin-bottom:1rem;position:relative}.filter__header{border-bottom:1px solid var(--calcite-color-border-2);display:flex;margin-bottom:.5rem;align-items:center}.filter__header--primary{margin-bottom:0}.filter__title{color:var(--calcite-color-text-1);flex:1;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1;margin:0;padding:1rem .5rem}.filter__actions-slot{display:flex;align-items:center}.filter__content{margin:0}.filter__content--padded{margin:-.75rem .5rem 0}.filter__content>calcite-tree>calcite-tree-item>a{padding-block:.25rem}.clear-button{margin-inline:.25rem}`;
|
|
6
|
+
class o extends a {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments), this.expanded = !1, this.heading = "", this.active = !1, this.noPadding = !1, this.clearDisabled = !1, this.filterId = "", this.clearLabel = "Clear", this.primary = !1, this.arcgisBrowserFilterRemove = l();
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.properties = { expanded: 5, heading: 1, active: 5, noPadding: 5, clearDisabled: 5, filterId: 1, clearLabel: 1, primary: 5 };
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.styles = s;
|
|
15
|
+
}
|
|
16
|
+
emitFilterRemove() {
|
|
17
|
+
this.arcgisBrowserFilterRemove.emit(this.filterId);
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return this.primary ? e`<div class="filter--primary"><div class="filter__header filter__header--primary"><h3 class="filter__title">${this.heading}</h3><slot name=action></slot></div><slot></slot></div>` : e`<div style=${t({ position: "relative" })}><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m><calcite-accordion-item .heading=${this.heading} .expanded=${this.expanded} @calciteAccordionItemExpand=${() => {
|
|
21
|
+
this.expanded = !0;
|
|
22
|
+
}} @calciteAccordionItemCollapse=${() => {
|
|
23
|
+
this.expanded = !1;
|
|
24
|
+
}} style=${t({
|
|
25
|
+
"--calcite-accordion-item-content-space": ".75rem .25rem",
|
|
26
|
+
"--calcite-accordion-icon-margin": ".5rem",
|
|
27
|
+
borderTop: "1px solid var(--calcite-color-border-1)"
|
|
28
|
+
})}><div slot=actions-end class="filter__actions-slot"><slot name=action></slot>${this.active && !this.clearDisabled && e`<calcite-button class="clear-button" kind=neutral appearance=transparent @click=${() => this.emitFilterRemove()}>${this.clearLabel}</calcite-button>` || ""}</div><div class=${c({ filter__content: !0, "filter__content--padded": !this.noPadding })}><slot></slot></div></calcite-accordion-item></calcite-accordion></div>`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
i("arcgis-portal-browser-filter", o);
|
|
32
|
+
export {
|
|
33
|
+
o as ArcgisPortalBrowserFilter
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|