@arcgis/portal-components 5.2.0-next.52 → 5.2.0-next.53
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/BZRUGC5P.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-navigation/customElement.js +180 -180
- 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 +4 -4
- package/dist/cdn/OQZDN4G5.js +0 -2
|
@@ -16,18 +16,18 @@ import { i as $e, a as Mt } from "../../chunks/utils.js";
|
|
|
16
16
|
import { g as Ae } from "../../chunks/item.js";
|
|
17
17
|
import { keyed as ce } from "lit/directives/keyed.js";
|
|
18
18
|
import { ref as F, createRef as B } from "lit/directives/ref.js";
|
|
19
|
-
import { c as Lt, g as
|
|
19
|
+
import { c as Lt, g as Ot } from "../../chunks/dom.js";
|
|
20
20
|
import { debounce as me } from "@arcgis/toolkit/function";
|
|
21
|
-
import
|
|
21
|
+
import Et from "@arcgis/core/identity/IdentityManager.js";
|
|
22
22
|
import { t as jt } from "../../chunks/functionalities.js";
|
|
23
23
|
import { c as Dt } from "../../chunks/string.js";
|
|
24
24
|
function Gt({ navigate: e, portal: t, product: i, productInfo: n, productHref: r, messages: o, searchActive: s, showNav: a, projectTitleEditing: c }) {
|
|
25
|
-
const
|
|
26
|
-
if (!i || !t || !o ||
|
|
25
|
+
const p = s && i === "Online" && !a || i !== "Online" && c && window.innerWidth < 960;
|
|
26
|
+
if (!i || !t || !o || p)
|
|
27
27
|
return null;
|
|
28
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 ? (
|
|
30
|
-
e({ event:
|
|
29
|
+
return l`<calcite-navigation-logo class="logo fade-in" .heading=${f} .description=${t.name || ""} .href=${r} @click=${r ? (h) => {
|
|
30
|
+
e({ event: h, href: r });
|
|
31
31
|
} : void 0} .thumbnail=${g}></calcite-navigation-logo>`;
|
|
32
32
|
}
|
|
33
33
|
const Z = {}, N = {
|
|
@@ -209,10 +209,10 @@ function K({ icon: e, title: t, description: i }) {
|
|
|
209
209
|
}
|
|
210
210
|
function Jt({ notifications: e, deleteNotifications: t, messages: i, navigate: n, portal: r, notificationDeleteProgress: o }) {
|
|
211
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,
|
|
213
|
-
if (c.nodeName === "CALCITE-LINK" &&
|
|
212
|
+
const c = a.target, p = c.href;
|
|
213
|
+
if (c.nodeName === "CALCITE-LINK" && p) {
|
|
214
214
|
const f = `${W({ portal: r, usePortalHostname: !!r.user })}/home/`;
|
|
215
|
-
n({ event: a, href:
|
|
215
|
+
n({ event: a, href: p, relativePath: p.replace(f, "") });
|
|
216
216
|
}
|
|
217
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
218
|
const a = s.currentTarget?.parentElement;
|
|
@@ -427,11 +427,11 @@ function ui(e, t) {
|
|
|
427
427
|
o && n.push(o);
|
|
428
428
|
}), n);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function P(e, t) {
|
|
431
431
|
return t && t[e.toLowerCase()]?.valid || !1;
|
|
432
432
|
}
|
|
433
433
|
function di(e, t) {
|
|
434
|
-
return e?.portalProperties && !e.portalProperties?.openData?.enabled ? !1 :
|
|
434
|
+
return e?.portalProperties && !e.portalProperties?.openData?.enabled ? !1 : P("HubforArcGIS", t);
|
|
435
435
|
}
|
|
436
436
|
function pi(e, t) {
|
|
437
437
|
if (!e)
|
|
@@ -440,14 +440,14 @@ function pi(e, t) {
|
|
|
440
440
|
"portal:publisher:publishFeeds",
|
|
441
441
|
"portal:publisher:publishRealTimeAnalytics",
|
|
442
442
|
"portal:publisher:publishBigDataAnalytics"
|
|
443
|
-
], r = (e?.privileges || []).some((s) => i.includes(s)), o =
|
|
443
|
+
], r = (e?.privileges || []).some((s) => i.includes(s)), o = P("velocity", t);
|
|
444
444
|
return r && o;
|
|
445
445
|
}
|
|
446
446
|
function hi(e) {
|
|
447
|
-
return
|
|
447
|
+
return P("HubforArcGIS", e);
|
|
448
448
|
}
|
|
449
449
|
function mi(e, t) {
|
|
450
|
-
return !(e.isPortal && e.portalProperties?.newMapViewerEnabled === !1) &&
|
|
450
|
+
return !(e.isPortal && e.portalProperties?.newMapViewerEnabled === !1) && P("arcgisWebApps", t);
|
|
451
451
|
}
|
|
452
452
|
function fi(e) {
|
|
453
453
|
return !!e.helperServices?.rasterAnalytics && !!e.helperServices.orthoMapping;
|
|
@@ -466,34 +466,34 @@ function vi(e, t, i, n) {
|
|
|
466
466
|
hasAccess: () => di(e, n)
|
|
467
467
|
},
|
|
468
468
|
AppStudio: {
|
|
469
|
-
hasAccess: () =>
|
|
469
|
+
hasAccess: () => P("arcgisWebApps", n)
|
|
470
470
|
},
|
|
471
471
|
"ArcGIS Velocity": {
|
|
472
472
|
hasAccess: () => e.isPortal || pi(r, n)
|
|
473
473
|
},
|
|
474
474
|
"ArcGIS Hub": {
|
|
475
|
-
hasAccess: () =>
|
|
475
|
+
hasAccess: () => P("HubforArcGIS", n)
|
|
476
476
|
},
|
|
477
477
|
"ArcGIS Enterprise Sites": {
|
|
478
478
|
hasAccess: () => hi(n)
|
|
479
479
|
},
|
|
480
480
|
"ArcGIS QuickCapture Web Designer": {
|
|
481
|
-
hasAccess: () =>
|
|
481
|
+
hasAccess: () => P("arcgisWebApps", n)
|
|
482
482
|
},
|
|
483
483
|
"ArcGIS Dashboards": {
|
|
484
|
-
hasAccess: () =>
|
|
484
|
+
hasAccess: () => P("dashboards", n)
|
|
485
485
|
},
|
|
486
486
|
"Map Viewer": {
|
|
487
487
|
hasAccess: () => mi(e, n)
|
|
488
488
|
},
|
|
489
489
|
"Map Viewer Classic": {
|
|
490
|
-
hasAccess: () =>
|
|
490
|
+
hasAccess: () => P("arcgisWebApps", n)
|
|
491
491
|
},
|
|
492
492
|
"Operations Dashboard for ArcGIS": {
|
|
493
|
-
hasAccess: () =>
|
|
493
|
+
hasAccess: () => P("opsdashboard", n)
|
|
494
494
|
},
|
|
495
495
|
"ArcGIS Dashboards Classic": {
|
|
496
|
-
hasAccess: () =>
|
|
496
|
+
hasAccess: () => P("opsdashboard", n)
|
|
497
497
|
},
|
|
498
498
|
"Ortho Maker": {
|
|
499
499
|
hasAccess: () => fi(e)
|
|
@@ -502,23 +502,23 @@ function vi(e, t, i, n) {
|
|
|
502
502
|
hasAccess: () => gi(e, r, t)
|
|
503
503
|
},
|
|
504
504
|
"Scene Viewer": {
|
|
505
|
-
hasAccess: () =>
|
|
505
|
+
hasAccess: () => P("arcgisWebApps", n)
|
|
506
506
|
},
|
|
507
507
|
"Story Maps": {
|
|
508
|
-
hasAccess: () =>
|
|
508
|
+
hasAccess: () => P("arcgisWebApps", n)
|
|
509
509
|
},
|
|
510
510
|
Survey123: {
|
|
511
|
-
hasAccess: () =>
|
|
511
|
+
hasAccess: () => P("survey123", n)
|
|
512
512
|
},
|
|
513
513
|
"Track Viewer": {
|
|
514
514
|
hasAccess: () => bi(e, i)
|
|
515
515
|
},
|
|
516
516
|
"Instant Apps": {
|
|
517
517
|
// For Portal
|
|
518
|
-
hasAccess: () =>
|
|
518
|
+
hasAccess: () => P("arcgisWebApps", n)
|
|
519
519
|
},
|
|
520
520
|
"ArcGIS Maps for Adobe Creative Cloud": {
|
|
521
|
-
hasAccess: () =>
|
|
521
|
+
hasAccess: () => P("arcgisWebApps", n) && !e.isPortal
|
|
522
522
|
}
|
|
523
523
|
};
|
|
524
524
|
}
|
|
@@ -596,65 +596,65 @@ async function $i({
|
|
|
596
596
|
orgCapabilities: s,
|
|
597
597
|
trackViewerEnabled: a,
|
|
598
598
|
notebookServerEnabled: c,
|
|
599
|
-
willQueryForItems:
|
|
599
|
+
willQueryForItems: p,
|
|
600
600
|
approvedApps: f
|
|
601
601
|
}) {
|
|
602
|
-
const g = {},
|
|
603
|
-
for (let m = 0; m <
|
|
602
|
+
const g = {}, h = {}, _ = vi(i, c, a, n), k = wi(i), A = [], I = e.length;
|
|
603
|
+
for (let m = 0; m < I; m++) {
|
|
604
604
|
const u = e[m], v = u.itemId || u.title;
|
|
605
605
|
let T = !0;
|
|
606
|
-
const
|
|
607
|
-
const V = (
|
|
608
|
-
return V && u.serverFunction === "Velocity" && (u.url =
|
|
606
|
+
const d = !u.serverFunction || t?.some((x) => {
|
|
607
|
+
const V = (x.serverFunction?.split(",") || []).includes(u.serverFunction);
|
|
608
|
+
return V && u.serverFunction === "Velocity" && (u.url = x.url), V;
|
|
609
609
|
}), $ = r?.some(
|
|
610
|
-
(
|
|
610
|
+
(x) => u.itemId && u.itemId === x.itemid || u.title && u.title === x.title
|
|
611
611
|
);
|
|
612
|
-
if (g[v] = 1,
|
|
612
|
+
if (g[v] = 1, h[v] = u, $ || ie(i) && !u.showInLocationPlatform || i.sourceJSON?.portalDeploymentType === "ArcGISEnterpriseOnKubernetes" && u.supportsKubernetes === !1)
|
|
613
613
|
continue;
|
|
614
614
|
const S = u.title;
|
|
615
|
-
if (
|
|
615
|
+
if (_[S] && !_[S]?.hasAccess())
|
|
616
616
|
continue;
|
|
617
|
-
const
|
|
617
|
+
const E = i.sourceJSON?.subscriptionInfo;
|
|
618
618
|
if (u.subscriptionType) {
|
|
619
|
-
|
|
619
|
+
E?.type === u.subscriptionType && (h[v].canAccess = !0, A.push(D(u, v, i)));
|
|
620
620
|
continue;
|
|
621
621
|
}
|
|
622
622
|
if (u.orgCapabilities) {
|
|
623
|
-
s?.length && s.some((C) => u.orgCapabilities?.includes(C.id)) && (
|
|
623
|
+
s?.length && s.some((C) => u.orgCapabilities?.includes(C.id)) && (h[v].canAccess = !0, A.push(D(u, v, i)));
|
|
624
624
|
continue;
|
|
625
625
|
}
|
|
626
|
-
if (!u.privileges?.length && !u.isLicensed &&
|
|
627
|
-
|
|
626
|
+
if (!u.privileges?.length && !u.isLicensed && d && (u.label !== "ArcGIS Location Platform" || ie(i))) {
|
|
627
|
+
h[v].canAccess = !0, A.push(D(u, v, i));
|
|
628
628
|
continue;
|
|
629
629
|
}
|
|
630
630
|
if (i.user?.sourceJSON?.userLicenseTypeId?.toLowerCase() === "storytellerut" && u.label?.toLowerCase() === "storymaps") {
|
|
631
|
-
|
|
631
|
+
h[v].canAccess = !0, A.push(D(u, v, i));
|
|
632
632
|
continue;
|
|
633
633
|
}
|
|
634
634
|
if (u.privileges?.length && i.user?.privileges) {
|
|
635
|
-
for (let
|
|
636
|
-
if (!i.user.privileges.includes(u.privileges[
|
|
635
|
+
for (let x = 0; x < u.privileges.length; x++)
|
|
636
|
+
if (!i.user.privileges.includes(u.privileges[x])) {
|
|
637
637
|
T = !1;
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
|
-
if (!u.isLicensed && T &&
|
|
641
|
-
|
|
640
|
+
if (!u.isLicensed && T && d) {
|
|
641
|
+
h[v].canAccess = !0, A.push(D(u, v, i));
|
|
642
642
|
continue;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
if (u.isLicensed && T &&
|
|
646
|
-
for (let
|
|
647
|
-
if (v === o[
|
|
648
|
-
|
|
645
|
+
if (u.isLicensed && T && d) {
|
|
646
|
+
for (let x = 0; x < o.length; x++)
|
|
647
|
+
if (v === o[x].itemId || v === o[x].title) {
|
|
648
|
+
h[v].canAccess = !0, A.push(D(u, v, i));
|
|
649
649
|
break;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
const
|
|
653
|
+
const w = await Ct(i);
|
|
654
654
|
return o.forEach((m) => {
|
|
655
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,
|
|
657
|
-
|
|
656
|
+
const u = yi(m, i, w);
|
|
657
|
+
h[m.itemId] = u, A.push(u);
|
|
658
658
|
}
|
|
659
659
|
}), {
|
|
660
660
|
apps: [
|
|
@@ -664,13 +664,13 @@ async function $i({
|
|
|
664
664
|
itemId: m.itemId,
|
|
665
665
|
webMappingApp: !0,
|
|
666
666
|
approvedApp: !0,
|
|
667
|
-
canAccess: !
|
|
667
|
+
canAccess: !p
|
|
668
668
|
};
|
|
669
|
-
return
|
|
669
|
+
return h[m.itemId] = u, _i(u, i, w);
|
|
670
670
|
}),
|
|
671
|
-
...
|
|
671
|
+
...A
|
|
672
672
|
],
|
|
673
|
-
appDictionary:
|
|
673
|
+
appDictionary: h
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
676
|
function ee(e, t) {
|
|
@@ -695,7 +695,7 @@ async function Ai({
|
|
|
695
695
|
}) {
|
|
696
696
|
if (!e?.id || !e.user)
|
|
697
697
|
return { apps: [], hiddenApps: {} };
|
|
698
|
-
const n = ci(), [r, o, s, a, c,
|
|
698
|
+
const n = ci(), [r, o, s, a, c, p, f] = await Promise.all([
|
|
699
699
|
ri(e),
|
|
700
700
|
Tt(e),
|
|
701
701
|
Nt(e),
|
|
@@ -703,69 +703,69 @@ async function Ai({
|
|
|
703
703
|
kt(e),
|
|
704
704
|
St(e),
|
|
705
705
|
si(e)
|
|
706
|
-
]), g = e.isPortal ? await It(e) : null,
|
|
707
|
-
let
|
|
708
|
-
e.isPortal || (
|
|
709
|
-
(
|
|
710
|
-
),
|
|
711
|
-
const k = a?.result?.approvedApps?.filter((
|
|
712
|
-
o?.forEach((
|
|
713
|
-
const $ =
|
|
714
|
-
$ && (
|
|
706
|
+
]), g = e.isPortal ? await It(e) : null, h = s?.result?.properties;
|
|
707
|
+
let _ = r?.appSwitcher?.apps || [];
|
|
708
|
+
e.isPortal || (_ = _.filter(
|
|
709
|
+
(d) => d.title !== "Map Viewer Classic" || e.sourceJSON.created < /* @__PURE__ */ new Date("February 26 2025")
|
|
710
|
+
), _.unshift(li(e, h)));
|
|
711
|
+
const k = a?.result?.approvedApps?.filter((d) => !d.hideForNonPrivilegedMember) || [], A = {};
|
|
712
|
+
o?.forEach((d) => {
|
|
713
|
+
const $ = d.clientId?.toLowerCase();
|
|
714
|
+
$ && (A[$] = {
|
|
715
715
|
valid: !0,
|
|
716
|
-
itemId:
|
|
717
|
-
clientId:
|
|
716
|
+
itemId: d.itemId,
|
|
717
|
+
clientId: d.clientId
|
|
718
718
|
});
|
|
719
|
-
}), c?.forEach((
|
|
720
|
-
const $ =
|
|
721
|
-
$ && (
|
|
719
|
+
}), c?.forEach((d) => {
|
|
720
|
+
const $ = d.id?.toLowerCase();
|
|
721
|
+
$ && (A[$] = {
|
|
722
722
|
valid: !0,
|
|
723
|
-
clientId:
|
|
723
|
+
clientId: d.id
|
|
724
724
|
});
|
|
725
725
|
});
|
|
726
|
-
const
|
|
727
|
-
userApps:
|
|
726
|
+
const I = ui(p, f), { apps: w, appDictionary: b } = await $i({
|
|
727
|
+
userApps: _,
|
|
728
728
|
servers: g,
|
|
729
729
|
portal: e,
|
|
730
|
-
blockedApps:
|
|
730
|
+
blockedApps: I,
|
|
731
731
|
provisionedListings: o,
|
|
732
732
|
orgCapabilities: c,
|
|
733
|
-
licenses:
|
|
733
|
+
licenses: A,
|
|
734
734
|
trackViewerEnabled: t,
|
|
735
735
|
notebookServerEnabled: i,
|
|
736
736
|
willQueryForItems: n,
|
|
737
737
|
approvedApps: k
|
|
738
738
|
});
|
|
739
|
-
|
|
739
|
+
h?.appLauncher && (h?.appLauncher.primary && be(h?.appLauncher.primary, e), h?.appLauncher.secondary && be(h?.appLauncher.secondary, e));
|
|
740
740
|
let m = [], u = [];
|
|
741
|
-
if (!
|
|
742
|
-
m =
|
|
741
|
+
if (!h?.appLauncher?.primary || !h?.appLauncher.secondary)
|
|
742
|
+
m = w.slice().sort((d, $) => (d.label || "") < ($.label || "") ? -1 : 1), m = ee(m, I), u = [];
|
|
743
743
|
else {
|
|
744
|
-
const { result:
|
|
745
|
-
|
|
746
|
-
const S = b[
|
|
747
|
-
S.canAccess = !0, S.hasChanged = S.url !==
|
|
744
|
+
const { result: d } = await oi(k, n, e);
|
|
745
|
+
d?.results?.length && d.results.forEach((y) => {
|
|
746
|
+
const S = b[y.id];
|
|
747
|
+
S.canAccess = !0, S.hasChanged = S.url !== y.url ? !!y.url : !1;
|
|
748
748
|
});
|
|
749
749
|
const $ = { ...b };
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}), m =
|
|
753
|
-
(
|
|
750
|
+
h?.appLauncher?.primary?.forEach((y) => {
|
|
751
|
+
y.label === "Map Viewer" && (y.uid = "Map Viewer");
|
|
752
|
+
}), m = h?.appLauncher.primary.reduce(
|
|
753
|
+
(y, S) => ve({ apps: y, app: S, appDictionary: b, newAppDictionary: $, portal: e }),
|
|
754
754
|
[]
|
|
755
|
-
) || [], u =
|
|
756
|
-
(
|
|
755
|
+
) || [], u = h?.appLauncher.secondary.reduce(
|
|
756
|
+
(y, S) => ve({ apps: y, app: S, appDictionary: b, newAppDictionary: $, portal: e }),
|
|
757
757
|
[]
|
|
758
|
-
) || [], m = ee(m,
|
|
759
|
-
for (const
|
|
760
|
-
$[
|
|
758
|
+
) || [], m = ee(m, I), u = ee(u, I), ie(e) && (m = m.filter((y) => y.canAccess), u = u.filter((y) => y.canAccess));
|
|
759
|
+
for (const y of Object.keys($))
|
|
760
|
+
$[y].canAccess && ($[y].isNew = !0, b[y] = $[y], m.push($[y]));
|
|
761
761
|
}
|
|
762
|
-
const v = [...m, ...u], T = u.reduce((
|
|
762
|
+
const v = [...m, ...u], T = u.reduce((d, $) => ($.itemId && (d[$.itemId] = !0), d), {});
|
|
763
763
|
return {
|
|
764
764
|
apps: v,
|
|
765
765
|
hiddenApps: T,
|
|
766
|
-
signInSettings:
|
|
767
|
-
licenses:
|
|
768
|
-
userProperties:
|
|
766
|
+
signInSettings: p,
|
|
767
|
+
licenses: A,
|
|
768
|
+
userProperties: h
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
771
|
function ki(e, t) {
|
|
@@ -809,22 +809,22 @@ function xi({ app: e, messages: t }) {
|
|
|
809
809
|
const { title: i, itemId: n, label: r, url: o, isNew: s } = e, a = t?.descriptions?.[i] || t?.descriptions?.[r];
|
|
810
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>`;
|
|
811
811
|
}
|
|
812
|
-
function Pi({ apps: e, appsLoading: t, appsSearchTerm: i, hiddenApps: n, messages: r, handleAppsSearch: o, handleAppReorder: s, handleAppSave: a, handleAppHide: c, handleAppCancel:
|
|
812
|
+
function Pi({ apps: e, appsLoading: t, appsSearchTerm: i, hiddenApps: n, messages: r, handleAppsSearch: o, handleAppReorder: s, handleAppSave: a, handleAppHide: c, handleAppCancel: p, handleAppEdit: f, editingApplications: g, portal: h }) {
|
|
813
813
|
if (!e || !r)
|
|
814
814
|
return null;
|
|
815
|
-
const
|
|
815
|
+
const _ = i?.length > 0, k = (e || []).filter((w) => w.itemId && (!n?.[w.itemId] || _) && ai(i, w)), A = _ ? r.noAppResults.replace("${term}", i) : r.noAppsAvailable, I = _ ? M(h) ? r.noAppsDescriptionPublic : r.noAppResultsDescriptionOrg : r.noAppsAvailable;
|
|
816
816
|
return g ? l`<div class="list__header"><calcite-button appearance=outline width=half @click=${() => {
|
|
817
|
-
|
|
817
|
+
p();
|
|
818
818
|
}}>${r.cancel}</calcite-button><calcite-button width=half @click=${() => {
|
|
819
819
|
a();
|
|
820
|
-
}}>${r.applyChanges}</calcite-button></div><calcite-list .label=${r.allMyApplications} drag-enabled @calciteListDragEnd=${(
|
|
821
|
-
const { newIndex: b, oldIndex: m } =
|
|
820
|
+
}}>${r.applyChanges}</calcite-button></div><calcite-list .label=${r.allMyApplications} drag-enabled @calciteListDragEnd=${(w) => {
|
|
821
|
+
const { newIndex: b, oldIndex: m } = w.detail;
|
|
822
822
|
s({ newIndex: b, oldIndex: m });
|
|
823
|
-
}} .loading=${t}>${G(e, (
|
|
823
|
+
}} .loading=${t}>${G(e, (w) => w.itemId, (w) => Ii({ app: w, hiddenApps: n, messages: r, toggleAppVisibility: (b, m) => {
|
|
824
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=${(
|
|
826
|
-
o(
|
|
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, (
|
|
825
|
+
} }))}</calcite-list>` : l`<div class="list__header"><calcite-input type=search icon .placeholder=${r.searchMyApps} scale=m class="list__search" @calciteInputInput=${(w) => {
|
|
826
|
+
o(w.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, (w) => w.itemId, (w) => xi({ app: w, messages: r }))}</ul>` : K({ title: A, description: I, icon: i ? "search" : "apps" })}`;
|
|
828
828
|
}
|
|
829
829
|
const we = "portalAppClientId", le = {
|
|
830
830
|
GeoanalyticsEngine: "geoanalyticsengine",
|
|
@@ -857,12 +857,12 @@ function Ti({
|
|
|
857
857
|
return s;
|
|
858
858
|
if (!e || !s || e?.user && !i && !M(e))
|
|
859
859
|
return [];
|
|
860
|
-
const a =
|
|
860
|
+
const a = Ei({
|
|
861
861
|
portal: e,
|
|
862
862
|
licenses: i,
|
|
863
863
|
subscriptionInfo: o
|
|
864
864
|
});
|
|
865
|
-
return
|
|
865
|
+
return Oi({ messages: t, portal: e, clientId: n, signInSettings: r, navLinkDictionary: a });
|
|
866
866
|
}
|
|
867
867
|
function Ni(e) {
|
|
868
868
|
const { id: t, access: i, isPortal: n } = e;
|
|
@@ -881,14 +881,14 @@ function Le({
|
|
|
881
881
|
gallery: s = "all",
|
|
882
882
|
groups: a = "all",
|
|
883
883
|
map: c = "all",
|
|
884
|
-
notebook:
|
|
884
|
+
notebook: p = "notebookCreators",
|
|
885
885
|
scene: f = "all"
|
|
886
886
|
} = e.portalProperties?.topNav || {};
|
|
887
887
|
let g = ["home"];
|
|
888
888
|
if (!n) {
|
|
889
889
|
if (!e.portalProperties?.topNav) {
|
|
890
|
-
const
|
|
891
|
-
return [...g, ...
|
|
890
|
+
const _ = ["gallery", "map", "scene", "groups"], k = e.isPortal ? ["help"] : [];
|
|
891
|
+
return [...g, ..._, ...k];
|
|
892
892
|
}
|
|
893
893
|
return [
|
|
894
894
|
...g,
|
|
@@ -899,18 +899,18 @@ function Le({
|
|
|
899
899
|
...e.isPortal ? ["help"] : []
|
|
900
900
|
];
|
|
901
901
|
}
|
|
902
|
-
const
|
|
902
|
+
const h = n.orgId === e.id;
|
|
903
903
|
return !e.portalProperties?.topNav && M(e) ? g = ["ArcGIS", "overview", "pricing", "map", "scene", "groups", "myContent"] : g = [
|
|
904
904
|
...g,
|
|
905
|
-
...(s === "all" || s === "members" &&
|
|
906
|
-
...(c === "all" || c === "members" &&
|
|
907
|
-
...(f === "all" || f === "members" &&
|
|
908
|
-
...!o && (!e.isPortal || e.sourceJSON.supportsHostedNotebooks) && (
|
|
909
|
-
...(a === "all" || a === "members" &&
|
|
910
|
-
...
|
|
905
|
+
...(s === "all" || s === "members" && h) && !r ? ["gallery"] : [],
|
|
906
|
+
...(c === "all" || c === "members" && h || c === "mapCreators" && he(n)) && !r ? ["map"] : [],
|
|
907
|
+
...(f === "all" || f === "members" && h || f === "sceneCreators" && he(n)) && !r ? ["scene"] : [],
|
|
908
|
+
...!o && (!e.isPortal || e.sourceJSON.supportsHostedNotebooks) && (p === "members" && h || p === "notebookCreators" && $t(n)) && !r ? ["notebook"] : [],
|
|
909
|
+
...(a === "all" || a === "members" && h) && !r ? ["groups"] : [],
|
|
910
|
+
...h && !r ? ["myContent", "organization"] : []
|
|
911
911
|
], g;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function O(e) {
|
|
914
914
|
return `${vt({ portal: e })}/`;
|
|
915
915
|
}
|
|
916
916
|
function Mi({
|
|
@@ -922,12 +922,12 @@ function Mi({
|
|
|
922
922
|
return e.forEach((r) => {
|
|
923
923
|
const o = t[r];
|
|
924
924
|
if (o && (!("show" in o) || o.show)) {
|
|
925
|
-
const { href: s, newTab: a, icon: c, relativePath:
|
|
925
|
+
const { href: s, newTab: a, icon: c, relativePath: p } = o;
|
|
926
926
|
n.push({
|
|
927
927
|
label: i[r],
|
|
928
928
|
href: s,
|
|
929
929
|
newTab: a,
|
|
930
|
-
relativePath:
|
|
930
|
+
relativePath: p,
|
|
931
931
|
icon: c
|
|
932
932
|
});
|
|
933
933
|
}
|
|
@@ -939,7 +939,7 @@ function Li({
|
|
|
939
939
|
}) {
|
|
940
940
|
if (!e || !t)
|
|
941
941
|
return [];
|
|
942
|
-
const i =
|
|
942
|
+
const i = O(t), n = {
|
|
943
943
|
overview: { label: e.overview, href: `${i}../features/features.html`, icon: "information" },
|
|
944
944
|
pricing: { label: e.pricing, href: `${i}../features/plans/pricing.html`, icon: "credit-card" },
|
|
945
945
|
map: { label: e.map, href: `${i}apps/mapviewer/index.html`, icon: "map" },
|
|
@@ -951,14 +951,14 @@ function Li({
|
|
|
951
951
|
};
|
|
952
952
|
return (Ni(t) ? ["overview", "pricing", "map", "scene", "help"] : Le({ portal: t })).map((o) => n[o]);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function Oi({
|
|
955
955
|
messages: e,
|
|
956
956
|
portal: t,
|
|
957
957
|
clientId: i,
|
|
958
958
|
signInSettings: n,
|
|
959
959
|
navLinkDictionary: r
|
|
960
960
|
}) {
|
|
961
|
-
const o = ue(i), s = Le({ portal: t, clientId: i, signInSettings: n }), a = `${
|
|
961
|
+
const o = ue(i), s = Le({ portal: t, clientId: i, signInSettings: n }), a = `${O(t)}geoanalytics${o ? "engine" : "fabric"}.html`;
|
|
962
962
|
return o || de(i) ? [
|
|
963
963
|
{
|
|
964
964
|
// TODO: active calculations in the component need to account for hash for these options
|
|
@@ -981,12 +981,12 @@ function Ei({
|
|
|
981
981
|
}
|
|
982
982
|
] : Mi({ keys: s, messages: e, navLinkDictionary: r });
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Ei({
|
|
985
985
|
portal: e,
|
|
986
986
|
licenses: t,
|
|
987
987
|
subscriptionInfo: i
|
|
988
988
|
}) {
|
|
989
|
-
const n = e.user, r =
|
|
989
|
+
const n = e.user, r = O(e), o = i?.options?.includes("Developer"), s = P("arcgiswebapps", t) || o && P("locationplatformwebapps", t) || M(e);
|
|
990
990
|
return {
|
|
991
991
|
pricing: { href: `${r}../features/plans/pricing.html` },
|
|
992
992
|
overview: { href: `${r}../features/features.html` },
|
|
@@ -1052,20 +1052,20 @@ function Oi({
|
|
|
1052
1052
|
function ji({ portal: e, item: t, messages: i, navigate: n, locale: r }) {
|
|
1053
1053
|
if (!t || !i || !t.modified)
|
|
1054
1054
|
return null;
|
|
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 }),
|
|
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 }), p = `item.html?id=${t.id}`, f = `${O(e)}${p}}`;
|
|
1056
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:
|
|
1057
|
+
n({ event: g, href: f, relativePath: p });
|
|
1058
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>`);
|
|
1059
1059
|
}
|
|
1060
|
-
function Di({ locale: e, navigate: t, portal: i, open: n, apps: r, appsLoading: o, hiddenApps: s, appsSearchTerm: a, handlePlatformClose: c, handleAppsSearch:
|
|
1061
|
-
if (!u || !i || !
|
|
1060
|
+
function Di({ locale: e, navigate: t, portal: i, open: n, apps: r, appsLoading: o, hiddenApps: s, appsSearchTerm: a, handlePlatformClose: c, handleAppsSearch: p, handleAppReorder: f, handleAppSave: g, handleAppHide: h, handleAppCancel: _, handleAppEdit: k, handleItemSearch: A, editingApplications: I, recentContent: w, recentContentLoading: b, recentContentSearchTerm: m, product: u, productInfo: v, links: T, messages: d }) {
|
|
1061
|
+
if (!u || !i || !d)
|
|
1062
1062
|
return null;
|
|
1063
|
-
const { name: $, icon:
|
|
1064
|
-
return l`<calcite-sheet class="platform" .label=${
|
|
1065
|
-
(C.key === "Enter" || C.key === " ") && t({ event: C, href:
|
|
1063
|
+
const { name: $, icon: y } = v || {};
|
|
1064
|
+
return l`<calcite-sheet class="platform" .label=${d.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=${y ?? 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: E, icon: R, relativePath: x }) => l`<calcite-tile .icon=${R} .description=${S} .href=${E} alignment=center scale=s @keydown=${(C) => {
|
|
1065
|
+
(C.key === "Enter" || C.key === " ") && t({ event: C, href: E, relativePath: x });
|
|
1066
1066
|
}} @click=${(C) => {
|
|
1067
|
-
t({ event: C, href:
|
|
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>${
|
|
1067
|
+
t({ event: C, href: E, relativePath: x });
|
|
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>${d.myApps}</calcite-tab-title><calcite-tab-title>${d.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: d, handleAppsSearch: p, handleAppReorder: f, handleAppSave: g, handleAppHide: h, handleAppCancel: _, handleAppEdit: k, editingApplications: I, portal: i })}</calcite-tab><calcite-tab class="platform__tab"><div class="list__header"><calcite-input type=search icon .placeholder=${d.searchRecentContent} scale=m class="list__search" @calciteInputInput=${(S) => A(S.target.value)}></calcite-input></div>${b && !o && l`<calcite-scrim loading></calcite-scrim>` || ""}<div class="list__container">${w?.length > 0 || b ? l`<ul class="list">${G(w, (S) => S.id, (S) => ji({ portal: i, messages: d, navigate: t, item: S, locale: e }))}</ul>` : m?.length ? K({ title: Q(d.noAppResults, { term: m }), description: d.recentContentNoResultsDescription, icon: "search" }) : K({ title: d.noContent, description: d.noContentDescription, icon: "clock" })}</div></calcite-tab></calcite-tabs>` || ""}</div></calcite-panel></calcite-sheet>`;
|
|
1069
1069
|
}
|
|
1070
1070
|
const ne = [
|
|
1071
1071
|
"new",
|
|
@@ -1116,8 +1116,8 @@ function Bi(e, t) {
|
|
|
1116
1116
|
o.push(s);
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
const { text: c, external:
|
|
1120
|
-
i[f].push({ text: c, external:
|
|
1119
|
+
const { text: c, external: p, group: f } = n[s.id];
|
|
1120
|
+
i[f].push({ text: c, external: p, ...s });
|
|
1121
1121
|
}), o.forEach((s) => {
|
|
1122
1122
|
const a = s.group || "custom";
|
|
1123
1123
|
i[a].push(s);
|
|
@@ -1126,35 +1126,35 @@ function Bi(e, t) {
|
|
|
1126
1126
|
function Fi({ navigate: e, portal: t, menuItem: i, messages: n, portalItem: r, openProjectTitleEdit: o, projectMenuClick: s }) {
|
|
1127
1127
|
if (!t || !n || !i || i.id === "details" && !r)
|
|
1128
1128
|
return null;
|
|
1129
|
-
const { external: a, id: c, text:
|
|
1130
|
-
return ce(`${c}${
|
|
1129
|
+
const { external: a, id: c, text: p } = i, f = `${O(t)}item.html?id=${r?.id}`;
|
|
1130
|
+
return ce(`${c}${p}`, l`<calcite-dropdown-item .iconEnd=${a ? "launch" : void 0} .href=${c === "details" ? f : i.href} .target=${a ? "_blank" : void 0} @calciteDropdownItemSelect=${(g) => {
|
|
1131
1131
|
if (c === "rename") {
|
|
1132
1132
|
o?.();
|
|
1133
1133
|
return;
|
|
1134
1134
|
}
|
|
1135
1135
|
c === "details" && e({ event: g, href: f }), s?.({ type: c });
|
|
1136
|
-
}}>${
|
|
1136
|
+
}}>${p}${c === "save" && l`<calcite-icon icon=bullet-point-large class="project__indicator" scale=s></calcite-icon>` || ""}</calcite-dropdown-item>`);
|
|
1137
1137
|
}
|
|
1138
|
-
function zi({ navigate: e, portal: t, projectTitle: i, editedProjectTitle: n, handleProjectTitleSave: r, handleProjectTitleEdit: o, handleProjectTitleCancel: s, openProjectTitleEdit: a, portalItem: c, projectTitleEditing:
|
|
1139
|
-
if (!t || !b || !
|
|
1138
|
+
function zi({ navigate: e, portal: t, projectTitle: i, editedProjectTitle: n, handleProjectTitleSave: r, handleProjectTitleEdit: o, handleProjectTitleCancel: s, openProjectTitleEdit: a, portalItem: c, projectTitleEditing: p, projectTitleSaving: f, projectTitleErrorMessage: g, projectMenuIcon: h, projectMenuSaveIndicator: _, projectMenuClick: k, projectMenuOptions: A, projectTitleInputRef: I, projectButtonRef: w, messages: b }) {
|
|
1139
|
+
if (!t || !b || !A?.length)
|
|
1140
1140
|
return null;
|
|
1141
|
-
const m = Bi(
|
|
1142
|
-
return
|
|
1141
|
+
const m = Bi(A, b), u = !!g;
|
|
1142
|
+
return p ? l`<form class="rename" @submit=${async (v) => {
|
|
1143
1143
|
v.preventDefault(), await r?.(n);
|
|
1144
1144
|
}} @keydown=${(v) => {
|
|
1145
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(
|
|
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(I)}></calcite-input>${u && l`<calcite-popover open .label=${b.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=${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=${h} icon-end=chevron-down scale=m class="project" appearance=transparent kind=neutral ${F(w)}><span class="project__text">${i}${_ && 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((d) => Fi({ menuItem: d, navigate: e, portal: t, messages: b, portalItem: c, openProjectTitleEdit: a, projectMenuClick: k }))}</calcite-dropdown-group>`)}</calcite-dropdown>`;
|
|
1147
1147
|
}
|
|
1148
1148
|
function Wi(e) {
|
|
1149
1149
|
return ["Location Platform", "Online", "Enterprise"].includes(e);
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function Oe({
|
|
1152
1152
|
portal: e,
|
|
1153
1153
|
searchType: t,
|
|
1154
1154
|
searchTerm: i
|
|
1155
1155
|
}) {
|
|
1156
1156
|
const r = e?.sourceJSON?.vectorSearchEnabled ? `&mode=${t}` : "";
|
|
1157
|
-
return
|
|
1157
|
+
return `search.html?q=${i}${r}`;
|
|
1158
1158
|
}
|
|
1159
1159
|
function Ri({ portal: e, item: t, messages: i, navigate: n }) {
|
|
1160
1160
|
if (!t || !i)
|
|
@@ -1162,7 +1162,7 @@ function Ri({ portal: e, item: t, messages: i, navigate: n }) {
|
|
|
1162
1162
|
const r = Q(i.by, {
|
|
1163
1163
|
itemType: Mt(t),
|
|
1164
1164
|
owner: t.owner
|
|
1165
|
-
}), o = `item.html?id=${t.id}`, s = `${
|
|
1165
|
+
}), o = `item.html?id=${t.id}`, s = `${O(e)}${o}`;
|
|
1166
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>`);
|
|
1167
1167
|
}
|
|
1168
1168
|
function Vi({ portal: e, suggestions: t, messages: i, navigate: n, searchType: r, searchTerm: o }) {
|
|
@@ -1170,9 +1170,9 @@ function Vi({ portal: e, suggestions: t, messages: i, navigate: n, searchType: r
|
|
|
1170
1170
|
return null;
|
|
1171
1171
|
if (!t)
|
|
1172
1172
|
return l`<div><calcite-loader scale=l .label=${i.loadingResults}></calcite-loader></div>`;
|
|
1173
|
-
const s =
|
|
1174
|
-
return l`<ul class="list">${t.map((
|
|
1175
|
-
n({ href:
|
|
1173
|
+
const s = Oe({ portal: e, searchType: r, searchTerm: o }), a = `${O(e)}${s}`;
|
|
1174
|
+
return l`<ul class="list">${t.map((c) => Ri({ messages: i, portal: e, item: c, 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=${a} @click=${(c) => {
|
|
1175
|
+
n({ href: a, event: c, relativePath: s });
|
|
1176
1176
|
}}>${i.viewAll}</calcite-button></div>`;
|
|
1177
1177
|
}
|
|
1178
1178
|
function Hi({ portal: e, messages: t, searchType: i, handleSearchTypeChange: n }) {
|
|
@@ -1181,32 +1181,32 @@ function Hi({ portal: e, messages: t, searchType: i, handleSearchTypeChange: n }
|
|
|
1181
1181
|
const r = i === "keyword", o = t.searchType;
|
|
1182
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>`;
|
|
1183
1183
|
}
|
|
1184
|
-
function qi({
|
|
1185
|
-
if (!Wi(
|
|
1184
|
+
function qi({ currentPathname: e, navigate: t, product: i, portal: n, messages: r, searchActive: o, searchType: s, searchTerm: a, suggestions: c, searchInputRef: p, searchActionRef: f, searchPopoverRef: g, handleSearch: h, handleToggleSearch: _, handleSearchTypeChange: k }) {
|
|
1185
|
+
if (!Wi(i) || !r || !n || e?.includes("search.html"))
|
|
1186
1186
|
return null;
|
|
1187
|
-
const
|
|
1188
|
-
return
|
|
1189
|
-
|
|
1190
|
-
}} ${F(
|
|
1187
|
+
const A = Oe({ portal: n, searchTerm: a, searchType: s });
|
|
1188
|
+
return o ? l`<div class="search" id=search-reference-element><calcite-input type=search scale=l icon=search class="search__input" @calciteInputInput=${(I) => h(I.target.value)} @keydown=${(I) => {
|
|
1189
|
+
I.key === "Enter" && (t({ href: A, event: I }), I.defaultPrevented || (window.location.href = A)), I.key === "Escape" && _(!1);
|
|
1190
|
+
}} ${F(p)}></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 && !!a} pointer-disabled placement=bottom-start trigger-disabled .focusTrapOptions=${{ initialFocus: !1 }} ${F(g)}><div class="suggestions__header"><h3 class="suggestions__title">${r.topResults}</h3>${Hi({ portal: n, messages: r, searchType: s, handleSearchTypeChange: k })}</div><div class="suggestions__results">${Vi({ portal: n, suggestions: c, navigate: t, messages: r, searchType: s, searchTerm: a })}</div></calcite-popover></div>` : l`<calcite-action icon=search scale=l text=search class="search__action fade-in" @click=${() => _(!0)} ${F(f)}></calcite-action>`;
|
|
1191
1191
|
}
|
|
1192
1192
|
function Ji({ signIn: e, messages: t }) {
|
|
1193
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
1194
|
}
|
|
1195
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:
|
|
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: p }) => l`<calcite-menu-item .text=${a} text-enabled .label=${a} .href=${c} .active=${Ci(c, o)} @click=${(f) => e({ event: f, href: c, relativePath: p })}></calcite-menu-item>`)}</calcite-menu>`;
|
|
1197
1197
|
}
|
|
1198
1198
|
function Qi({ userLinks: e, messages: t, navigate: i, openAccountSwitcher: n, portal: r, signOut: o, textDisabled: s }) {
|
|
1199
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:
|
|
1201
|
-
(k.key === "Enter" || k.key === " ") && i({ event: k, href:
|
|
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: p }) => l`<calcite-dropdown-group selection-mode=none .groupTitle=${c}>${p.map(({ icon: f, label: g, href: h, relativePath: _ }) => l`<calcite-dropdown-item .iconStart=${f} .href=${h} @keydown=${(k) => {
|
|
1201
|
+
(k.key === "Enter" || k.key === " ") && i({ event: k, href: h, relativePath: _ });
|
|
1202
1202
|
}} @click=${(k) => {
|
|
1203
|
-
i({ event: k, href:
|
|
1203
|
+
i({ event: k, href: h, relativePath: _ });
|
|
1204
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
|
|
1206
|
-
|
|
1205
|
+
const p = Lt(c.target, "calcite-dropdown");
|
|
1206
|
+
p && (p.open = !1), n();
|
|
1207
1207
|
}}>${t.switchAccounts}</calcite-dropdown-item>` || ""}</calcite-dropdown-group></calcite-dropdown></div>`;
|
|
1208
1208
|
}
|
|
1209
|
-
const
|
|
1209
|
+
const Ee = {
|
|
1210
1210
|
community: "https://community.esri.com/plugins/common/feature/oauth2sso_v2/sso_login_redirect?referer=https%3A%2F%2Fcommunity.esri.com%2F",
|
|
1211
1211
|
myEsri: "https://my.esri.com"
|
|
1212
1212
|
};
|
|
@@ -1257,10 +1257,10 @@ function en(e, t, i) {
|
|
|
1257
1257
|
return e.forEach((r) => {
|
|
1258
1258
|
const o = i[r];
|
|
1259
1259
|
if (o && (!("show" in o) || o.show)) {
|
|
1260
|
-
const { href: s, newTab: a, icon: c, group:
|
|
1260
|
+
const { href: s, newTab: a, icon: c, group: p, relativePath: f } = o;
|
|
1261
1261
|
n.push({
|
|
1262
1262
|
label: t[r],
|
|
1263
|
-
group:
|
|
1263
|
+
group: p,
|
|
1264
1264
|
href: s,
|
|
1265
1265
|
newTab: a,
|
|
1266
1266
|
relativePath: f,
|
|
@@ -1270,7 +1270,7 @@ function en(e, t, i) {
|
|
|
1270
1270
|
}), n;
|
|
1271
1271
|
}
|
|
1272
1272
|
function tn(e) {
|
|
1273
|
-
const t =
|
|
1273
|
+
const t = O(e), i = nn(e), n = `user.html${window.location.pathname.includes("home/user.html") ? "?nav=1" : ""}`;
|
|
1274
1274
|
return {
|
|
1275
1275
|
myProfile: {
|
|
1276
1276
|
href: `${t}${n}`,
|
|
@@ -1294,7 +1294,7 @@ function tn(e) {
|
|
|
1294
1294
|
show: i,
|
|
1295
1295
|
group: "resources",
|
|
1296
1296
|
icon: "speech-bubbles",
|
|
1297
|
-
href:
|
|
1297
|
+
href: Ee.community,
|
|
1298
1298
|
newTab: !0
|
|
1299
1299
|
},
|
|
1300
1300
|
myEsri: {
|
|
@@ -1336,7 +1336,7 @@ function rn(e) {
|
|
|
1336
1336
|
);
|
|
1337
1337
|
}
|
|
1338
1338
|
function on(e) {
|
|
1339
|
-
return je(e,
|
|
1339
|
+
return je(e, Ee.myEsri);
|
|
1340
1340
|
}
|
|
1341
1341
|
function je(e, t) {
|
|
1342
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}`;
|
|
@@ -1604,14 +1604,14 @@ function hn() {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
function mn(e, t = window.location.href) {
|
|
1606
1606
|
const i = window.location.href.startsWith("http://"), n = yt(e);
|
|
1607
|
-
|
|
1607
|
+
Et.destroyCredentials(), hn();
|
|
1608
1608
|
const r = new URL(J(`${ae(e)}oauth2/signout`, e)), { searchParams: o } = r;
|
|
1609
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;
|
|
1610
1610
|
}
|
|
1611
1611
|
function j(e, t) {
|
|
1612
1612
|
if (!e)
|
|
1613
1613
|
return 0;
|
|
1614
|
-
const i =
|
|
1614
|
+
const i = Ot({ text: e, font: `${t === "s" ? ".875rem" : "1rem"} 'Avenir Next'` });
|
|
1615
1615
|
return Math.ceil(i);
|
|
1616
1616
|
}
|
|
1617
1617
|
function fn({
|
|
@@ -1624,10 +1624,10 @@ function fn({
|
|
|
1624
1624
|
}) {
|
|
1625
1625
|
if (!t || !e)
|
|
1626
1626
|
return;
|
|
1627
|
-
const s = e.user, c = pe(t) && n?.length ? 24 + n.reduce((g,
|
|
1627
|
+
const s = e.user, c = pe(t) && n?.length ? 24 + n.reduce((g, h) => g + 16 + j(h.label) + 16, 0) : 0, p = 40 + j(i) + 32 + 16 + 16 + 12, f = s ? Math.max(j(s?.username, "s"), j(s?.fullName)) : j(r?.signIn);
|
|
1628
1628
|
return {
|
|
1629
1629
|
actions: 192,
|
|
1630
|
-
project: i ?
|
|
1630
|
+
project: i ? p : 0,
|
|
1631
1631
|
product: 64 + Math.max(j(o?.name), j(e.name, "s")) + 16,
|
|
1632
1632
|
nav: c,
|
|
1633
1633
|
user: 64 + f + 16
|
|
@@ -1637,10 +1637,10 @@ function gn({
|
|
|
1637
1637
|
measurements: e,
|
|
1638
1638
|
screenWidth: t
|
|
1639
1639
|
}) {
|
|
1640
|
-
const { actions: i, nav: n, product: r, project: o, user: s } = e, a = 64, c = t - i - a > n,
|
|
1640
|
+
const { actions: i, nav: n, product: r, project: o, user: s } = e, a = 64, c = t - i - a > n, p = t - i - (c ? n : 0) - o - a > r, f = t - n - o - i - r < s;
|
|
1641
1641
|
return {
|
|
1642
1642
|
nav: c,
|
|
1643
|
-
product:
|
|
1643
|
+
product: p,
|
|
1644
1644
|
user: f ? "avatar" : "full"
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
@@ -1697,9 +1697,9 @@ class yn extends mt {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
this.notificationDeleteProgress = void 0, this.refreshNotifications();
|
|
1699
1699
|
}, this.navigate = (t) => {
|
|
1700
|
-
this.arcgisNavigate.emit(t);
|
|
1700
|
+
this.arcgisNavigate.emit(t), this.platformMenuOpen = !1, this.searchActive = !1;
|
|
1701
1701
|
}, this.openPlatformMenu = () => {
|
|
1702
|
-
this.platformMenuOpen = !0;
|
|
1702
|
+
this.platformMenuOpen = !0, this.searchActive = !1;
|
|
1703
1703
|
}, this.projectMenuClick = (t) => {
|
|
1704
1704
|
this.arcgisNavigationProjectMenuClick.emit(t);
|
|
1705
1705
|
}, this.openProjectTitleEdit = () => {
|
|
@@ -1782,12 +1782,12 @@ class yn extends mt {
|
|
|
1782
1782
|
async loaded() {
|
|
1783
1783
|
const { portal: t, messages: i, clientId: n, product: r } = this;
|
|
1784
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:
|
|
1785
|
+
const { apps: o, hiddenApps: s, signInSettings: a, licenses: c, userProperties: p } = await Ai({
|
|
1786
1786
|
portal: t,
|
|
1787
1787
|
trackViewerEnabled: !this.disableTrackViewer,
|
|
1788
1788
|
notebookServerEnabled: !this.disableNotebookServer
|
|
1789
1789
|
}), f = await xt(t);
|
|
1790
|
-
this.infoBanner = f?.informationalBanner, this.userProperties =
|
|
1790
|
+
this.infoBanner = f?.informationalBanner, this.userProperties = p, this.apps = o, this.hiddenApps = s, this.sortedApps = o, this.previousAppState = { apps: o, hiddenApps: s }, this.appsLoading = !1, this.links = Ti({
|
|
1791
1791
|
portal: t,
|
|
1792
1792
|
messages: i.links,
|
|
1793
1793
|
licenses: c,
|
|
@@ -1830,8 +1830,8 @@ class yn extends mt {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
1832
|
render() {
|
|
1833
|
-
const { accountSwitcherOpen: t, apps: i, appsLoading: n, appsSearchTerm: r, currentPathname: o, handleAppCancel: s, handleAppHide: a, handleAppReorder: c, handleAppSave:
|
|
1834
|
-
return l`<div class="wrapper" style=${_e({ "--arcgis-portal-navigation-max-width": this.maxWidth ? `${this.maxWidth}px` : "100%" })}><arcgis-portal-info-banner .config=${
|
|
1833
|
+
const { accountSwitcherOpen: t, apps: i, appsLoading: n, appsSearchTerm: r, currentPathname: o, handleAppCancel: s, handleAppHide: a, handleAppReorder: c, handleAppSave: p, handleItemSearch: f, handlePlatformClose: g, handleSearch: h, handleToggleSearch: _, handleSearchTypeChange: k, hiddenApps: A, infoBanner: I, links: w, messages: b, navigate: m, notifications: u, notificationDeleteProgress: v, openAccountSwitcher: T, portal: d, portalItem: $, product: y, productInfo: S, productHref: E, projectTitle: R, editedProjectTitle: x, 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 = d?.user, lt = pe(y) && !w?.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=${I}></arcgis-portal-info-banner>${d?.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: d, showNav: Y, openPlatformMenu: Be })}${ot && Gt({ navigate: m, portal: d, product: y, productInfo: S, productHref: E, messages: b?.logo, showNav: Y, searchActive: H, projectTitleEditing: X }) || ""}${zi({ navigate: m, portal: d, portalItem: $, messages: b?.project, projectTitle: R, editedProjectTitle: x, 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: d, product: y, messages: b?.links, links: w, currentPathname: o }) || ""}<div slot=content-end class="content-end fade-in" .hidden=${X || H}><slot name=content-end></slot></div>${qi({ currentPathname: o, navigate: m, portal: d, product: y, messages: b?.search, searchActive: H, searchType: tt, searchTerm: et, suggestions: at, handleSearch: h, handleToggleSearch: _, 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: d, deleteNotifications: this.deleteNotifications, messages: b?.notifications, notificationDeleteProgress: v })}</div>${Qi({ portal: d, userLinks: Ze, openAccountSwitcher: d?.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: d, product: y, productInfo: S, messages: b?.platform, apps: i, appsLoading: n, hiddenApps: A, appsSearchTerm: r, editingApplications: this.editingApplications, open: Fe, links: w, recentContent: Qe, recentContentSearchTerm: Xe, recentContentLoading: Ye, handlePlatformClose: g, handleAppReorder: c, handleAppEdit: () => this.editingApplications = !0, handleAppsSearch: (ut) => this.appsSearchTerm = ut, handleAppSave: p, handleAppCancel: s, handleAppHide: a, handleItemSearch: f })}${t && l`<arcgis-portal-account-switcher .portal=${d} .baseUrl=${W({ portal: d })}></arcgis-portal-account-switcher>` || ""}</div>`;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
dt("arcgis-portal-navigation", yn);
|