@arcgis/portal-components 5.2.0-next.30 → 5.2.0-next.32
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/{GNS7NA7V.js → 2MV6L7TF.js} +1 -1
- package/dist/cdn/{2CP32LP3.js → 2XILGLOG.js} +1 -1
- package/dist/cdn/3XVBYE54.js +2 -0
- package/dist/cdn/3ZYTCYNE.js +2 -0
- package/dist/cdn/{HIRM34QB.js → 43IIAMZ3.js} +1 -1
- package/dist/cdn/{QJ2UHWPU.js → 4YGBHWHG.js} +1 -1
- package/dist/cdn/5H4VCRNA.js +2 -0
- package/dist/cdn/6KRP5D52.js +2 -0
- package/dist/cdn/{5VHBNEN3.js → 6XWNBD36.js} +1 -1
- package/dist/cdn/7355NM43.js +2 -0
- package/dist/cdn/7LC4ZEXB.js +2 -0
- package/dist/cdn/ADC752YM.js +2 -0
- package/dist/cdn/AX5KYSWU.js +2 -0
- package/dist/cdn/{CHSZSBO6.js → BTYTNPSM.js} +1 -1
- package/dist/cdn/BUPFZ5MT.js +2 -0
- package/dist/cdn/DWPIXEWQ.js +2 -0
- package/dist/cdn/E67OMPRM.js +2 -0
- package/dist/cdn/EIOSA4DR.js +2 -0
- package/dist/cdn/G2YAOSMT.js +2 -0
- package/dist/cdn/G6YH7AFY.js +2 -0
- package/dist/cdn/GNBMYDRC.js +2 -0
- package/dist/cdn/H6QISDOR.js +2 -0
- package/dist/cdn/HA2J6NDT.js +2 -0
- package/dist/cdn/{RJPBPB45.js → HVF4Z3VA.js} +1 -1
- package/dist/cdn/{BZTVED5W.js → IILAKXVC.js} +1 -1
- package/dist/cdn/J2KLHUBJ.js +2 -0
- package/dist/cdn/{LCZTOHWB.js → JEXN44WM.js} +1 -1
- package/dist/cdn/{3BJVGCJG.js → KDDYAFAF.js} +1 -1
- package/dist/cdn/{HGSK6OFA.js → KPEWVVE5.js} +1 -1
- package/dist/cdn/MM6SCKYE.js +2 -0
- package/dist/cdn/NZVLEDFZ.js +2 -0
- package/dist/cdn/{YGKPNY5R.js → OU2AR22N.js} +1 -1
- package/dist/cdn/{ZDLFZJBT.js → Q22FWLJZ.js} +1 -1
- package/dist/cdn/QUEBM77K.js +2 -0
- package/dist/cdn/QUMJ5FTJ.js +2 -0
- package/dist/cdn/T6JAFB2A.js +2 -0
- package/dist/cdn/V7LZAIB6.js +2 -0
- package/dist/cdn/VSAH76S7.js +2 -0
- package/dist/cdn/{DBKSQGEI.js → XHM6I6YG.js} +1 -1
- package/dist/cdn/XNZQ5PXA.js +2 -0
- package/dist/cdn/YCAVVVZV.js +2 -0
- package/dist/cdn/YHXXIHQA.js +2 -0
- package/dist/cdn/Z2ZUXONU.js +2 -0
- package/dist/cdn/{WJ2NMHDE.js → ZZ4DR3HN.js} +1 -1
- package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/store.js +18 -0
- package/dist/components/arcgis-portal-browser/customElement.d.ts +152 -32
- package/dist/components/arcgis-portal-browser/customElement.js +68 -80
- package/dist/components/arcgis-portal-browser/utils/types.d.ts +6 -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 +175 -6
- package/dist/components/arcgis-portal-browser-filter/customElement.js +12 -14
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +144 -32
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +37 -37
- package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +144 -32
- 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/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 +48 -0
- package/dist/loader.js +11 -5
- package/dist/types/lumina.d.ts +39 -2
- package/dist/types/preact.d.ts +45 -2
- package/dist/types/react.d.ts +51 -2
- package/dist/types/stencil.d.ts +39 -2
- package/package.json +4 -4
- package/dist/cdn/32CZ4VLI.js +0 -2
- package/dist/cdn/47NPIL2S.js +0 -2
- package/dist/cdn/DY5G63YO.js +0 -2
- package/dist/cdn/EKO6SVAF.js +0 -2
- package/dist/cdn/FI45QCN2.js +0 -2
- package/dist/cdn/FRDK7SCC.js +0 -2
- package/dist/cdn/GDZZCADX.js +0 -2
- package/dist/cdn/GEIZTD7F.js +0 -2
- package/dist/cdn/GJ26ZIE5.js +0 -2
- package/dist/cdn/HB7GO6ST.js +0 -2
- package/dist/cdn/KZWW4BWJ.js +0 -2
- package/dist/cdn/M7ABAD7K.js +0 -2
- package/dist/cdn/MLTQECPL.js +0 -2
- package/dist/cdn/O7ICV6C7.js +0 -2
- package/dist/cdn/OKHKS5RH.js +0 -2
- package/dist/cdn/OKRYML2G.js +0 -2
- package/dist/cdn/PFCDINAN.js +0 -2
- package/dist/cdn/QOFH6DQT.js +0 -2
- package/dist/cdn/VSKX2QMZ.js +0 -2
- package/dist/cdn/VTLIQOV4.js +0 -2
- package/dist/cdn/YECI7XG3.js +0 -2
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { PortalBrowserSortField, PortalBrowserSortOrder } from "./utils.js";
|
|
4
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
|
+
|
|
6
|
+
export abstract class ArcgisPortalBrowserSort extends LitElement {
|
|
7
|
+
/** @internal */
|
|
8
|
+
protected _messages: {
|
|
9
|
+
browser: {
|
|
10
|
+
refineContent: string;
|
|
11
|
+
filters: string;
|
|
12
|
+
pageRange: string;
|
|
13
|
+
pageRangeAria: string;
|
|
14
|
+
pageRangeWithRecycleBin: string;
|
|
15
|
+
pageRangeAriaWithRecycleBin: string;
|
|
16
|
+
totalSize: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
close: string;
|
|
19
|
+
};
|
|
20
|
+
actions: { more: string; };
|
|
21
|
+
filter: { clear: string; };
|
|
22
|
+
filterDate: {
|
|
23
|
+
today: string;
|
|
24
|
+
yesterday: string;
|
|
25
|
+
last7: string;
|
|
26
|
+
last30: string;
|
|
27
|
+
never: string;
|
|
28
|
+
custom: string;
|
|
29
|
+
title: {
|
|
30
|
+
created: string;
|
|
31
|
+
modified: string;
|
|
32
|
+
joined: string;
|
|
33
|
+
lastLogin: string;
|
|
34
|
+
};
|
|
35
|
+
created: string;
|
|
36
|
+
modified: string;
|
|
37
|
+
joined: string;
|
|
38
|
+
lastLogin: string;
|
|
39
|
+
};
|
|
40
|
+
pagination: {
|
|
41
|
+
next: string;
|
|
42
|
+
prev: string;
|
|
43
|
+
};
|
|
44
|
+
search: {
|
|
45
|
+
label: string;
|
|
46
|
+
search: string;
|
|
47
|
+
clear: string;
|
|
48
|
+
wildcard: string;
|
|
49
|
+
};
|
|
50
|
+
sort: {
|
|
51
|
+
sortDirection: string;
|
|
52
|
+
title: string;
|
|
53
|
+
relevance: string;
|
|
54
|
+
modified: string;
|
|
55
|
+
deleted: string;
|
|
56
|
+
created: string;
|
|
57
|
+
added: string;
|
|
58
|
+
size: string;
|
|
59
|
+
owner: string;
|
|
60
|
+
sizeAsc: string;
|
|
61
|
+
sizeDesc: string;
|
|
62
|
+
numviews: string;
|
|
63
|
+
numAsc: string;
|
|
64
|
+
numDesc: string;
|
|
65
|
+
alphabeticalAsc: string;
|
|
66
|
+
alphabeticalDesc: string;
|
|
67
|
+
recentAsc: string;
|
|
68
|
+
recentDesc: string;
|
|
69
|
+
sort: string;
|
|
70
|
+
sortBy: string;
|
|
71
|
+
sortByColon: string;
|
|
72
|
+
fullname: string;
|
|
73
|
+
username: string;
|
|
74
|
+
name: string;
|
|
75
|
+
membertype: string;
|
|
76
|
+
joined: string;
|
|
77
|
+
lastlogin: string;
|
|
78
|
+
dataset: string;
|
|
79
|
+
mfaenabled: string;
|
|
80
|
+
description: string;
|
|
81
|
+
lastSyncFailureCount: string;
|
|
82
|
+
invitationsPendingCount: string;
|
|
83
|
+
participantGroupLinksCount: string;
|
|
84
|
+
defaultAsc: string;
|
|
85
|
+
defaultDesc: string;
|
|
86
|
+
};
|
|
87
|
+
topBar: { filter: string; };
|
|
88
|
+
filterStatus: {
|
|
89
|
+
clear: string;
|
|
90
|
+
filters: string;
|
|
91
|
+
additional: string;
|
|
92
|
+
clearAllFilters: string;
|
|
93
|
+
};
|
|
94
|
+
} & T9nMeta<{
|
|
95
|
+
browser: {
|
|
96
|
+
refineContent: string;
|
|
97
|
+
filters: string;
|
|
98
|
+
pageRange: string;
|
|
99
|
+
pageRangeAria: string;
|
|
100
|
+
pageRangeWithRecycleBin: string;
|
|
101
|
+
pageRangeAriaWithRecycleBin: string;
|
|
102
|
+
totalSize: string;
|
|
103
|
+
loading: string;
|
|
104
|
+
close: string;
|
|
105
|
+
};
|
|
106
|
+
actions: { more: string; };
|
|
107
|
+
filter: { clear: string; };
|
|
108
|
+
filterDate: {
|
|
109
|
+
today: string;
|
|
110
|
+
yesterday: string;
|
|
111
|
+
last7: string;
|
|
112
|
+
last30: string;
|
|
113
|
+
never: string;
|
|
114
|
+
custom: string;
|
|
115
|
+
title: {
|
|
116
|
+
created: string;
|
|
117
|
+
modified: string;
|
|
118
|
+
joined: string;
|
|
119
|
+
lastLogin: string;
|
|
120
|
+
};
|
|
121
|
+
created: string;
|
|
122
|
+
modified: string;
|
|
123
|
+
joined: string;
|
|
124
|
+
lastLogin: string;
|
|
125
|
+
};
|
|
126
|
+
pagination: {
|
|
127
|
+
next: string;
|
|
128
|
+
prev: string;
|
|
129
|
+
};
|
|
130
|
+
search: {
|
|
131
|
+
label: string;
|
|
132
|
+
search: string;
|
|
133
|
+
clear: string;
|
|
134
|
+
wildcard: string;
|
|
135
|
+
};
|
|
136
|
+
sort: {
|
|
137
|
+
sortDirection: string;
|
|
138
|
+
title: string;
|
|
139
|
+
relevance: string;
|
|
140
|
+
modified: string;
|
|
141
|
+
deleted: string;
|
|
142
|
+
created: string;
|
|
143
|
+
added: string;
|
|
144
|
+
size: string;
|
|
145
|
+
owner: string;
|
|
146
|
+
sizeAsc: string;
|
|
147
|
+
sizeDesc: string;
|
|
148
|
+
numviews: string;
|
|
149
|
+
numAsc: string;
|
|
150
|
+
numDesc: string;
|
|
151
|
+
alphabeticalAsc: string;
|
|
152
|
+
alphabeticalDesc: string;
|
|
153
|
+
recentAsc: string;
|
|
154
|
+
recentDesc: string;
|
|
155
|
+
sort: string;
|
|
156
|
+
sortBy: string;
|
|
157
|
+
sortByColon: string;
|
|
158
|
+
fullname: string;
|
|
159
|
+
username: string;
|
|
160
|
+
name: string;
|
|
161
|
+
membertype: string;
|
|
162
|
+
joined: string;
|
|
163
|
+
lastlogin: string;
|
|
164
|
+
dataset: string;
|
|
165
|
+
mfaenabled: string;
|
|
166
|
+
description: string;
|
|
167
|
+
lastSyncFailureCount: string;
|
|
168
|
+
invitationsPendingCount: string;
|
|
169
|
+
participantGroupLinksCount: string;
|
|
170
|
+
defaultAsc: string;
|
|
171
|
+
defaultDesc: string;
|
|
172
|
+
};
|
|
173
|
+
topBar: { filter: string; };
|
|
174
|
+
filterStatus: {
|
|
175
|
+
clear: string;
|
|
176
|
+
filters: string;
|
|
177
|
+
additional: string;
|
|
178
|
+
clearAllFilters: string;
|
|
179
|
+
};
|
|
180
|
+
}>;
|
|
181
|
+
/** @default "dropdown" */
|
|
182
|
+
accessor appearance: "accordion" | "dropdown";
|
|
183
|
+
accessor field: PortalBrowserSortField | undefined;
|
|
184
|
+
accessor options: PortalBrowserSortField[];
|
|
185
|
+
accessor order: PortalBrowserSortOrder | undefined;
|
|
186
|
+
/** @default true */
|
|
187
|
+
accessor showText: boolean;
|
|
188
|
+
/** @default false */
|
|
189
|
+
accessor useDeleted: boolean;
|
|
190
|
+
readonly arcgisBrowserSortFieldChange: import("@arcgis/lumina").TargetedEvent<this, PortalBrowserSortField>;
|
|
191
|
+
readonly arcgisBrowserSortOrderChange: import("@arcgis/lumina").TargetedEvent<this, PortalBrowserSortOrder>;
|
|
192
|
+
readonly "@eventTypes": {
|
|
193
|
+
arcgisBrowserSortFieldChange: ArcgisPortalBrowserSort["arcgisBrowserSortFieldChange"]["detail"];
|
|
194
|
+
arcgisBrowserSortOrderChange: ArcgisPortalBrowserSort["arcgisBrowserSortOrderChange"]["detail"];
|
|
195
|
+
};
|
|
196
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as h } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as p, html as i } from "lit";
|
|
4
|
+
import { LitElement as m, createEvent as l, nothing as d } from "@arcgis/lumina";
|
|
5
|
+
import { u } from "../../chunks/useT9n.js";
|
|
6
|
+
const g = p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`, b = {
|
|
7
|
+
title: ["asc", "alphabetical"],
|
|
8
|
+
owner: ["asc", "alphabetical"],
|
|
9
|
+
numviews: ["desc", "num"],
|
|
10
|
+
relevance: ["desc"],
|
|
11
|
+
modified: ["desc", "recent"],
|
|
12
|
+
created: ["desc", "recent"],
|
|
13
|
+
size: ["desc", "size"],
|
|
14
|
+
fullname: ["asc", "alphabetical"],
|
|
15
|
+
username: ["asc", "alphabetical"],
|
|
16
|
+
name: ["asc", "alphabetical"],
|
|
17
|
+
membertype: ["asc", "alphabetical"],
|
|
18
|
+
joined: ["desc", "recent"],
|
|
19
|
+
lastlogin: ["desc", "recent"],
|
|
20
|
+
added: ["desc", "recent"],
|
|
21
|
+
dataset: ["asc", "alphabetical"],
|
|
22
|
+
mfaenabled: ["desc", "default"],
|
|
23
|
+
description: ["asc", "alphabetical"],
|
|
24
|
+
lastSyncFailureCount: ["desc", "num"],
|
|
25
|
+
invitationsPendingCount: ["desc", "num"],
|
|
26
|
+
participantGroupLinksCount: ["desc", "num"]
|
|
27
|
+
};
|
|
28
|
+
function n(a, e, o) {
|
|
29
|
+
const [t, s] = b[a], r = a === "modified" && o ? e.deleted || "Date deleted" : e[a] || a, c = {
|
|
30
|
+
asc: (s ? e[`${s}Asc`] : void 0) || e.defaultAsc,
|
|
31
|
+
desc: (s ? e[`${s}Desc`] : void 0) || e.defaultDesc
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
label: r,
|
|
35
|
+
showSortOrder: !!s,
|
|
36
|
+
defaultSortOrder: t,
|
|
37
|
+
sortOrderLabels: c
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
class f extends m {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments), this._messages = u({ name: "portal-browser", blocking: !0 }), this.sortOrders = ["asc", "desc"], this.options = [], this.appearance = "dropdown", this.showText = !0, this.useDeleted = !1, this.arcgisBrowserSortFieldChange = l(), this.arcgisBrowserSortOrderChange = l();
|
|
43
|
+
}
|
|
44
|
+
static {
|
|
45
|
+
this.properties = { options: 0, field: 1, order: 1, appearance: 1, showText: 5, useDeleted: 5 };
|
|
46
|
+
}
|
|
47
|
+
static {
|
|
48
|
+
this.styles = g;
|
|
49
|
+
}
|
|
50
|
+
getI18n() {
|
|
51
|
+
return this._messages.sort;
|
|
52
|
+
}
|
|
53
|
+
renderFieldOption(e, o) {
|
|
54
|
+
const t = this.getI18n(), s = n(e, t, this.useDeleted);
|
|
55
|
+
return i`<calcite-dropdown-item .selected=${o === e} @calciteDropdownItemSelect=${() => this.arcgisBrowserSortFieldChange.emit(e)}>${s.label}</calcite-dropdown-item>`;
|
|
56
|
+
}
|
|
57
|
+
renderButton(e) {
|
|
58
|
+
const o = this.getI18n(), t = n(e, o, this.useDeleted), s = `${o.sortBy} ${t.label}`;
|
|
59
|
+
return i`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${s}>${this.showText ? t.label : null}</calcite-button>`;
|
|
60
|
+
}
|
|
61
|
+
renderDropdown() {
|
|
62
|
+
if (!this.options.length)
|
|
63
|
+
return null;
|
|
64
|
+
const e = this.getI18n(), o = this.field && this.options.includes(this.field) ? this.field : this.options[0], t = n(o, e, this.useDeleted), s = this.order || t.defaultSortOrder;
|
|
65
|
+
return i`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(o)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map((r) => this.renderFieldOption(r, o))}</calcite-dropdown-group>${t.showSortOrder && i`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map((r) => i`<calcite-dropdown-item .selected=${s === r} @calciteDropdownItemSelect=${() => this.arcgisBrowserSortOrderChange.emit(r)}>${t.sortOrderLabels[r]}</calcite-dropdown-item>`)}</calcite-dropdown-group>` || ""}</calcite-dropdown>`;
|
|
66
|
+
}
|
|
67
|
+
renderTreeItem(e, o) {
|
|
68
|
+
const t = this.getI18n(), s = n(e, t, this.useDeleted);
|
|
69
|
+
return i`<calcite-tree-item data-value=${e ?? d} .selected=${o === e}><a>${s.label}</a></calcite-tree-item>`;
|
|
70
|
+
}
|
|
71
|
+
renderAccordion(e, o, t) {
|
|
72
|
+
return t ? null : i`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${o}</div></calcite-accordion-item>`;
|
|
73
|
+
}
|
|
74
|
+
renderAccordions() {
|
|
75
|
+
if (!this.options.length)
|
|
76
|
+
return null;
|
|
77
|
+
const e = this.getI18n(), o = this.field && this.options.includes(this.field) ? this.field : this.options[0], t = n(o, e, this.useDeleted), s = this.order || t.defaultSortOrder;
|
|
78
|
+
return i`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy, i`<calcite-tree @calciteTreeSelect=${(r) => {
|
|
79
|
+
const c = r.target.selectedItems?.[0]?.dataset.value;
|
|
80
|
+
c && typeof c == "string" && this.arcgisBrowserSortFieldChange.emit(c);
|
|
81
|
+
}}>${this.options.map((r) => this.renderTreeItem(r, o))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection, i`<calcite-tree @calciteTreeSelect=${(r) => {
|
|
82
|
+
const c = r.target.selectedItems?.[0]?.dataset.value;
|
|
83
|
+
(c === "asc" || c === "desc") && this.arcgisBrowserSortOrderChange.emit(c);
|
|
84
|
+
}}>${this.sortOrders.map((r) => i`<calcite-tree-item data-value=${r ?? d} .selected=${s === r}><a>${t.sortOrderLabels[r]}</a></calcite-tree-item>`)}</calcite-tree>`, !t.showSortOrder)}</calcite-accordion></div>`;
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
return this.appearance === "accordion" ? this.renderAccordions() : this.renderDropdown();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
h("arcgis-portal-browser-sort", f);
|
|
91
|
+
export {
|
|
92
|
+
f as ArcgisPortalBrowserSort
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-dropdown";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-tree-item";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-accordion-item";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-accordion";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-tree";
|
|
9
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type PortalBrowserSortField = "added" | "created" | "dataset" | "description" | "fullname" | "invitationsPendingCount" | "joined" | "lastlogin" | "lastSyncFailureCount" | "membertype" | "mfaenabled" | "modified" | "name" | "numviews" | "owner" | "participantGroupLinksCount" | "relevance" | "size" | "title" | "username";
|
|
2
|
+
|
|
3
|
+
export type PortalBrowserSortOrder = "asc" | "desc";
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { PortalBrowserStore } from "../arcgis-portal-browser/utils/store.js";
|
|
4
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
|
+
|
|
6
|
+
export abstract class ArcgisPortalBrowserTopBar extends LitElement {
|
|
7
|
+
/** @internal */
|
|
8
|
+
protected _messages: {
|
|
9
|
+
browser: {
|
|
10
|
+
refineContent: string;
|
|
11
|
+
filters: string;
|
|
12
|
+
pageRange: string;
|
|
13
|
+
pageRangeAria: string;
|
|
14
|
+
pageRangeWithRecycleBin: string;
|
|
15
|
+
pageRangeAriaWithRecycleBin: string;
|
|
16
|
+
totalSize: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
close: string;
|
|
19
|
+
};
|
|
20
|
+
actions: { more: string; };
|
|
21
|
+
filter: { clear: string; };
|
|
22
|
+
filterDate: {
|
|
23
|
+
today: string;
|
|
24
|
+
yesterday: string;
|
|
25
|
+
last7: string;
|
|
26
|
+
last30: string;
|
|
27
|
+
never: string;
|
|
28
|
+
custom: string;
|
|
29
|
+
title: {
|
|
30
|
+
created: string;
|
|
31
|
+
modified: string;
|
|
32
|
+
joined: string;
|
|
33
|
+
lastLogin: string;
|
|
34
|
+
};
|
|
35
|
+
created: string;
|
|
36
|
+
modified: string;
|
|
37
|
+
joined: string;
|
|
38
|
+
lastLogin: string;
|
|
39
|
+
};
|
|
40
|
+
pagination: {
|
|
41
|
+
next: string;
|
|
42
|
+
prev: string;
|
|
43
|
+
};
|
|
44
|
+
search: {
|
|
45
|
+
label: string;
|
|
46
|
+
search: string;
|
|
47
|
+
clear: string;
|
|
48
|
+
wildcard: string;
|
|
49
|
+
};
|
|
50
|
+
sort: {
|
|
51
|
+
sortDirection: string;
|
|
52
|
+
title: string;
|
|
53
|
+
relevance: string;
|
|
54
|
+
modified: string;
|
|
55
|
+
deleted: string;
|
|
56
|
+
created: string;
|
|
57
|
+
added: string;
|
|
58
|
+
size: string;
|
|
59
|
+
owner: string;
|
|
60
|
+
sizeAsc: string;
|
|
61
|
+
sizeDesc: string;
|
|
62
|
+
numviews: string;
|
|
63
|
+
numAsc: string;
|
|
64
|
+
numDesc: string;
|
|
65
|
+
alphabeticalAsc: string;
|
|
66
|
+
alphabeticalDesc: string;
|
|
67
|
+
recentAsc: string;
|
|
68
|
+
recentDesc: string;
|
|
69
|
+
sort: string;
|
|
70
|
+
sortBy: string;
|
|
71
|
+
sortByColon: string;
|
|
72
|
+
fullname: string;
|
|
73
|
+
username: string;
|
|
74
|
+
name: string;
|
|
75
|
+
membertype: string;
|
|
76
|
+
joined: string;
|
|
77
|
+
lastlogin: string;
|
|
78
|
+
dataset: string;
|
|
79
|
+
mfaenabled: string;
|
|
80
|
+
description: string;
|
|
81
|
+
lastSyncFailureCount: string;
|
|
82
|
+
invitationsPendingCount: string;
|
|
83
|
+
participantGroupLinksCount: string;
|
|
84
|
+
defaultAsc: string;
|
|
85
|
+
defaultDesc: string;
|
|
86
|
+
};
|
|
87
|
+
topBar: { filter: string; };
|
|
88
|
+
filterStatus: {
|
|
89
|
+
clear: string;
|
|
90
|
+
filters: string;
|
|
91
|
+
additional: string;
|
|
92
|
+
clearAllFilters: string;
|
|
93
|
+
};
|
|
94
|
+
} & T9nMeta<{
|
|
95
|
+
browser: {
|
|
96
|
+
refineContent: string;
|
|
97
|
+
filters: string;
|
|
98
|
+
pageRange: string;
|
|
99
|
+
pageRangeAria: string;
|
|
100
|
+
pageRangeWithRecycleBin: string;
|
|
101
|
+
pageRangeAriaWithRecycleBin: string;
|
|
102
|
+
totalSize: string;
|
|
103
|
+
loading: string;
|
|
104
|
+
close: string;
|
|
105
|
+
};
|
|
106
|
+
actions: { more: string; };
|
|
107
|
+
filter: { clear: string; };
|
|
108
|
+
filterDate: {
|
|
109
|
+
today: string;
|
|
110
|
+
yesterday: string;
|
|
111
|
+
last7: string;
|
|
112
|
+
last30: string;
|
|
113
|
+
never: string;
|
|
114
|
+
custom: string;
|
|
115
|
+
title: {
|
|
116
|
+
created: string;
|
|
117
|
+
modified: string;
|
|
118
|
+
joined: string;
|
|
119
|
+
lastLogin: string;
|
|
120
|
+
};
|
|
121
|
+
created: string;
|
|
122
|
+
modified: string;
|
|
123
|
+
joined: string;
|
|
124
|
+
lastLogin: string;
|
|
125
|
+
};
|
|
126
|
+
pagination: {
|
|
127
|
+
next: string;
|
|
128
|
+
prev: string;
|
|
129
|
+
};
|
|
130
|
+
search: {
|
|
131
|
+
label: string;
|
|
132
|
+
search: string;
|
|
133
|
+
clear: string;
|
|
134
|
+
wildcard: string;
|
|
135
|
+
};
|
|
136
|
+
sort: {
|
|
137
|
+
sortDirection: string;
|
|
138
|
+
title: string;
|
|
139
|
+
relevance: string;
|
|
140
|
+
modified: string;
|
|
141
|
+
deleted: string;
|
|
142
|
+
created: string;
|
|
143
|
+
added: string;
|
|
144
|
+
size: string;
|
|
145
|
+
owner: string;
|
|
146
|
+
sizeAsc: string;
|
|
147
|
+
sizeDesc: string;
|
|
148
|
+
numviews: string;
|
|
149
|
+
numAsc: string;
|
|
150
|
+
numDesc: string;
|
|
151
|
+
alphabeticalAsc: string;
|
|
152
|
+
alphabeticalDesc: string;
|
|
153
|
+
recentAsc: string;
|
|
154
|
+
recentDesc: string;
|
|
155
|
+
sort: string;
|
|
156
|
+
sortBy: string;
|
|
157
|
+
sortByColon: string;
|
|
158
|
+
fullname: string;
|
|
159
|
+
username: string;
|
|
160
|
+
name: string;
|
|
161
|
+
membertype: string;
|
|
162
|
+
joined: string;
|
|
163
|
+
lastlogin: string;
|
|
164
|
+
dataset: string;
|
|
165
|
+
mfaenabled: string;
|
|
166
|
+
description: string;
|
|
167
|
+
lastSyncFailureCount: string;
|
|
168
|
+
invitationsPendingCount: string;
|
|
169
|
+
participantGroupLinksCount: string;
|
|
170
|
+
defaultAsc: string;
|
|
171
|
+
defaultDesc: string;
|
|
172
|
+
};
|
|
173
|
+
topBar: { filter: string; };
|
|
174
|
+
filterStatus: {
|
|
175
|
+
clear: string;
|
|
176
|
+
filters: string;
|
|
177
|
+
additional: string;
|
|
178
|
+
clearAllFilters: string;
|
|
179
|
+
};
|
|
180
|
+
}>;
|
|
181
|
+
/** @default false */
|
|
182
|
+
accessor filtersDisabled: boolean;
|
|
183
|
+
accessor store: PortalBrowserStore;
|
|
184
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as a } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as l, html as t } from "lit";
|
|
4
|
+
import { LitElement as o, safeClassMap as n } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as d, ref as c } from "lit/directives/ref.js";
|
|
6
|
+
import { u as h } from "../../chunks/useT9n.js";
|
|
7
|
+
import { b as r } from "../../chunks/ui.js";
|
|
8
|
+
import { i as p } from "../../chunks/functionalities.js";
|
|
9
|
+
import { c as m, i as u } from "../../chunks/store.js";
|
|
10
|
+
import "../arcgis-portal-browser-filter-status/customElement.js";
|
|
11
|
+
const b = l`:host{position:relative;display:block;background-color:var(--arcgis-browser-top-bar-background)}.wrapper{display:flex;margin-inline:auto;max-width:var(--arcgis-browser-max-width)}.search-and-sort{display:flex;flex:1;align-items:center;padding-inline-end:1.5rem;min-height:3rem}.search{flex:1}.filter{margin-block:.25rem;padding-inline:.5rem;display:flex;justify-content:center;align-items:center}.large .filter{display:none}.rel{position:relative}.bucket--small{text-align:center;border-bottom:1px solid var(--calcite-color-border-3)}.indicator{width:.5rem;height:.5rem;position:absolute;border-radius:999px;top:0;pointer-events:none;z-index:20;background-color:var(--calcite-color-brand);inset-inline-start:0}.small .search-and-sort{padding-inline-end:0}`;
|
|
12
|
+
class f extends o {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.searchWrapper = d(), this.resizeObserver = null, this._messages = h({ name: "portal-browser", blocking: !0 }), this.width = 0, this.store = m(), this.filtersDisabled = !1;
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.properties = { width: 16, store: 0, filtersDisabled: 5 };
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.styles = b;
|
|
21
|
+
}
|
|
22
|
+
firstUpdated() {
|
|
23
|
+
this.updateWidth(), !(typeof ResizeObserver > "u" || !this.searchWrapper.value) && (this.resizeObserver = new ResizeObserver(() => this.updateWidth()), this.resizeObserver.observe(this.searchWrapper.value));
|
|
24
|
+
}
|
|
25
|
+
disconnectedCallback() {
|
|
26
|
+
this.resizeObserver?.disconnect(), this.resizeObserver = null, super.disconnectedCallback();
|
|
27
|
+
}
|
|
28
|
+
updateWidth() {
|
|
29
|
+
requestAnimationFrame(() => {
|
|
30
|
+
this.width = this.searchWrapper.value?.offsetWidth || 0;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
getFormFactor() {
|
|
34
|
+
const e = this.store.width || window.innerWidth;
|
|
35
|
+
return e <= r.sm ? "small" : e <= r.md ? "medium" : "large";
|
|
36
|
+
}
|
|
37
|
+
hasActiveFilter() {
|
|
38
|
+
return Object.values(this.store.filters).some((e) => !!e.value && !p(u, e.id));
|
|
39
|
+
}
|
|
40
|
+
handleClick() {
|
|
41
|
+
this.store.preview = "", this.store.filtersExpanded = !this.store.filtersExpanded;
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
const e = this.getFormFactor(), s = (e === "medium" || e === "small") && (!this.store.filtersEmpty || !this.store.sortEmpty && this.store.panel) && !this.filtersDisabled, i = this._messages.topBar.filter;
|
|
45
|
+
return t`<div>${e === "small" && t`<div class="bucket bucket--small"><slot name=bucket></slot></div>` || ""}<slot name=primary-filter></slot><div class=${n({ wrapper: !0, [e]: !0 })}><slot name=content-start></slot>${e !== "small" && t`<div class="bucket"><slot name=bucket></slot></div>` || ""}<div class="search-and-sort" ${c(this.searchWrapper)}><div class="search"><slot name=search></slot></div>${!s && !this.filtersDisabled && t`<arcgis-portal-browser-filter-status .componentWidth=${this.width} .browserWidth=${this.store.width || window.innerWidth} class="filter-status" .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters || []}></arcgis-portal-browser-filter-status>` || ""}</div>${s && t`<div class="filter"><div class="rel">${this.hasActiveFilter() && t`<span class="indicator"></span>` || ""}<calcite-button class="filter-toggle" scale=s appearance=transparent kind=neutral icon-start=sliders .label=${i} @click=${() => this.handleClick()} aria-expanded=${this.store.filtersExpanded ? "true" : "false"}></calcite-button></div></div>` || ""}<slot name=content-end></slot></div></div>`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
a("arcgis-portal-browser-top-bar", f);
|
|
49
|
+
export {
|
|
50
|
+
f as ArcgisPortalBrowserTopBar
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { PortalBrowserStore } from "../arcgis-portal-browser/utils/store.js";
|
|
4
|
+
|
|
5
|
+
export abstract class ArcgisPortalBrowserView extends LitElement {
|
|
6
|
+
accessor options: PortalBrowserViewOption[];
|
|
7
|
+
accessor store: PortalBrowserStore;
|
|
8
|
+
/** @default "" */
|
|
9
|
+
accessor view: string;
|
|
10
|
+
/** @default "View" */
|
|
11
|
+
accessor viewText: string;
|
|
12
|
+
readonly arcgisBrowserViewChange: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
13
|
+
readonly "@eventTypes": {
|
|
14
|
+
arcgisBrowserViewChange: ArcgisPortalBrowserView["arcgisBrowserViewChange"]["detail"];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface PortalBrowserViewOption {
|
|
19
|
+
value: string;
|
|
20
|
+
title: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as o } from "../../chunks/runtime.js";
|
|
3
|
+
import { html as e } from "lit";
|
|
4
|
+
import { LitElement as s, createEvent as n } from "@arcgis/lumina";
|
|
5
|
+
import { c } from "../../chunks/store.js";
|
|
6
|
+
const l = 960;
|
|
7
|
+
class a extends s {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.options = [], this.view = "", this.viewText = "View", this.store = c(), this.arcgisBrowserViewChange = n();
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.properties = { options: 0, view: 1, viewText: 1, store: 0 };
|
|
13
|
+
}
|
|
14
|
+
renderOption(t) {
|
|
15
|
+
return e`<calcite-dropdown-item .selected=${t.value === this.view} @calciteDropdownItemSelect=${() => {
|
|
16
|
+
this.arcgisBrowserViewChange.emit(t.value);
|
|
17
|
+
}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`;
|
|
18
|
+
}
|
|
19
|
+
renderButton() {
|
|
20
|
+
const t = this.options.find((r) => r.value === this.view), i = this.store.width || window.innerWidth;
|
|
21
|
+
return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title || ""}`}>${i > l ? t?.title : null}</calcite-button>`;
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map((t) => this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
o("arcgis-portal-browser-view", a);
|
|
28
|
+
export {
|
|
29
|
+
a as ArcgisPortalBrowserView
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-dropdown";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
5
|
+
export * from "./customElement.js";
|