@arcgis/portal-components 5.2.0-next.50 → 5.2.0-next.52
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/README.md +2 -2
- package/dist/cdn/{ZR7DM7HF.js → AGVSKS3A.js} +81 -79
- package/dist/cdn/OQZDN4G5.js +2 -0
- package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +14 -3
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +22 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +490 -383
- package/dist/components/arcgis-portal-navigation/customElement.d.ts +5 -0
- package/dist/components/arcgis-portal-navigation/customElement.js +451 -424
- package/dist/components/arcgis-portal-navigation/types.d.ts +1 -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/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cdn/SQVFNATF.js +0 -2
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { g as te, c as
|
|
3
|
-
import { html as
|
|
4
|
-
import { safeStyleMap as
|
|
2
|
+
import { g as te, c as dt } from "../../chunks/runtime.js";
|
|
3
|
+
import { html as l, svg as pt, nothing as L, css as ht } from "lit";
|
|
4
|
+
import { safeStyleMap as _e, safeClassMap as oe, LitElement as mt, createEvent as q } from "@arcgis/lumina";
|
|
5
5
|
import { u as ft } from "../../chunks/useT9n.js";
|
|
6
|
-
import { formatDate as
|
|
7
|
-
import { b as
|
|
8
|
-
import { r as
|
|
9
|
-
import { repeat as
|
|
6
|
+
import { formatDate as gt, substitute as Q, getLocale as bt } from "@arcgis/core/intl.js";
|
|
7
|
+
import { b as W, d as vt, e as se, n as wt, g as ae, f as J, a as yt } from "../../chunks/portal.js";
|
|
8
|
+
import { r as U } from "../../chunks/requests.js";
|
|
9
|
+
import { repeat as G } from "lit/directives/repeat.js";
|
|
10
10
|
import { m as _t } from "../../chunks/icons.js";
|
|
11
|
-
import { i as
|
|
11
|
+
import { i as M, c as he, a as $t } from "../../chunks/user.js";
|
|
12
12
|
import "@arcgis/core/portal/Portal.js";
|
|
13
|
-
import { a as
|
|
14
|
-
import { d as
|
|
15
|
-
import { i as
|
|
16
|
-
import { g as
|
|
13
|
+
import { a as At, b as kt, c as St, d as It, e as xt } from "../../chunks/portal2.js";
|
|
14
|
+
import { d as Pt, e as Tt, h as Nt, i as Ct } from "../../chunks/user2.js";
|
|
15
|
+
import { i as $e, a as Mt } from "../../chunks/utils.js";
|
|
16
|
+
import { g as Ae } from "../../chunks/item.js";
|
|
17
17
|
import { keyed as ce } from "lit/directives/keyed.js";
|
|
18
|
-
import { ref as F, createRef as
|
|
19
|
-
import { c as
|
|
20
|
-
import { debounce as
|
|
18
|
+
import { ref as F, createRef as B } from "lit/directives/ref.js";
|
|
19
|
+
import { c as Lt, g as Et } from "../../chunks/dom.js";
|
|
20
|
+
import { debounce as me } from "@arcgis/toolkit/function";
|
|
21
21
|
import Ot from "@arcgis/core/identity/IdentityManager.js";
|
|
22
|
-
import { t as
|
|
23
|
-
import { c as
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
if (!i || !t || !o ||
|
|
22
|
+
import { t as jt } from "../../chunks/functionalities.js";
|
|
23
|
+
import { c as Dt } from "../../chunks/string.js";
|
|
24
|
+
function Gt({ navigate: e, portal: t, product: i, productInfo: n, productHref: r, messages: o, searchActive: s, showNav: a, projectTitleEditing: c }) {
|
|
25
|
+
const h = s && i === "Online" && !a || i !== "Online" && c && window.innerWidth < 960;
|
|
26
|
+
if (!i || !t || !o || h)
|
|
27
27
|
return null;
|
|
28
|
-
const { name:
|
|
29
|
-
return
|
|
28
|
+
const { name: f, glyph: g } = n || {};
|
|
29
|
+
return l`<calcite-navigation-logo class="logo fade-in" .heading=${f} .description=${t.name || ""} .href=${r} @click=${r ? (d) => {
|
|
30
30
|
e({ event: d, href: r });
|
|
31
|
-
} : void 0} .thumbnail=${
|
|
31
|
+
} : void 0} .thumbnail=${g}></calcite-navigation-logo>`;
|
|
32
32
|
}
|
|
33
33
|
const Z = {}, N = {
|
|
34
34
|
Month: 2628e3,
|
|
@@ -38,7 +38,7 @@ const Z = {}, N = {
|
|
|
38
38
|
Minute: 60,
|
|
39
39
|
Second: 1
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function ke(e) {
|
|
42
42
|
if (!e)
|
|
43
43
|
return null;
|
|
44
44
|
const t = Math.floor(e / 1e3), i = Math.abs(t), n = N.Day * 365;
|
|
@@ -59,22 +59,22 @@ function Ae(e) {
|
|
|
59
59
|
return [Math.floor(t / n), "year"];
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Se(e) {
|
|
63
63
|
return (typeof e == "number" ? e : e.getTime?.()) - (/* @__PURE__ */ new Date()).getTime();
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ie({ locale: e, time: t, t9n: i }) {
|
|
66
66
|
if (!e || !t)
|
|
67
67
|
return "";
|
|
68
|
-
const n =
|
|
68
|
+
const n = Se(t);
|
|
69
69
|
Z[e] ??= new Intl.RelativeTimeFormat(e, { style: "long" });
|
|
70
|
-
const r =
|
|
70
|
+
const r = ke(n);
|
|
71
71
|
return r ? r[1] === "second" ? i?.lessThanOneMinute || `< ${Z[e].format(r[0] > 0 ? 1 : -1, "minutes")}` : Z[e].format(r[0], r[1]) : "";
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const Ut = {
|
|
74
74
|
month: "long",
|
|
75
75
|
day: "numeric",
|
|
76
76
|
year: "numeric"
|
|
77
|
-
},
|
|
77
|
+
}, Bt = {
|
|
78
78
|
month: "long",
|
|
79
79
|
day: "numeric"
|
|
80
80
|
};
|
|
@@ -82,28 +82,28 @@ function Ft({ locale: e, time: t }, i) {
|
|
|
82
82
|
if (!e || !t)
|
|
83
83
|
return "";
|
|
84
84
|
const n = new Date(t);
|
|
85
|
-
return
|
|
85
|
+
return gt(n, i ? Ut : Bt);
|
|
86
86
|
}
|
|
87
|
-
async function
|
|
87
|
+
async function zt({ portal: e }) {
|
|
88
88
|
if (!e?.user)
|
|
89
89
|
return { result: [] };
|
|
90
|
-
const t = `${e.restUrl}/community/users/${e.user.id}/notifications`, { result: i, error: n } = await
|
|
90
|
+
const t = `${e.restUrl}/community/users/${e.user.id}/notifications`, { result: i, error: n } = await U(t);
|
|
91
91
|
return n ? { error: n } : { result: i?.notifications };
|
|
92
92
|
}
|
|
93
|
-
async function
|
|
93
|
+
async function Wt(e, t) {
|
|
94
94
|
if (!e?.user)
|
|
95
95
|
return { success: !0 };
|
|
96
|
-
const i = t.map((o) => ({ portal: e, id: o })).map(
|
|
96
|
+
const i = t.map((o) => ({ portal: e, id: o })).map(xe);
|
|
97
97
|
return { success: !((await Promise.allSettled(i))?.filter((o) => o.status === "rejected" || !o.value?.success)).length };
|
|
98
98
|
}
|
|
99
|
-
async function
|
|
99
|
+
async function xe({
|
|
100
100
|
portal: e,
|
|
101
101
|
id: t
|
|
102
102
|
}) {
|
|
103
|
-
const i = `${e.restUrl}/community/users/${e.user?.id}/notifications/${t}/delete`, { result: n } = await
|
|
103
|
+
const i = `${e.restUrl}/community/users/${e.user?.id}/notifications/${t}/delete`, { result: n } = await U(i, { method: "post" });
|
|
104
104
|
return n?.success ? { success: !0, id: t } : { success: !1, id: t };
|
|
105
105
|
}
|
|
106
|
-
const
|
|
106
|
+
const Pe = "notifications-menu";
|
|
107
107
|
function Rt(e) {
|
|
108
108
|
try {
|
|
109
109
|
const t = decodeURIComponent(e);
|
|
@@ -112,7 +112,7 @@ function Rt(e) {
|
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Vt(e) {
|
|
116
116
|
switch (e) {
|
|
117
117
|
case "group_join_admin":
|
|
118
118
|
return "users";
|
|
@@ -167,7 +167,7 @@ function Wt(e) {
|
|
|
167
167
|
return "bell";
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ht({
|
|
171
171
|
notification: e,
|
|
172
172
|
portal: t,
|
|
173
173
|
locale: i,
|
|
@@ -175,74 +175,80 @@ function Vt({
|
|
|
175
175
|
}) {
|
|
176
176
|
if (e?.received && e.id) {
|
|
177
177
|
const r = {
|
|
178
|
-
date:
|
|
178
|
+
date: Ie({ locale: i, time: e.received, t9n: n }),
|
|
179
179
|
id: e.id,
|
|
180
180
|
text: "",
|
|
181
|
-
icon:
|
|
181
|
+
icon: Vt(e.type)
|
|
182
182
|
};
|
|
183
183
|
if (e.type === "webapp_not_copied" && t.isPortal && (e.type = "webapp_not_copied_portal"), e.data?.taskTitle && (e.data.taskTitle = Rt(e.data.taskTitle)), e.type === "message_received")
|
|
184
184
|
r.text = e.data.message || "";
|
|
185
185
|
else if (n.types[e.type]) {
|
|
186
|
-
const o =
|
|
187
|
-
e.data.baseUrl = `${o}/home/`, r.text =
|
|
186
|
+
const o = W({ portal: t, usePortalHostname: !!t.user });
|
|
187
|
+
e.data.baseUrl = `${o}/home/`, r.text = Q(n.types[e.type], e.data);
|
|
188
188
|
}
|
|
189
189
|
if (r.text)
|
|
190
190
|
return r;
|
|
191
191
|
}
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function fe({
|
|
195
195
|
portal: e,
|
|
196
196
|
locale: t,
|
|
197
197
|
t9n: i
|
|
198
198
|
}) {
|
|
199
199
|
if (!i)
|
|
200
200
|
return [];
|
|
201
|
-
const { result: n, error: r } = await
|
|
202
|
-
return r && console.error(r), n?.length ? n.map((s) =>
|
|
201
|
+
const { result: n, error: r } = await zt({ portal: e });
|
|
202
|
+
return r && console.error(r), n?.length ? n.map((s) => Ht({ notification: s, portal: e, t9n: i, locale: t })).filter((s) => s) : [];
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
return t ?
|
|
204
|
+
function qt({ notifications: e, messages: t }) {
|
|
205
|
+
return t ? l`<calcite-action class="action" scale=l .text=${t.label} icon=bell .indicator=${!!e?.length} id=${Pe}></calcite-action>` : null;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return !t && !i ? null :
|
|
207
|
+
function K({ icon: e, title: t, description: i }) {
|
|
208
|
+
return !t && !i ? null : l`<div class="empty">${e && l`<svg xmlns=http://www.w3.org/2000/svg width=64 height=64 viewBox="0 0 64 64" fill=none>${pt`<path d=${_t[e] ?? L} fill=var(--calcite-color-border-input) />`}</svg>` || ""}${t && l`<h3 class="notifications__empty__header">${t}</h3>` || ""}${i && l`<p class="notifications__empty__text">${i}</p>` || ""}</div>`;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return i ?
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
function Jt({ notifications: e, deleteNotifications: t, messages: i, navigate: n, portal: r, notificationDeleteProgress: o }) {
|
|
211
|
+
return i ? l`<calcite-popover .referenceElement=${Pe} .label=${i.label} auto-close pointer-disabled flip-disabled placement=bottom-end scale=l .heading=${i.label}>${e?.length > 0 ? l`<div class="notifications notifications--full">${typeof o == "number" && l`<calcite-scrim><calcite-loader type=determinate-value .label=${i.deleting} .value=${o}></calcite-loader></calcite-scrim>` || ""}<calcite-list .label=${i.label} interaction-mode=static class="notifications__list" scale=l>${G(e, (s) => s.id, (s) => l`<calcite-list-item closable @calciteListItemClose=${async () => await t([s.id])} .messageOverrides=${{ close: i.dismissLabel }} .iconStart=${s.icon}><div slot=content class="notification"><div class="notification__message" .innerHTML=${s.text ?? ""} @click=${(a) => {
|
|
212
|
+
const c = a.target, h = c.href;
|
|
213
|
+
if (c.nodeName === "CALCITE-LINK" && h) {
|
|
214
|
+
const f = `${W({ portal: r, usePortalHostname: !!r.user })}/home/`;
|
|
215
|
+
n({ event: a, href: h, relativePath: h.replace(f, "") });
|
|
216
|
+
}
|
|
217
|
+
}}></div><div class="notification__date">${s.date}</div></div></calcite-list-item>`)}</calcite-list></div><calcite-button class="notifications__dismiss" scale=l appearance=transparent @click=${async (s) => {
|
|
218
|
+
const a = s.currentTarget?.parentElement;
|
|
219
|
+
await t(e?.map(({ id: c }) => c)), a.open = !1;
|
|
220
|
+
}}>${i.dismissAllLabel}</calcite-button>` : l`<div class="notifications">${K({ title: i.noNotifications, description: i.noNotificationsDescription, icon: "check" })}</div>`}</calcite-popover>` : null;
|
|
215
221
|
}
|
|
216
|
-
function
|
|
222
|
+
function Kt(e) {
|
|
217
223
|
return e.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
218
224
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
function Qt(e) {
|
|
223
|
-
return Zt(e, !0);
|
|
225
|
+
function Qt(e, t, i, n) {
|
|
226
|
+
ii(e, JSON.stringify(t), i);
|
|
224
227
|
}
|
|
225
228
|
function Xt(e) {
|
|
229
|
+
return ei(e, !0);
|
|
230
|
+
}
|
|
231
|
+
function Yt(e) {
|
|
226
232
|
try {
|
|
227
233
|
window.localStorage.removeItem(e);
|
|
228
234
|
} catch {
|
|
229
235
|
}
|
|
230
236
|
}
|
|
231
|
-
function
|
|
237
|
+
function Zt(e) {
|
|
232
238
|
try {
|
|
233
239
|
window.sessionStorage.removeItem(e);
|
|
234
240
|
} catch {
|
|
235
241
|
}
|
|
236
242
|
}
|
|
237
|
-
function
|
|
238
|
-
const i =
|
|
243
|
+
function ei(e, t) {
|
|
244
|
+
const i = ti(e);
|
|
239
245
|
return i && t ? JSON.parse(i) : i;
|
|
240
246
|
}
|
|
241
|
-
function
|
|
242
|
-
const t = document.cookie, i = new RegExp(`(?:^|; )${
|
|
247
|
+
function ti(e) {
|
|
248
|
+
const t = document.cookie, i = new RegExp(`(?:^|; )${Kt(e)}=([^;]*)`, "u"), n = t.match(i);
|
|
243
249
|
return n ? decodeURIComponent(n[1]) : "";
|
|
244
250
|
}
|
|
245
|
-
function
|
|
251
|
+
function ii(e, t, i) {
|
|
246
252
|
i = i || {};
|
|
247
253
|
let n = i?.expires;
|
|
248
254
|
if (typeof n == "number") {
|
|
@@ -258,9 +264,9 @@ function ti(e, t, i) {
|
|
|
258
264
|
}
|
|
259
265
|
document.cookie = r;
|
|
260
266
|
}
|
|
261
|
-
async function
|
|
267
|
+
async function ni(e) {
|
|
262
268
|
const i = `owner:"${e.isPortal ? "esri" : "esri_config"}" AND title:"AppSwitcher Config" AND type:"Application Configuration"`, n = `${e.restUrl}/search`;
|
|
263
|
-
return await
|
|
269
|
+
return await U(n, { query: {
|
|
264
270
|
num: 1,
|
|
265
271
|
start: 0,
|
|
266
272
|
sortField: "title",
|
|
@@ -268,46 +274,46 @@ async function ii(e) {
|
|
|
268
274
|
q: i
|
|
269
275
|
} });
|
|
270
276
|
}
|
|
271
|
-
async function
|
|
277
|
+
async function ri(e) {
|
|
272
278
|
const t = { appSwitcher: { apps: [] } };
|
|
273
279
|
if (!e?.id || !e.user)
|
|
274
280
|
return t;
|
|
275
|
-
const { result: i } = await
|
|
281
|
+
const { result: i } = await ni(e), n = i?.results?.[0];
|
|
276
282
|
if (!n)
|
|
277
283
|
return t;
|
|
278
284
|
const r = n.id;
|
|
279
|
-
return (await
|
|
285
|
+
return (await Ae(e, r)).result;
|
|
280
286
|
}
|
|
281
|
-
async function
|
|
287
|
+
async function oi(e, t, i) {
|
|
282
288
|
if (!t || !e?.length)
|
|
283
289
|
return { result: null };
|
|
284
290
|
const n = `${i.restUrl}/search`;
|
|
285
|
-
return await
|
|
291
|
+
return await U(n, {
|
|
286
292
|
query: {
|
|
287
293
|
num: 100,
|
|
288
294
|
q: `id:(${e.map((r) => `"${r.itemId}"`).join(" OR ")})`
|
|
289
295
|
}
|
|
290
296
|
});
|
|
291
297
|
}
|
|
292
|
-
async function
|
|
298
|
+
async function si(e) {
|
|
293
299
|
const t = `${e.restUrl}/search`, i = {
|
|
294
300
|
num: 10,
|
|
295
301
|
start: 0,
|
|
296
302
|
sortField: "title",
|
|
297
303
|
sortOrder: "asc",
|
|
298
304
|
q: 'owner:"esri" AND title:"BlockedApps Config" AND type: "Application Configuration"'
|
|
299
|
-
}, { result: n } = await
|
|
300
|
-
return r ? (await
|
|
305
|
+
}, { result: n } = await U(t, { query: i }), r = n?.results?.[0]?.id;
|
|
306
|
+
return r ? (await Ae(e, r))?.result?.blockedApps || [] : [];
|
|
301
307
|
}
|
|
302
|
-
function
|
|
308
|
+
function ai(e, t) {
|
|
303
309
|
const i = e?.toLowerCase() || "", n = `${t.title || ""} ${t.label || ""}`;
|
|
304
310
|
return !i || n.toLowerCase().includes(i);
|
|
305
311
|
}
|
|
306
|
-
function
|
|
307
|
-
if (
|
|
312
|
+
function ci() {
|
|
313
|
+
if (Xt("APSW-query")?.expires > (/* @__PURE__ */ new Date()).setHours((/* @__PURE__ */ new Date()).getHours()))
|
|
308
314
|
return !0;
|
|
309
315
|
const t = { expires: (/* @__PURE__ */ new Date()).setHours((/* @__PURE__ */ new Date()).getHours() + 5) };
|
|
310
|
-
return
|
|
316
|
+
return Qt(
|
|
311
317
|
"APSW-query",
|
|
312
318
|
t,
|
|
313
319
|
{
|
|
@@ -317,13 +323,13 @@ function ai() {
|
|
|
317
323
|
}
|
|
318
324
|
), !1;
|
|
319
325
|
}
|
|
320
|
-
function
|
|
326
|
+
function li(e, t) {
|
|
321
327
|
const { landingPage: i } = t || {};
|
|
322
328
|
return {
|
|
323
329
|
image: "arcgis-online.png",
|
|
324
330
|
label: "ArcGIS Online",
|
|
325
331
|
title: "ArcGIS Online",
|
|
326
|
-
url: `${
|
|
332
|
+
url: `${W({ portal: e })}${i?.url ? i.url : $e(e.user) ? "organization.html" : "index.html"}`
|
|
327
333
|
};
|
|
328
334
|
}
|
|
329
335
|
function ge(e) {
|
|
@@ -409,10 +415,10 @@ function ge(e) {
|
|
|
409
415
|
"workflow-manager-beta",
|
|
410
416
|
"workflow-manager",
|
|
411
417
|
"workforce"
|
|
412
|
-
].find((n) => e?.includes(n) &&
|
|
413
|
-
return i ?
|
|
418
|
+
].find((n) => e?.includes(n) && z(`${n}.png`) === e);
|
|
419
|
+
return i ? z(`${i}.avif`) : e;
|
|
414
420
|
}
|
|
415
|
-
function
|
|
421
|
+
function ui(e, t) {
|
|
416
422
|
const i = e?.blockedApps || [], n = [];
|
|
417
423
|
return !i.length && !e.blockBetaApps || !t?.length ? [] : (e.blockBetaApps && t.forEach((r) => {
|
|
418
424
|
r.isBeta && !i.includes(r.clientid) && i.push(r.clientid);
|
|
@@ -424,10 +430,10 @@ function li(e, t) {
|
|
|
424
430
|
function x(e, t) {
|
|
425
431
|
return t && t[e.toLowerCase()]?.valid || !1;
|
|
426
432
|
}
|
|
427
|
-
function
|
|
433
|
+
function di(e, t) {
|
|
428
434
|
return e?.portalProperties && !e.portalProperties?.openData?.enabled ? !1 : x("HubforArcGIS", t);
|
|
429
435
|
}
|
|
430
|
-
function
|
|
436
|
+
function pi(e, t) {
|
|
431
437
|
if (!e)
|
|
432
438
|
return !1;
|
|
433
439
|
const i = [
|
|
@@ -437,39 +443,39 @@ function di(e, t) {
|
|
|
437
443
|
], r = (e?.privileges || []).some((s) => i.includes(s)), o = x("velocity", t);
|
|
438
444
|
return r && o;
|
|
439
445
|
}
|
|
440
|
-
function
|
|
446
|
+
function hi(e) {
|
|
441
447
|
return x("HubforArcGIS", e);
|
|
442
448
|
}
|
|
443
|
-
function
|
|
449
|
+
function mi(e, t) {
|
|
444
450
|
return !(e.isPortal && e.portalProperties?.newMapViewerEnabled === !1) && x("arcgisWebApps", t);
|
|
445
451
|
}
|
|
446
452
|
function fi(e) {
|
|
447
453
|
return !!e.helperServices?.rasterAnalytics && !!e.helperServices.orthoMapping;
|
|
448
454
|
}
|
|
449
|
-
function
|
|
455
|
+
function gi(e, t, i) {
|
|
450
456
|
const n = i && (!e.isPortal || !!e.sourceJSON?.supportsHostedNotebooks), r = !!t?.privileges?.length && t.privileges.some((o) => o === "premium:publisher:createNotebooks");
|
|
451
457
|
return n && r;
|
|
452
458
|
}
|
|
453
|
-
function
|
|
459
|
+
function bi(e, t) {
|
|
454
460
|
return !!e.helperServices?.locationTracking && t;
|
|
455
461
|
}
|
|
456
|
-
function
|
|
462
|
+
function vi(e, t, i, n) {
|
|
457
463
|
const r = e?.user;
|
|
458
464
|
return {
|
|
459
465
|
"Open Data": {
|
|
460
|
-
hasAccess: () =>
|
|
466
|
+
hasAccess: () => di(e, n)
|
|
461
467
|
},
|
|
462
468
|
AppStudio: {
|
|
463
469
|
hasAccess: () => x("arcgisWebApps", n)
|
|
464
470
|
},
|
|
465
471
|
"ArcGIS Velocity": {
|
|
466
|
-
hasAccess: () => e.isPortal ||
|
|
472
|
+
hasAccess: () => e.isPortal || pi(r, n)
|
|
467
473
|
},
|
|
468
474
|
"ArcGIS Hub": {
|
|
469
475
|
hasAccess: () => x("HubforArcGIS", n)
|
|
470
476
|
},
|
|
471
477
|
"ArcGIS Enterprise Sites": {
|
|
472
|
-
hasAccess: () =>
|
|
478
|
+
hasAccess: () => hi(n)
|
|
473
479
|
},
|
|
474
480
|
"ArcGIS QuickCapture Web Designer": {
|
|
475
481
|
hasAccess: () => x("arcgisWebApps", n)
|
|
@@ -478,7 +484,7 @@ function bi(e, t, i, n) {
|
|
|
478
484
|
hasAccess: () => x("dashboards", n)
|
|
479
485
|
},
|
|
480
486
|
"Map Viewer": {
|
|
481
|
-
hasAccess: () =>
|
|
487
|
+
hasAccess: () => mi(e, n)
|
|
482
488
|
},
|
|
483
489
|
"Map Viewer Classic": {
|
|
484
490
|
hasAccess: () => x("arcgisWebApps", n)
|
|
@@ -493,7 +499,7 @@ function bi(e, t, i, n) {
|
|
|
493
499
|
hasAccess: () => fi(e)
|
|
494
500
|
},
|
|
495
501
|
Notebook: {
|
|
496
|
-
hasAccess: () =>
|
|
502
|
+
hasAccess: () => gi(e, r, t)
|
|
497
503
|
},
|
|
498
504
|
"Scene Viewer": {
|
|
499
505
|
hasAccess: () => x("arcgisWebApps", n)
|
|
@@ -505,7 +511,7 @@ function bi(e, t, i, n) {
|
|
|
505
511
|
hasAccess: () => x("survey123", n)
|
|
506
512
|
},
|
|
507
513
|
"Track Viewer": {
|
|
508
|
-
hasAccess: () =>
|
|
514
|
+
hasAccess: () => bi(e, i)
|
|
509
515
|
},
|
|
510
516
|
"Instant Apps": {
|
|
511
517
|
// For Portal
|
|
@@ -516,7 +522,7 @@ function bi(e, t, i, n) {
|
|
|
516
522
|
}
|
|
517
523
|
};
|
|
518
524
|
}
|
|
519
|
-
function
|
|
525
|
+
function wi(e) {
|
|
520
526
|
let t = {
|
|
521
527
|
opsdashboard: 1,
|
|
522
528
|
arcgisWebApps: 1,
|
|
@@ -543,44 +549,44 @@ function vi(e) {
|
|
|
543
549
|
function ie(e) {
|
|
544
550
|
return e.sourceJSON?.subscriptionInfo?.options?.includes("Developer");
|
|
545
551
|
}
|
|
546
|
-
function
|
|
552
|
+
function z(e) {
|
|
547
553
|
return te(`assets/portal-navigation/apps/${e || ""}`);
|
|
548
554
|
}
|
|
549
|
-
function
|
|
555
|
+
function Te(e, t, i) {
|
|
550
556
|
return e.icon ? `${t.restUrl}/portals/self/resources/${e.icon}?token=${i}` : `${t.restUrl}/content/items/${e.itemId}/resources/${e.image || e.properties?.appSwitcher?.image}?token=${i}`;
|
|
551
557
|
}
|
|
552
|
-
function
|
|
553
|
-
if (e.image ? e.image =
|
|
558
|
+
function D(e, t, i) {
|
|
559
|
+
if (e.image ? e.image = z(e.image) : e.placeHolderIcon = `${z()}svg-app-icon.svg`, e.url?.startsWith("../")) {
|
|
554
560
|
const n = i.urlKey ? `${i.urlKey}.${i.customBaseUrl}` : i.portalHostname;
|
|
555
561
|
e.url = `${window.location.protocol}//${n}${e.url.substring(2, e.url.length)}`;
|
|
556
562
|
}
|
|
557
563
|
return delete e.isLicensed, delete e.privileges, e.itemId = t, e;
|
|
558
564
|
}
|
|
559
|
-
function
|
|
560
|
-
return `${
|
|
565
|
+
function Ne() {
|
|
566
|
+
return `${z()}svg-app-circle.svg`;
|
|
561
567
|
}
|
|
562
|
-
function
|
|
568
|
+
function yi(e, t, i) {
|
|
563
569
|
const n = e.properties?.appSwitcher?.image || e.icon;
|
|
564
570
|
return {
|
|
565
571
|
abbr: e.properties?.appSwitcher?.abbr || e.abbreviation,
|
|
566
572
|
itemId: e.itemId,
|
|
567
573
|
canAccess: !0,
|
|
568
574
|
webMappingApp: !0,
|
|
569
|
-
image: n ?
|
|
575
|
+
image: n ? Te(e, t, i) : void 0,
|
|
570
576
|
label: e.title || e.label,
|
|
571
577
|
url: e.url,
|
|
572
|
-
placeHolderIcon: e.placeHolderIcon ||
|
|
578
|
+
placeHolderIcon: e.placeHolderIcon || Ne()
|
|
573
579
|
};
|
|
574
580
|
}
|
|
575
581
|
function _i(e, t, i) {
|
|
576
|
-
return e.appSwitcher?.image || e.icon ? e.image =
|
|
582
|
+
return e.appSwitcher?.image || e.icon ? e.image = Te(e, t, i) : e.placeHolderIcon = Ne(), e.abbr = e.appSwitcher?.abbr || e.abbreviation, delete e.abbreviation, delete e.appSwitcher, delete e.approvedApp, delete e.webMappingApp, e;
|
|
577
583
|
}
|
|
578
584
|
function be(e, t) {
|
|
579
585
|
e.forEach((i) => {
|
|
580
586
|
i.uid === "Map Viewer Beta" && (i.uid = "Map Viewer"), t.isPortal && (i.uid === "Operations Dashboard for ArcGIS" ? i.uid = "ArcGIS Dashboards Classic" : i.uid === "Workforce for ArcGIS" && (i.uid = "ArcGIS Workforce"));
|
|
581
587
|
});
|
|
582
588
|
}
|
|
583
|
-
async function
|
|
589
|
+
async function $i({
|
|
584
590
|
userApps: e,
|
|
585
591
|
servers: t,
|
|
586
592
|
portal: i,
|
|
@@ -589,78 +595,78 @@ async function yi({
|
|
|
589
595
|
provisionedListings: o,
|
|
590
596
|
orgCapabilities: s,
|
|
591
597
|
trackViewerEnabled: a,
|
|
592
|
-
notebookServerEnabled:
|
|
593
|
-
willQueryForItems:
|
|
594
|
-
approvedApps:
|
|
598
|
+
notebookServerEnabled: c,
|
|
599
|
+
willQueryForItems: h,
|
|
600
|
+
approvedApps: f
|
|
595
601
|
}) {
|
|
596
|
-
const
|
|
597
|
-
for (let
|
|
598
|
-
const
|
|
599
|
-
let
|
|
600
|
-
const
|
|
601
|
-
const
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
(
|
|
602
|
+
const g = {}, d = {}, A = vi(i, c, a, n), k = wi(i), w = [], P = e.length;
|
|
603
|
+
for (let m = 0; m < P; m++) {
|
|
604
|
+
const u = e[m], v = u.itemId || u.title;
|
|
605
|
+
let T = !0;
|
|
606
|
+
const p = !u.serverFunction || t?.some((I) => {
|
|
607
|
+
const V = (I.serverFunction?.split(",") || []).includes(u.serverFunction);
|
|
608
|
+
return V && u.serverFunction === "Velocity" && (u.url = I.url), V;
|
|
609
|
+
}), $ = r?.some(
|
|
610
|
+
(I) => u.itemId && u.itemId === I.itemid || u.title && u.title === I.title
|
|
605
611
|
);
|
|
606
|
-
if (v
|
|
612
|
+
if (g[v] = 1, d[v] = u, $ || ie(i) && !u.showInLocationPlatform || i.sourceJSON?.portalDeploymentType === "ArcGISEnterpriseOnKubernetes" && u.supportsKubernetes === !1)
|
|
607
613
|
continue;
|
|
608
|
-
const
|
|
609
|
-
if (S
|
|
614
|
+
const S = u.title;
|
|
615
|
+
if (A[S] && !A[S]?.hasAccess())
|
|
610
616
|
continue;
|
|
611
|
-
const
|
|
612
|
-
if (
|
|
613
|
-
|
|
617
|
+
const O = i.sourceJSON?.subscriptionInfo;
|
|
618
|
+
if (u.subscriptionType) {
|
|
619
|
+
O?.type === u.subscriptionType && (d[v].canAccess = !0, w.push(D(u, v, i)));
|
|
614
620
|
continue;
|
|
615
621
|
}
|
|
616
|
-
if (
|
|
617
|
-
s?.length && s.some((
|
|
622
|
+
if (u.orgCapabilities) {
|
|
623
|
+
s?.length && s.some((C) => u.orgCapabilities?.includes(C.id)) && (d[v].canAccess = !0, w.push(D(u, v, i)));
|
|
618
624
|
continue;
|
|
619
625
|
}
|
|
620
|
-
if (!
|
|
621
|
-
d[
|
|
626
|
+
if (!u.privileges?.length && !u.isLicensed && p && (u.label !== "ArcGIS Location Platform" || ie(i))) {
|
|
627
|
+
d[v].canAccess = !0, w.push(D(u, v, i));
|
|
622
628
|
continue;
|
|
623
629
|
}
|
|
624
|
-
if (i.user?.sourceJSON?.userLicenseTypeId?.toLowerCase() === "storytellerut" &&
|
|
625
|
-
d[
|
|
630
|
+
if (i.user?.sourceJSON?.userLicenseTypeId?.toLowerCase() === "storytellerut" && u.label?.toLowerCase() === "storymaps") {
|
|
631
|
+
d[v].canAccess = !0, w.push(D(u, v, i));
|
|
626
632
|
continue;
|
|
627
633
|
}
|
|
628
|
-
if (
|
|
629
|
-
for (let
|
|
630
|
-
if (!i.user.privileges.includes(
|
|
631
|
-
|
|
634
|
+
if (u.privileges?.length && i.user?.privileges) {
|
|
635
|
+
for (let I = 0; I < u.privileges.length; I++)
|
|
636
|
+
if (!i.user.privileges.includes(u.privileges[I])) {
|
|
637
|
+
T = !1;
|
|
632
638
|
break;
|
|
633
639
|
}
|
|
634
|
-
if (!
|
|
635
|
-
d[
|
|
640
|
+
if (!u.isLicensed && T && p) {
|
|
641
|
+
d[v].canAccess = !0, w.push(D(u, v, i));
|
|
636
642
|
continue;
|
|
637
643
|
}
|
|
638
644
|
}
|
|
639
|
-
if (
|
|
640
|
-
for (let
|
|
641
|
-
if (
|
|
642
|
-
d[
|
|
645
|
+
if (u.isLicensed && T && p) {
|
|
646
|
+
for (let I = 0; I < o.length; I++)
|
|
647
|
+
if (v === o[I].itemId || v === o[I].title) {
|
|
648
|
+
d[v].canAccess = !0, w.push(D(u, v, i));
|
|
643
649
|
break;
|
|
644
650
|
}
|
|
645
651
|
}
|
|
646
652
|
}
|
|
647
|
-
const
|
|
648
|
-
return o.forEach((
|
|
649
|
-
if (
|
|
650
|
-
const
|
|
651
|
-
d[
|
|
653
|
+
const y = await Ct(i);
|
|
654
|
+
return o.forEach((m) => {
|
|
655
|
+
if (m.type === "Web Mapping Application" && !k[m.clientId] && !g[m.itemId] && m.url && m.title && !g[m.title] && !m.typeKeywords.includes("hideFromAppSwitcher")) {
|
|
656
|
+
const u = yi(m, i, y);
|
|
657
|
+
d[m.itemId] = u, w.push(u);
|
|
652
658
|
}
|
|
653
659
|
}), {
|
|
654
660
|
apps: [
|
|
655
|
-
...
|
|
656
|
-
const
|
|
657
|
-
...
|
|
658
|
-
itemId:
|
|
661
|
+
...f.map((m) => {
|
|
662
|
+
const u = {
|
|
663
|
+
...m.appProperties,
|
|
664
|
+
itemId: m.itemId,
|
|
659
665
|
webMappingApp: !0,
|
|
660
666
|
approvedApp: !0,
|
|
661
|
-
canAccess: !
|
|
667
|
+
canAccess: !h
|
|
662
668
|
};
|
|
663
|
-
return d[
|
|
669
|
+
return d[m.itemId] = u, _i(u, i, y);
|
|
664
670
|
}),
|
|
665
671
|
...w
|
|
666
672
|
],
|
|
@@ -680,92 +686,92 @@ function ve({
|
|
|
680
686
|
portal: r
|
|
681
687
|
}) {
|
|
682
688
|
let s = Object.keys(i).map((a) => i[a]).filter((a) => a.itemId === t.uid || a.title === t.uid).shift();
|
|
683
|
-
return s && !i[t.uid] && (t.uid = s.itemId || s.title || ""), s?.hasBeenPopulated || (s ? ((t.hasChanged || s.hasChanged || !s.canAccess && !s.ignoreNoAccess) &&
|
|
689
|
+
return s && !i[t.uid] && (t.uid = s.itemId || s.title || ""), s?.hasBeenPopulated || (s ? ((t.hasChanged || s.hasChanged || !s.canAccess && !s.ignoreNoAccess) && $e(r.user) && (i[t.uid].hasChanged = !0, i[t.uid].ignoreNoAccess = t.ignoreNoAccess), t.isNew && (i[t.uid].isNew = !0), delete n[t.uid]) : (s = t, s.canAccess = !1, s.itemId = t.uid, i[t.uid] = s), i[t.uid].hasBeenPopulated = !0, e.push(s)), e;
|
|
684
690
|
}
|
|
685
|
-
async function
|
|
691
|
+
async function Ai({
|
|
686
692
|
portal: e,
|
|
687
693
|
trackViewerEnabled: t,
|
|
688
694
|
notebookServerEnabled: i
|
|
689
695
|
}) {
|
|
690
696
|
if (!e?.id || !e.user)
|
|
691
697
|
return { apps: [], hiddenApps: {} };
|
|
692
|
-
const n =
|
|
693
|
-
|
|
694
|
-
Pt(e),
|
|
698
|
+
const n = ci(), [r, o, s, a, c, h, f] = await Promise.all([
|
|
699
|
+
ri(e),
|
|
695
700
|
Tt(e),
|
|
696
|
-
|
|
701
|
+
Nt(e),
|
|
697
702
|
At(e),
|
|
698
703
|
kt(e),
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
704
|
+
St(e),
|
|
705
|
+
si(e)
|
|
706
|
+
]), g = e.isPortal ? await It(e) : null, d = s?.result?.properties;
|
|
707
|
+
let A = r?.appSwitcher?.apps || [];
|
|
708
|
+
e.isPortal || (A = A.filter(
|
|
709
|
+
(p) => p.title !== "Map Viewer Classic" || e.sourceJSON.created < /* @__PURE__ */ new Date("February 26 2025")
|
|
710
|
+
), A.unshift(li(e, d)));
|
|
711
|
+
const k = a?.result?.approvedApps?.filter((p) => !p.hideForNonPrivilegedMember) || [], w = {};
|
|
712
|
+
o?.forEach((p) => {
|
|
713
|
+
const $ = p.clientId?.toLowerCase();
|
|
714
|
+
$ && (w[$] = {
|
|
709
715
|
valid: !0,
|
|
710
|
-
itemId:
|
|
711
|
-
clientId:
|
|
716
|
+
itemId: p.itemId,
|
|
717
|
+
clientId: p.clientId
|
|
712
718
|
});
|
|
713
|
-
}),
|
|
714
|
-
const
|
|
715
|
-
|
|
719
|
+
}), c?.forEach((p) => {
|
|
720
|
+
const $ = p.id?.toLowerCase();
|
|
721
|
+
$ && (w[$] = {
|
|
716
722
|
valid: !0,
|
|
717
|
-
clientId:
|
|
723
|
+
clientId: p.id
|
|
718
724
|
});
|
|
719
725
|
});
|
|
720
|
-
const P =
|
|
721
|
-
userApps:
|
|
722
|
-
servers:
|
|
726
|
+
const P = ui(h, f), { apps: y, appDictionary: b } = await $i({
|
|
727
|
+
userApps: A,
|
|
728
|
+
servers: g,
|
|
723
729
|
portal: e,
|
|
724
730
|
blockedApps: P,
|
|
725
731
|
provisionedListings: o,
|
|
726
|
-
orgCapabilities:
|
|
732
|
+
orgCapabilities: c,
|
|
727
733
|
licenses: w,
|
|
728
734
|
trackViewerEnabled: t,
|
|
729
735
|
notebookServerEnabled: i,
|
|
730
736
|
willQueryForItems: n,
|
|
731
|
-
approvedApps:
|
|
737
|
+
approvedApps: k
|
|
732
738
|
});
|
|
733
739
|
d?.appLauncher && (d?.appLauncher.primary && be(d?.appLauncher.primary, e), d?.appLauncher.secondary && be(d?.appLauncher.secondary, e));
|
|
734
|
-
let
|
|
740
|
+
let m = [], u = [];
|
|
735
741
|
if (!d?.appLauncher?.primary || !d?.appLauncher.secondary)
|
|
736
|
-
|
|
742
|
+
m = y.slice().sort((p, $) => (p.label || "") < ($.label || "") ? -1 : 1), m = ee(m, P), u = [];
|
|
737
743
|
else {
|
|
738
|
-
const { result:
|
|
739
|
-
|
|
740
|
-
const
|
|
741
|
-
|
|
744
|
+
const { result: p } = await oi(k, n, e);
|
|
745
|
+
p?.results?.length && p.results.forEach((_) => {
|
|
746
|
+
const S = b[_.id];
|
|
747
|
+
S.canAccess = !0, S.hasChanged = S.url !== _.url ? !!_.url : !1;
|
|
742
748
|
});
|
|
743
|
-
const
|
|
744
|
-
d?.appLauncher?.primary?.forEach((
|
|
745
|
-
|
|
746
|
-
}),
|
|
747
|
-
(
|
|
749
|
+
const $ = { ...b };
|
|
750
|
+
d?.appLauncher?.primary?.forEach((_) => {
|
|
751
|
+
_.label === "Map Viewer" && (_.uid = "Map Viewer");
|
|
752
|
+
}), m = d?.appLauncher.primary.reduce(
|
|
753
|
+
(_, S) => ve({ apps: _, app: S, appDictionary: b, newAppDictionary: $, portal: e }),
|
|
748
754
|
[]
|
|
749
|
-
) || [],
|
|
750
|
-
(
|
|
755
|
+
) || [], u = d?.appLauncher.secondary.reduce(
|
|
756
|
+
(_, S) => ve({ apps: _, app: S, appDictionary: b, newAppDictionary: $, portal: e }),
|
|
751
757
|
[]
|
|
752
|
-
) || [],
|
|
753
|
-
for (const
|
|
754
|
-
_
|
|
758
|
+
) || [], m = ee(m, P), u = ee(u, P), ie(e) && (m = m.filter((_) => _.canAccess), u = u.filter((_) => _.canAccess));
|
|
759
|
+
for (const _ of Object.keys($))
|
|
760
|
+
$[_].canAccess && ($[_].isNew = !0, b[_] = $[_], m.push($[_]));
|
|
755
761
|
}
|
|
756
|
-
const
|
|
762
|
+
const v = [...m, ...u], T = u.reduce((p, $) => ($.itemId && (p[$.itemId] = !0), p), {});
|
|
757
763
|
return {
|
|
758
|
-
apps:
|
|
759
|
-
hiddenApps:
|
|
760
|
-
signInSettings:
|
|
764
|
+
apps: v,
|
|
765
|
+
hiddenApps: T,
|
|
766
|
+
signInSettings: h,
|
|
761
767
|
licenses: w,
|
|
762
768
|
userProperties: d
|
|
763
769
|
};
|
|
764
770
|
}
|
|
765
|
-
function
|
|
771
|
+
function ki(e, t) {
|
|
766
772
|
return !e?.itemId || !t ? !1 : t[e.itemId];
|
|
767
773
|
}
|
|
768
|
-
async function
|
|
774
|
+
async function Si({
|
|
769
775
|
apps: e,
|
|
770
776
|
hiddenApps: t,
|
|
771
777
|
userProperties: i,
|
|
@@ -773,52 +779,52 @@ async function ki({
|
|
|
773
779
|
}) {
|
|
774
780
|
const r = e.reduce(
|
|
775
781
|
(s, a) => {
|
|
776
|
-
const
|
|
777
|
-
return s[
|
|
782
|
+
const c = t[a.itemId];
|
|
783
|
+
return s[c ? "secondary" : "primary"].push({
|
|
778
784
|
label: a.label,
|
|
779
785
|
uid: a.itemId || a.title
|
|
780
786
|
}), s;
|
|
781
787
|
},
|
|
782
788
|
{ primary: [], secondary: [] }
|
|
783
789
|
), o = { ...i || {}, appLauncher: r };
|
|
784
|
-
return await
|
|
790
|
+
return await Pt(o, n);
|
|
785
791
|
}
|
|
786
|
-
function
|
|
792
|
+
function Ce({ app: e }) {
|
|
787
793
|
if (!e)
|
|
788
794
|
return null;
|
|
789
795
|
if (!e.canAccess)
|
|
790
|
-
return
|
|
796
|
+
return l`<span class="list-item__logo list-item__logo-empty"></span>`;
|
|
791
797
|
const t = !e.image && e.abbr;
|
|
792
|
-
return
|
|
798
|
+
return l`${t && l`<span class="list-item__logo">${e.placeHolderIcon && l`<img src=${ge(e.placeHolderIcon) ?? L} class="list-item__logo-bg" alt>` || ""}<span style=${_e({ fontSize: e.fontSize || "20px" })} class="list-item__abbr">${e.abbr}</span></span>` || ""}${e.image && l`<img src=${ge(e.image) ?? L} class="list-item__logo" alt>` || ""}${e.isNew && l`<span class=${oe({ "list-item__indicator": !0 })}></span>` || ""}`;
|
|
793
799
|
}
|
|
794
|
-
function
|
|
800
|
+
function Ii({ app: e, hiddenApps: t, messages: i, toggleAppVisibility: n }) {
|
|
795
801
|
if (!e || !i)
|
|
796
802
|
return null;
|
|
797
|
-
const r =
|
|
798
|
-
return
|
|
803
|
+
const r = ki(e, t), { title: o, itemId: s, label: a } = e;
|
|
804
|
+
return l`<calcite-list-item .label=${o || a} class=${oe(r ? "app--hidden" : "")}><span slot=content-start>${Ce({ app: e })}</span><calcite-action .text=${r ? i.show : i.hide} .icon=${r ? "view-hide" : "view-visible"} slot=actions-end @click=${() => s && n(s, !r)}></calcite-action></calcite-list-item>`;
|
|
799
805
|
}
|
|
800
|
-
function
|
|
806
|
+
function xi({ app: e, messages: t }) {
|
|
801
807
|
if (!e || !t)
|
|
802
808
|
return null;
|
|
803
809
|
const { title: i, itemId: n, label: r, url: o, isNew: s } = e, a = t?.descriptions?.[i] || t?.descriptions?.[r];
|
|
804
|
-
return
|
|
810
|
+
return l`<li class="list-item" id=${n ?? L}><a class="list-item__link" href=${o ?? L}>${l`<span class="list-item__container">${Ce({ app: e })}<span class="list-item__title">${i || r}</span>${s && l`<calcite-chip scale=s class="list-item__chip" icon=asterisk-small .label=${t.new}>${t.new}</calcite-chip>` || ""}</span>`}</a>${a && l`<calcite-tooltip .referenceElement=${n} placement=trailing>${a}</calcite-tooltip>` || ""}</li>`;
|
|
805
811
|
}
|
|
806
|
-
function
|
|
812
|
+
function Pi({ apps: e, appsLoading: t, appsSearchTerm: i, hiddenApps: n, messages: r, handleAppsSearch: o, handleAppReorder: s, handleAppSave: a, handleAppHide: c, handleAppCancel: h, handleAppEdit: f, editingApplications: g, portal: d }) {
|
|
807
813
|
if (!e || !r)
|
|
808
814
|
return null;
|
|
809
|
-
const
|
|
810
|
-
return
|
|
811
|
-
|
|
815
|
+
const A = i?.length > 0, k = (e || []).filter((y) => y.itemId && (!n?.[y.itemId] || A) && ai(i, y)), w = A ? r.noAppResults.replace("${term}", i) : r.noAppsAvailable, P = A ? M(d) ? r.noAppsDescriptionPublic : r.noAppResultsDescriptionOrg : r.noAppsAvailable;
|
|
816
|
+
return g ? l`<div class="list__header"><calcite-button appearance=outline width=half @click=${() => {
|
|
817
|
+
h();
|
|
812
818
|
}}>${r.cancel}</calcite-button><calcite-button width=half @click=${() => {
|
|
813
819
|
a();
|
|
814
|
-
}}>${r.applyChanges}</calcite-button></div><calcite-list .label=${r.allMyApplications} drag-enabled @calciteListDragEnd=${(
|
|
815
|
-
const { newIndex:
|
|
816
|
-
s({ newIndex:
|
|
817
|
-
}} .loading=${t}>${
|
|
818
|
-
|
|
819
|
-
} }))}</calcite-list>` :
|
|
820
|
-
o(
|
|
821
|
-
}}></calcite-input><calcite-button appearance=transparent kind=neutral icon-start=reorder-cards .label=${r.reorder} @click=${() =>
|
|
820
|
+
}}>${r.applyChanges}</calcite-button></div><calcite-list .label=${r.allMyApplications} drag-enabled @calciteListDragEnd=${(y) => {
|
|
821
|
+
const { newIndex: b, oldIndex: m } = y.detail;
|
|
822
|
+
s({ newIndex: b, oldIndex: m });
|
|
823
|
+
}} .loading=${t}>${G(e, (y) => y.itemId, (y) => Ii({ app: y, hiddenApps: n, messages: r, toggleAppVisibility: (b, m) => {
|
|
824
|
+
c({ app: b, hidden: m });
|
|
825
|
+
} }))}</calcite-list>` : l`<div class="list__header"><calcite-input type=search icon .placeholder=${r.searchMyApps} scale=m class="list__search" @calciteInputInput=${(y) => {
|
|
826
|
+
o(y.currentTarget.value);
|
|
827
|
+
}}></calcite-input><calcite-button appearance=transparent kind=neutral icon-start=reorder-cards .label=${r.reorder} @click=${() => f()}></calcite-button></div>${k?.length > 0 ? l`<ul class="list">${G(k, (y) => y.itemId, (y) => xi({ app: y, messages: r }))}</ul>` : K({ title: w, description: P, icon: i ? "search" : "apps" })}`;
|
|
822
828
|
}
|
|
823
829
|
const we = "portalAppClientId", le = {
|
|
824
830
|
GeoanalyticsEngine: "geoanalyticsengine",
|
|
@@ -831,13 +837,13 @@ function ue(e) {
|
|
|
831
837
|
function de(e) {
|
|
832
838
|
return le.GeoanalyticsFabric === e;
|
|
833
839
|
}
|
|
834
|
-
function
|
|
840
|
+
function Me(e) {
|
|
835
841
|
return le.IndoorsOnline === e;
|
|
836
842
|
}
|
|
837
843
|
function pe(e) {
|
|
838
844
|
return ["Location Platform", "GeoAnalytics Fabric", "GeoAnalytics Engine", "Online", "Enterprise"].includes(e);
|
|
839
845
|
}
|
|
840
|
-
function
|
|
846
|
+
function Ti({
|
|
841
847
|
portal: e,
|
|
842
848
|
messages: t,
|
|
843
849
|
licenses: i,
|
|
@@ -846,67 +852,68 @@ function Pi({
|
|
|
846
852
|
}) {
|
|
847
853
|
if (!t || !e)
|
|
848
854
|
return [];
|
|
849
|
-
const o = e.sourceJSON?.subscriptionInfo, s =
|
|
855
|
+
const o = e.sourceJSON?.subscriptionInfo, s = Li({ messages: t, portal: e });
|
|
850
856
|
if (!e.user)
|
|
851
857
|
return s;
|
|
852
|
-
if (!e || !s || e?.user && !i && !
|
|
858
|
+
if (!e || !s || e?.user && !i && !M(e))
|
|
853
859
|
return [];
|
|
854
860
|
const a = Oi({
|
|
855
861
|
portal: e,
|
|
856
862
|
licenses: i,
|
|
857
863
|
subscriptionInfo: o
|
|
858
864
|
});
|
|
859
|
-
return
|
|
865
|
+
return Ei({ messages: t, portal: e, clientId: n, signInSettings: r, navLinkDictionary: a });
|
|
860
866
|
}
|
|
861
|
-
function
|
|
867
|
+
function Ni(e) {
|
|
862
868
|
const { id: t, access: i, isPortal: n } = e;
|
|
863
869
|
return !t && !i && !n;
|
|
864
870
|
}
|
|
865
|
-
function
|
|
866
|
-
|
|
871
|
+
function Ci(e, t) {
|
|
872
|
+
const i = new URL(e), n = t || window.location.pathname;
|
|
873
|
+
return i.pathname === n;
|
|
867
874
|
}
|
|
868
|
-
function
|
|
875
|
+
function Le({
|
|
869
876
|
portal: e,
|
|
870
877
|
clientId: t,
|
|
871
878
|
signInSettings: i
|
|
872
879
|
}) {
|
|
873
|
-
const n = e.user, r =
|
|
880
|
+
const n = e.user, r = Me(t), o = !!i?.blockedApps?.includes("arcgisnotebooks"), {
|
|
874
881
|
gallery: s = "all",
|
|
875
882
|
groups: a = "all",
|
|
876
|
-
map:
|
|
877
|
-
notebook:
|
|
878
|
-
scene:
|
|
883
|
+
map: c = "all",
|
|
884
|
+
notebook: h = "notebookCreators",
|
|
885
|
+
scene: f = "all"
|
|
879
886
|
} = e.portalProperties?.topNav || {};
|
|
880
|
-
let
|
|
887
|
+
let g = ["home"];
|
|
881
888
|
if (!n) {
|
|
882
889
|
if (!e.portalProperties?.topNav) {
|
|
883
|
-
const
|
|
884
|
-
return [...
|
|
890
|
+
const A = ["gallery", "map", "scene", "groups"], k = e.isPortal ? ["help"] : [];
|
|
891
|
+
return [...g, ...A, ...k];
|
|
885
892
|
}
|
|
886
893
|
return [
|
|
887
|
-
...
|
|
894
|
+
...g,
|
|
888
895
|
...s === "all" ? ["gallery"] : [],
|
|
889
|
-
...
|
|
890
|
-
...
|
|
896
|
+
...c === "all" ? ["map"] : [],
|
|
897
|
+
...f === "all" ? ["scene"] : [],
|
|
891
898
|
...a === "all" ? ["groups"] : [],
|
|
892
899
|
...e.isPortal ? ["help"] : []
|
|
893
900
|
];
|
|
894
901
|
}
|
|
895
902
|
const d = n.orgId === e.id;
|
|
896
|
-
return !e.portalProperties?.topNav &&
|
|
897
|
-
...
|
|
903
|
+
return !e.portalProperties?.topNav && M(e) ? g = ["ArcGIS", "overview", "pricing", "map", "scene", "groups", "myContent"] : g = [
|
|
904
|
+
...g,
|
|
898
905
|
...(s === "all" || s === "members" && d) && !r ? ["gallery"] : [],
|
|
899
|
-
...(
|
|
900
|
-
...(
|
|
901
|
-
...!o && (!e.isPortal || e.sourceJSON.supportsHostedNotebooks) && (
|
|
906
|
+
...(c === "all" || c === "members" && d || c === "mapCreators" && he(n)) && !r ? ["map"] : [],
|
|
907
|
+
...(f === "all" || f === "members" && d || f === "sceneCreators" && he(n)) && !r ? ["scene"] : [],
|
|
908
|
+
...!o && (!e.isPortal || e.sourceJSON.supportsHostedNotebooks) && (h === "members" && d || h === "notebookCreators" && $t(n)) && !r ? ["notebook"] : [],
|
|
902
909
|
...(a === "all" || a === "members" && d) && !r ? ["groups"] : [],
|
|
903
910
|
...d && !r ? ["myContent", "organization"] : []
|
|
904
|
-
],
|
|
911
|
+
], g;
|
|
905
912
|
}
|
|
906
|
-
function
|
|
907
|
-
return `${
|
|
913
|
+
function E(e) {
|
|
914
|
+
return `${vt({ portal: e })}/`;
|
|
908
915
|
}
|
|
909
|
-
function
|
|
916
|
+
function Mi({
|
|
910
917
|
keys: e,
|
|
911
918
|
navLinkDictionary: t,
|
|
912
919
|
messages: i
|
|
@@ -915,42 +922,43 @@ function Ci({
|
|
|
915
922
|
return e.forEach((r) => {
|
|
916
923
|
const o = t[r];
|
|
917
924
|
if (o && (!("show" in o) || o.show)) {
|
|
918
|
-
const { href: s, newTab: a, icon:
|
|
925
|
+
const { href: s, newTab: a, icon: c, relativePath: h } = o;
|
|
919
926
|
n.push({
|
|
920
927
|
label: i[r],
|
|
921
928
|
href: s,
|
|
922
929
|
newTab: a,
|
|
923
|
-
|
|
930
|
+
relativePath: h,
|
|
931
|
+
icon: c
|
|
924
932
|
});
|
|
925
933
|
}
|
|
926
934
|
}), n;
|
|
927
935
|
}
|
|
928
|
-
function
|
|
936
|
+
function Li({
|
|
929
937
|
messages: e,
|
|
930
938
|
portal: t
|
|
931
939
|
}) {
|
|
932
940
|
if (!e || !t)
|
|
933
941
|
return [];
|
|
934
|
-
const i =
|
|
942
|
+
const i = E(t), n = {
|
|
935
943
|
overview: { label: e.overview, href: `${i}../features/features.html`, icon: "information" },
|
|
936
944
|
pricing: { label: e.pricing, href: `${i}../features/plans/pricing.html`, icon: "credit-card" },
|
|
937
945
|
map: { label: e.map, href: `${i}apps/mapviewer/index.html`, icon: "map" },
|
|
938
946
|
scene: { label: e.scene, href: `${i}webscene/viewer.html`, icon: "globe" },
|
|
939
947
|
help: { label: e.help, href: se(t), newTab: !0, icon: "headset" },
|
|
940
|
-
home: { label: e.home, href: `${i}index.html`, icon: "home" },
|
|
941
|
-
gallery: { label: e.gallery, href: `${i}gallery.html`, icon: "gallery" },
|
|
942
|
-
groups: { label: e.groups, href: `${i}groups.html`, icon: "group" }
|
|
948
|
+
home: { label: e.home, href: `${i}index.html`, relativePath: "index.html", icon: "home" },
|
|
949
|
+
gallery: { label: e.gallery, href: `${i}gallery.html`, relativePath: "gallery.html", icon: "gallery" },
|
|
950
|
+
groups: { label: e.groups, href: `${i}groups.html`, relativePath: "groups.html", icon: "group" }
|
|
943
951
|
};
|
|
944
|
-
return (
|
|
952
|
+
return (Ni(t) ? ["overview", "pricing", "map", "scene", "help"] : Le({ portal: t })).map((o) => n[o]);
|
|
945
953
|
}
|
|
946
|
-
function
|
|
954
|
+
function Ei({
|
|
947
955
|
messages: e,
|
|
948
956
|
portal: t,
|
|
949
957
|
clientId: i,
|
|
950
958
|
signInSettings: n,
|
|
951
959
|
navLinkDictionary: r
|
|
952
960
|
}) {
|
|
953
|
-
const o = ue(i), s =
|
|
961
|
+
const o = ue(i), s = Le({ portal: t, clientId: i, signInSettings: n }), a = `${E(t)}geoanalytics${o ? "engine" : "fabric"}.html`;
|
|
954
962
|
return o || de(i) ? [
|
|
955
963
|
{
|
|
956
964
|
// TODO: active calculations in the component need to account for hash for these options
|
|
@@ -971,27 +979,29 @@ function Li({
|
|
|
971
979
|
href: `${a}#account`,
|
|
972
980
|
label: e.account
|
|
973
981
|
}
|
|
974
|
-
] :
|
|
982
|
+
] : Mi({ keys: s, messages: e, navLinkDictionary: r });
|
|
975
983
|
}
|
|
976
984
|
function Oi({
|
|
977
985
|
portal: e,
|
|
978
986
|
licenses: t,
|
|
979
987
|
subscriptionInfo: i
|
|
980
988
|
}) {
|
|
981
|
-
const n = e.user, r =
|
|
989
|
+
const n = e.user, r = E(e), o = i?.options?.includes("Developer"), s = x("arcgiswebapps", t) || o && x("locationplatformwebapps", t) || M(e);
|
|
982
990
|
return {
|
|
983
991
|
pricing: { href: `${r}../features/plans/pricing.html` },
|
|
984
992
|
overview: { href: `${r}../features/features.html` },
|
|
985
993
|
ArcGIS: {
|
|
986
|
-
href: `${r}${
|
|
987
|
-
show:
|
|
994
|
+
href: `${r}${M(e) ? "index.html" : "../features/features.html"}`,
|
|
995
|
+
show: M(e) || !n
|
|
988
996
|
},
|
|
989
997
|
groups: {
|
|
990
998
|
href: `${r}groups.html`,
|
|
999
|
+
relativePath: "groups.html",
|
|
991
1000
|
icon: "group"
|
|
992
1001
|
},
|
|
993
1002
|
myContent: {
|
|
994
1003
|
href: `${r}content.html`,
|
|
1004
|
+
relativePath: "content.html",
|
|
995
1005
|
icon: "files"
|
|
996
1006
|
},
|
|
997
1007
|
map: {
|
|
@@ -1006,11 +1016,13 @@ function Oi({
|
|
|
1006
1016
|
gallery: {
|
|
1007
1017
|
show: !!e.id && !o,
|
|
1008
1018
|
href: `${r}gallery.html`,
|
|
1019
|
+
relativePath: "gallery.html",
|
|
1009
1020
|
icon: "gallery"
|
|
1010
1021
|
},
|
|
1011
1022
|
home: {
|
|
1012
|
-
show: !
|
|
1023
|
+
show: !M(e) && !o,
|
|
1013
1024
|
href: `${r}index.html`,
|
|
1025
|
+
relativePath: "index.html",
|
|
1014
1026
|
icon: "home"
|
|
1015
1027
|
},
|
|
1016
1028
|
scene: {
|
|
@@ -1019,33 +1031,41 @@ function Oi({
|
|
|
1019
1031
|
icon: "globe"
|
|
1020
1032
|
},
|
|
1021
1033
|
notebook: {
|
|
1022
|
-
show:
|
|
1034
|
+
show: wt(e),
|
|
1023
1035
|
href: `${r}notebook/notebookhome.html`,
|
|
1036
|
+
relativePath: "notebook/notebookhome.html",
|
|
1024
1037
|
icon: "notebook"
|
|
1025
1038
|
},
|
|
1026
1039
|
organization: {
|
|
1027
|
-
show: !
|
|
1040
|
+
show: !M(e),
|
|
1028
1041
|
href: `${r}organization.html`,
|
|
1042
|
+
relativePath: "organization.html",
|
|
1029
1043
|
icon: "organization"
|
|
1030
1044
|
},
|
|
1031
1045
|
features: {
|
|
1032
|
-
show:
|
|
1046
|
+
show: M(e) && !e.isPortal,
|
|
1033
1047
|
href: `${r}../features/features.html`,
|
|
1034
1048
|
icon: "information"
|
|
1035
1049
|
}
|
|
1036
1050
|
};
|
|
1037
1051
|
}
|
|
1038
|
-
function
|
|
1052
|
+
function ji({ portal: e, item: t, messages: i, navigate: n, locale: r }) {
|
|
1039
1053
|
if (!t || !i || !t.modified)
|
|
1040
1054
|
return null;
|
|
1041
|
-
const o = t.modified, s = { lessThanOneMinute: i.lessThanOneMinute }, a =
|
|
1042
|
-
return ce(t.id,
|
|
1055
|
+
const o = t.modified, s = { lessThanOneMinute: i.lessThanOneMinute }, a = ke(Se(o)), c = a?.[1] === "year" || a?.[1] === "month" ? Ft({ locale: r, time: o }, a?.[1] === "year") : Ie({ locale: r, time: o, t9n: s }), h = `item.html?id=${t.id}`, f = `${E(e)}${h}}`;
|
|
1056
|
+
return ce(t.id, l`<li class="list-item"><a class="list-item__link" href=${f ?? L} @click=${(g) => {
|
|
1057
|
+
n({ event: g, href: f, relativePath: h });
|
|
1058
|
+
}}>${l`<span class="list-item__container"><span class="list-item__logo list-item__logo--item-type"><arcgis-portal-item-type .item=${t} .user=${e.user} hide-text></arcgis-portal-item-type></span><span class="list-item__content"><span class="list-item__title list-item__title--regular">${t.title}</span><span class="list-item__subtitle">${Q(i.lastUpdated, { date: c })}</span></span></span>`}</a></li>`);
|
|
1043
1059
|
}
|
|
1044
|
-
function
|
|
1045
|
-
if (!
|
|
1060
|
+
function Di({ locale: e, navigate: t, portal: i, open: n, apps: r, appsLoading: o, hiddenApps: s, appsSearchTerm: a, handlePlatformClose: c, handleAppsSearch: h, handleAppReorder: f, handleAppSave: g, handleAppHide: d, handleAppCancel: A, handleAppEdit: k, handleItemSearch: w, editingApplications: P, recentContent: y, recentContentLoading: b, recentContentSearchTerm: m, product: u, productInfo: v, links: T, messages: p }) {
|
|
1061
|
+
if (!u || !i || !p)
|
|
1046
1062
|
return null;
|
|
1047
|
-
const { name:
|
|
1048
|
-
return
|
|
1063
|
+
const { name: $, icon: _ } = v || {};
|
|
1064
|
+
return l`<calcite-sheet class="platform" .label=${p.label} position=inline-start display-mode=overlay id=example-sheet .open=${n} @calciteSheetClose=${c}><calcite-panel class="platform__panel"><div slot=header-content class="platform__header"><img src=${_ ?? L} class="platform__header-image"><div class="platform__header-text"><h2 class="platform__title">${$}</h2><p class="platform__subtitle">${i.name}</p></div><calcite-action icon=x text="Close menu" scale=l @click=${c}></calcite-action></div><div class="platform__container"><div class="platform__tiles">${T.filter(({ icon: S }) => S).map(({ label: S, href: O, icon: R, relativePath: I }) => l`<calcite-tile .icon=${R} .description=${S} .href=${O} alignment=center scale=s @keydown=${(C) => {
|
|
1065
|
+
(C.key === "Enter" || C.key === " ") && t({ event: C, href: O, relativePath: I });
|
|
1066
|
+
}} @click=${(C) => {
|
|
1067
|
+
t({ event: C, href: O, relativePath: I });
|
|
1068
|
+
}}></calcite-tile>`)}</div>${i?.user && !M(i) && l`<calcite-tabs layout=center class="platform__tabs"><calcite-tab-nav slot=title-group><calcite-tab-title selected>${p.myApps}</calcite-tab-title><calcite-tab-title>${p.recentContent}</calcite-tab-title></calcite-tab-nav><calcite-tab selected class="platform__tab">${o && l`<calcite-scrim loading></calcite-scrim>` || ""}${Pi({ apps: r, appsLoading: o, appsSearchTerm: a, hiddenApps: s, messages: p, handleAppsSearch: h, handleAppReorder: f, handleAppSave: g, handleAppHide: d, handleAppCancel: A, handleAppEdit: k, editingApplications: P, portal: i })}</calcite-tab><calcite-tab class="platform__tab"><div class="list__header"><calcite-input type=search icon .placeholder=${p.searchRecentContent} scale=m class="list__search" @calciteInputInput=${(S) => w(S.target.value)}></calcite-input></div>${b && !o && l`<calcite-scrim loading></calcite-scrim>` || ""}<div class="list__container">${y?.length > 0 || b ? l`<ul class="list">${G(y, (S) => S.id, (S) => ji({ portal: i, messages: p, navigate: t, item: S, locale: e }))}</ul>` : m?.length ? K({ title: Q(p.noAppResults, { term: m }), description: p.recentContentNoResultsDescription, icon: "search" }) : K({ title: p.noContent, description: p.noContentDescription, icon: "clock" })}</div></calcite-tab></calcite-tabs>` || ""}</div></calcite-panel></calcite-sheet>`;
|
|
1049
1069
|
}
|
|
1050
1070
|
const ne = [
|
|
1051
1071
|
"new",
|
|
@@ -1058,19 +1078,19 @@ const ne = [
|
|
|
1058
1078
|
"embed",
|
|
1059
1079
|
"details"
|
|
1060
1080
|
];
|
|
1061
|
-
async function
|
|
1081
|
+
async function Gi(e) {
|
|
1062
1082
|
return await Promise.resolve({ status: "success" });
|
|
1063
1083
|
}
|
|
1064
1084
|
function re(e) {
|
|
1065
1085
|
return ne.includes(e.id);
|
|
1066
1086
|
}
|
|
1067
|
-
function
|
|
1087
|
+
function Ui(e) {
|
|
1068
1088
|
return (e || [])?.toSorted((t, i) => {
|
|
1069
1089
|
const n = re(t), r = re(i);
|
|
1070
1090
|
return n && !r ? -1 : r && !n ? 1 : r && n ? ne.indexOf(t.id) - ne.indexOf(i.id) : -1;
|
|
1071
1091
|
});
|
|
1072
1092
|
}
|
|
1073
|
-
function
|
|
1093
|
+
function Bi(e, t) {
|
|
1074
1094
|
const i = {
|
|
1075
1095
|
new: [],
|
|
1076
1096
|
save: [],
|
|
@@ -1090,14 +1110,14 @@ function Ui(e, t) {
|
|
|
1090
1110
|
copyLink: { text: t.copyLink, group: "share" },
|
|
1091
1111
|
embed: { text: t.embed, group: "share" },
|
|
1092
1112
|
details: { text: t.itemDetails, group: "details", external: !0 }
|
|
1093
|
-
}, r =
|
|
1113
|
+
}, r = Ui(e), o = [];
|
|
1094
1114
|
return r.forEach((s) => {
|
|
1095
1115
|
if (!re(s)) {
|
|
1096
1116
|
o.push(s);
|
|
1097
1117
|
return;
|
|
1098
1118
|
}
|
|
1099
|
-
const { text:
|
|
1100
|
-
i[
|
|
1119
|
+
const { text: c, external: h, group: f } = n[s.id];
|
|
1120
|
+
i[f].push({ text: c, external: h, ...s });
|
|
1101
1121
|
}), o.forEach((s) => {
|
|
1102
1122
|
const a = s.group || "custom";
|
|
1103
1123
|
i[a].push(s);
|
|
@@ -1106,87 +1126,91 @@ function Ui(e, t) {
|
|
|
1106
1126
|
function Fi({ navigate: e, portal: t, menuItem: i, messages: n, portalItem: r, openProjectTitleEdit: o, projectMenuClick: s }) {
|
|
1107
1127
|
if (!t || !n || !i || i.id === "details" && !r)
|
|
1108
1128
|
return null;
|
|
1109
|
-
const { external: a, id:
|
|
1110
|
-
return ce(`${
|
|
1111
|
-
if (
|
|
1129
|
+
const { external: a, id: c, text: h } = i, f = `${E(t)}item.html?id=${r?.id}`;
|
|
1130
|
+
return ce(`${c}${h}`, l`<calcite-dropdown-item .iconEnd=${a ? "launch" : void 0} .href=${c === "details" ? f : i.href} .target=${a ? "_blank" : void 0} @calciteDropdownItemSelect=${(g) => {
|
|
1131
|
+
if (c === "rename") {
|
|
1112
1132
|
o?.();
|
|
1113
1133
|
return;
|
|
1114
1134
|
}
|
|
1115
|
-
|
|
1116
|
-
}}>${
|
|
1135
|
+
c === "details" && e({ event: g, href: f }), s?.({ type: c });
|
|
1136
|
+
}}>${h}${c === "save" && l`<calcite-icon icon=bullet-point-large class="project__indicator" scale=s></calcite-icon>` || ""}</calcite-dropdown-item>`);
|
|
1117
1137
|
}
|
|
1118
|
-
function
|
|
1119
|
-
if (!t || !
|
|
1138
|
+
function zi({ navigate: e, portal: t, projectTitle: i, editedProjectTitle: n, handleProjectTitleSave: r, handleProjectTitleEdit: o, handleProjectTitleCancel: s, openProjectTitleEdit: a, portalItem: c, projectTitleEditing: h, projectTitleSaving: f, projectTitleErrorMessage: g, projectMenuIcon: d, projectMenuSaveIndicator: A, projectMenuClick: k, projectMenuOptions: w, projectTitleInputRef: P, projectButtonRef: y, messages: b }) {
|
|
1139
|
+
if (!t || !b || !w?.length)
|
|
1120
1140
|
return null;
|
|
1121
|
-
const
|
|
1122
|
-
return
|
|
1123
|
-
|
|
1124
|
-
}} @keydown=${(
|
|
1125
|
-
|
|
1126
|
-
}}><calcite-input id=project-title-input type=text scale=l class="rename__input" .label=${
|
|
1127
|
-
}
|
|
1128
|
-
function
|
|
1141
|
+
const m = Bi(w, b), u = !!g;
|
|
1142
|
+
return h ? l`<form class="rename" @submit=${async (v) => {
|
|
1143
|
+
v.preventDefault(), await r?.(n);
|
|
1144
|
+
}} @keydown=${(v) => {
|
|
1145
|
+
v.key === "Escape" && s?.();
|
|
1146
|
+
}}><calcite-input id=project-title-input type=text scale=l class="rename__input" .label=${b.title} .value=${n} .status=${u ? "invalid" : "idle"} @calciteInputInput=${(v) => o?.(v.target.value)} ${F(P)}></calcite-input>${u && l`<calcite-popover open .label=${b.error} .referenceElement=${P?.value || "project-title-input"} pointer-disabled placement=bottom-start><calcite-notice kind=danger open><div slot=message>${g}</div></calcite-notice></calcite-popover>` || ""}<calcite-action .disabled=${f} icon=check scale=l .text=${b?.saveRename} active class="rename__action" type=submit .loading=${f}></calcite-action><calcite-action .disabled=${f} icon=x scale=l .text=${b?.cancelRename} class="rename__action" @click=${() => s?.()}></calcite-action></form>` : l`<calcite-dropdown width=m class="fade-in"><calcite-button slot=trigger .iconStart=${d} icon-end=chevron-down scale=m class="project" appearance=transparent kind=neutral ${F(y)}><span class="project__text">${i}${A && l`<calcite-icon scale=s icon=bullet-point-large class="project__indicator"></calcite-icon>` || ""}</span></calcite-button>${G(Object.entries(m).filter(([v, T]) => T.length), ([v, T]) => v, ([v, T]) => l`<calcite-dropdown-group selection-mode=none>${T.map((p) => Fi({ menuItem: p, navigate: e, portal: t, messages: b, portalItem: c, openProjectTitleEdit: a, projectMenuClick: k }))}</calcite-dropdown-group>`)}</calcite-dropdown>`;
|
|
1147
|
+
}
|
|
1148
|
+
function Wi(e) {
|
|
1129
1149
|
return ["Location Platform", "Online", "Enterprise"].includes(e);
|
|
1130
1150
|
}
|
|
1131
|
-
function
|
|
1151
|
+
function Ee({
|
|
1132
1152
|
portal: e,
|
|
1133
1153
|
searchType: t,
|
|
1134
1154
|
searchTerm: i
|
|
1135
1155
|
}) {
|
|
1136
1156
|
const r = e?.sourceJSON?.vectorSearchEnabled ? `&mode=${t}` : "";
|
|
1137
|
-
return `${
|
|
1157
|
+
return `${E(e)}search.html?q=${i}${r}`;
|
|
1138
1158
|
}
|
|
1139
1159
|
function Ri({ portal: e, item: t, messages: i, navigate: n }) {
|
|
1140
1160
|
if (!t || !i)
|
|
1141
1161
|
return null;
|
|
1142
|
-
const r =
|
|
1143
|
-
itemType:
|
|
1162
|
+
const r = Q(i.by, {
|
|
1163
|
+
itemType: Mt(t),
|
|
1144
1164
|
owner: t.owner
|
|
1145
|
-
}), o =
|
|
1146
|
-
return ce(t.id,
|
|
1165
|
+
}), o = `item.html?id=${t.id}`, s = `${E(e)}${o}`;
|
|
1166
|
+
return ce(t.id, l`<li class="list-item"><a class="list-item__link" href=${s ?? L} @click=${(a) => n({ event: a, href: s, relativePath: o })}>${l`<span class="list-item__container"><span class="list-item__logo list-item__logo--item-type"><arcgis-portal-item-type .item=${t} .user=${e.user} hide-text></arcgis-portal-item-type></span><span class="list-item__content"><span class="list-item__title list-item__title--regular list-item__title--large">${t.title}</span><span class="list-item__subtitle list-item__subtitle--large">${r}</span></span></span>`}</a></li>`);
|
|
1147
1167
|
}
|
|
1148
|
-
function
|
|
1168
|
+
function Vi({ portal: e, suggestions: t, messages: i, navigate: n, searchType: r, searchTerm: o }) {
|
|
1149
1169
|
if (!i || !e || !o)
|
|
1150
1170
|
return null;
|
|
1151
1171
|
if (!t)
|
|
1152
|
-
return
|
|
1153
|
-
const s =
|
|
1154
|
-
return
|
|
1172
|
+
return l`<div><calcite-loader scale=l .label=${i.loadingResults}></calcite-loader></div>`;
|
|
1173
|
+
const s = Ee({ portal: e, searchType: r, searchTerm: o });
|
|
1174
|
+
return l`<ul class="list">${t.map((a) => Ri({ messages: i, portal: e, item: a, navigate: n }))}</ul><div class="suggestions__footer"><calcite-button icon-end=arrow-right scale=l appearance=outline class="suggestions__footer__button" kind=neutral round .href=${s} @click=${(a) => {
|
|
1155
1175
|
n({ href: s, event: a });
|
|
1156
1176
|
}}>${i.viewAll}</calcite-button></div>`;
|
|
1157
1177
|
}
|
|
1158
|
-
function
|
|
1178
|
+
function Hi({ portal: e, messages: t, searchType: i, handleSearchTypeChange: n }) {
|
|
1159
1179
|
if (!t || !e?.sourceJSON?.vectorSearchEnabled)
|
|
1160
1180
|
return null;
|
|
1161
1181
|
const r = i === "keyword", o = t.searchType;
|
|
1162
|
-
return
|
|
1182
|
+
return l`<calcite-chip .label=${o.label} .icon=${r ? "text" : "effects"} id=search-type-toggle appearance=solid kind=neutral><span>${r ? o.keywordTitle : o.semanticTitle}</span><calcite-icon icon=chevron-down scale=s class="suggestions__search-type__icon" aria-hidden=true></calcite-icon></calcite-chip><calcite-popover pointer-disabled .label=${t.searchType.label} reference-element=search-type-toggle placement=bottom-end class="suggestions__search-type"><div class="esri-header-search-type-popover-contents"><calcite-list .label=${t.searchType.label} interaction-mode=interactive display-mode=flat scale=m selection-mode=none><calcite-list-item @calciteListItemSelect=${() => n("keyword")} icon-start=text value=keyword .label=${o.keywordTitle} .description=${o.keywordDescription}></calcite-list-item><calcite-list-item @calciteListItemSelect=${() => n("vector")} icon-start=effects value=semantic .label=${o.semanticTitle} .description=${o.semanticDescription}></calcite-list-item></calcite-list></div></calcite-popover>`;
|
|
1163
1183
|
}
|
|
1164
|
-
function
|
|
1165
|
-
if (!
|
|
1184
|
+
function qi({ navigate: e, product: t, portal: i, messages: n, searchActive: r, searchType: o, searchTerm: s, suggestions: a, searchInputRef: c, searchActionRef: h, searchPopoverRef: f, handleSearch: g, handleToggleSearch: d, handleSearchTypeChange: A }) {
|
|
1185
|
+
if (!Wi(t) || !n || !i)
|
|
1166
1186
|
return null;
|
|
1167
|
-
const
|
|
1168
|
-
return r ?
|
|
1169
|
-
w.key === "Enter" && (e({ href:
|
|
1170
|
-
}} ${F(
|
|
1171
|
-
}
|
|
1172
|
-
function
|
|
1173
|
-
return
|
|
1174
|
-
}
|
|
1175
|
-
function
|
|
1176
|
-
return !i || !t || !r || !pe(i) || !n ||
|
|
1177
|
-
}
|
|
1178
|
-
function
|
|
1179
|
-
const
|
|
1180
|
-
return !
|
|
1181
|
-
|
|
1182
|
-
|
|
1187
|
+
const k = Ee({ portal: i, searchTerm: s, searchType: o });
|
|
1188
|
+
return r ? l`<div class="search" id=search-reference-element><calcite-input type=search scale=l icon=search class="search__input" @calciteInputInput=${(w) => g(w.target.value)} @keydown=${(w) => {
|
|
1189
|
+
w.key === "Enter" && (e({ href: k, event: w }), w.defaultPrevented || (window.location.href = k)), w.key === "Escape" && d(!1);
|
|
1190
|
+
}} ${F(c)}></calcite-input><calcite-action icon=x scale=l .text=${n?.close} active class="search__action" @click=${() => d(!1)}></calcite-action><calcite-popover .label=${n.suggestions} reference-element=search-reference-element .open=${r && !!s} pointer-disabled placement=bottom-start trigger-disabled .focusTrapOptions=${{ initialFocus: !1 }} ${F(f)}><div class="suggestions__header"><h3 class="suggestions__title">${n.topResults}</h3>${Hi({ portal: i, messages: n, searchType: o, handleSearchTypeChange: A })}</div><div class="suggestions__results">${Vi({ portal: i, suggestions: a, navigate: e, messages: n, searchType: o, searchTerm: s })}</div></calcite-popover></div>` : l`<calcite-action icon=search scale=l text=search class="search__action fade-in" @click=${() => d(!0)} ${F(h)}></calcite-action>`;
|
|
1191
|
+
}
|
|
1192
|
+
function Ji({ signIn: e, messages: t }) {
|
|
1193
|
+
return l`<calcite-menu slot=user .label=${t?.account || ""} class="border-start fade-in"><calcite-menu-item .label=${t?.signIn || ""} text-enabled .text=${t?.signIn || ""} @calciteMenuItemSelect=${() => e()}></calcite-menu-item></calcite-menu>`;
|
|
1194
|
+
}
|
|
1195
|
+
function Ki({ navigate: e, portal: t, product: i, links: n, messages: r, currentPathname: o, searchActive: s }) {
|
|
1196
|
+
return !i || !t || !r || !pe(i) || !n || s ? null : l`<calcite-menu slot=content-start .label=${r.label} class="site-nav fade-in">${G(n, ({ href: a }) => a, ({ label: a, href: c, relativePath: h }) => l`<calcite-menu-item .text=${a} text-enabled .label=${a} .href=${c} .active=${Ci(c, o)} @click=${(f) => e({ event: f, href: c, relativePath: h })}></calcite-menu-item>`)}</calcite-menu>`;
|
|
1197
|
+
}
|
|
1198
|
+
function Qi({ userLinks: e, messages: t, navigate: i, openAccountSwitcher: n, portal: r, signOut: o, textDisabled: s }) {
|
|
1199
|
+
const a = r?.user;
|
|
1200
|
+
return !a || !e || !t || e?.account?.options.length < 1 && e?.resources?.options.length < 1 ? null : l`<div slot=user class="user fade-in"><calcite-navigation-user id=navigation-user full-name=${a?.fullName ?? L} .username=${a?.username} .thumbnail=${a.thumbnailUrl || void 0} .userId=${a?.id} .textDisabled=${s}></calcite-navigation-user><calcite-dropdown width=m reference-element=navigation-user>${s && l`<div class="user__top"><arcgis-portal-user-avatar .user=${a} .portal=${r} scale=l class="user__avatar"></arcgis-portal-user-avatar><div class="user__top__text"><h2 class="user__top__full">${a.fullName}</h2><p class="user__top__username">${a.username}</p></div></div>` || ""}${Object.values(e).filter((c) => c.options.length).map(({ title: c, options: h }) => l`<calcite-dropdown-group selection-mode=none .groupTitle=${c}>${h.map(({ icon: f, label: g, href: d, relativePath: A }) => l`<calcite-dropdown-item .iconStart=${f} .href=${d} @keydown=${(k) => {
|
|
1201
|
+
(k.key === "Enter" || k.key === " ") && i({ event: k, href: d, relativePath: A });
|
|
1202
|
+
}} @click=${(k) => {
|
|
1203
|
+
i({ event: k, href: d, relativePath: A });
|
|
1204
|
+
}}>${g}</calcite-dropdown-item>`)}</calcite-dropdown-group>`)}<calcite-dropdown-group selection-mode=none><calcite-dropdown-item icon-start=sign-out @calciteDropdownItemSelect=${() => o()}>${t.signOut}</calcite-dropdown-item>${n && l`<calcite-dropdown-item icon-start=users @calciteDropdownItemSelect=${(c) => {
|
|
1205
|
+
const h = Lt(c.target, "calcite-dropdown");
|
|
1206
|
+
h && (h.open = !1), n();
|
|
1183
1207
|
}}>${t.switchAccounts}</calcite-dropdown-item>` || ""}</calcite-dropdown-group></calcite-dropdown></div>`;
|
|
1184
1208
|
}
|
|
1185
1209
|
const Oe = {
|
|
1186
1210
|
community: "https://community.esri.com/plugins/common/feature/oauth2sso_v2/sso_login_redirect?referer=https%3A%2F%2Fcommunity.esri.com%2F",
|
|
1187
1211
|
myEsri: "https://my.esri.com"
|
|
1188
1212
|
};
|
|
1189
|
-
function
|
|
1213
|
+
function Xi({
|
|
1190
1214
|
messages: e,
|
|
1191
1215
|
userLinks: t
|
|
1192
1216
|
}) {
|
|
@@ -1198,7 +1222,7 @@ function Qi({
|
|
|
1198
1222
|
i[n.group].options.push(n);
|
|
1199
1223
|
}), i;
|
|
1200
1224
|
}
|
|
1201
|
-
function
|
|
1225
|
+
function Yi({
|
|
1202
1226
|
portal: e,
|
|
1203
1227
|
messages: t,
|
|
1204
1228
|
clientId: i
|
|
@@ -1208,10 +1232,10 @@ function Xi({
|
|
|
1208
1232
|
account: { title: t?.account, options: [] },
|
|
1209
1233
|
resources: { title: t?.account, options: [] }
|
|
1210
1234
|
};
|
|
1211
|
-
const n =
|
|
1212
|
-
return
|
|
1235
|
+
const n = tn(e), r = Zi({ navLinkDictionary: n, messages: t, clientId: i });
|
|
1236
|
+
return Xi({ userLinks: r, messages: t });
|
|
1213
1237
|
}
|
|
1214
|
-
function
|
|
1238
|
+
function Zi({
|
|
1215
1239
|
navLinkDictionary: e,
|
|
1216
1240
|
messages: t,
|
|
1217
1241
|
clientId: i
|
|
@@ -1226,34 +1250,37 @@ function Yi({
|
|
|
1226
1250
|
"arcgisBlog",
|
|
1227
1251
|
"help"
|
|
1228
1252
|
];
|
|
1229
|
-
return (ue(i) || de(i)) && (n = ["mySettings", "arcgisBlog", "help"]),
|
|
1253
|
+
return (ue(i) || de(i)) && (n = ["mySettings", "arcgisBlog", "help"]), Me(i) && (n = []), en(n, t, e);
|
|
1230
1254
|
}
|
|
1231
|
-
function
|
|
1255
|
+
function en(e, t, i) {
|
|
1232
1256
|
const n = [];
|
|
1233
1257
|
return e.forEach((r) => {
|
|
1234
1258
|
const o = i[r];
|
|
1235
1259
|
if (o && (!("show" in o) || o.show)) {
|
|
1236
|
-
const { href: s, newTab: a, icon:
|
|
1260
|
+
const { href: s, newTab: a, icon: c, group: h, relativePath: f } = o;
|
|
1237
1261
|
n.push({
|
|
1238
1262
|
label: t[r],
|
|
1239
|
-
group:
|
|
1263
|
+
group: h,
|
|
1240
1264
|
href: s,
|
|
1241
1265
|
newTab: a,
|
|
1242
|
-
|
|
1266
|
+
relativePath: f,
|
|
1267
|
+
icon: c
|
|
1243
1268
|
});
|
|
1244
1269
|
}
|
|
1245
1270
|
}), n;
|
|
1246
1271
|
}
|
|
1247
|
-
function
|
|
1248
|
-
const t =
|
|
1272
|
+
function tn(e) {
|
|
1273
|
+
const t = E(e), i = nn(e), n = `user.html${window.location.pathname.includes("home/user.html") ? "?nav=1" : ""}`;
|
|
1249
1274
|
return {
|
|
1250
1275
|
myProfile: {
|
|
1251
|
-
href: `${t}
|
|
1276
|
+
href: `${t}${n}`,
|
|
1277
|
+
relativePath: n,
|
|
1252
1278
|
group: "account",
|
|
1253
1279
|
icon: "user"
|
|
1254
1280
|
},
|
|
1255
1281
|
mySettings: {
|
|
1256
|
-
href: `${t}
|
|
1282
|
+
href: `${t}${n}#settings`,
|
|
1283
|
+
relativePath: `${n}#settings`,
|
|
1257
1284
|
group: "account",
|
|
1258
1285
|
icon: "gear"
|
|
1259
1286
|
},
|
|
@@ -1274,7 +1301,7 @@ function en(e) {
|
|
|
1274
1301
|
show: i,
|
|
1275
1302
|
group: "account",
|
|
1276
1303
|
icon: "globe",
|
|
1277
|
-
href:
|
|
1304
|
+
href: on(e),
|
|
1278
1305
|
newTab: !0
|
|
1279
1306
|
},
|
|
1280
1307
|
arcgisBlog: {
|
|
@@ -1288,41 +1315,41 @@ function en(e) {
|
|
|
1288
1315
|
show: i,
|
|
1289
1316
|
group: "resources",
|
|
1290
1317
|
icon: "education",
|
|
1291
|
-
href:
|
|
1318
|
+
href: rn(e),
|
|
1292
1319
|
newTab: !0
|
|
1293
1320
|
},
|
|
1294
1321
|
trialDownload: {
|
|
1295
1322
|
group: "resources",
|
|
1296
1323
|
icon: "download-to",
|
|
1297
|
-
show:
|
|
1324
|
+
show: an(e),
|
|
1298
1325
|
href: `${t}/home/user.html${window.location.pathname.includes("home/user.html") ? "?nav=1&tab=licenses" : "?tab=licenses"}#settings`
|
|
1299
1326
|
}
|
|
1300
1327
|
};
|
|
1301
1328
|
}
|
|
1302
|
-
function
|
|
1329
|
+
function nn(e) {
|
|
1303
1330
|
return !e.isPortal && e?.user?.sourceJSON?.userType === "both";
|
|
1304
1331
|
}
|
|
1305
|
-
function
|
|
1306
|
-
return
|
|
1332
|
+
function rn(e) {
|
|
1333
|
+
return je(
|
|
1307
1334
|
e,
|
|
1308
1335
|
`${window.location.protocol}//www.esri.com/training/arcgis-online-training`
|
|
1309
1336
|
);
|
|
1310
1337
|
}
|
|
1311
|
-
function
|
|
1312
|
-
return
|
|
1338
|
+
function on(e) {
|
|
1339
|
+
return je(e, Oe.myEsri);
|
|
1313
1340
|
}
|
|
1314
|
-
function
|
|
1315
|
-
const i = ae(e), n =
|
|
1341
|
+
function je(e, t) {
|
|
1342
|
+
const i = ae(e), n = sn(e), r = `https://accounts${n ? n === "dev" ? "-dev" : "-stg" : ""}.esri.com/`, o = `&authBaseUrl=${J(i.replace("/sharing/rest/", ""), e)}`, s = `${r}LoginHandler/switchuser?`, a = `username=${e?.user?.username ?? ""}&redirect_uri=${t}${o}`;
|
|
1316
1343
|
return `${s}${a}`;
|
|
1317
1344
|
}
|
|
1318
|
-
function
|
|
1345
|
+
function sn(e) {
|
|
1319
1346
|
const t = e.portalHostname;
|
|
1320
1347
|
return t?.includes("dev") ? "dev" : t?.includes("qa") ? "qa" : "";
|
|
1321
1348
|
}
|
|
1322
|
-
function
|
|
1349
|
+
function an(e) {
|
|
1323
1350
|
return !e?.isPortal && ["Trial", "Trial Press"].includes(e?.sourceJSON.subscriptionInfo?.type);
|
|
1324
1351
|
}
|
|
1325
|
-
function
|
|
1352
|
+
function cn(e) {
|
|
1326
1353
|
switch (e) {
|
|
1327
1354
|
case "360 VR":
|
|
1328
1355
|
return {
|
|
@@ -1543,48 +1570,48 @@ function an(e) {
|
|
|
1543
1570
|
};
|
|
1544
1571
|
}
|
|
1545
1572
|
}
|
|
1546
|
-
function
|
|
1573
|
+
function ln({
|
|
1547
1574
|
product: e,
|
|
1548
1575
|
portal: t,
|
|
1549
1576
|
clientId: i
|
|
1550
1577
|
}) {
|
|
1551
1578
|
return e !== "Online" ? e : t?.sourceJSON?.subscriptionInfo?.options?.includes("Developer") ? "Location Platform" : de(i) ? "GeoAnalytics Fabric" : ue(i) ? "GeoAnalytics Engine" : t?.isPortal ? "Enterprise" : "Online";
|
|
1552
1579
|
}
|
|
1553
|
-
function
|
|
1554
|
-
const t =
|
|
1580
|
+
function un(e) {
|
|
1581
|
+
const t = ln(e), { name: i, fileName: n, icon: r } = cn(t);
|
|
1555
1582
|
return {
|
|
1556
1583
|
name: i,
|
|
1557
1584
|
glyph: te(`assets/portal-navigation/product-logos/${n}-glyph-32.svg`),
|
|
1558
1585
|
icon: te(`assets/portal-navigation/apps/${r}.avif`)
|
|
1559
1586
|
};
|
|
1560
1587
|
}
|
|
1561
|
-
function
|
|
1562
|
-
const e =
|
|
1588
|
+
function dn() {
|
|
1589
|
+
const e = bt();
|
|
1563
1590
|
["item.html", "group.html"].some((t) => window.location.href.includes(t)) ? window.location.href = `./signin.html?locale=${e}&useLandingPage=false&returnUrl=${encodeURIComponent(
|
|
1564
1591
|
window.location.href
|
|
1565
1592
|
)}` : window.location.href = `./signin.html?locale=${e}&useLandingPage=true`;
|
|
1566
1593
|
}
|
|
1567
|
-
function
|
|
1568
|
-
const i =
|
|
1594
|
+
function pn({ portal: e, clientId: t }) {
|
|
1595
|
+
const i = W({ portal: e });
|
|
1569
1596
|
if (e?.isPortal) {
|
|
1570
|
-
const n = e.access === "private" ?
|
|
1571
|
-
|
|
1597
|
+
const n = e.access === "private" ? J("signin.html", e) : e.allSSL || window.location.protocol === "https:" ? J("./index.html", e) : `${i}/index.html`;
|
|
1598
|
+
mn(e, n);
|
|
1572
1599
|
} else
|
|
1573
1600
|
window.location.href = `${i}/pages/Account/manage_accounts.html#client_id=${t}&signout=true`;
|
|
1574
1601
|
}
|
|
1575
|
-
function
|
|
1576
|
-
|
|
1602
|
+
function hn() {
|
|
1603
|
+
Yt(we), Zt(we);
|
|
1577
1604
|
}
|
|
1578
|
-
function
|
|
1579
|
-
const i = window.location.href.startsWith("http://"), n =
|
|
1580
|
-
Ot.destroyCredentials(),
|
|
1581
|
-
const r = new URL(
|
|
1605
|
+
function mn(e, t = window.location.href) {
|
|
1606
|
+
const i = window.location.href.startsWith("http://"), n = yt(e);
|
|
1607
|
+
Ot.destroyCredentials(), hn();
|
|
1608
|
+
const r = new URL(J(`${ae(e)}oauth2/signout`, e)), { searchParams: o } = r;
|
|
1582
1609
|
o.append("client_id", "arcgisonline"), o.append("redirect_uri", t), n && i && (e.isPortal || e.user?.sourceJSON.provider === "enterprise") && o.append("token", n), window.location.href = r.href;
|
|
1583
1610
|
}
|
|
1584
|
-
function
|
|
1611
|
+
function j(e, t) {
|
|
1585
1612
|
if (!e)
|
|
1586
1613
|
return 0;
|
|
1587
|
-
const i =
|
|
1614
|
+
const i = Et({ text: e, font: `${t === "s" ? ".875rem" : "1rem"} 'Avenir Next'` });
|
|
1588
1615
|
return Math.ceil(i);
|
|
1589
1616
|
}
|
|
1590
1617
|
function fn({
|
|
@@ -1597,28 +1624,28 @@ function fn({
|
|
|
1597
1624
|
}) {
|
|
1598
1625
|
if (!t || !e)
|
|
1599
1626
|
return;
|
|
1600
|
-
const s = e.user,
|
|
1627
|
+
const s = e.user, c = pe(t) && n?.length ? 24 + n.reduce((g, d) => g + 16 + j(d.label) + 16, 0) : 0, h = 40 + j(i) + 32 + 16 + 16 + 12, f = s ? Math.max(j(s?.username, "s"), j(s?.fullName)) : j(r?.signIn);
|
|
1601
1628
|
return {
|
|
1602
1629
|
actions: 192,
|
|
1603
|
-
project: i ?
|
|
1604
|
-
product: 64 + Math.max(
|
|
1605
|
-
nav:
|
|
1606
|
-
user: 64 +
|
|
1630
|
+
project: i ? h : 0,
|
|
1631
|
+
product: 64 + Math.max(j(o?.name), j(e.name, "s")) + 16,
|
|
1632
|
+
nav: c,
|
|
1633
|
+
user: 64 + f + 16
|
|
1607
1634
|
};
|
|
1608
1635
|
}
|
|
1609
|
-
function
|
|
1636
|
+
function gn({
|
|
1610
1637
|
measurements: e,
|
|
1611
1638
|
screenWidth: t
|
|
1612
1639
|
}) {
|
|
1613
|
-
const { actions: i, nav: n, product: r, project: o, user: s } = e, a = 64,
|
|
1640
|
+
const { actions: i, nav: n, product: r, project: o, user: s } = e, a = 64, c = t - i - a > n, h = t - i - (c ? n : 0) - o - a > r, f = t - n - o - i - r < s;
|
|
1614
1641
|
return {
|
|
1615
|
-
nav:
|
|
1616
|
-
product:
|
|
1617
|
-
user:
|
|
1642
|
+
nav: c,
|
|
1643
|
+
product: h,
|
|
1644
|
+
user: f ? "avatar" : "full"
|
|
1618
1645
|
};
|
|
1619
1646
|
}
|
|
1620
|
-
const
|
|
1621
|
-
async function
|
|
1647
|
+
const De = ' -type:"Code Attachment" -type:"Featured Items" -type:"Symbol Set" -type:"Color Set" -type:"Windows Viewer Add In" -type:"Windows Viewer Configuration" -type:"Map Area" -typekeywords:"MapAreaPackage" -type:"Indoors Map Configuration" -typekeywords:"SMX"';
|
|
1648
|
+
async function ye({
|
|
1622
1649
|
portal: e,
|
|
1623
1650
|
searchTerm: t
|
|
1624
1651
|
}) {
|
|
@@ -1627,7 +1654,7 @@ async function _e({
|
|
|
1627
1654
|
try {
|
|
1628
1655
|
return (await e.queryItems({
|
|
1629
1656
|
...t ? { query: t } : {},
|
|
1630
|
-
filter: `owner:${e.user.username}${
|
|
1657
|
+
filter: `owner:${e.user.username}${De}`,
|
|
1631
1658
|
num: 20,
|
|
1632
1659
|
sortField: "modified",
|
|
1633
1660
|
sortOrder: "desc"
|
|
@@ -1636,37 +1663,37 @@ async function _e({
|
|
|
1636
1663
|
return [];
|
|
1637
1664
|
}
|
|
1638
1665
|
}
|
|
1639
|
-
async function
|
|
1666
|
+
async function bn({
|
|
1640
1667
|
portal: e,
|
|
1641
1668
|
searchTerm: t
|
|
1642
1669
|
}) {
|
|
1643
1670
|
if (!e?.user)
|
|
1644
1671
|
return [];
|
|
1645
|
-
const i =
|
|
1646
|
-
return (await
|
|
1672
|
+
const i = Dt((t || "").substring(0, 409)), n = `${e?.id ? `accountid:"${e.id}"` : ""}${De}`, r = `${ae(e)}search/suggest`;
|
|
1673
|
+
return (await U(r, { query: {
|
|
1647
1674
|
suggest: i,
|
|
1648
1675
|
filters: n,
|
|
1649
1676
|
searchFields: "title",
|
|
1650
1677
|
f: "json"
|
|
1651
1678
|
} }))?.result?.results || [];
|
|
1652
1679
|
}
|
|
1653
|
-
const
|
|
1654
|
-
function
|
|
1655
|
-
return !e || i && !t?.user ? null :
|
|
1680
|
+
const vn = ht`:host{display:block}.wrapper{background:var(--calcite-color-foreground-1);border-bottom:1px solid var(--calcite-color-border-3)}.navigation{width:100%;min-width:0;min-height:4rem;display:flex;align-items:stretch;max-width:var(--arcgis-portal-navigation-max-width);margin-inline:auto}.navigation--loading .fade-in{opacity:0}.fade-in{opacity:1;transition:opacity ease-in-out .15s}.content-end{margin-inline-start:auto;display:flex;align-items:center}.content-end[hidden]{display:none}.action{height:100%;--calcite-internal-action-spacing: 1.25rem}.border-start{border-inline-start:1px solid var(--calcite-color-border-3)}.platform{--calcite-sheet-scrim-background: var(--calcite-color-transparent-scrim);--calcite-sheet-width: 24rem}.platform__container{display:flex;flex-direction:column;max-height:100%}.platform__header{display:flex;align-items:center}.platform__header-image{width:48px;height:48px;margin-inline-end:1rem}.platform__header-text{flex:1 1 auto;line-height:1.375}.platform__title{margin:0;padding:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium)}.platform__subtitle{margin:0;padding:0;font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-2)}.platform__panel{border-inline-end:1px solid var(--calcite-color-border-3);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.platform__tiles{margin:.75rem .75rem 1.5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));grid-gap:.5rem}.platform__tabs{min-height:0;flex:1 1 auto;--calcite-tab-content-space-y: 0}.platform__tab{position:relative}.list{list-style:none;margin:0;padding:0}.list__container{position:relative}.list__header{display:flex;align-items:center;padding:.5rem .75rem;border-bottom:1px solid var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1);position:sticky;top:0;z-index:701}.list__search{flex:1 1 auto;--calcite-color-border-input: var(--calcite-color-foreground-1)}.list-item__link{display:block;box-sizing:border-box;width:100%;padding-inline-start:.75rem;background-color:var(--calcite-color-foreground-1);outline-color:transparent;text-decoration:none;outline-offset:0;transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out,outline-offset var(--calcite-internal-animation-timing-fast) ease-in-out}.list-item__link:hover{background-color:var(--calcite-color-transparent-hover)}.list-item__link:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus);outline-offset:-2px}.list-item__container{box-sizing:border-box;width:100%;padding-block:.5rem;padding-inline-start:0;padding-inline-end:.5rem;border-bottom:1px solid var(--calcite-color-border-3);display:flex;align-items:center;position:relative;pointer-events:none}.list-item__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.list-item__logo{width:48px;height:48px;flex:0 0 auto;box-sizing:border-box;margin-inline-end:.5rem;justify-content:center;align-items:center;position:relative;display:flex}.list-item__logo-bg{position:absolute}.list-item__indicator{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background-color:var(--calcite-color-status-success);border:2px solid var(--calcite-color-foreground-1);z-index:50;top:.25rem;inset-inline-start:-.25rem}.list-item__abbr{color:#fff;font-weight:700;position:relative}.list-item__logo-empty{border:2px dashed var(--calcite-color-border-3);border-radius:8px}.list-item__logo--item-type{background-color:var(--calcite-color-background);display:flex;justify-content:center;align-items:center}.list-item__title{display:block;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);font-weight:500;word-wrap:break-word}.list-item__title--regular{font-weight:400;padding-top:.25rem}.list-item__title--large{font-size:var(--calcite-font-size-0);line-height:1}.list-item__subtitle{display:block;font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3);font-weight:500;padding-top:.25rem;padding-bottom:.25rem}.list-item__subtitle--large{font-size:var(--calcite-font-size--1);font-weight:400;padding:0}.list-item__chip{margin-inline-start:auto;--calcite-chip-background-color: var(--calcite-color-foreground-current)}.app--hidden{--calcite-list-background-color: var(--calcite-color-background)}.app--hidden .list-item__logo{opacity:.4}.logo{border-inline-end:1px solid var(--calcite-color-border-3)}.site-nav{margin-inline-start:1.5rem}.project{border-inline-end:1px solid var(--calcite-color-border-3)}.project__indicator{margin-inline-start:1rem;--calcite-ui-icon-color: var(--calcite-color-status-danger);float:inline-end}.project__text{display:flex;font-size:1rem}.rename{width:100%;min-width:0;display:flex;flex:1 1 0;align-items:center;margin-inline-start:.5rem}.rename__action{margin-inline-end:.5rem;display:flex;align-items:center}.rename__input{margin-inline-end:.5rem;display:block;width:100%}.search{width:100%;min-width:0;display:flex;flex:1 1 0;align-items:center;margin-inline-start:.5rem}.search__action{margin-inline-end:.5rem;display:flex;align-items:center}.search__input{margin-inline-end:.5rem;display:block;width:100%}.suggestions__header{display:flex;align-items:center;width:var(--calcite-popover-max-size-x);box-sizing:border-box;padding:.75rem 1rem;border-bottom:1px solid var(--calcite-color-border-3)}.suggestions__title{padding:0;margin:0;font-weight:500;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-1);flex:1 1 0}.suggestions__search-type{--calcite-popover-max-size-x: 320px}.suggestions__search-type__icon{vertical-align:-.2rem}.suggestions__footer{display:flex;align-items:center;justify-content:center;padding:1rem}.notifications{width:min(24rem,80vw)}.notifications--full:after{content:"";display:block;border-top:1px solid var(--calcite-color-border-3);margin-left:1rem}.notifications__list{max-height:min(18rem,80vh);overflow:auto}.notifications--empty{padding:2rem}.empty{padding:1rem;text-align:center;color:var(--calcite-color-text-3);--calcite-icon-color: var(--calcite-color-status-success-hover)}.empty__header{margin:0;padding:.75rem 0 0;color:var(--calcite-color-text-1);font-weight:500;font-size:var(--calcite-font-size-1)}.empty__text{margin:0;padding:0;color:var(--calcite-color-text-3);font-weight:400;font-size:var(--calcite-font-size-0)}.notification{display:flex;flex-direction:column;padding:.5rem}.notification__message{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);--calcite-color-brand-underline: transparent}.notification__date{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-0)}.notifications__dismiss{margin-inline-start:auto;margin-inline-end:1rem;margin-block:.5rem}.user{display:flex;--calcite-dropdown-item-text-color: var(--calcite-color-text-3);--calcite-dropdown-group-title-text-color: var(--calcite-color-text-2)}.user__top{display:flex;padding:.75rem;border-bottom:1px solid var(--calcite-color-border-3)}.user__top__avatar{flex:0 0 auto}.user__top__text{box-sizing:border-box;word-wrap:break-word;flex:1 1 0;min-width:0;padding-inline-start:1rem;line-height:1.375}.user__top__full{font-size:1rem;font-weight:medium;color:var(--calcite-colot-text-1);padding:0;margin:0}.user__top__username{font-size:1rem;color:var(--calcite-colot-text-2);padding:0;margin:0}`;
|
|
1681
|
+
function wn({ messages: e, portal: t, showNav: i, openPlatformMenu: n }) {
|
|
1682
|
+
return !e || i && !t?.user ? null : l`<calcite-action .label=${e.applicationMenu} text="app switcher" icon=app-launcher scale=l class="action" @click=${n}></calcite-action>`;
|
|
1656
1683
|
}
|
|
1657
|
-
class
|
|
1684
|
+
class yn extends mt {
|
|
1658
1685
|
constructor() {
|
|
1659
1686
|
super(...arguments), this.messages = ft({ blocking: !0 }), this.refreshNotifications = async () => {
|
|
1660
1687
|
const { portal: t, messages: i } = this;
|
|
1661
|
-
this.notifications = await
|
|
1688
|
+
this.notifications = await fe({ portal: t, locale: i._t9nLocale, t9n: i.notifications });
|
|
1662
1689
|
}, this.deleteNotifications = async (t) => {
|
|
1663
1690
|
const { portal: i } = this;
|
|
1664
1691
|
if (t?.length < 20)
|
|
1665
|
-
await
|
|
1692
|
+
await Wt(i, t);
|
|
1666
1693
|
else {
|
|
1667
1694
|
let n = 0;
|
|
1668
1695
|
for await (const r of t)
|
|
1669
|
-
await
|
|
1696
|
+
await xe({ id: r, portal: i }), this.notificationDeleteProgress = Math.ceil(n++ / t.length * 100);
|
|
1670
1697
|
}
|
|
1671
1698
|
this.notificationDeleteProgress = void 0, this.refreshNotifications();
|
|
1672
1699
|
}, this.navigate = (t) => {
|
|
@@ -1685,7 +1712,7 @@ class wn extends ht {
|
|
|
1685
1712
|
});
|
|
1686
1713
|
}, this.handleProjectTitleSave = async (t) => {
|
|
1687
1714
|
this.projectTitleSaving = !0;
|
|
1688
|
-
const n = await (this.projectTitleSave ||
|
|
1715
|
+
const n = await (this.projectTitleSave || Gi)(t);
|
|
1689
1716
|
if (this.projectTitleSaving = !1, n.status === "success") {
|
|
1690
1717
|
this.closeProjectTitleEdit();
|
|
1691
1718
|
return;
|
|
@@ -1697,9 +1724,9 @@ class wn extends ht {
|
|
|
1697
1724
|
this.editedProjectTitle = this.projectTitle, this.closeProjectTitleEdit();
|
|
1698
1725
|
}, this.signOut = () => {
|
|
1699
1726
|
const { portal: t, clientId: i } = this;
|
|
1700
|
-
|
|
1727
|
+
pn({ portal: t, clientId: i }), this.arcgisNavigationSignOut.emit();
|
|
1701
1728
|
}, this.signIn = () => {
|
|
1702
|
-
this.arcgisNavigationSignIn.emit(),
|
|
1729
|
+
this.arcgisNavigationSignIn.emit(), dn();
|
|
1703
1730
|
}, this.openAccountSwitcher = () => {
|
|
1704
1731
|
this.accountSwitcherOpen = !0;
|
|
1705
1732
|
}, this.handlePlatformClose = () => {
|
|
@@ -1707,11 +1734,11 @@ class wn extends ht {
|
|
|
1707
1734
|
}, this.handleAppSave = async () => {
|
|
1708
1735
|
const { hiddenApps: t, sortedApps: i, userProperties: n, portal: r } = this;
|
|
1709
1736
|
this.apps = [...i], this.editingApplications = !1, this.appsLoading = !0;
|
|
1710
|
-
const { result: o } = await
|
|
1737
|
+
const { result: o } = await Si({ apps: i, hiddenApps: t, userProperties: n, portal: r });
|
|
1711
1738
|
o?.success && (this.previousAppState = {
|
|
1712
1739
|
apps: i,
|
|
1713
1740
|
hiddenApps: t
|
|
1714
|
-
}), await
|
|
1741
|
+
}), await jt(1e3), this.appsLoading = !1;
|
|
1715
1742
|
}, this.handleAppCancel = () => {
|
|
1716
1743
|
this.previousAppState && (this.apps = this.previousAppState.apps, this.hiddenApps = this.previousAppState.hiddenApps), this.editingApplications = !1;
|
|
1717
1744
|
}, this.handleAppHide = ({ app: t, hidden: i }) => {
|
|
@@ -1721,10 +1748,10 @@ class wn extends ht {
|
|
|
1721
1748
|
n.splice(t, 1), n.splice(i, 0, r), this.sortedApps = n;
|
|
1722
1749
|
}, this.handleItemSearch = (t) => {
|
|
1723
1750
|
this.recentContentLoading = !0, this.recentContentSearchTerm = t, this.debouncedItemSearch(t);
|
|
1724
|
-
}, this.debouncedItemSearch =
|
|
1725
|
-
this.recentContent = await
|
|
1726
|
-
}, 1e3), this.debouncedSuggest =
|
|
1727
|
-
this.suggestions = await
|
|
1751
|
+
}, this.debouncedItemSearch = me(async (t) => {
|
|
1752
|
+
this.recentContent = await ye({ portal: this.portal, searchTerm: t }), this.recentContentLoading = !1;
|
|
1753
|
+
}, 1e3), this.debouncedSuggest = me(async (t) => {
|
|
1754
|
+
this.suggestions = await bn({ portal: this.portal, searchTerm: t });
|
|
1728
1755
|
}, 1e3), this.handleSearch = (t) => {
|
|
1729
1756
|
this.searchTerm = t, this.suggestions = void 0, this.debouncedSuggest(t);
|
|
1730
1757
|
}, this.sizeSearchPopover = () => {
|
|
@@ -1743,27 +1770,27 @@ class wn extends ht {
|
|
|
1743
1770
|
});
|
|
1744
1771
|
}, this.handleSearchTypeChange = (t) => {
|
|
1745
1772
|
this.searchType = t;
|
|
1746
|
-
}, this.searchInput =
|
|
1773
|
+
}, this.searchInput = B(), this.searchAction = B(), this.searchPopover = B(), this.projectTitleInputRef = B(), this.projectButtonRef = B(), this.links = [], this.notifications = [], this.apps = [], this.hiddenApps = {}, this.sortedApps = [], this.appsSearchTerm = "", this.appsLoading = !0, this.editingApplications = !1, this.recentContent = [], this.recentContentSearchTerm = "", this.recentContentLoading = !0, this.platformMenuOpen = !1, this.accountSwitcherOpen = !1, this.projectTitleEditing = !1, this.projectTitleSaving = !1, this.screenWidth = window.innerWidth, this.searchActive = !1, this.searchTerm = "", this.searchType = "keyword", this.projectMenuOptions = [], this.currentPathname = window.location.pathname, this.arcgisNavigate = q(), this.arcgisNavigationProjectMenuClick = q(), this.arcgisNavigationSignIn = q(), this.arcgisNavigationSignOut = q();
|
|
1747
1774
|
}
|
|
1748
1775
|
static {
|
|
1749
|
-
this.properties = { infoBanner: 16, links: 16, userLinks: 16, notifications: 16, apps: 16, hiddenApps: 16, sortedApps: 16, previousAppState: 16, appsSearchTerm: 16, appsLoading: 16, editingApplications: 16, recentContent: 16, recentContentSearchTerm: 16, recentContentLoading: 16, platformMenuOpen: 16, accountSwitcherOpen: 16, editedProjectTitle: 16, projectTitleEditing: 16, projectTitleSaving: 16, projectTitleErrorMessage: 16, productInfo: 16, notificationDeleteProgress: 16, measurements: 16, screenWidth: 16, showProduct: 16, showNav: 16, showUser: 16, searchActive: 16, searchTerm: 16, suggestions: 16, searchType: 16, portal: 0, portalItem: 0, product: 1, productHref: 1, projectTitle: 1, projectTitleSave: 0, projectMenuIcon: 1, projectMenuSaveIndicator: 5, projectMenuOptions: 0, disableTrackViewer: 5, disableNotebookServer: 5, clientId: 1 };
|
|
1776
|
+
this.properties = { infoBanner: 16, links: 16, userLinks: 16, notifications: 16, apps: 16, hiddenApps: 16, sortedApps: 16, previousAppState: 16, appsSearchTerm: 16, appsLoading: 16, editingApplications: 16, recentContent: 16, recentContentSearchTerm: 16, recentContentLoading: 16, platformMenuOpen: 16, accountSwitcherOpen: 16, editedProjectTitle: 16, projectTitleEditing: 16, projectTitleSaving: 16, projectTitleErrorMessage: 16, productInfo: 16, notificationDeleteProgress: 16, measurements: 16, screenWidth: 16, showProduct: 16, showNav: 16, showUser: 16, searchActive: 16, searchTerm: 16, suggestions: 16, searchType: 16, portal: 0, portalItem: 0, product: 1, productHref: 1, projectTitle: 1, projectTitleSave: 0, projectMenuIcon: 1, projectMenuSaveIndicator: 5, projectMenuOptions: 0, disableTrackViewer: 5, disableNotebookServer: 5, clientId: 1, currentPathname: 1, maxWidth: 9 };
|
|
1750
1777
|
}
|
|
1751
1778
|
static {
|
|
1752
|
-
this.styles =
|
|
1779
|
+
this.styles = vn;
|
|
1753
1780
|
}
|
|
1754
1781
|
#e;
|
|
1755
1782
|
async loaded() {
|
|
1756
1783
|
const { portal: t, messages: i, clientId: n, product: r } = this;
|
|
1757
|
-
this.calculateMeasurements(), this.productInfo =
|
|
1758
|
-
const { apps: o, hiddenApps: s, signInSettings: a, licenses:
|
|
1784
|
+
this.calculateMeasurements(), this.productInfo = un({ product: r, clientId: n, portal: t }), this.userLinks = Yi({ portal: t, messages: i.user, clientId: n }), this.notifications = await fe({ portal: t, locale: i._t9nLocale, t9n: i.notifications }), this.recentContent = await ye({ portal: t }), this.recentContentLoading = !1;
|
|
1785
|
+
const { apps: o, hiddenApps: s, signInSettings: a, licenses: c, userProperties: h } = await Ai({
|
|
1759
1786
|
portal: t,
|
|
1760
1787
|
trackViewerEnabled: !this.disableTrackViewer,
|
|
1761
1788
|
notebookServerEnabled: !this.disableNotebookServer
|
|
1762
|
-
}),
|
|
1763
|
-
this.infoBanner =
|
|
1789
|
+
}), f = await xt(t);
|
|
1790
|
+
this.infoBanner = f?.informationalBanner, this.userProperties = h, this.apps = o, this.hiddenApps = s, this.sortedApps = o, this.previousAppState = { apps: o, hiddenApps: s }, this.appsLoading = !1, this.links = Ti({
|
|
1764
1791
|
portal: t,
|
|
1765
1792
|
messages: i.links,
|
|
1766
|
-
licenses:
|
|
1793
|
+
licenses: c,
|
|
1767
1794
|
clientId: n,
|
|
1768
1795
|
signInSettings: a
|
|
1769
1796
|
}), this.calculateMeasurements();
|
|
@@ -1796,18 +1823,18 @@ class wn extends ht {
|
|
|
1796
1823
|
}
|
|
1797
1824
|
}
|
|
1798
1825
|
updateBreakpoints() {
|
|
1799
|
-
const { measurements: t,
|
|
1826
|
+
const { measurements: t, maxWidth: i } = this;
|
|
1800
1827
|
if (t) {
|
|
1801
|
-
const n =
|
|
1802
|
-
this.showProduct =
|
|
1828
|
+
const n = i ? Math.min(this.screenWidth, i) : this.screenWidth, r = gn({ measurements: t, screenWidth: n });
|
|
1829
|
+
this.showProduct = r.product, this.showNav = r.nav, this.showUser = r.user;
|
|
1803
1830
|
}
|
|
1804
1831
|
}
|
|
1805
1832
|
render() {
|
|
1806
|
-
const { accountSwitcherOpen: t, apps: i, appsLoading: n, appsSearchTerm: r,
|
|
1807
|
-
return
|
|
1833
|
+
const { accountSwitcherOpen: t, apps: i, appsLoading: n, appsSearchTerm: r, currentPathname: o, handleAppCancel: s, handleAppHide: a, handleAppReorder: c, handleAppSave: h, handleItemSearch: f, handlePlatformClose: g, handleSearch: d, handleToggleSearch: A, handleSearchTypeChange: k, hiddenApps: w, infoBanner: P, links: y, messages: b, navigate: m, notifications: u, notificationDeleteProgress: v, openAccountSwitcher: T, portal: p, portalItem: $, product: _, productInfo: S, productHref: O, projectTitle: R, editedProjectTitle: I, handleProjectTitleSave: C, handleProjectTitleEdit: V, handleProjectTitleCancel: Ge, openProjectTitleEdit: Ue, openPlatformMenu: Be, platformMenuOpen: Fe, projectTitleEditing: X, projectTitleSaving: ze, projectTitleErrorMessage: We, projectMenuIcon: Re, projectMenuSaveIndicator: Ve, projectMenuClick: He, projectMenuOptions: qe, projectTitleInputRef: Je, projectButtonRef: Ke, recentContent: Qe, recentContentSearchTerm: Xe, recentContentLoading: Ye, userLinks: Ze, searchActive: H, searchTerm: et, searchType: tt, searchInput: it, searchAction: nt, searchPopover: rt, showNav: Y, showProduct: ot, showUser: st, suggestions: at } = this, ct = p?.user, lt = pe(_) && !y?.length || !this.measurements;
|
|
1834
|
+
return l`<div class="wrapper" style=${_e({ "--arcgis-portal-navigation-max-width": this.maxWidth ? `${this.maxWidth}px` : "100%" })}><arcgis-portal-info-banner .config=${P}></arcgis-portal-info-banner>${p?.isPortal && $?.loaded && l`<arcgis-portal-classification-banner .portalItem=${$}></arcgis-portal-classification-banner>` || ""}<header class=${oe({ navigation: !0, "navigation--loading": lt })}>${wn({ messages: b?.platform, portal: p, showNav: Y, openPlatformMenu: Be })}${ot && Gt({ navigate: m, portal: p, product: _, productInfo: S, productHref: O, messages: b?.logo, showNav: Y, searchActive: H, projectTitleEditing: X }) || ""}${zi({ navigate: m, portal: p, portalItem: $, messages: b?.project, projectTitle: R, editedProjectTitle: I, handleProjectTitleSave: C, handleProjectTitleEdit: V, openProjectTitleEdit: Ue, projectTitleErrorMessage: We, handleProjectTitleCancel: Ge, projectTitleEditing: X, projectTitleSaving: ze, projectMenuIcon: Re, projectMenuSaveIndicator: Ve, projectMenuClick: He, projectMenuOptions: qe, projectTitleInputRef: Je, projectButtonRef: Ke })}${Y && Ki({ searchActive: H, navigate: m, portal: p, product: _, messages: b?.links, links: y, currentPathname: o }) || ""}<div slot=content-end class="content-end fade-in" .hidden=${X || H}><slot name=content-end></slot></div>${qi({ navigate: m, portal: p, product: _, messages: b?.search, searchActive: H, searchType: tt, searchTerm: et, suggestions: at, handleSearch: d, handleToggleSearch: A, handleSearchTypeChange: k, searchInputRef: it, searchActionRef: nt, searchPopoverRef: rt })}${ct ? l`<div class="border-start fade-in">${qt({ notifications: u, messages: b?.notifications })}${Jt({ notifications: u, navigate: m, portal: p, deleteNotifications: this.deleteNotifications, messages: b?.notifications, notificationDeleteProgress: v })}</div>${Qi({ portal: p, userLinks: Ze, openAccountSwitcher: p?.isPortal ? void 0 : T, signOut: this.signOut, messages: b?.user, textDisabled: st === "avatar", navigate: m })}` : Ji({ messages: b.user, signIn: this.signIn })}</header>${Di({ locale: b._t9nLocale, navigate: m, portal: p, product: _, productInfo: S, messages: b?.platform, apps: i, appsLoading: n, hiddenApps: w, appsSearchTerm: r, editingApplications: this.editingApplications, open: Fe, links: y, recentContent: Qe, recentContentSearchTerm: Xe, recentContentLoading: Ye, handlePlatformClose: g, handleAppReorder: c, handleAppEdit: () => this.editingApplications = !0, handleAppsSearch: (ut) => this.appsSearchTerm = ut, handleAppSave: h, handleAppCancel: s, handleAppHide: a, handleItemSearch: f })}${t && l`<arcgis-portal-account-switcher .portal=${p} .baseUrl=${W({ portal: p })}></arcgis-portal-account-switcher>` || ""}</div>`;
|
|
1808
1835
|
}
|
|
1809
1836
|
}
|
|
1810
|
-
|
|
1837
|
+
dt("arcgis-portal-navigation", yn);
|
|
1811
1838
|
export {
|
|
1812
|
-
|
|
1839
|
+
yn as ArcGISPortalNavigation
|
|
1813
1840
|
};
|