@arcgis/portal-components 5.2.0-next.95 → 5.2.0-next.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/2SUHE7I3.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-navigation/customElement.js +327 -323
- package/dist/components/arcgis-portal-navigation/index.js +4 -4
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +6 -6
- package/dist/cdn/JQTQZCBV.js +0 -2
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { g as
|
|
3
|
-
import { safeStyleMap as
|
|
4
|
-
import { u as
|
|
5
|
-
import { nothing as
|
|
6
|
-
import { formatDate as It, substitute as
|
|
7
|
-
import { g as
|
|
2
|
+
import { g as ne, c as $t } from "../../chunks/runtime.js";
|
|
3
|
+
import { safeStyleMap as Ie, safeClassMap as re, LitElement as At, createEvent as q } from "@arcgis/lumina";
|
|
4
|
+
import { u as kt } from "../../chunks/useT9n.js";
|
|
5
|
+
import { nothing as M, html as c, svg as xt, css as St } from "lit";
|
|
6
|
+
import { formatDate as It, substitute as X, getLocale as Pt } from "@arcgis/core/intl.js";
|
|
7
|
+
import { g as ce, b as Pe } from "../../chunks/url.js";
|
|
8
8
|
import { a as B } from "../../chunks/requests.js";
|
|
9
9
|
import { repeat as U } from "lit/directives/repeat.js";
|
|
10
10
|
import { m as Nt } from "../../chunks/icons.js";
|
|
11
|
-
import { i as
|
|
12
|
-
import { c as
|
|
13
|
-
import { c as jt, d as Dt, e as
|
|
14
|
-
import { i as
|
|
11
|
+
import { i as T, c as ge, a as Tt } from "../../chunks/user2.js";
|
|
12
|
+
import { c as Ct, d as Mt, e as Ot, f as Lt, h as Et } from "../../chunks/portal2.js";
|
|
13
|
+
import { c as jt, d as Dt, e as Gt } from "../../chunks/user.js";
|
|
14
|
+
import { i as Ne, a as zt } from "../../chunks/utils2.js";
|
|
15
15
|
import { g as Ut } from "../../chunks/request.js";
|
|
16
|
-
import { g as
|
|
17
|
-
import { keyed as
|
|
18
|
-
import { e as
|
|
16
|
+
import { g as Te } from "../../chunks/item.js";
|
|
17
|
+
import { keyed as le } from "lit/directives/keyed.js";
|
|
18
|
+
import { e as ue, n as Bt, a as de, f as J, g as Rt } from "../../chunks/portal.js";
|
|
19
19
|
import { ref as W, createRef as F } from "lit/directives/ref.js";
|
|
20
20
|
import { c as Ft, g as Wt } from "../../chunks/dom.js";
|
|
21
|
-
import { debounce as
|
|
21
|
+
import { debounce as be } from "@arcgis/toolkit/function";
|
|
22
22
|
import Vt from "@arcgis/core/identity/IdentityManager.js";
|
|
23
23
|
import { t as Ht } from "../../chunks/functionalities.js";
|
|
24
24
|
import { c as qt } from "../../chunks/string.js";
|
|
25
|
-
function
|
|
25
|
+
function ve({ portal: e, productInfo: t }) {
|
|
26
26
|
const { name: i, glyph: n } = t || {};
|
|
27
|
-
return c`<img alt class="logo__glyph" src=${n ??
|
|
27
|
+
return c`<img alt class="logo__glyph" src=${n ?? M}><span class="logo__text"><span class="logo__title">${i}</span>${e?.name && c`<span class="logo__subtitle">${e.name}</span>` || ""}</span>`;
|
|
28
28
|
}
|
|
29
|
-
function Jt({ navigate: e, portal: t, product: i, productInfo: n, productHref: r, messages: o, searchActive:
|
|
30
|
-
const d =
|
|
31
|
-
return !i || !t || !o || d || t?.portalProperties?.topNav?.brandVisibilityEnabled === !1 && !t?.user ? null : r ? c`<a href=${r ??
|
|
29
|
+
function Jt({ navigate: e, portal: t, product: i, productInfo: n, productHref: r, messages: o, searchActive: a, showNav: s, projectTitleEditing: l }) {
|
|
30
|
+
const d = a && i === "Online" && !s || i !== "Online" && l && window.innerWidth < 960;
|
|
31
|
+
return !i || !t || !o || d || t?.portalProperties?.topNav?.brandVisibilityEnabled === !1 && !t?.user ? null : r ? c`<a href=${r ?? M} @click=${(m) => {
|
|
32
32
|
e({ event: m, href: r });
|
|
33
|
-
}} class="logo logo--link">${
|
|
33
|
+
}} class="logo logo--link">${ve({ portal: t, productInfo: n })}</a>` : c`<div class="logo ">${ve({ portal: t, productInfo: n })}</div>`;
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const te = {}, C = {
|
|
36
36
|
Month: 2628e3,
|
|
37
37
|
Week: 604800,
|
|
38
38
|
Day: 86400,
|
|
@@ -40,37 +40,37 @@ const Z = {}, T = {
|
|
|
40
40
|
Minute: 60,
|
|
41
41
|
Second: 1
|
|
42
42
|
};
|
|
43
|
-
function
|
|
43
|
+
function Ce(e) {
|
|
44
44
|
if (!e)
|
|
45
45
|
return null;
|
|
46
|
-
const t = Math.floor(e / 1e3), i = Math.abs(t), n =
|
|
46
|
+
const t = Math.floor(e / 1e3), i = Math.abs(t), n = C.Day * 365;
|
|
47
47
|
switch (!0) {
|
|
48
|
-
case i <
|
|
49
|
-
return [Math.floor(t /
|
|
50
|
-
case i <
|
|
51
|
-
return [Math.floor(t /
|
|
52
|
-
case i <
|
|
53
|
-
return [Math.floor(t /
|
|
54
|
-
case i <
|
|
55
|
-
return [Math.floor(t /
|
|
56
|
-
case i <
|
|
57
|
-
return [Math.floor(t /
|
|
48
|
+
case i < C.Minute:
|
|
49
|
+
return [Math.floor(t / C.Second), "second"];
|
|
50
|
+
case i < C.Hour:
|
|
51
|
+
return [Math.floor(t / C.Minute), "minute"];
|
|
52
|
+
case i < C.Day:
|
|
53
|
+
return [Math.floor(t / C.Hour), "hour"];
|
|
54
|
+
case i < C.Week:
|
|
55
|
+
return [Math.floor(t / C.Day), "day"];
|
|
56
|
+
case i < C.Month:
|
|
57
|
+
return [Math.floor(t / C.Week), "week"];
|
|
58
58
|
case i < n:
|
|
59
|
-
return [Math.floor(t /
|
|
59
|
+
return [Math.floor(t / C.Month), "month"];
|
|
60
60
|
default:
|
|
61
61
|
return [Math.floor(t / n), "year"];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Me(e) {
|
|
65
65
|
return (typeof e == "number" ? e : e.getTime?.()) - (/* @__PURE__ */ new Date()).getTime();
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Oe({ locale: e, time: t, t9n: i }) {
|
|
68
68
|
if (!e || !t)
|
|
69
69
|
return "";
|
|
70
|
-
const n =
|
|
71
|
-
|
|
72
|
-
const r =
|
|
73
|
-
return r ? r[1] === "second" ? i?.lessThanOneMinute || `< ${
|
|
70
|
+
const n = Me(t);
|
|
71
|
+
te[e] ??= new Intl.RelativeTimeFormat(e, { style: "long" });
|
|
72
|
+
const r = Ce(n);
|
|
73
|
+
return r ? r[1] === "second" ? i?.lessThanOneMinute || `< ${te[e].format(r[0] > 0 ? 1 : -1, "minutes")}` : te[e].format(r[0], r[1]) : "";
|
|
74
74
|
}
|
|
75
75
|
const Kt = {
|
|
76
76
|
month: "long",
|
|
@@ -95,17 +95,17 @@ async function Yt({ portal: e }) {
|
|
|
95
95
|
async function Zt(e, t) {
|
|
96
96
|
if (!e?.user)
|
|
97
97
|
return { success: !0 };
|
|
98
|
-
const i = t.map((o) => ({ portal: e, id: o })).map(
|
|
98
|
+
const i = t.map((o) => ({ portal: e, id: o })).map(Le);
|
|
99
99
|
return { success: !((await Promise.allSettled(i))?.filter((o) => o.status === "rejected" || !o.value?.success)).length };
|
|
100
100
|
}
|
|
101
|
-
async function
|
|
101
|
+
async function Le({
|
|
102
102
|
portal: e,
|
|
103
103
|
id: t
|
|
104
104
|
}) {
|
|
105
105
|
const i = `${e.restUrl}/community/users/${e.user?.id}/notifications/${t}/delete`, { result: n } = await B(i, { method: "post" });
|
|
106
106
|
return n?.success ? { success: !0, id: t } : { success: !1, id: t };
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Ee = "notifications-menu";
|
|
109
109
|
function ei(e) {
|
|
110
110
|
try {
|
|
111
111
|
const t = decodeURIComponent(e);
|
|
@@ -177,7 +177,7 @@ function ii({
|
|
|
177
177
|
}) {
|
|
178
178
|
if (e?.received && e.id) {
|
|
179
179
|
const r = {
|
|
180
|
-
date:
|
|
180
|
+
date: Oe({ locale: i, time: e.received, t9n: n }),
|
|
181
181
|
id: e.id,
|
|
182
182
|
text: "",
|
|
183
183
|
icon: ti(e.type)
|
|
@@ -185,15 +185,15 @@ function ii({
|
|
|
185
185
|
if (e.type === "webapp_not_copied" && t.isPortal && (e.type = "webapp_not_copied_portal"), e.data?.taskTitle && (e.data.taskTitle = ei(e.data.taskTitle)), e.type === "message_received")
|
|
186
186
|
r.text = e.data.message || "";
|
|
187
187
|
else if (n.types[e.type]) {
|
|
188
|
-
const o =
|
|
189
|
-
e.data.baseUrl = `${o}/home/`, r.text =
|
|
188
|
+
const o = ce({ portal: t, usePortalHostname: !!t.user });
|
|
189
|
+
e.data.baseUrl = `${o}/home/`, r.text = X(n.types[e.type], e.data);
|
|
190
190
|
}
|
|
191
191
|
if (r.text)
|
|
192
192
|
return r;
|
|
193
193
|
}
|
|
194
194
|
return null;
|
|
195
195
|
}
|
|
196
|
-
async function
|
|
196
|
+
async function _e({
|
|
197
197
|
portal: e,
|
|
198
198
|
locale: t,
|
|
199
199
|
t9n: i
|
|
@@ -201,33 +201,33 @@ async function be({
|
|
|
201
201
|
if (!i)
|
|
202
202
|
return [];
|
|
203
203
|
const { result: n, error: r } = await Yt({ portal: e });
|
|
204
|
-
return r && console.error(r), n?.length ? n.map((
|
|
204
|
+
return r && console.error(r), n?.length ? n.map((a) => ii({ notification: a, portal: e, t9n: i, locale: t })).filter((a) => a) : [];
|
|
205
205
|
}
|
|
206
206
|
function ni({ notifications: e, messages: t, handleToggleNotifications: i, handleToggleSearch: n, notificationsActive: r }) {
|
|
207
|
-
return t ? c`<calcite-action class="action" scale=l .text=${t.label} icon=bell .indicator=${!!e?.length} id=${
|
|
207
|
+
return t ? c`<calcite-action class="action" scale=l .text=${t.label} icon=bell .indicator=${!!e?.length} id=${Ee} @click=${() => i(!r)} @focusin=${() => n(!1, !0)}></calcite-action>` : null;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return !t && !i ? null : c`<div class="empty">${e && c`<svg xmlns=http://www.w3.org/2000/svg width=64 height=64 viewBox="0 0 64 64" fill=none>${xt`<path d=${Nt[e] ??
|
|
209
|
+
function K({ icon: e, title: t, description: i }) {
|
|
210
|
+
return !t && !i ? null : c`<div class="empty">${e && c`<svg xmlns=http://www.w3.org/2000/svg width=64 height=64 viewBox="0 0 64 64" fill=none>${xt`<path d=${Nt[e] ?? M} fill=var(--calcite-color-border-input) />`}</svg>` || ""}${t && c`<h3 class="notifications__empty__header">${t}</h3>` || ""}${i && c`<p class="notifications__empty__text">${i}</p>` || ""}</div>`;
|
|
211
211
|
}
|
|
212
|
-
function ri({ notifications: e, deleteNotifications: t, messages: i, navigate: n, portal: r, notificationsActive: o, handleToggleNotifications:
|
|
213
|
-
return i ? c`<calcite-popover .referenceElement=${
|
|
212
|
+
function ri({ notifications: e, deleteNotifications: t, messages: i, navigate: n, portal: r, notificationsActive: o, handleToggleNotifications: a, notificationDeleteProgress: s }) {
|
|
213
|
+
return i ? c`<calcite-popover .referenceElement=${Ee} @calcitePopoverClose=${() => a(!1)} .label=${i.label} auto-close .open=${o} pointer-disabled flip-disabled trigger-disabled placement=bottom-end scale=l .heading=${i.label}>${e?.length > 0 ? c`<div class="notifications notifications--full">${typeof s == "number" && c`<calcite-scrim><calcite-loader type=determinate-value .label=${i.deleting} .value=${s}></calcite-loader></calcite-scrim>` || ""}<calcite-list .label=${i.label} interaction-mode=static class="notifications__list" scale=l>${U(e, (l) => l.id, (l) => c`<calcite-list-item closable @calciteListItemClose=${async () => await t([l.id])} .messageOverrides=${{ close: i.dismissLabel }} .iconStart=${l.icon}><div slot=content class="notification"><div class="notification__message" .innerHTML=${l.text ?? ""} @click=${(d) => {
|
|
214
214
|
const m = d.target, g = m.href;
|
|
215
215
|
if (m.nodeName === "CALCITE-LINK" && g) {
|
|
216
|
-
const p = `${
|
|
216
|
+
const p = `${ce({ portal: r, usePortalHostname: !!r.user })}/home/`;
|
|
217
217
|
n({ event: d, href: g, relativePath: g.replace(p, "") });
|
|
218
218
|
}
|
|
219
219
|
}}></div><div class="notification__date">${l.date}</div></div></calcite-list-item>`)}</calcite-list></div><calcite-button class="notifications__dismiss" scale=l appearance=transparent @click=${async (l) => {
|
|
220
220
|
const d = l.currentTarget?.parentElement;
|
|
221
221
|
await t(e?.map(({ id: m }) => m)), d.open = !1;
|
|
222
|
-
}}>${i.dismissAllLabel}</calcite-button>` : c`<div class="notifications">${
|
|
222
|
+
}}>${i.dismissAllLabel}</calcite-button>` : c`<div class="notifications">${K({ title: i.noNotifications, description: i.noNotificationsDescription, icon: "check" })}</div>`}</calcite-popover>` : null;
|
|
223
223
|
}
|
|
224
224
|
function oi(e) {
|
|
225
225
|
return e.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function ai(e, t, i, n) {
|
|
228
228
|
pi(e, JSON.stringify(t), i);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function si(e) {
|
|
231
231
|
return ui(e, !0);
|
|
232
232
|
}
|
|
233
233
|
function ci(e) {
|
|
@@ -254,15 +254,15 @@ function pi(e, t, i) {
|
|
|
254
254
|
i = i || {};
|
|
255
255
|
let n = i?.expires;
|
|
256
256
|
if (typeof n == "number") {
|
|
257
|
-
const o = /* @__PURE__ */ new Date(),
|
|
258
|
-
o.setTime(Date.now() +
|
|
257
|
+
const o = /* @__PURE__ */ new Date(), a = n * 24 * 60 * 60 * 1e3;
|
|
258
|
+
o.setTime(Date.now() + a), n = o, i.expires = o;
|
|
259
259
|
}
|
|
260
260
|
typeof n != "string" && n?.toUTCString && (i.expires = n.toUTCString());
|
|
261
261
|
let r = `${e}=${encodeURIComponent(t)}`;
|
|
262
262
|
for (const o of Object.keys(i)) {
|
|
263
263
|
r += `; ${o}`;
|
|
264
|
-
const
|
|
265
|
-
|
|
264
|
+
const a = i[o];
|
|
265
|
+
a !== !0 && (r += `=${a}`);
|
|
266
266
|
}
|
|
267
267
|
document.cookie = r;
|
|
268
268
|
}
|
|
@@ -284,7 +284,7 @@ async function mi(e) {
|
|
|
284
284
|
if (!n)
|
|
285
285
|
return t;
|
|
286
286
|
const r = n.id;
|
|
287
|
-
return (await
|
|
287
|
+
return (await Te(e, r)).result;
|
|
288
288
|
}
|
|
289
289
|
async function fi(e, t, i) {
|
|
290
290
|
if (!t || !e?.length)
|
|
@@ -305,17 +305,17 @@ async function gi(e) {
|
|
|
305
305
|
sortOrder: "asc",
|
|
306
306
|
q: 'owner:"esri" AND title:"BlockedApps Config" AND type: "Application Configuration"'
|
|
307
307
|
}, { result: n } = await B(t, { query: i }), r = n?.results?.[0]?.id;
|
|
308
|
-
return r ? (await
|
|
308
|
+
return r ? (await Te(e, r))?.result?.blockedApps || [] : [];
|
|
309
309
|
}
|
|
310
310
|
function bi(e, t) {
|
|
311
311
|
const i = e?.toLowerCase() || "", n = `${t.title || ""} ${t.label || ""}`;
|
|
312
312
|
return !i || n.toLowerCase().includes(i);
|
|
313
313
|
}
|
|
314
314
|
function vi() {
|
|
315
|
-
if (
|
|
315
|
+
if (si("APSW-query")?.expires > (/* @__PURE__ */ new Date()).setHours((/* @__PURE__ */ new Date()).getHours()))
|
|
316
316
|
return !0;
|
|
317
317
|
const t = { expires: (/* @__PURE__ */ new Date()).setHours((/* @__PURE__ */ new Date()).getHours() + 5) };
|
|
318
|
-
return
|
|
318
|
+
return ai(
|
|
319
319
|
"APSW-query",
|
|
320
320
|
t,
|
|
321
321
|
{
|
|
@@ -331,10 +331,10 @@ function _i(e, t) {
|
|
|
331
331
|
image: "arcgis-online.png",
|
|
332
332
|
label: "ArcGIS Online",
|
|
333
333
|
title: "ArcGIS Online",
|
|
334
|
-
url: `${
|
|
334
|
+
url: `${Pe({ portal: e })}/${i?.url ? i.url : Ne(e.user) ? "organization.html" : "index.html"}`
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function we(e) {
|
|
338
338
|
const i = [
|
|
339
339
|
"api-for-python",
|
|
340
340
|
"appstudio",
|
|
@@ -425,7 +425,7 @@ function wi(e, t) {
|
|
|
425
425
|
return !i.length && !e.blockBetaApps || !t?.length ? [] : (e.blockBetaApps && t.forEach((r) => {
|
|
426
426
|
r.isBeta && !i.includes(r.clientid) && i.push(r.clientid);
|
|
427
427
|
}), i.forEach((r) => {
|
|
428
|
-
const o = t.find((
|
|
428
|
+
const o = t.find((a) => a.clientid === r);
|
|
429
429
|
o && n.push(o);
|
|
430
430
|
}), n);
|
|
431
431
|
}
|
|
@@ -442,13 +442,13 @@ function $i(e, t) {
|
|
|
442
442
|
"portal:publisher:publishFeeds",
|
|
443
443
|
"portal:publisher:publishRealTimeAnalytics",
|
|
444
444
|
"portal:publisher:publishBigDataAnalytics"
|
|
445
|
-
], r = (e?.privileges || []).some((
|
|
445
|
+
], r = (e?.privileges || []).some((a) => i.includes(a)), o = S("velocity", t);
|
|
446
446
|
return r && o;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function Ai(e) {
|
|
449
449
|
return S("HubforArcGIS", e);
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function ki(e, t) {
|
|
452
452
|
return !(e.isPortal && e.portalProperties?.newMapViewerEnabled === !1) && S("arcgisWebApps", t);
|
|
453
453
|
}
|
|
454
454
|
function xi(e) {
|
|
@@ -477,7 +477,7 @@ function Pi(e, t, i, n) {
|
|
|
477
477
|
hasAccess: () => S("HubforArcGIS", n)
|
|
478
478
|
},
|
|
479
479
|
"ArcGIS Enterprise Sites": {
|
|
480
|
-
hasAccess: () =>
|
|
480
|
+
hasAccess: () => Ai(n)
|
|
481
481
|
},
|
|
482
482
|
"ArcGIS QuickCapture Web Designer": {
|
|
483
483
|
hasAccess: () => S("arcgisWebApps", n)
|
|
@@ -486,7 +486,7 @@ function Pi(e, t, i, n) {
|
|
|
486
486
|
hasAccess: () => S("dashboards", n)
|
|
487
487
|
},
|
|
488
488
|
"Map Viewer": {
|
|
489
|
-
hasAccess: () =>
|
|
489
|
+
hasAccess: () => ki(e, n)
|
|
490
490
|
},
|
|
491
491
|
"Map Viewer Classic": {
|
|
492
492
|
hasAccess: () => S("arcgisWebApps", n)
|
|
@@ -548,42 +548,42 @@ function Ni(e) {
|
|
|
548
548
|
};
|
|
549
549
|
return e.isPortal && (t = { ...t, arcgisonline: 1, arcgisUrban: 1, arcgisinstantapps: 1 }), t;
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function oe(e) {
|
|
552
552
|
return e.sourceJSON?.subscriptionInfo?.options?.includes("Developer");
|
|
553
553
|
}
|
|
554
554
|
function V(e) {
|
|
555
|
-
return
|
|
555
|
+
return ne(`assets/portal-navigation/apps/${e || ""}`);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function je(e, t, i) {
|
|
558
558
|
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}`;
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function z(e, t, i) {
|
|
561
561
|
if (e.image ? e.image = V(e.image) : e.placeHolderIcon = `${V()}svg-app-icon.svg`, e.url?.startsWith("../")) {
|
|
562
562
|
const n = i.urlKey ? `${i.urlKey}.${i.customBaseUrl}` : i.portalHostname;
|
|
563
563
|
e.url = `${window.location.protocol}//${n}${e.url.substring(2, e.url.length)}`;
|
|
564
564
|
}
|
|
565
|
-
return delete e.isLicensed, delete e.privileges, e.itemId = t, e;
|
|
565
|
+
return e.title === "ArcGIS GeoBIM" && (e.label = "ArcGIS GeoBIM"), delete e.isLicensed, delete e.privileges, e.itemId = t, e;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function De() {
|
|
568
568
|
return `${V()}svg-app-circle.svg`;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function Ti(e, t, i) {
|
|
571
571
|
const n = e.properties?.appSwitcher?.image || e.icon;
|
|
572
572
|
return {
|
|
573
573
|
abbr: e.properties?.appSwitcher?.abbr || e.abbreviation,
|
|
574
574
|
itemId: e.itemId,
|
|
575
575
|
canAccess: !0,
|
|
576
576
|
webMappingApp: !0,
|
|
577
|
-
image: n ?
|
|
577
|
+
image: n ? je(e, t, i) : void 0,
|
|
578
578
|
label: e.title || e.label,
|
|
579
579
|
url: e.url,
|
|
580
|
-
placeHolderIcon: e.placeHolderIcon ||
|
|
580
|
+
placeHolderIcon: e.placeHolderIcon || De()
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
return e.appSwitcher?.image || e.icon ? e.image =
|
|
583
|
+
function Ci(e, t, i) {
|
|
584
|
+
return e.appSwitcher?.image || e.icon ? e.image = je(e, t, i) : e.placeHolderIcon = De(), e.abbr = e.appSwitcher?.abbr || e.abbreviation, delete e.abbreviation, delete e.appSwitcher, delete e.approvedApp, delete e.webMappingApp, e;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function ye(e, t) {
|
|
587
587
|
e.forEach((i) => {
|
|
588
588
|
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"));
|
|
589
589
|
});
|
|
@@ -595,64 +595,64 @@ async function Mi({
|
|
|
595
595
|
licenses: n,
|
|
596
596
|
blockedApps: r,
|
|
597
597
|
provisionedListings: o,
|
|
598
|
-
orgCapabilities:
|
|
599
|
-
trackViewerEnabled:
|
|
598
|
+
orgCapabilities: a,
|
|
599
|
+
trackViewerEnabled: s,
|
|
600
600
|
notebookServerEnabled: l,
|
|
601
601
|
willQueryForItems: d,
|
|
602
602
|
approvedApps: m
|
|
603
603
|
}) {
|
|
604
|
-
const g = {}, p = {}, _ = Pi(i, l,
|
|
604
|
+
const g = {}, p = {}, _ = Pi(i, l, s, n), A = Ni(i), w = [], I = e.length;
|
|
605
605
|
for (let h = 0; h < I; h++) {
|
|
606
606
|
const u = e[h], v = u.itemId || u.title;
|
|
607
|
-
let
|
|
608
|
-
const y = !u.serverFunction || t?.some((
|
|
609
|
-
(
|
|
607
|
+
let P = !0;
|
|
608
|
+
const y = !u.serverFunction || t?.some(($) => ($.serverFunction?.split(",") || []).includes(u.serverFunction)), x = r?.some(
|
|
609
|
+
($) => u.itemId && u.itemId === $.itemid || u.title && u.title === $.title
|
|
610
610
|
);
|
|
611
|
-
if (g[v] = 1, p[v] = u,
|
|
611
|
+
if (g[v] = 1, p[v] = u, x || oe(i) && !u.showInLocationPlatform || i.sourceJSON?.portalDeploymentType === "ArcGISEnterpriseOnKubernetes" && u.supportsKubernetes === !1)
|
|
612
612
|
continue;
|
|
613
|
-
const
|
|
614
|
-
if (_[
|
|
613
|
+
const b = u.title;
|
|
614
|
+
if (_[b] && !_[b]?.hasAccess())
|
|
615
615
|
continue;
|
|
616
|
-
const
|
|
616
|
+
const j = i.sourceJSON?.subscriptionInfo;
|
|
617
617
|
if (u.subscriptionType) {
|
|
618
|
-
|
|
618
|
+
j?.type === u.subscriptionType && (p[v].canAccess = !0, w.push(z(u, v, i)));
|
|
619
619
|
continue;
|
|
620
620
|
}
|
|
621
621
|
if (u.orgCapabilities) {
|
|
622
|
-
|
|
622
|
+
a?.length && a.some((E) => u.orgCapabilities?.includes(E.id)) && (p[v].canAccess = !0, w.push(z(u, v, i)));
|
|
623
623
|
continue;
|
|
624
624
|
}
|
|
625
|
-
if (!u.privileges?.length && !u.isLicensed && y && (u.label !== "ArcGIS Location Platform" ||
|
|
626
|
-
p[v].canAccess = !0, w.push(
|
|
625
|
+
if (!u.privileges?.length && !u.isLicensed && y && (u.label !== "ArcGIS Location Platform" || oe(i))) {
|
|
626
|
+
p[v].canAccess = !0, w.push(z(u, v, i));
|
|
627
627
|
continue;
|
|
628
628
|
}
|
|
629
629
|
if (i.user?.sourceJSON?.userLicenseTypeId?.toLowerCase() === "storytellerut" && u.label?.toLowerCase() === "storymaps") {
|
|
630
|
-
p[v].canAccess = !0, w.push(
|
|
630
|
+
p[v].canAccess = !0, w.push(z(u, v, i));
|
|
631
631
|
continue;
|
|
632
632
|
}
|
|
633
633
|
if (u.privileges?.length && i.user?.privileges) {
|
|
634
|
-
for (let
|
|
635
|
-
if (!i.user.privileges.includes(u.privileges[
|
|
636
|
-
|
|
634
|
+
for (let $ = 0; $ < u.privileges.length; $++)
|
|
635
|
+
if (!i.user.privileges.includes(u.privileges[$])) {
|
|
636
|
+
P = !1;
|
|
637
637
|
break;
|
|
638
638
|
}
|
|
639
|
-
if (!u.isLicensed &&
|
|
640
|
-
p[v].canAccess = !0, w.push(
|
|
639
|
+
if (!u.isLicensed && P && y) {
|
|
640
|
+
p[v].canAccess = !0, w.push(z(u, v, i));
|
|
641
641
|
continue;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
if (u.isLicensed &&
|
|
645
|
-
for (let
|
|
646
|
-
if (v === o[
|
|
647
|
-
p[v].canAccess = !0, w.push(
|
|
644
|
+
if (u.isLicensed && P && y) {
|
|
645
|
+
for (let $ = 0; $ < o.length; $++)
|
|
646
|
+
if (v === o[$].itemId || v === o[$].title) {
|
|
647
|
+
p[v].canAccess = !0, w.push(z(u, v, i));
|
|
648
648
|
break;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
const
|
|
652
|
+
const N = await Ut(i);
|
|
653
653
|
return o.forEach((h) => {
|
|
654
|
-
if (h.type === "Web Mapping Application" &&
|
|
655
|
-
const u =
|
|
654
|
+
if (h.type === "Web Mapping Application" && !A[h.clientId] && !g[h.itemId] && h.url && h.title && !g[h.title] && !h.typeKeywords.includes("hideFromAppSwitcher")) {
|
|
655
|
+
const u = Ti(h, i, N);
|
|
656
656
|
p[h.itemId] = u, w.push(u);
|
|
657
657
|
}
|
|
658
658
|
}), {
|
|
@@ -665,27 +665,27 @@ async function Mi({
|
|
|
665
665
|
approvedApp: !0,
|
|
666
666
|
canAccess: !d
|
|
667
667
|
};
|
|
668
|
-
return p[h.itemId] = u,
|
|
668
|
+
return p[h.itemId] = u, Ci(u, i, N);
|
|
669
669
|
}),
|
|
670
670
|
...w
|
|
671
671
|
],
|
|
672
672
|
appDictionary: p
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function ie(e, t) {
|
|
676
676
|
return e.filter((i) => !t?.some(
|
|
677
677
|
(r) => i.itemId && i.itemId === r.itemid || i.title && i.title === r.title
|
|
678
678
|
));
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function $e({
|
|
681
681
|
apps: e,
|
|
682
682
|
app: t,
|
|
683
683
|
appDictionary: i,
|
|
684
684
|
newAppDictionary: n,
|
|
685
685
|
portal: r
|
|
686
686
|
}) {
|
|
687
|
-
let
|
|
688
|
-
return
|
|
687
|
+
let a = Object.keys(i).map((s) => i[s]).filter((s) => s.itemId === t.uid || s.title === t.uid).shift();
|
|
688
|
+
return a && !i[t.uid] && (t.uid = a.itemId || a.title || ""), a?.hasBeenPopulated || (a ? ((t.hasChanged || a.hasChanged || !a.canAccess && !a.ignoreNoAccess) && Ne(r.user) && (i[t.uid].hasChanged = !0, i[t.uid].ignoreNoAccess = t.ignoreNoAccess), t.isNew && (i[t.uid].isNew = !0), delete n[t.uid]) : (a = t, a.canAccess = !1, a.itemId = t.uid, i[t.uid] = a), i[t.uid].hasBeenPopulated = !0, e.push(a)), e;
|
|
689
689
|
}
|
|
690
690
|
async function Oi({
|
|
691
691
|
portal: e,
|
|
@@ -694,35 +694,35 @@ async function Oi({
|
|
|
694
694
|
}) {
|
|
695
695
|
if (!e?.id || !e.user)
|
|
696
696
|
return { apps: [], hiddenApps: {} };
|
|
697
|
-
const n = vi(), [r, o,
|
|
697
|
+
const n = vi(), [r, o, a, s, l, d, m] = await Promise.all([
|
|
698
698
|
mi(e),
|
|
699
699
|
Dt(e),
|
|
700
|
-
|
|
701
|
-
|
|
700
|
+
Gt(e),
|
|
701
|
+
Ct(e),
|
|
702
702
|
Mt(e),
|
|
703
703
|
Ot(e),
|
|
704
704
|
gi(e)
|
|
705
|
-
]), g = e.isPortal ? await Lt(e) : null, p =
|
|
705
|
+
]), g = e.isPortal ? await Lt(e) : null, p = a?.result?.properties;
|
|
706
706
|
let _ = r?.appSwitcher?.apps || [];
|
|
707
707
|
e.isPortal || (_ = _.filter(
|
|
708
708
|
(y) => y.title !== "Map Viewer Classic" || e.sourceJSON.created < /* @__PURE__ */ new Date("February 26 2025")
|
|
709
709
|
), _.unshift(_i(e, p)));
|
|
710
|
-
const
|
|
710
|
+
const A = s?.result?.approvedApps?.filter((y) => !y.hideForNonPrivilegedMember) || [], w = {};
|
|
711
711
|
o?.forEach((y) => {
|
|
712
|
-
const
|
|
713
|
-
|
|
712
|
+
const x = y.clientId?.toLowerCase();
|
|
713
|
+
x && (w[x] = {
|
|
714
714
|
valid: !0,
|
|
715
715
|
itemId: y.itemId,
|
|
716
716
|
clientId: y.clientId
|
|
717
717
|
});
|
|
718
718
|
}), l?.forEach((y) => {
|
|
719
|
-
const
|
|
720
|
-
|
|
719
|
+
const x = y.id?.toLowerCase();
|
|
720
|
+
x && (w[x] = {
|
|
721
721
|
valid: !0,
|
|
722
722
|
clientId: y.id
|
|
723
723
|
});
|
|
724
724
|
});
|
|
725
|
-
const I = wi(d, m), { apps:
|
|
725
|
+
const I = wi(d, m), { apps: N, appDictionary: f } = await Mi({
|
|
726
726
|
userApps: _,
|
|
727
727
|
servers: g,
|
|
728
728
|
portal: e,
|
|
@@ -733,35 +733,35 @@ async function Oi({
|
|
|
733
733
|
trackViewerEnabled: t,
|
|
734
734
|
notebookServerEnabled: i,
|
|
735
735
|
willQueryForItems: n,
|
|
736
|
-
approvedApps:
|
|
736
|
+
approvedApps: A
|
|
737
737
|
});
|
|
738
|
-
p?.appLauncher && (p?.appLauncher.primary &&
|
|
738
|
+
p?.appLauncher && (p?.appLauncher.primary && ye(p?.appLauncher.primary, e), p?.appLauncher.secondary && ye(p?.appLauncher.secondary, e));
|
|
739
739
|
let h = [], u = [];
|
|
740
740
|
if (!p?.appLauncher?.primary || !p?.appLauncher.secondary)
|
|
741
|
-
h =
|
|
741
|
+
h = N.slice().sort((y, x) => (y.label || "") < (x.label || "") ? -1 : 1), h = ie(h, I), u = [];
|
|
742
742
|
else {
|
|
743
|
-
const { result: y } = await fi(
|
|
743
|
+
const { result: y } = await fi(A, n, e);
|
|
744
744
|
y?.results?.length && y.results.forEach((k) => {
|
|
745
|
-
const
|
|
746
|
-
|
|
745
|
+
const b = f[k.id];
|
|
746
|
+
b.canAccess = !0, b.hasChanged = b.url !== k.url ? !!k.url : !1;
|
|
747
747
|
});
|
|
748
|
-
const
|
|
748
|
+
const x = { ...f };
|
|
749
749
|
p?.appLauncher?.primary?.forEach((k) => {
|
|
750
750
|
k.label === "Map Viewer" && (k.uid = "Map Viewer");
|
|
751
751
|
}), h = p?.appLauncher.primary.reduce(
|
|
752
|
-
(k,
|
|
752
|
+
(k, b) => $e({ apps: k, app: b, appDictionary: f, newAppDictionary: x, portal: e }),
|
|
753
753
|
[]
|
|
754
754
|
) || [], u = p?.appLauncher.secondary.reduce(
|
|
755
|
-
(k,
|
|
755
|
+
(k, b) => $e({ apps: k, app: b, appDictionary: f, newAppDictionary: x, portal: e }),
|
|
756
756
|
[]
|
|
757
|
-
) || [], h =
|
|
758
|
-
for (const k of Object.keys(
|
|
759
|
-
|
|
757
|
+
) || [], h = ie(h, I), u = ie(u, I), oe(e) && (h = h.filter((k) => k.canAccess), u = u.filter((k) => k.canAccess));
|
|
758
|
+
for (const k of Object.keys(x))
|
|
759
|
+
x[k].canAccess && (x[k].isNew = !0, f[k] = x[k], h.push(x[k]));
|
|
760
760
|
}
|
|
761
|
-
const v = [...h, ...u],
|
|
761
|
+
const v = [...h, ...u], P = u.reduce((y, x) => (x.itemId && (y[x.itemId] = !0), y), {});
|
|
762
762
|
return {
|
|
763
763
|
apps: v,
|
|
764
|
-
hiddenApps:
|
|
764
|
+
hiddenApps: P,
|
|
765
765
|
signInSettings: d,
|
|
766
766
|
licenses: w,
|
|
767
767
|
userProperties: p
|
|
@@ -777,72 +777,72 @@ async function Ei({
|
|
|
777
777
|
portal: n
|
|
778
778
|
}) {
|
|
779
779
|
const r = e.reduce(
|
|
780
|
-
(
|
|
781
|
-
const l = t[
|
|
782
|
-
return
|
|
783
|
-
label:
|
|
784
|
-
uid:
|
|
785
|
-
}),
|
|
780
|
+
(a, s) => {
|
|
781
|
+
const l = t[s.itemId];
|
|
782
|
+
return a[l ? "secondary" : "primary"].push({
|
|
783
|
+
label: s.label,
|
|
784
|
+
uid: s.itemId || s.title
|
|
785
|
+
}), a;
|
|
786
786
|
},
|
|
787
787
|
{ primary: [], secondary: [] }
|
|
788
788
|
), o = { ...i || {}, appLauncher: r };
|
|
789
789
|
return await jt(o, n);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Ge({ app: e }) {
|
|
792
792
|
if (!e)
|
|
793
793
|
return null;
|
|
794
794
|
if (!e.canAccess)
|
|
795
795
|
return c`<span class="list-item__logo list-item__logo-empty"></span>`;
|
|
796
796
|
const t = !e.image && e.abbr;
|
|
797
|
-
return c`${t && c`<span class="list-item__logo">${e.placeHolderIcon && c`<img src=${
|
|
797
|
+
return c`${t && c`<span class="list-item__logo">${e.placeHolderIcon && c`<img src=${we(e.placeHolderIcon) ?? M} class="list-item__logo-bg" alt>` || ""}<span style=${Ie({ fontSize: e.fontSize || "20px" })} class="list-item__abbr">${e.abbr}</span></span>` || ""}${e.image && c`<img src=${we(e.image) ?? M} class="list-item__logo" alt>` || ""}`;
|
|
798
798
|
}
|
|
799
799
|
function ji({ app: e, hiddenApps: t, messages: i, toggleAppVisibility: n, handleAppDelete: r }) {
|
|
800
800
|
if (!e || !i)
|
|
801
801
|
return null;
|
|
802
|
-
const o = Li(e, t), { title:
|
|
803
|
-
return c`<calcite-list-item .label=${
|
|
802
|
+
const o = Li(e, t), { title: a, itemId: s, label: l } = e;
|
|
803
|
+
return c`<calcite-list-item .label=${a || l} class=${re(o ? "app--hidden" : "")}><span slot=content-start>${Ge({ app: e })}</span>${e.canAccess ? c`<calcite-action .text=${o ? i.show : i.hide} .icon=${o ? "view-hide" : "view-visible"} slot=actions-end @click=${() => s && n(s, !o)}></calcite-action>` : c`<calcite-action .text=${i.delete} icon=x slot=actions-end @click=${() => s && r(s)}></calcite-action>`}</calcite-list-item>`;
|
|
804
804
|
}
|
|
805
805
|
function Di({ app: e, messages: t }) {
|
|
806
806
|
if (!e || !t)
|
|
807
807
|
return null;
|
|
808
|
-
const { title: i, itemId: n, label: r, url: o, isNew:
|
|
809
|
-
return c`<li class="list-item"><a class="list-item__link" href=${o ??
|
|
808
|
+
const { title: i, itemId: n, label: r, url: o, isNew: a } = e, s = t?.descriptions?.[i] || t?.descriptions?.[r];
|
|
809
|
+
return c`<li class="list-item"><a class="list-item__link" href=${o ?? M} target=_blank id=${n ?? M} aria-describedby=${`${n}--tooltip`}>${c`<span class="list-item__container">${Ge({ app: e })}<span class="list-item__title">${r || i}</span>${a && c`<calcite-chip scale=s class="list-item__chip" .label=${t.new}>${t.new}</calcite-chip>` || ""}</span>`}</a>${s && c`<calcite-tooltip .referenceElement=${n} placement=trailing .id=${`${n}--tooltip`} role=tooltip>${s}</calcite-tooltip>` || ""}</li>`;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Gi({ apps: e, appsLoading: t, appsSearchTerm: i, hiddenApps: n, messages: r, handleAppsSearch: o, handleAppReorder: a, handleAppSave: s, handleAppHide: l, handleAppDelete: d, handleAppCancel: m, handleAppEdit: g, editingApplications: p, portal: _ }) {
|
|
812
812
|
if (!e || !r)
|
|
813
813
|
return null;
|
|
814
|
-
const
|
|
814
|
+
const A = i?.length > 0, w = (e || []).filter((f) => f.itemId && (!n?.[f.itemId] || A) && bi(i, f)), I = A ? r.noAppResults.replace("{term}", i) : r.noAppsAvailable, N = A ? T(_) ? r.noAppsDescriptionPublic : r.noAppResultsDescriptionOrg : r.noAppsAvailable;
|
|
815
815
|
return p ? c`<div class="list__header"><calcite-button appearance=outline width=half @click=${() => {
|
|
816
816
|
m();
|
|
817
817
|
}}>${r.cancel}</calcite-button><calcite-button width=half @click=${() => {
|
|
818
|
-
|
|
818
|
+
s();
|
|
819
819
|
}}>${r.applyChanges}</calcite-button></div><calcite-list .label=${r.allMyApplications} drag-enabled @calciteListDragEnd=${(f) => {
|
|
820
820
|
const { newIndex: h, oldIndex: u } = f.detail;
|
|
821
|
-
|
|
821
|
+
a({ newIndex: h, oldIndex: u });
|
|
822
822
|
}} .loading=${t}>${U(e, (f) => f.itemId, (f) => ji({ app: f, hiddenApps: n, messages: r, toggleAppVisibility: (h, u) => {
|
|
823
823
|
l({ app: h, hidden: u });
|
|
824
824
|
}, handleAppDelete: d }))}</calcite-list>` : c`<div class="list__header"><calcite-input type=search icon .placeholder=${r.searchMyApps} .value=${i} scale=m class="list__search" @calciteInputInput=${(f) => {
|
|
825
825
|
o(f.currentTarget.value);
|
|
826
|
-
}}></calcite-input><calcite-button appearance=transparent kind=neutral icon-start=reorder-cards .label=${r.reorder} @click=${() => g()} id=customize-apps></calcite-button><calcite-tooltip reference-element=customize-apps><span>${r.customizeApps}</span></calcite-tooltip></div>${w?.length > 0 ? c`<ul class="list">${U(w, (f) => f.itemId, (f) => Di({ app: f, messages: r }))}</ul>` :
|
|
826
|
+
}}></calcite-input><calcite-button appearance=transparent kind=neutral icon-start=reorder-cards .label=${r.reorder} @click=${() => g()} id=customize-apps></calcite-button><calcite-tooltip reference-element=customize-apps><span>${r.customizeApps}</span></calcite-tooltip></div>${w?.length > 0 ? c`<ul class="list">${U(w, (f) => f.itemId, (f) => Di({ app: f, messages: r }))}</ul>` : K({ title: I, description: N, icon: i ? "search" : "apps" })}`;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Ae = "portalAppClientId", pe = {
|
|
829
829
|
GeoanalyticsEngine: "geoanalyticsengine",
|
|
830
830
|
GeoanalyticsFabric: "geoanalyticsfabric",
|
|
831
831
|
IndoorsOnline: "indoorsonline"
|
|
832
832
|
};
|
|
833
|
-
function
|
|
834
|
-
return
|
|
833
|
+
function he(e) {
|
|
834
|
+
return pe.GeoanalyticsEngine === e;
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
836
|
+
function me(e) {
|
|
837
|
+
return pe.GeoanalyticsFabric === e;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
839
|
+
function ze(e) {
|
|
840
|
+
return pe.IndoorsOnline === e;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Q(e) {
|
|
843
843
|
return ["Location Platform", "GeoAnalytics Fabric", "GeoAnalytics Engine", "Online", "Enterprise"].includes(e);
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function zi({
|
|
846
846
|
portal: e,
|
|
847
847
|
messages: t,
|
|
848
848
|
licenses: i,
|
|
@@ -851,12 +851,12 @@ function Gi({
|
|
|
851
851
|
}) {
|
|
852
852
|
if (!t || !e)
|
|
853
853
|
return [];
|
|
854
|
-
const o = e.sourceJSON?.subscriptionInfo,
|
|
854
|
+
const o = e.sourceJSON?.subscriptionInfo, a = Wi({ messages: t, portal: e });
|
|
855
855
|
if (!e.user)
|
|
856
|
-
return
|
|
857
|
-
if (!e || !
|
|
856
|
+
return a;
|
|
857
|
+
if (!e || !a || e?.user && !i && !T(e))
|
|
858
858
|
return [];
|
|
859
|
-
const
|
|
859
|
+
const s = Hi({
|
|
860
860
|
portal: e,
|
|
861
861
|
licenses: i,
|
|
862
862
|
subscriptionInfo: o
|
|
@@ -865,11 +865,11 @@ function Gi({
|
|
|
865
865
|
portal: e,
|
|
866
866
|
clientId: n,
|
|
867
867
|
signInSettings: r,
|
|
868
|
-
navLinkDictionary:
|
|
868
|
+
navLinkDictionary: s
|
|
869
869
|
});
|
|
870
870
|
return Ui({ links: l, portal: e });
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function ke(e, t) {
|
|
873
873
|
return t ? e.configName ? t.indexOf(e.configName) : t.length : 0;
|
|
874
874
|
}
|
|
875
875
|
function Ui({
|
|
@@ -880,7 +880,7 @@ function Ui({
|
|
|
880
880
|
if (!i)
|
|
881
881
|
return e;
|
|
882
882
|
const n = i.customPage;
|
|
883
|
-
return n?.enabled && (n.visibility !== "members" || t.user?.orgId === t.id) && e.push({ label: n.name, href: n.url, configName: "customPage", icon: "link" }), i.order ? e.sort((r, o) =>
|
|
883
|
+
return n?.enabled && (n.visibility !== "members" || t.user?.orgId === t.id) && e.push({ label: n.name, href: n.url, configName: "customPage", icon: "link" }), i.order ? e.sort((r, o) => ke(r, i.order) - ke(o, i.order)) : e;
|
|
884
884
|
}
|
|
885
885
|
function Bi(e) {
|
|
886
886
|
const { id: t, access: i, isPortal: n } = e;
|
|
@@ -892,27 +892,27 @@ function Ri(e, t, i) {
|
|
|
892
892
|
const n = new URL(e), r = t || window.location.pathname;
|
|
893
893
|
return n.pathname === r;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Ue({
|
|
896
896
|
portal: e,
|
|
897
897
|
clientId: t,
|
|
898
898
|
signInSettings: i
|
|
899
899
|
}) {
|
|
900
|
-
const n = e.user, r =
|
|
901
|
-
gallery:
|
|
900
|
+
const n = e.user, r = ze(t), o = !!i?.blockedApps?.includes("arcgisnotebooks"), a = e.portalProperties, {
|
|
901
|
+
gallery: s = "all",
|
|
902
902
|
groups: l = "all",
|
|
903
903
|
map: d = "all",
|
|
904
904
|
notebook: m = "notebookCreators",
|
|
905
905
|
scene: g = "all"
|
|
906
|
-
} =
|
|
906
|
+
} = a?.topNav || {};
|
|
907
907
|
let p = ["home"];
|
|
908
908
|
if (!n) {
|
|
909
|
-
if (!
|
|
910
|
-
const
|
|
911
|
-
return [...p,
|
|
909
|
+
if (!a?.topNav) {
|
|
910
|
+
const A = ["gallery", "map", "scene", "groups"], w = e.isPortal ? ["help"] : [];
|
|
911
|
+
return [...p, ...A, ...w];
|
|
912
912
|
}
|
|
913
913
|
return [
|
|
914
914
|
...p,
|
|
915
|
-
...
|
|
915
|
+
...s === "all" ? ["gallery"] : [],
|
|
916
916
|
...d === "all" ? ["map"] : [],
|
|
917
917
|
...g === "all" ? ["scene"] : [],
|
|
918
918
|
...l === "all" ? ["groups"] : [],
|
|
@@ -920,19 +920,19 @@ function ze({
|
|
|
920
920
|
];
|
|
921
921
|
}
|
|
922
922
|
const _ = n.orgId === e.id;
|
|
923
|
-
return !
|
|
923
|
+
return !a?.topNav && T(e) ? p = ["ArcGIS", "overview", "pricing", "map", "scene", "groups", "myContent"] : p = [
|
|
924
924
|
...p,
|
|
925
|
-
...(
|
|
926
|
-
...(d === "all" || d === "members" && _ || d === "mapCreators" &&
|
|
927
|
-
...(g === "all" || g === "members" && _ || g === "sceneCreators" &&
|
|
925
|
+
...(s === "all" || s === "members" && _) && !r ? ["gallery"] : [],
|
|
926
|
+
...(d === "all" || d === "members" && _ || d === "mapCreators" && ge(n)) && !r ? ["map"] : [],
|
|
927
|
+
...(g === "all" || g === "members" && _ || g === "sceneCreators" && ge(n)) && !r ? ["scene"] : [],
|
|
928
928
|
...!o && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
929
|
-
(!e.isPortal || e.sourceJSON.supportsHostedNotebooks) && (m === "members" && _ || m === "notebookCreators" &&
|
|
929
|
+
(!e.isPortal || e.sourceJSON.supportsHostedNotebooks) && (m === "members" && _ || m === "notebookCreators" && Tt(n)) && !r ? ["notebook"] : [],
|
|
930
930
|
...(l === "all" || l === "members" && _) && !r ? ["groups"] : [],
|
|
931
931
|
..._ && !r ? ["myContent", "organization"] : []
|
|
932
932
|
], p;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
return `${
|
|
934
|
+
function O(e) {
|
|
935
|
+
return `${Pe({ portal: e })}/`;
|
|
936
936
|
}
|
|
937
937
|
function Fi({
|
|
938
938
|
keys: e,
|
|
@@ -943,11 +943,11 @@ function Fi({
|
|
|
943
943
|
return e.forEach((r) => {
|
|
944
944
|
const o = t[r];
|
|
945
945
|
if (o && (!("show" in o) || o.show)) {
|
|
946
|
-
const { href:
|
|
946
|
+
const { href: a, newTab: s, icon: l, relativePath: d, configName: m } = o;
|
|
947
947
|
n.push({
|
|
948
948
|
label: i[r],
|
|
949
|
-
href:
|
|
950
|
-
newTab:
|
|
949
|
+
href: a,
|
|
950
|
+
newTab: s,
|
|
951
951
|
relativePath: d,
|
|
952
952
|
configName: m,
|
|
953
953
|
icon: l
|
|
@@ -961,12 +961,12 @@ function Wi({
|
|
|
961
961
|
}) {
|
|
962
962
|
if (!e || !t)
|
|
963
963
|
return [];
|
|
964
|
-
const i =
|
|
964
|
+
const i = O(t), n = {
|
|
965
965
|
overview: { label: e.overview, href: `${i}../features/features.html`, icon: "information" },
|
|
966
966
|
pricing: { label: e.pricing, href: `${i}../features/plans/pricing.html`, icon: "credit-card" },
|
|
967
967
|
map: { label: e.map, href: `${i}apps/mapviewer/index.html`, icon: "map", configName: "map" },
|
|
968
968
|
scene: { label: e.scene, href: `${i}webscene/viewer.html`, icon: "globe", configName: "scene" },
|
|
969
|
-
help: { label: e.help, href:
|
|
969
|
+
help: { label: e.help, href: ue(t), newTab: !0, icon: "headset" },
|
|
970
970
|
home: { label: e.home, href: `${i}index.html`, relativePath: "index.html", icon: "home" },
|
|
971
971
|
gallery: {
|
|
972
972
|
label: e.gallery,
|
|
@@ -983,7 +983,7 @@ function Wi({
|
|
|
983
983
|
configName: "groups"
|
|
984
984
|
}
|
|
985
985
|
};
|
|
986
|
-
return (Bi(t) ? ["overview", "pricing", "map", "scene", "help"] :
|
|
986
|
+
return (Bi(t) ? ["overview", "pricing", "map", "scene", "help"] : Ue({ portal: t })).map((o) => n[o]);
|
|
987
987
|
}
|
|
988
988
|
function Vi({
|
|
989
989
|
messages: e,
|
|
@@ -992,41 +992,41 @@ function Vi({
|
|
|
992
992
|
signInSettings: n,
|
|
993
993
|
navLinkDictionary: r
|
|
994
994
|
}) {
|
|
995
|
-
const o =
|
|
996
|
-
return o ||
|
|
995
|
+
const o = he(i), a = Ue({ portal: t, clientId: i, signInSettings: n }), s = `${O(t)}geoanalytics${o ? "engine" : "fabric"}.html`;
|
|
996
|
+
return o || me(i) ? [
|
|
997
997
|
{
|
|
998
998
|
// TODO: active calculations in the component need to account for hash for these options
|
|
999
|
-
href: `${
|
|
999
|
+
href: `${s}#subscription`,
|
|
1000
1000
|
label: e.subscription
|
|
1001
1001
|
},
|
|
1002
1002
|
...o ? [
|
|
1003
1003
|
{
|
|
1004
|
-
href: `${
|
|
1004
|
+
href: `${s}#downloads`,
|
|
1005
1005
|
label: e.downloads
|
|
1006
1006
|
}
|
|
1007
1007
|
] : [],
|
|
1008
1008
|
{
|
|
1009
|
-
href: `${
|
|
1009
|
+
href: `${s}#credentials`,
|
|
1010
1010
|
label: e.developerCredentials
|
|
1011
1011
|
},
|
|
1012
1012
|
{
|
|
1013
|
-
href: `${
|
|
1013
|
+
href: `${s}#account`,
|
|
1014
1014
|
label: e.account
|
|
1015
1015
|
}
|
|
1016
|
-
] : Fi({ keys:
|
|
1016
|
+
] : Fi({ keys: a, messages: e, navLinkDictionary: r });
|
|
1017
1017
|
}
|
|
1018
1018
|
function Hi({
|
|
1019
1019
|
portal: e,
|
|
1020
1020
|
licenses: t,
|
|
1021
1021
|
subscriptionInfo: i
|
|
1022
1022
|
}) {
|
|
1023
|
-
const n = e.user, r =
|
|
1023
|
+
const n = e.user, r = O(e), o = i?.options?.includes("Developer"), a = S("arcgiswebapps", t) || o && S("locationplatformwebapps", t) || T(e);
|
|
1024
1024
|
return {
|
|
1025
1025
|
pricing: { href: `${r}../features/plans/pricing.html` },
|
|
1026
1026
|
overview: { href: `${r}../features/features.html` },
|
|
1027
1027
|
ArcGIS: {
|
|
1028
|
-
href: `${r}${
|
|
1029
|
-
show:
|
|
1028
|
+
href: `${r}${T(e) ? "index.html" : "../features/features.html"}`,
|
|
1029
|
+
show: T(e) || !n
|
|
1030
1030
|
},
|
|
1031
1031
|
groups: {
|
|
1032
1032
|
href: `${r}groups.html`,
|
|
@@ -1040,13 +1040,13 @@ function Hi({
|
|
|
1040
1040
|
icon: "files"
|
|
1041
1041
|
},
|
|
1042
1042
|
map: {
|
|
1043
|
-
show:
|
|
1043
|
+
show: a,
|
|
1044
1044
|
href: `${r}apps/mapviewer/index.html`,
|
|
1045
1045
|
icon: "map",
|
|
1046
1046
|
configName: "map"
|
|
1047
1047
|
},
|
|
1048
1048
|
help: {
|
|
1049
|
-
href:
|
|
1049
|
+
href: ue(e),
|
|
1050
1050
|
newTab: !0
|
|
1051
1051
|
},
|
|
1052
1052
|
gallery: {
|
|
@@ -1057,13 +1057,13 @@ function Hi({
|
|
|
1057
1057
|
configName: "gallery"
|
|
1058
1058
|
},
|
|
1059
1059
|
home: {
|
|
1060
|
-
show: !
|
|
1060
|
+
show: !T(e) && !o,
|
|
1061
1061
|
href: `${r}index.html`,
|
|
1062
1062
|
relativePath: "index.html",
|
|
1063
1063
|
icon: "home"
|
|
1064
1064
|
},
|
|
1065
1065
|
scene: {
|
|
1066
|
-
show:
|
|
1066
|
+
show: a,
|
|
1067
1067
|
href: `${r}webscene/viewer.html`,
|
|
1068
1068
|
icon: "globe",
|
|
1069
1069
|
configName: "scene"
|
|
@@ -1076,13 +1076,13 @@ function Hi({
|
|
|
1076
1076
|
configName: "notebook"
|
|
1077
1077
|
},
|
|
1078
1078
|
organization: {
|
|
1079
|
-
show: !
|
|
1079
|
+
show: !T(e),
|
|
1080
1080
|
href: `${r}organization.html`,
|
|
1081
1081
|
relativePath: "organization.html",
|
|
1082
1082
|
icon: "organization"
|
|
1083
1083
|
},
|
|
1084
1084
|
features: {
|
|
1085
|
-
show:
|
|
1085
|
+
show: T(e) && !e.isPortal,
|
|
1086
1086
|
href: `${r}../features/features.html`,
|
|
1087
1087
|
icon: "information"
|
|
1088
1088
|
}
|
|
@@ -1091,22 +1091,24 @@ function Hi({
|
|
|
1091
1091
|
function qi({ portal: e, item: t, messages: i, navigate: n, locale: r }) {
|
|
1092
1092
|
if (!t || !i || !t.modified)
|
|
1093
1093
|
return null;
|
|
1094
|
-
const o = t.modified,
|
|
1095
|
-
return
|
|
1094
|
+
const o = t.modified, a = { lessThanOneMinute: i.lessThanOneMinute }, s = Ce(Me(o)), l = s?.[1] === "year" || s?.[1] === "month" ? Xt({ locale: r, time: o }, s?.[1] === "year") : Oe({ locale: r, time: o, t9n: a }), d = `item.html?id=${t.id}`, m = `${O(e)}${d}}`;
|
|
1095
|
+
return le(t.id, c`<li class="list-item"><a class="list-item__link" href=${m ?? M} @click=${(g) => {
|
|
1096
1096
|
n({ event: g, href: m, relativePath: d });
|
|
1097
|
-
}}>${c`<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">${
|
|
1097
|
+
}}>${c`<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">${X(i.lastUpdated, { date: l })}</span></span></span>`}</a></li>`);
|
|
1098
1098
|
}
|
|
1099
|
-
function Ji({ locale: e, navigate: t, portal: i, open: n, apps: r, appsLoading: o, hiddenApps:
|
|
1100
|
-
if (!
|
|
1099
|
+
function Ji({ locale: e, navigate: t, portal: i, open: n, apps: r, appsLoading: o, hiddenApps: a, appsSearchTerm: s, handlePlatformClose: l, handleAppsSearch: d, handleAppReorder: m, handleAppSave: g, handleAppDelete: p, handleAppHide: _, handleAppCancel: A, handleAppEdit: w, handleItemSearch: I, handlePlatformTabUpdate: N, platformTab: f, editingApplications: h, recentContent: u, recentContentLoading: v, recentContentSearchTerm: P, product: y, platformInfo: x, links: k, messages: b }) {
|
|
1100
|
+
if (!y || !i || !b)
|
|
1101
1101
|
return null;
|
|
1102
|
-
const { name:
|
|
1103
|
-
return c`<calcite-sheet class="platform" .label=${b.label} position=inline-start display-mode=overlay id=example-sheet .open=${n} @calciteSheetClose=${l}><calcite-panel class="platform__panel"><div slot=header-content class="platform__header"><img src=${
|
|
1104
|
-
(D.key === "Enter" || D.key === " ") && t({ event: D, href:
|
|
1102
|
+
const { name: j, icon: L } = x || {};
|
|
1103
|
+
return c`<calcite-sheet class="platform" .label=${b.label} position=inline-start display-mode=overlay id=example-sheet .open=${n} @calciteSheetClose=${l}><calcite-panel class="platform__panel"><div slot=header-content class="platform__header"><img src=${L ?? M} class="platform__header-image"><div class="platform__header-text"><h2 class="platform__title">${j}</h2><p class="platform__subtitle">${i.name}</p></div><calcite-action icon=x text="Close menu" scale=l @click=${l}></calcite-action></div><div class="platform__container"><div class="platform__tiles">${k.filter(({ icon: $ }) => $).map(({ label: $, href: E, icon: Y, relativePath: H }) => c`<calcite-tile .icon=${Y} .description=${$} .href=${E} alignment=center scale=s @keydown=${(D) => {
|
|
1104
|
+
(D.key === "Enter" || D.key === " ") && t({ event: D, href: E, relativePath: H });
|
|
1105
1105
|
}} @click=${(D) => {
|
|
1106
|
-
t({ event: D, href:
|
|
1107
|
-
}}></calcite-tile>`)}</div>${i?.user && c`<calcite-tabs layout=center class="platform__tabs"><calcite-tab-nav slot=title-group
|
|
1106
|
+
t({ event: D, href: E, relativePath: H });
|
|
1107
|
+
}}></calcite-tile>`)}</div>${i?.user && c`<calcite-tabs layout=center class="platform__tabs"><calcite-tab-nav slot=title-group @calciteTabChange=${($) => {
|
|
1108
|
+
N($.target.selectedTitle?.dataset.id);
|
|
1109
|
+
}}>${!T(i) && c`<calcite-tab-title .selected=${f === "apps"}>${b.myApps}</calcite-tab-title>` || ""}<calcite-tab-title .selected=${f === "content"}>${b.recentContent}</calcite-tab-title></calcite-tab-nav>${!T(i) && c`<calcite-tab .selected=${f === "apps"} class="platform__tab" data-id=apps>${o && c`<calcite-scrim loading></calcite-scrim>` || ""}${Gi({ apps: r, appsLoading: o, appsSearchTerm: s, hiddenApps: a, messages: b, handleAppsSearch: d, handleAppReorder: m, handleAppSave: g, handleAppDelete: p, handleAppHide: _, handleAppCancel: A, handleAppEdit: w, editingApplications: h, portal: i })}</calcite-tab>` || ""}<calcite-tab class="platform__tab" .selected=${f === "content"} data-id=content><div class="list__header"><calcite-input type=search icon .placeholder=${b.searchRecentContent} .value=${P} scale=m class="list__search" @calciteInputInput=${($) => I($.target.value)}></calcite-input></div>${v && !o && c`<calcite-scrim loading></calcite-scrim>` || ""}<div class="list__container">${u?.length > 0 || v ? c`<ul class="list">${U(u, ($) => $.id, ($) => qi({ portal: i, messages: b, navigate: t, item: $, locale: e }))}</ul>` : P?.length ? K({ title: X(b.noAppResults, { term: P }), description: b.recentContentNoResultsDescription, icon: "search" }) : K({ title: b.noContent, description: b.noContentDescription, icon: "clock" })}</div></calcite-tab></calcite-tabs>` || ""}</div></calcite-panel></calcite-sheet>`;
|
|
1108
1110
|
}
|
|
1109
|
-
const
|
|
1111
|
+
const ae = [
|
|
1110
1112
|
"new",
|
|
1111
1113
|
"open",
|
|
1112
1114
|
"rename",
|
|
@@ -1120,13 +1122,13 @@ const re = [
|
|
|
1120
1122
|
async function Ki(e) {
|
|
1121
1123
|
return await Promise.resolve({ status: "success" });
|
|
1122
1124
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1125
|
+
function se(e) {
|
|
1126
|
+
return ae.includes(e.id);
|
|
1125
1127
|
}
|
|
1126
1128
|
function Qi(e) {
|
|
1127
1129
|
return (e || [])?.toSorted((t, i) => {
|
|
1128
|
-
const n =
|
|
1129
|
-
return n && !r ? -1 : r && !n ? 1 : r && n ?
|
|
1130
|
+
const n = se(t), r = se(i);
|
|
1131
|
+
return n && !r ? -1 : r && !n ? 1 : r && n ? ae.indexOf(t.id) - ae.indexOf(i.id) : -1;
|
|
1130
1132
|
});
|
|
1131
1133
|
}
|
|
1132
1134
|
function Xi(e, t) {
|
|
@@ -1150,31 +1152,31 @@ function Xi(e, t) {
|
|
|
1150
1152
|
embed: { text: t.embed, group: "share" },
|
|
1151
1153
|
details: { text: t.itemDetails, group: "details", external: !0 }
|
|
1152
1154
|
}, r = Qi(e), o = [];
|
|
1153
|
-
return r.forEach((
|
|
1154
|
-
if (!
|
|
1155
|
-
o.push(
|
|
1155
|
+
return r.forEach((a) => {
|
|
1156
|
+
if (!se(a)) {
|
|
1157
|
+
o.push(a);
|
|
1156
1158
|
return;
|
|
1157
1159
|
}
|
|
1158
|
-
const { text: l, external: d, group: m } = n[
|
|
1159
|
-
i[m].push({ text: l, external: d, ...
|
|
1160
|
-
}), o.forEach((
|
|
1161
|
-
const
|
|
1162
|
-
i[
|
|
1160
|
+
const { text: l, external: d, group: m } = n[a.id];
|
|
1161
|
+
i[m].push({ text: l, external: d, ...a });
|
|
1162
|
+
}), o.forEach((a) => {
|
|
1163
|
+
const s = a.group || "custom";
|
|
1164
|
+
i[s].push(a);
|
|
1163
1165
|
}), i;
|
|
1164
1166
|
}
|
|
1165
|
-
function Yi({ navigate: e, portal: t, menuItem: i, messages: n, portalItem: r, openProjectTitleEdit: o, projectMenuClick:
|
|
1167
|
+
function Yi({ navigate: e, portal: t, menuItem: i, messages: n, portalItem: r, openProjectTitleEdit: o, projectMenuClick: a }) {
|
|
1166
1168
|
if (!t || !n || !i || i.id === "details" && !r)
|
|
1167
1169
|
return null;
|
|
1168
|
-
const { external:
|
|
1169
|
-
return
|
|
1170
|
+
const { external: s, id: l, text: d } = i, m = `${O(t)}item.html?id=${r?.id}`;
|
|
1171
|
+
return le(`${l}${d}`, c`<calcite-dropdown-item .iconEnd=${s ? "launch" : void 0} .href=${l === "details" ? m : i.href} .target=${s ? "_blank" : void 0} @calciteDropdownItemSelect=${(g) => {
|
|
1170
1172
|
if (l === "rename") {
|
|
1171
1173
|
o?.();
|
|
1172
1174
|
return;
|
|
1173
1175
|
}
|
|
1174
|
-
l === "details" && e({ event: g, href: m }),
|
|
1176
|
+
l === "details" && e({ event: g, href: m }), a?.({ type: l });
|
|
1175
1177
|
}}>${d}${l === "save" && c`<calcite-icon icon=bullet-point-large class="project__indicator" scale=s></calcite-icon>` || ""}</calcite-dropdown-item>`);
|
|
1176
1178
|
}
|
|
1177
|
-
function Zi({ navigate: e, portal: t, projectTitle: i, editedProjectTitle: n, handleProjectTitleSave: r, handleProjectTitleEdit: o, handleProjectTitleCancel:
|
|
1179
|
+
function Zi({ navigate: e, portal: t, projectTitle: i, editedProjectTitle: n, handleProjectTitleSave: r, handleProjectTitleEdit: o, handleProjectTitleCancel: a, openProjectTitleEdit: s, portalItem: l, projectTitleEditing: d, projectTitleSaving: m, projectTitleErrorMessage: g, projectMenuIcon: p, projectMenuSaveIndicator: _, projectMenuClick: A, projectMenuOptions: w, projectTitleInputRef: I, projectButtonRef: N, messages: f }) {
|
|
1178
1180
|
if (!t || !f || !w?.length && !i)
|
|
1179
1181
|
return null;
|
|
1180
1182
|
if (!w?.length)
|
|
@@ -1183,13 +1185,13 @@ function Zi({ navigate: e, portal: t, projectTitle: i, editedProjectTitle: n, ha
|
|
|
1183
1185
|
return d ? c`<form class="rename" @submit=${async (v) => {
|
|
1184
1186
|
v.preventDefault(), await r?.(n);
|
|
1185
1187
|
}} @keydown=${(v) => {
|
|
1186
|
-
v.key === "Escape" &&
|
|
1187
|
-
}}><calcite-input id=project-title-input type=text scale=l class="rename__input" .label=${f.title} .value=${n} .status=${u ? "invalid" : "idle"} @calciteInputInput=${(v) => o?.(v.target.value)} ${W(I)}></calcite-input>${u && c`<calcite-popover open .label=${f.error} .referenceElement=${I?.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=${m} icon=check scale=l .text=${f?.saveRename} active class="rename__action" type=submit .loading=${m}></calcite-action><calcite-action .disabled=${m} icon=x scale=l .text=${f?.cancelRename} class="rename__action" @click=${() =>
|
|
1188
|
+
v.key === "Escape" && a?.();
|
|
1189
|
+
}}><calcite-input id=project-title-input type=text scale=l class="rename__input" .label=${f.title} .value=${n} .status=${u ? "invalid" : "idle"} @calciteInputInput=${(v) => o?.(v.target.value)} ${W(I)}></calcite-input>${u && c`<calcite-popover open .label=${f.error} .referenceElement=${I?.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=${m} icon=check scale=l .text=${f?.saveRename} active class="rename__action" type=submit .loading=${m}></calcite-action><calcite-action .disabled=${m} icon=x scale=l .text=${f?.cancelRename} class="rename__action" @click=${() => a?.()}></calcite-action></form>` : c`<calcite-dropdown width=m class="fade-in project__dropdown"><button slot=trigger class="project" ${W(N)}>${p && c`<calcite-icon scale=s .icon=${p} class="project__menu-icon"></calcite-icon>` || ""}<span class="project__text">${i}</span>${_ && c`<calcite-icon scale=s icon=bullet-point-large class="project__indicator"></calcite-icon>` || ""}<calcite-icon scale=s icon=chevron-down></calcite-icon></button>${U(Object.entries(h).filter(([v, P]) => P.length), ([v, P]) => v, ([v, P]) => c`<calcite-dropdown-group selection-mode=none>${P.map((y) => Yi({ menuItem: y, navigate: e, portal: t, messages: f, portalItem: l, openProjectTitleEdit: s, projectMenuClick: A }))}</calcite-dropdown-group>`)}</calcite-dropdown>`;
|
|
1188
1190
|
}
|
|
1189
1191
|
function en(e) {
|
|
1190
1192
|
return ["Location Platform", "Online", "Enterprise"].includes(e);
|
|
1191
1193
|
}
|
|
1192
|
-
function
|
|
1194
|
+
function Be({
|
|
1193
1195
|
portal: e,
|
|
1194
1196
|
searchType: t,
|
|
1195
1197
|
searchTerm: i
|
|
@@ -1200,20 +1202,20 @@ function Ge({
|
|
|
1200
1202
|
function tn({ portal: e, item: t, messages: i, navigate: n }) {
|
|
1201
1203
|
if (!t || !i)
|
|
1202
1204
|
return null;
|
|
1203
|
-
const r =
|
|
1204
|
-
itemType:
|
|
1205
|
+
const r = X(i.by, {
|
|
1206
|
+
itemType: zt(t),
|
|
1205
1207
|
owner: t.owner
|
|
1206
|
-
}), o = `item.html?id=${t.id}`,
|
|
1207
|
-
return
|
|
1208
|
+
}), o = `item.html?id=${t.id}`, a = `${O(e)}${o}`;
|
|
1209
|
+
return le(t.id, c`<li class="list-item"><a class="list-item__link" href=${a ?? M} @click=${(s) => n({ event: s, href: a, relativePath: o })}>${c`<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>`);
|
|
1208
1210
|
}
|
|
1209
1211
|
function nn({ portal: e, suggestions: t, messages: i, navigate: n, searchType: r, searchTerm: o }) {
|
|
1210
1212
|
if (!i || !e || !o)
|
|
1211
1213
|
return null;
|
|
1212
1214
|
if (!t)
|
|
1213
1215
|
return c`<div><calcite-loader scale=l .label=${i.loadingResults}></calcite-loader></div>`;
|
|
1214
|
-
const
|
|
1216
|
+
const a = Be({ portal: e, searchType: r, searchTerm: o }), s = `/${a}`, l = `${O(e)}${a}`;
|
|
1215
1217
|
return c`<ul class="list">${t.map((d) => tn({ messages: i, portal: e, item: d, 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=${l} @click=${(d) => {
|
|
1216
|
-
n({ href: l, event: d, relativePath:
|
|
1218
|
+
n({ href: l, event: d, relativePath: s });
|
|
1217
1219
|
}}>${i.viewAll}</calcite-button></div>`;
|
|
1218
1220
|
}
|
|
1219
1221
|
function rn({ portal: e, messages: t, searchType: i, handleSearchTypeChange: n }) {
|
|
@@ -1222,32 +1224,32 @@ function rn({ portal: e, messages: t, searchType: i, handleSearchTypeChange: n }
|
|
|
1222
1224
|
const r = i === "keyword", o = t.searchType;
|
|
1223
1225
|
return c`<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>`;
|
|
1224
1226
|
}
|
|
1225
|
-
function on({ currentPathname: e, navigate: t, product: i, portal: n, messages: r, searchActive: o, searchType:
|
|
1227
|
+
function on({ currentPathname: e, navigate: t, product: i, portal: n, messages: r, searchActive: o, searchType: a, searchTerm: s, suggestions: l, searchInputRef: d, searchActionRef: m, searchPopoverRef: g, handleSearch: p, handleToggleSearch: _, handleSearchTypeChange: A }) {
|
|
1226
1228
|
if (!en(i) || !r || !n || e?.includes("search.html"))
|
|
1227
1229
|
return null;
|
|
1228
|
-
const w =
|
|
1229
|
-
return o ? c`<div class="search" id=search-reference-element><calcite-input type=search scale=l icon=search class="search__input" .ariaLabel=${r.label} .placeholder=${
|
|
1230
|
-
f.key === "Enter" && (t({ href:
|
|
1231
|
-
}} ${W(d)}></calcite-input><calcite-action icon=x scale=l .text=${r?.close} active class="search__action" @click=${() => _(!1)}></calcite-action><calcite-popover .label=${r.suggestions} reference-element=search-reference-element .open=${o && !!
|
|
1230
|
+
const w = Be({ portal: n, searchType: a, searchTerm: s }), I = `/${w}`, N = `${O(n)}${w}`;
|
|
1231
|
+
return o ? c`<div class="search" id=search-reference-element><calcite-input type=search scale=l icon=search class="search__input" .ariaLabel=${r.label} .placeholder=${a === "vector" ? r.searchType.semanticPlaceholder : r.searchType.keywordPlaceholder} @calciteInputInput=${(f) => p(f.target.value)} @keydown=${(f) => {
|
|
1232
|
+
f.key === "Enter" && (t({ href: N, event: f, relativePath: I }), f.defaultPrevented || (window.location.href = N)), f.key === "Escape" && _(!1);
|
|
1233
|
+
}} ${W(d)}></calcite-input><calcite-action icon=x scale=l .text=${r?.close} active class="search__action" @click=${() => _(!1)}></calcite-action><calcite-popover .label=${r.suggestions} reference-element=search-reference-element .open=${o && !!s} pointer-disabled placement=bottom-start trigger-disabled .focusTrapOptions=${{ initialFocus: !1 }} ${W(g)}><div class="suggestions__header"><h3 class="suggestions__title">${r.topResults}</h3>${rn({ portal: n, messages: r, searchType: a, handleSearchTypeChange: A })}</div><div class="suggestions__results">${nn({ portal: n, suggestions: l, navigate: t, messages: r, searchType: a, searchTerm: s })}</div></calcite-popover></div>` : c`<calcite-action icon=search scale=l text=search class="search__action" @click=${() => _(!0)} ${W(m)}></calcite-action>`;
|
|
1232
1234
|
}
|
|
1233
|
-
function
|
|
1235
|
+
function an({ signIn: e, messages: t }) {
|
|
1234
1236
|
return c`<div class="border-start fade-in"><calcite-button class="user__button" slot=trigger appearance=transparent kind=neutral @click=${() => e()}><span class="user__button__contents"><calcite-avatar scale=m class="user__button__avatar"></calcite-avatar><span class="user__button__text"><p class="user__button__username">${t?.signIn || ""}</p></span></span></calcite-button></div>`;
|
|
1235
1237
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return
|
|
1238
|
+
function sn({ navigate: e, portal: t, product: i, links: n, messages: r, currentPathname: o, searchActive: a }) {
|
|
1239
|
+
return Q(i) && n?.length === 0 && t ? c`<div slot=content-start class="site-nav skeleton">${["Overview", "Pricing", "Map", "Scene", "Help"].map((s) => c`<span class="skeleton-line" aria-hidden>${s}</span>`)}</div>` : !i || !t || !r || !Q(i) || !n || a ? null : c`<calcite-menu slot=content-start .label=${r.label} class="site-nav fade-in">${U(n, ({ href: s }) => s, ({ label: s, href: l, relativePath: d, configName: m }) => c`<calcite-menu-item .text=${s} text-enabled .label=${s} .href=${l} .active=${Ri(l, o, m)} @click=${(g) => e({ event: g, href: l, relativePath: d })}></calcite-menu-item>`)}</calcite-menu>`;
|
|
1238
1240
|
}
|
|
1239
|
-
function cn({ userLinks: e, messages: t, navigate: i, openAccountSwitcher: n, portal: r, signOut: o, textDisabled:
|
|
1240
|
-
const
|
|
1241
|
-
return !
|
|
1242
|
-
(
|
|
1243
|
-
}} @click=${(
|
|
1244
|
-
i({ event:
|
|
1241
|
+
function cn({ userLinks: e, messages: t, navigate: i, openAccountSwitcher: n, portal: r, signOut: o, textDisabled: a }) {
|
|
1242
|
+
const s = r?.user;
|
|
1243
|
+
return !s || !e || !t || e?.account?.options.length < 1 && e?.resources?.options.length < 1 ? null : c`<div class="user"><calcite-dropdown .width=${a ? "l" : "m"} class="user__dropdown"><calcite-button class="user__button" slot=trigger appearance=transparent kind=neutral><span class="user__button__contents"><arcgis-portal-user-avatar .user=${s} .portal=${r} scale=l class="user__button__avatar"></arcgis-portal-user-avatar>${!a && c`<span class="user__button__text"><h2 class="user__button__full user__full">${s.fullName}</h2><p class="user__button__username user__username">${s.username}</p></span>` || ""}</span></calcite-button>${a && c`<div class="user__top"><arcgis-portal-user-avatar .user=${s} .portal=${r} scale=l class="user__avatar"></arcgis-portal-user-avatar><div class="user__top__text"><h2 class="user__top__full user__full">${s.fullName}</h2><p class="user__top__username user__username">${s.username}</p></div></div>` || ""}${Object.values(e).filter((l) => l.options.length).map(({ title: l, options: d }) => c`<calcite-dropdown-group selection-mode=none .groupTitle=${l}>${d.map(({ icon: m, label: g, href: p, relativePath: _ }) => c`<calcite-dropdown-item .iconStart=${m} .href=${p} @keydown=${(A) => {
|
|
1244
|
+
(A.key === "Enter" || A.key === " ") && i({ event: A, href: p, relativePath: _ });
|
|
1245
|
+
}} @click=${(A) => {
|
|
1246
|
+
i({ event: A, href: p, relativePath: _ });
|
|
1245
1247
|
}}>${g}</calcite-dropdown-item>`)}</calcite-dropdown-group>`)}<calcite-dropdown-group selection-mode=none>${n && c`<calcite-dropdown-item icon-start=users @calciteDropdownItemSelect=${(l) => {
|
|
1246
1248
|
const d = Ft(l.target, "calcite-dropdown");
|
|
1247
1249
|
d && (d.open = !1), n();
|
|
1248
1250
|
}}>${t.switchAccounts}</calcite-dropdown-item>` || ""}<calcite-dropdown-item icon-start=sign-out @calciteDropdownItemSelect=${() => o()}>${t.signOut}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown></div>`;
|
|
1249
1251
|
}
|
|
1250
|
-
const
|
|
1252
|
+
const Re = {
|
|
1251
1253
|
community: "https://community.esri.com/plugins/common/feature/oauth2sso_v2/sso_login_redirect?referer=https%3A%2F%2Fcommunity.esri.com%2F",
|
|
1252
1254
|
myEsri: "https://my.esri.com"
|
|
1253
1255
|
};
|
|
@@ -1291,19 +1293,19 @@ function dn({
|
|
|
1291
1293
|
"arcgisBlog",
|
|
1292
1294
|
"help"
|
|
1293
1295
|
];
|
|
1294
|
-
return (
|
|
1296
|
+
return (he(i) || me(i)) && (n = ["mySettings", "arcgisBlog", "help"]), ze(i) && (n = []), pn(n, t, e);
|
|
1295
1297
|
}
|
|
1296
1298
|
function pn(e, t, i) {
|
|
1297
1299
|
const n = [];
|
|
1298
1300
|
return e.forEach((r) => {
|
|
1299
1301
|
const o = i[r];
|
|
1300
1302
|
if (o && (!("show" in o) || o.show)) {
|
|
1301
|
-
const { href:
|
|
1303
|
+
const { href: a, newTab: s, icon: l, group: d, relativePath: m } = o;
|
|
1302
1304
|
n.push({
|
|
1303
1305
|
label: t[r],
|
|
1304
1306
|
group: d,
|
|
1305
|
-
href:
|
|
1306
|
-
newTab:
|
|
1307
|
+
href: a,
|
|
1308
|
+
newTab: s,
|
|
1307
1309
|
relativePath: m,
|
|
1308
1310
|
icon: l
|
|
1309
1311
|
});
|
|
@@ -1311,7 +1313,7 @@ function pn(e, t, i) {
|
|
|
1311
1313
|
}), n;
|
|
1312
1314
|
}
|
|
1313
1315
|
function hn(e) {
|
|
1314
|
-
const t =
|
|
1316
|
+
const t = O(e), i = mn(e), n = `user.html${window.location.pathname.includes("home/user.html") ? "?nav=1" : ""}`;
|
|
1315
1317
|
return {
|
|
1316
1318
|
myProfile: {
|
|
1317
1319
|
href: `${t}${n}`,
|
|
@@ -1328,14 +1330,14 @@ function hn(e) {
|
|
|
1328
1330
|
help: {
|
|
1329
1331
|
group: "resources",
|
|
1330
1332
|
icon: "question",
|
|
1331
|
-
href:
|
|
1333
|
+
href: ue(e),
|
|
1332
1334
|
newTab: !0
|
|
1333
1335
|
},
|
|
1334
1336
|
communityForums: {
|
|
1335
1337
|
show: i,
|
|
1336
1338
|
group: "resources",
|
|
1337
1339
|
icon: "speech-bubbles",
|
|
1338
|
-
href:
|
|
1340
|
+
href: Re.community,
|
|
1339
1341
|
newTab: !0
|
|
1340
1342
|
},
|
|
1341
1343
|
myEsri: {
|
|
@@ -1371,17 +1373,17 @@ function mn(e) {
|
|
|
1371
1373
|
return !e.isPortal && e?.user?.sourceJSON?.userType === "both";
|
|
1372
1374
|
}
|
|
1373
1375
|
function fn(e) {
|
|
1374
|
-
return
|
|
1376
|
+
return Fe(
|
|
1375
1377
|
e,
|
|
1376
1378
|
`${window.location.protocol}//www.esri.com/training/arcgis-online-training`
|
|
1377
1379
|
);
|
|
1378
1380
|
}
|
|
1379
1381
|
function gn(e) {
|
|
1380
|
-
return
|
|
1382
|
+
return Fe(e, Re.myEsri);
|
|
1381
1383
|
}
|
|
1382
|
-
function
|
|
1383
|
-
const i =
|
|
1384
|
-
return `${
|
|
1384
|
+
function Fe(e, t) {
|
|
1385
|
+
const i = de(e), n = bn(e), r = `https://accounts${n ? n === "dev" ? "-dev" : "-stg" : ""}.esri.com/`, o = `&authBaseUrl=${J(i.replace("/sharing/rest/", ""), e)}`, a = `${r}LoginHandler/switchuser?`, s = `username=${e?.user?.username ?? ""}&redirect_uri=${t}${o}`;
|
|
1386
|
+
return `${a}${s}`;
|
|
1385
1387
|
}
|
|
1386
1388
|
function bn(e) {
|
|
1387
1389
|
const t = e.portalHostname;
|
|
@@ -1390,7 +1392,7 @@ function bn(e) {
|
|
|
1390
1392
|
function vn(e) {
|
|
1391
1393
|
return !e?.isPortal && ["Trial", "Trial Press"].includes(e?.sourceJSON.subscriptionInfo?.type);
|
|
1392
1394
|
}
|
|
1393
|
-
function
|
|
1395
|
+
function We(e) {
|
|
1394
1396
|
switch (e) {
|
|
1395
1397
|
case "360 VR":
|
|
1396
1398
|
return {
|
|
@@ -1611,27 +1613,27 @@ function Re(e) {
|
|
|
1611
1613
|
};
|
|
1612
1614
|
}
|
|
1613
1615
|
}
|
|
1614
|
-
function
|
|
1616
|
+
function Ve({
|
|
1615
1617
|
name: e,
|
|
1616
1618
|
fileName: t,
|
|
1617
1619
|
icon: i
|
|
1618
1620
|
}) {
|
|
1619
1621
|
return {
|
|
1620
1622
|
name: e,
|
|
1621
|
-
glyph:
|
|
1622
|
-
icon:
|
|
1623
|
+
glyph: ne(`assets/portal-navigation/product-logos/${t}-glyph-32.svg`),
|
|
1624
|
+
icon: ne(`assets/portal-navigation/apps/${i}.avif`)
|
|
1623
1625
|
};
|
|
1624
1626
|
}
|
|
1625
|
-
function
|
|
1626
|
-
return e?.sourceJSON?.subscriptionInfo?.options?.includes("Developer") ? "Location Platform" :
|
|
1627
|
+
function He({ portal: e, clientId: t }) {
|
|
1628
|
+
return e?.sourceJSON?.subscriptionInfo?.options?.includes("Developer") ? "Location Platform" : me(t) ? "GeoAnalytics Fabric" : he(t) ? "GeoAnalytics Engine" : e?.isPortal ? "Enterprise" : "Online";
|
|
1627
1629
|
}
|
|
1628
1630
|
function _n(e) {
|
|
1629
|
-
const t =
|
|
1630
|
-
return
|
|
1631
|
+
const t = He(e);
|
|
1632
|
+
return Ve(We(t));
|
|
1631
1633
|
}
|
|
1632
|
-
function
|
|
1633
|
-
const t = e?.product === "Online" ?
|
|
1634
|
-
return
|
|
1634
|
+
function xe(e) {
|
|
1635
|
+
const t = e?.product === "Online" ? He(e) : e?.product;
|
|
1636
|
+
return Ve(We(t));
|
|
1635
1637
|
}
|
|
1636
1638
|
function wn() {
|
|
1637
1639
|
const e = Pt();
|
|
@@ -1640,29 +1642,29 @@ function wn() {
|
|
|
1640
1642
|
)}` : window.location.href = `./signin.html?locale=${e}&useLandingPage=true`;
|
|
1641
1643
|
}
|
|
1642
1644
|
function yn({ portal: e, clientId: t }) {
|
|
1643
|
-
const i =
|
|
1645
|
+
const i = ce({ portal: e });
|
|
1644
1646
|
if (e?.isPortal) {
|
|
1645
|
-
const n = e.access === "private" ?
|
|
1646
|
-
|
|
1647
|
+
const n = e.access === "private" ? J("signin.html", e) : e.allSSL || window.location.protocol === "https:" ? J("./index.html", e) : `${i}/index.html`;
|
|
1648
|
+
An(e, n);
|
|
1647
1649
|
} else
|
|
1648
1650
|
window.location.href = `${i}/pages/Account/manage_accounts.html#client_id=${t}&signout=true`;
|
|
1649
1651
|
}
|
|
1650
1652
|
function $n() {
|
|
1651
|
-
ci(
|
|
1653
|
+
ci(Ae), li(Ae);
|
|
1652
1654
|
}
|
|
1653
|
-
function
|
|
1655
|
+
function An(e, t = window.location.href) {
|
|
1654
1656
|
const i = window.location.href.startsWith("http://"), n = Rt(e);
|
|
1655
1657
|
Vt.destroyCredentials(), $n();
|
|
1656
|
-
const r = new URL(
|
|
1658
|
+
const r = new URL(J(`${de(e)}oauth2/signout`, e)), { searchParams: o } = r;
|
|
1657
1659
|
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;
|
|
1658
1660
|
}
|
|
1659
|
-
function
|
|
1661
|
+
function G(e, t) {
|
|
1660
1662
|
if (!e)
|
|
1661
1663
|
return 0;
|
|
1662
1664
|
const i = Wt({ text: e, font: `${t === "s" ? ".875rem" : "1rem"} 'Avenir Next'` });
|
|
1663
1665
|
return Math.ceil(i);
|
|
1664
1666
|
}
|
|
1665
|
-
function
|
|
1667
|
+
function kn({
|
|
1666
1668
|
portal: e,
|
|
1667
1669
|
product: t,
|
|
1668
1670
|
projectTitle: i,
|
|
@@ -1672,11 +1674,11 @@ function An({
|
|
|
1672
1674
|
}) {
|
|
1673
1675
|
if (!t || !e)
|
|
1674
1676
|
return;
|
|
1675
|
-
const
|
|
1677
|
+
const a = e.user, l = Q(t) && n?.length ? 24 + n.reduce((g, p) => g + 16 + G(p.label) + 16, 0) : 0, d = 40 + G(i) + 32 + 16 + 16 + 12, m = a ? Math.max(G(a?.username, "s"), G(a?.fullName)) : G(r?.signIn);
|
|
1676
1678
|
return {
|
|
1677
1679
|
actions: 192,
|
|
1678
1680
|
project: i ? Math.min(d, 400) : 0,
|
|
1679
|
-
product: 64 + Math.max(
|
|
1681
|
+
product: 64 + Math.max(G(o?.name), G(e.name, "s")) + 16,
|
|
1680
1682
|
nav: l,
|
|
1681
1683
|
user: 64 + m + 16
|
|
1682
1684
|
};
|
|
@@ -1685,15 +1687,15 @@ function xn({
|
|
|
1685
1687
|
measurements: e,
|
|
1686
1688
|
screenWidth: t
|
|
1687
1689
|
}) {
|
|
1688
|
-
const { actions: i, nav: n, product: r, project: o, user:
|
|
1690
|
+
const { actions: i, nav: n, product: r, project: o, user: a } = e, s = 64, l = t - i - s > n, d = t - i - (l ? n : 0) - o - s > Math.min(r, 400), m = t - n - o - i - r < Math.min(a, 320);
|
|
1689
1691
|
return {
|
|
1690
1692
|
nav: l,
|
|
1691
1693
|
product: d,
|
|
1692
1694
|
user: m ? "avatar" : "full"
|
|
1693
1695
|
};
|
|
1694
1696
|
}
|
|
1695
|
-
const
|
|
1696
|
-
async function
|
|
1697
|
+
const qe = ' -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"';
|
|
1698
|
+
async function Se({
|
|
1697
1699
|
portal: e,
|
|
1698
1700
|
searchTerm: t
|
|
1699
1701
|
}) {
|
|
@@ -1702,7 +1704,7 @@ async function Ae({
|
|
|
1702
1704
|
try {
|
|
1703
1705
|
return (await e.queryItems({
|
|
1704
1706
|
...t ? { query: t } : {},
|
|
1705
|
-
filter: `owner:${e.user.username}${
|
|
1707
|
+
filter: `owner:${e.user.username}${qe}`,
|
|
1706
1708
|
num: 20,
|
|
1707
1709
|
sortField: "modified",
|
|
1708
1710
|
sortOrder: "desc"
|
|
@@ -1717,7 +1719,7 @@ async function Sn({
|
|
|
1717
1719
|
}) {
|
|
1718
1720
|
if (!e)
|
|
1719
1721
|
return [];
|
|
1720
|
-
const i = qt((t || "").substring(0, 409)), n = `${e?.id ? `accountid:"${e.id}"` : ""}${
|
|
1722
|
+
const i = qt((t || "").substring(0, 409)), n = `${e?.id ? `accountid:"${e.id}"` : ""}${qe}`, r = `${de(e)}search/suggest`;
|
|
1721
1723
|
return (await B(r, { query: {
|
|
1722
1724
|
suggest: i,
|
|
1723
1725
|
filters: n,
|
|
@@ -1729,11 +1731,11 @@ const In = St`:host{display:block;--arcgis-portal-navigation-logo-max-width: 260
|
|
|
1729
1731
|
function Pn({ messages: e, portal: t, showNav: i, openPlatformMenu: n, handleToggleSearch: r }) {
|
|
1730
1732
|
return !e || i && !t?.user ? null : c`<calcite-action .label=${e.applicationMenu} text="app switcher" icon=app-launcher scale=l class="action" @click=${n} @focusin=${() => r(!1, !0)}></calcite-action>`;
|
|
1731
1733
|
}
|
|
1732
|
-
class Nn extends
|
|
1734
|
+
class Nn extends At {
|
|
1733
1735
|
constructor() {
|
|
1734
|
-
super(...arguments), this.messages =
|
|
1736
|
+
super(...arguments), this.messages = kt({ blocking: !0 }), this.originalRecentContent = [], this.refreshNotifications = async () => {
|
|
1735
1737
|
const { portal: t, messages: i } = this;
|
|
1736
|
-
this.notifications = await
|
|
1738
|
+
this.notifications = await _e({ portal: t, locale: i._t9nLocale, t9n: i.notifications });
|
|
1737
1739
|
}, this.deleteNotifications = async (t) => {
|
|
1738
1740
|
const { portal: i } = this;
|
|
1739
1741
|
if (t?.length < 20)
|
|
@@ -1741,13 +1743,13 @@ class Nn extends kt {
|
|
|
1741
1743
|
else {
|
|
1742
1744
|
let n = 0;
|
|
1743
1745
|
for await (const r of t)
|
|
1744
|
-
await
|
|
1746
|
+
await Le({ id: r, portal: i }), this.notificationDeleteProgress = Math.ceil(n++ / t.length * 100);
|
|
1745
1747
|
}
|
|
1746
1748
|
this.notificationDeleteProgress = void 0, this.refreshNotifications();
|
|
1747
1749
|
}, this.navigate = (t) => {
|
|
1748
1750
|
this.arcgisNavigate.emit(t), this.platformMenuOpen = !1, this.notificationsActive = !1, this.searchActive = !1;
|
|
1749
1751
|
}, this.openPlatformMenu = () => {
|
|
1750
|
-
this.platformMenuOpen = !0, this.searchActive = !1;
|
|
1752
|
+
this.platformMenuOpen = !0, this.searchActive = !1, T(this.portal) || (this.platformTab = "apps");
|
|
1751
1753
|
}, this.projectMenuClick = (t) => {
|
|
1752
1754
|
this.arcgisNavigationProjectMenuClick.emit(t);
|
|
1753
1755
|
}, this.openProjectTitleEdit = () => {
|
|
@@ -1779,6 +1781,8 @@ class Nn extends kt {
|
|
|
1779
1781
|
this.accountSwitcherOpen = !0;
|
|
1780
1782
|
}, this.handlePlatformClose = () => {
|
|
1781
1783
|
this.platformMenuOpen = !1, this.handleAppCancel(), this.appsSearchTerm = "", this.recentContent = this.originalRecentContent, this.recentContentSearchTerm = "";
|
|
1784
|
+
}, this.handlePlatformTabUpdate = (t) => {
|
|
1785
|
+
this.platformTab = t;
|
|
1782
1786
|
}, this.handleAppSave = async () => {
|
|
1783
1787
|
const { hiddenApps: t, sortedApps: i, userProperties: n, portal: r } = this;
|
|
1784
1788
|
this.apps = [...i], this.editingApplications = !1, this.appsLoading = !0;
|
|
@@ -1798,9 +1802,9 @@ class Nn extends kt {
|
|
|
1798
1802
|
n.splice(t, 1), n.splice(i, 0, r), this.sortedApps = n;
|
|
1799
1803
|
}, this.handleItemSearch = (t) => {
|
|
1800
1804
|
this.recentContentLoading = !0, this.recentContentSearchTerm = t, this.debouncedItemSearch(t);
|
|
1801
|
-
}, this.debouncedItemSearch =
|
|
1802
|
-
this.recentContent = await
|
|
1803
|
-
}, 1e3), this.debouncedSuggest =
|
|
1805
|
+
}, this.debouncedItemSearch = be(async (t) => {
|
|
1806
|
+
this.recentContent = await Se({ portal: this.portal, searchTerm: t }), this.recentContentLoading = !1, t || (this.originalRecentContent = [...this.recentContent]);
|
|
1807
|
+
}, 1e3), this.debouncedSuggest = be(async (t) => {
|
|
1804
1808
|
this.suggestions = await Sn({ portal: this.portal, searchTerm: t });
|
|
1805
1809
|
}, 1e3), this.handleSearch = (t) => {
|
|
1806
1810
|
this.searchTerm = t, this.suggestions = void 0, this.debouncedSuggest(t);
|
|
@@ -1822,10 +1826,10 @@ class Nn extends kt {
|
|
|
1822
1826
|
});
|
|
1823
1827
|
}, this.handleSearchTypeChange = (t) => {
|
|
1824
1828
|
this.searchType = t;
|
|
1825
|
-
}, this.searchInput = F(), this.searchAction = F(), this.searchPopover = F(), this.projectTitleInputRef = F(), this.projectButtonRef = F(), this.initialDocumentOverflowStyle = document.documentElement.style.overflow, this.links = [], this.notifications = [], this.notificationsActive = !1, 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 =
|
|
1829
|
+
}, this.searchInput = F(), this.searchAction = F(), this.searchPopover = F(), this.projectTitleInputRef = F(), this.projectButtonRef = F(), this.initialDocumentOverflowStyle = document.documentElement.style.overflow, this.links = [], this.notifications = [], this.notificationsActive = !1, 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.platformTab = "apps", 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();
|
|
1826
1830
|
}
|
|
1827
1831
|
static {
|
|
1828
|
-
this.properties = { infoBanner: 16, links: 16, userLinks: 16, notifications: 16, notificationsActive: 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, platformInfo: 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 };
|
|
1832
|
+
this.properties = { infoBanner: 16, links: 16, userLinks: 16, notifications: 16, notificationsActive: 16, apps: 16, hiddenApps: 16, sortedApps: 16, previousAppState: 16, appsSearchTerm: 16, appsLoading: 16, editingApplications: 16, recentContent: 16, recentContentSearchTerm: 16, recentContentLoading: 16, platformMenuOpen: 16, platformTab: 16, accountSwitcherOpen: 16, editedProjectTitle: 16, projectTitleEditing: 16, projectTitleSaving: 16, projectTitleErrorMessage: 16, productInfo: 16, platformInfo: 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 };
|
|
1829
1833
|
}
|
|
1830
1834
|
static {
|
|
1831
1835
|
this.styles = In;
|
|
@@ -1839,7 +1843,7 @@ class Nn extends kt {
|
|
|
1839
1843
|
}));
|
|
1840
1844
|
}
|
|
1841
1845
|
willUpdate(t) {
|
|
1842
|
-
(t.has("product") || t.has("clientId")) && this.hasUpdated && (this.productInfo =
|
|
1846
|
+
(t.has("product") || t.has("clientId")) && this.hasUpdated && (this.productInfo = xe({ product: this.product, clientId: this.clientId, portal: this.portal }));
|
|
1843
1847
|
}
|
|
1844
1848
|
firstUpdated() {
|
|
1845
1849
|
this.el && this.#e && (this.#e.observe(this.el), this.screenWidth = window.innerWidth);
|
|
@@ -1852,32 +1856,32 @@ class Nn extends kt {
|
|
|
1852
1856
|
}
|
|
1853
1857
|
async fetchData() {
|
|
1854
1858
|
const { portal: t, messages: i, clientId: n, product: r } = this;
|
|
1855
|
-
this.calculateMeasurements(), this.productInfo =
|
|
1856
|
-
const { apps: o, hiddenApps:
|
|
1859
|
+
this.calculateMeasurements(), this.productInfo = xe({ product: r, clientId: n, portal: t }), this.platformInfo = _n({ clientId: n, portal: t }), this.userLinks = un({ portal: t, messages: i.user, clientId: n }), this.notifications = await _e({ portal: t, locale: i._t9nLocale, t9n: i.notifications }), this.recentContent = await Se({ portal: t }), this.originalRecentContent = [...this.recentContent], this.recentContentLoading = !1;
|
|
1860
|
+
const { apps: o, hiddenApps: a, signInSettings: s, licenses: l, userProperties: d } = await Oi({
|
|
1857
1861
|
portal: t,
|
|
1858
1862
|
trackViewerEnabled: !this.disableTrackViewer,
|
|
1859
1863
|
notebookServerEnabled: !this.disableNotebookServer
|
|
1860
1864
|
}), m = await Et(t);
|
|
1861
|
-
this.infoBanner = m?.informationalBanner, this.userProperties = d, this.apps = o, this.hiddenApps =
|
|
1865
|
+
this.infoBanner = m?.informationalBanner, this.userProperties = d, this.apps = o, this.hiddenApps = a, this.sortedApps = o, this.previousAppState = { apps: o, hiddenApps: a }, this.appsLoading = !1, this.links = zi({
|
|
1862
1866
|
portal: t,
|
|
1863
1867
|
messages: i.links,
|
|
1864
1868
|
licenses: l,
|
|
1865
1869
|
clientId: n,
|
|
1866
|
-
signInSettings:
|
|
1867
|
-
}), this.calculateMeasurements();
|
|
1870
|
+
signInSettings: s
|
|
1871
|
+
}), T(t) && (this.platformTab = "content"), this.calculateMeasurements();
|
|
1868
1872
|
}
|
|
1869
1873
|
calculateMeasurements() {
|
|
1870
|
-
const { links: t, messages: i, portal: n, product: r, productInfo: o, projectTitle:
|
|
1874
|
+
const { links: t, messages: i, portal: n, product: r, productInfo: o, projectTitle: a } = this;
|
|
1871
1875
|
if (n) {
|
|
1872
|
-
const
|
|
1876
|
+
const s = kn({
|
|
1873
1877
|
portal: n,
|
|
1874
1878
|
product: r,
|
|
1875
1879
|
productInfo: o,
|
|
1876
1880
|
links: t,
|
|
1877
1881
|
messages: i.user,
|
|
1878
|
-
projectTitle:
|
|
1882
|
+
projectTitle: a
|
|
1879
1883
|
});
|
|
1880
|
-
this.measurements =
|
|
1884
|
+
this.measurements = s, this.updateBreakpoints();
|
|
1881
1885
|
}
|
|
1882
1886
|
}
|
|
1883
1887
|
updateBreakpoints() {
|
|
@@ -1888,8 +1892,8 @@ class Nn extends kt {
|
|
|
1888
1892
|
}
|
|
1889
1893
|
}
|
|
1890
1894
|
render() {
|
|
1891
|
-
const { accountSwitcherOpen: t, apps: i, appsLoading: n, appsSearchTerm: r, currentPathname: o, handleAppCancel:
|
|
1892
|
-
return c`<calcite-scrim class=${
|
|
1895
|
+
const { accountSwitcherOpen: t, apps: i, appsLoading: n, appsSearchTerm: r, currentPathname: o, handleAppCancel: a, handleAppDelete: s, handleAppHide: l, handleAppReorder: d, handleAppSave: m, handleItemSearch: g, handlePlatformClose: p, handleSearch: _, handleToggleSearch: A, handleSearchTypeChange: w, hiddenApps: I, infoBanner: N, links: f, messages: h, navigate: u, notifications: v, notificationsActive: P, notificationDeleteProgress: y, openAccountSwitcher: x, platformInfo: k, portal: b, portalItem: j, product: L, productInfo: $, productHref: E, projectTitle: Y, editedProjectTitle: H, handleProjectTitleSave: D, handleProjectTitleEdit: Je, handleProjectTitleCancel: Ke, handleToggleNotifications: fe, openProjectTitleEdit: Qe, openPlatformMenu: Xe, platformMenuOpen: Ye, projectTitleEditing: Z, projectTitleSaving: Ze, projectTitleErrorMessage: et, projectMenuIcon: tt, projectMenuSaveIndicator: it, projectMenuClick: nt, projectMenuOptions: rt, projectTitleInputRef: ot, projectButtonRef: at, recentContent: st, recentContentSearchTerm: ct, recentContentLoading: lt, userLinks: ut, searchActive: R, searchTerm: dt, searchType: pt, searchInput: ht, searchAction: mt, searchPopover: ft, showNav: ee, showProduct: gt, showUser: bt, suggestions: vt } = this, _t = b?.user, wt = Q(L) && !f?.length || !this.measurements;
|
|
1896
|
+
return c`<calcite-scrim class=${re({ scrim: !0, "scrim--active": R })}></calcite-scrim><div class="wrapper" style=${Ie({ "--arcgis-portal-navigation-max-width": this.maxWidth ? `${this.maxWidth}px` : "100%" })}><arcgis-portal-info-banner .config=${N}></arcgis-portal-info-banner>${b?.isPortal && j?.loaded && c`<arcgis-portal-classification-banner .portalItem=${j}></arcgis-portal-classification-banner>` || ""}<header class=${re({ navigation: !0, "navigation--loading": wt })}>${Pn({ messages: h?.platform, portal: b, showNav: ee, openPlatformMenu: Xe, handleToggleSearch: A })}${gt && Jt({ navigate: u, portal: b, product: L, productInfo: $, productHref: E, messages: h?.logo, showNav: ee, searchActive: R, projectTitleEditing: Z }) || ""}${Zi({ navigate: u, portal: b, portalItem: j, messages: h?.project, projectTitle: Y, editedProjectTitle: H, handleProjectTitleSave: D, handleProjectTitleEdit: Je, openProjectTitleEdit: Qe, projectTitleErrorMessage: et, handleProjectTitleCancel: Ke, projectTitleEditing: Z, projectTitleSaving: Ze, projectMenuIcon: tt, projectMenuSaveIndicator: it, projectMenuClick: nt, projectMenuOptions: rt, projectTitleInputRef: ot, projectButtonRef: at })}${ee && sn({ searchActive: R, navigate: u, portal: b, product: L, messages: h?.links, links: f, currentPathname: o }) || ""}<div slot=content-end class="content-end fade-in" .hidden=${Z || R}><slot name=content-end></slot></div>${on({ currentPathname: o, navigate: u, portal: b, product: L, messages: h?.search, searchActive: R, searchType: pt, searchTerm: dt, suggestions: vt, handleSearch: _, handleToggleSearch: A, handleSearchTypeChange: w, searchInputRef: ht, searchActionRef: mt, searchPopoverRef: ft })}${_t ? c`<div class="border-start">${ni({ notifications: v, notificationsActive: P, messages: h?.notifications, handleToggleNotifications: fe, handleToggleSearch: A })}${ri({ notificationsActive: P, notifications: v, navigate: u, portal: b, deleteNotifications: this.deleteNotifications, handleToggleNotifications: fe, messages: h?.notifications, notificationDeleteProgress: y })}</div>${cn({ portal: b, userLinks: ut, openAccountSwitcher: b?.isPortal ? void 0 : x, signOut: this.signOut, messages: h?.user, textDisabled: bt === "avatar", navigate: u })}` : an({ messages: h.user, signIn: this.signIn })}</header>${Ji({ locale: h._t9nLocale, navigate: u, portal: b, product: L, platformInfo: k, messages: h?.platform, apps: i, appsLoading: n, hiddenApps: I, appsSearchTerm: r, editingApplications: this.editingApplications, open: Ye, links: f, recentContent: st, recentContentSearchTerm: ct, recentContentLoading: lt, handlePlatformClose: p, handlePlatformTabUpdate: this.handlePlatformTabUpdate, handleAppReorder: d, handleAppEdit: () => this.editingApplications = !0, handleAppDelete: s, handleAppsSearch: (yt) => this.appsSearchTerm = yt, handleAppSave: m, handleAppCancel: a, handleAppHide: l, handleItemSearch: g, platformTab: this.platformTab })}${t && c`<arcgis-portal-account-switcher .portal=${b} @arcgisClose=${() => {
|
|
1893
1897
|
this.accountSwitcherOpen = !1;
|
|
1894
1898
|
}}></arcgis-portal-account-switcher>` || ""}</div>`;
|
|
1895
1899
|
}
|