@arcgis/portal-components 5.2.0-next.71 → 5.2.0-next.73
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/LICENSE.md +4 -2
- package/dist/cdn/{2IIE3YY2.js → HWRG6XAS.js} +107 -107
- package/dist/cdn/{UUGX7XW6.js → KPDZDJTT.js} +1 -1
- package/dist/cdn/{YPRKDQA4.js → SSLWBHRC.js} +1 -1
- package/dist/cdn/W2AW2BW3.js +2 -0
- package/dist/cdn/{3IA7YX3J.js → YY4236HO.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/portal-item-badge.js +107 -104
- package/dist/components/arcgis-portal-ai-assistant/agents/portalRouteKeys.d.ts +26 -0
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +19 -4
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +920 -780
- package/dist/components/arcgis-portal-navigation/customElement.js +1 -1
- package/dist/components/arcgis-portal-navigation/index.js +1 -1
- 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/G4HKVJ53.js +0 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as I } from "./runtime.js";
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { css as
|
|
5
|
-
import { u as
|
|
6
|
-
import { substitute as
|
|
3
|
+
import { LitElement as v, nothing as R, safeClassMap as D } from "@arcgis/lumina";
|
|
4
|
+
import { css as C, html as g } from "lit";
|
|
5
|
+
import { u as B } from "./useT9n.js";
|
|
6
|
+
import { substitute as h } from "@arcgis/core/intl.js";
|
|
7
7
|
import { f as M } from "./user.js";
|
|
8
|
-
import { a as W, b as d, g as
|
|
9
|
-
import { i as
|
|
10
|
-
import { g as
|
|
8
|
+
import { a as W, b as d, g as f, c as x, d as b, i as $, e as K, f as L, h as E } from "./items.js";
|
|
9
|
+
import { i as O } from "./users.js";
|
|
10
|
+
import { g as _ } from "./user2.js";
|
|
11
11
|
import { f as U } from "./verified.js";
|
|
12
|
-
import { a as
|
|
13
|
-
const
|
|
12
|
+
import { a as A, i as m } from "./info.js";
|
|
13
|
+
const H = C`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`, q = [
|
|
14
14
|
"Operations Dashboard Add In",
|
|
15
15
|
"Operations Dashboard Extension",
|
|
16
16
|
"Operation View",
|
|
@@ -23,7 +23,7 @@ const _ = D`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-ba
|
|
|
23
23
|
"Map Template",
|
|
24
24
|
"Mobile Basemap Package",
|
|
25
25
|
"Desktop Add In"
|
|
26
|
-
],
|
|
26
|
+
], G = [
|
|
27
27
|
"Cascade",
|
|
28
28
|
"MapTour",
|
|
29
29
|
"MapJournal",
|
|
@@ -31,37 +31,40 @@ const _ = D`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-ba
|
|
|
31
31
|
"Shortlist",
|
|
32
32
|
"StoryMapCrowdsource",
|
|
33
33
|
"StorytellingSwipe"
|
|
34
|
-
],
|
|
34
|
+
], N = {
|
|
35
35
|
"Geoprocessing Package": ".gpk",
|
|
36
36
|
Layer: ".lyr",
|
|
37
37
|
"Layer Package": ".lpk",
|
|
38
38
|
"Map Package": ".mpk",
|
|
39
39
|
"Scene Package": ".spk"
|
|
40
|
-
},
|
|
41
|
-
function z(e) {
|
|
42
|
-
const t = decodeURIComponent(e.url || h(e).url || "");
|
|
43
|
-
return q.find((i) => t.includes(`/apps/${i}/index.html`));
|
|
44
|
-
}
|
|
40
|
+
}, k = "", z = "template_name";
|
|
45
41
|
function F(e) {
|
|
46
|
-
|
|
42
|
+
const t = decodeURIComponent(e.url || f(e).url || "");
|
|
43
|
+
return G.find((i) => t.includes(`/apps/${i}/index.html`));
|
|
47
44
|
}
|
|
48
45
|
function J(e) {
|
|
49
|
-
return
|
|
46
|
+
return E(e);
|
|
50
47
|
}
|
|
51
48
|
function V(e) {
|
|
52
|
-
return
|
|
49
|
+
return L(e);
|
|
50
|
+
}
|
|
51
|
+
function j(e) {
|
|
52
|
+
return K(e);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function T(e) {
|
|
55
55
|
return e.type === "Web Mapping Application" && d(e).includes("Web AppBuilder");
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function y(e, t) {
|
|
58
58
|
return (t?.isPortal ?? !1) && d(e).includes("AppBuilder Extension");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
return n || c || l || s || m(e, t);
|
|
60
|
+
function u(e, t) {
|
|
61
|
+
return e.typeKeywords?.some((i) => t.includes(i));
|
|
63
62
|
}
|
|
64
|
-
function
|
|
63
|
+
function P(e, t) {
|
|
64
|
+
const i = ["HTML3D/HTML", "App Builder", "Widget"], r = ["HTML3D/HTML", "Web AppBuilder", "Widget"], a = e.type === "Web Mapping Application", o = a && u(e, ["Web AppBuilder"]), c = a && u(e, ["WABTemplate"]), l = e.type === "AppBuilder Widget Package" && u(e, i), s = e.type === "Web AppBuilder Widget" && u(e, r), n = !!e?.owner?.startsWith("esri_") && a && u(e, ["Web AppBuilder for ArcGIS"]);
|
|
65
|
+
return o || c || l || s || y(e, t) || n;
|
|
66
|
+
}
|
|
67
|
+
function Q(e, t) {
|
|
65
68
|
return t?.isPortal && [
|
|
66
69
|
"Insights Workbook",
|
|
67
70
|
"Insights Page",
|
|
@@ -75,65 +78,65 @@ function j(e, t) {
|
|
|
75
78
|
"Relational Database Connection"
|
|
76
79
|
].includes(e.type || "");
|
|
77
80
|
}
|
|
78
|
-
const
|
|
79
|
-
function
|
|
80
|
-
return e.type === t && (
|
|
81
|
+
const X = (e, t) => (t?.isPortal ?? !1) && (T(e) || y(e, t) || m(e) || Q(e, t));
|
|
82
|
+
function Y(e, t, i) {
|
|
83
|
+
return e.type === t && (f(e).name?.endsWith(i) ?? !1);
|
|
81
84
|
}
|
|
82
|
-
function
|
|
83
|
-
return Object.entries(
|
|
84
|
-
([t, i]) =>
|
|
85
|
+
function Z(e) {
|
|
86
|
+
return Object.entries(N).some(
|
|
87
|
+
([t, i]) => Y(e, t, i)
|
|
85
88
|
);
|
|
86
89
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
90
|
+
function ee(e, t) {
|
|
91
|
+
return q.includes(e.type) || Z(e) || A(e) || J(e) || m(e) || X(e, t);
|
|
89
92
|
}
|
|
90
|
-
function
|
|
93
|
+
function te(e) {
|
|
91
94
|
return (e.owner || "").toLowerCase().includes("esri") && d(e).includes("Requires Credits");
|
|
92
95
|
}
|
|
93
|
-
function
|
|
96
|
+
function ie(e) {
|
|
94
97
|
return (e.owner || "").toLowerCase().includes("esri") && d(e).includes("Requires Subscription");
|
|
95
98
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
99
|
+
function re(e) {
|
|
100
|
+
return b(e) === "org_authoritative";
|
|
98
101
|
}
|
|
99
102
|
function S(e) {
|
|
100
|
-
return
|
|
103
|
+
return b(e) === "public_authoritative";
|
|
101
104
|
}
|
|
102
105
|
function ae(e, t) {
|
|
103
|
-
return t === "Registered API Key Credentials (Standard)" || t === "Registered OAuth 2.0 Credentials (Standard)" ?
|
|
106
|
+
return t === "Registered API Key Credentials (Standard)" || t === "Registered OAuth 2.0 Credentials (Standard)" ? k : e[t].title || k;
|
|
104
107
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
107
|
-
if ((
|
|
108
|
+
function Pe(e, t, i) {
|
|
109
|
+
const r = [], a = d(e), o = f(e), c = x(e);
|
|
110
|
+
if ((re(e) || S(e)) && r.push("Authoritative"), b(e) === "deprecated" && r.push("Deprecated"), P(e, t) && r.push("DeprecatedItemType"), $(e) && r.push("Beta"), e.type === "Solution" && a.includes("ArcGIS Solution") && r.push("Solution"), a.includes("Public Data Collection") && i && r.push("Public Data Collection"), ee(e, t) && r.push("Retired"), c.includes("livingatlas") && r.push("Living Atlas"), c.includes("opendata") && r.push("Open Data"), te(e) && r.push("Premium"), ie(e) && r.push("Subscriber"), o.origin && r.push("Collaboration"), e.owner !== "esri_apps" && o.listed && !t?.isPortal && r.push("Marketplace"), a.includes("Registered App")) {
|
|
108
111
|
const l = t?.isPortal ?? !1;
|
|
109
112
|
if (e.type !== "API Key" && (!l || e.owner !== "esri_apps")) {
|
|
110
|
-
const s =
|
|
111
|
-
s ?
|
|
112
|
-
|
|
113
|
-
) :
|
|
114
|
-
|
|
113
|
+
const s = a.includes("APIToken"), n = a.includes("Personal API Token") && !l;
|
|
114
|
+
s ? r.push(
|
|
115
|
+
n ? "Registered API Key Credentials (Personal)" : "Registered API Key Credentials (Standard)"
|
|
116
|
+
) : r.push(
|
|
117
|
+
n ? "Registered OAuth 2.0 Credentials (Personal)" : "Registered OAuth 2.0 Credentials (Standard)"
|
|
115
118
|
);
|
|
116
119
|
}
|
|
117
120
|
}
|
|
118
|
-
return
|
|
121
|
+
return a.includes("hasReplacementItem") && r.push("Has Replacement"), r;
|
|
119
122
|
}
|
|
120
|
-
function
|
|
123
|
+
function se({
|
|
121
124
|
badgeType: e,
|
|
122
125
|
i18n: t,
|
|
123
126
|
portal: i
|
|
124
127
|
}) {
|
|
125
|
-
const
|
|
128
|
+
const r = i?.isPortal ?? !1;
|
|
126
129
|
if (e === "Registered API Key Credentials (Standard)") {
|
|
127
|
-
const
|
|
128
|
-
return
|
|
130
|
+
const a = t[e].title;
|
|
131
|
+
return r ? a.enterprise : a.online;
|
|
129
132
|
}
|
|
130
133
|
if (e === "Registered OAuth 2.0 Credentials (Standard)") {
|
|
131
|
-
const
|
|
132
|
-
return
|
|
134
|
+
const a = t[e].title;
|
|
135
|
+
return r ? a.enterprise : a.online;
|
|
133
136
|
}
|
|
134
137
|
return ae(t, e);
|
|
135
138
|
}
|
|
136
|
-
function
|
|
139
|
+
function oe(e) {
|
|
137
140
|
const t = {
|
|
138
141
|
MapSeries: "Series",
|
|
139
142
|
MapJournal: "Journal",
|
|
@@ -143,49 +146,49 @@ function se(e) {
|
|
|
143
146
|
MapTour: "Tour",
|
|
144
147
|
StoryMapCrowdsource: "Crowdsource",
|
|
145
148
|
StorytellingSwipe: "Swipe & Spyglass"
|
|
146
|
-
},
|
|
147
|
-
if (
|
|
148
|
-
return t[
|
|
149
|
-
const
|
|
150
|
-
return
|
|
149
|
+
}, r = d(e).find((o) => o in t);
|
|
150
|
+
if (r)
|
|
151
|
+
return t[r];
|
|
152
|
+
const a = F(e);
|
|
153
|
+
return a && t[a] || !1;
|
|
151
154
|
}
|
|
152
|
-
async function
|
|
155
|
+
async function ne({
|
|
153
156
|
badgeType: e,
|
|
154
157
|
i18n: t,
|
|
155
158
|
item: i,
|
|
156
|
-
locale:
|
|
157
|
-
portal:
|
|
158
|
-
user:
|
|
159
|
+
locale: r,
|
|
160
|
+
portal: a,
|
|
161
|
+
user: o,
|
|
159
162
|
useProduction: c
|
|
160
163
|
}) {
|
|
161
|
-
const l = !
|
|
164
|
+
const l = !o || O(o);
|
|
162
165
|
switch (e) {
|
|
163
166
|
case "Authoritative": {
|
|
164
167
|
if (S(i)) {
|
|
165
|
-
const s = await U(i,
|
|
166
|
-
return
|
|
168
|
+
const s = await U(i, r, a, c), n = t.Authoritative.tooltip, p = a?.isPortal && !c ? a?.name : s?.name || a?.name || i.owner;
|
|
169
|
+
return h(n.public, { name: p || "" });
|
|
167
170
|
}
|
|
168
171
|
return t.Authoritative.tooltip.org;
|
|
169
172
|
}
|
|
170
173
|
case "Deprecated": {
|
|
171
|
-
const s = i.owner || "",
|
|
172
|
-
return
|
|
174
|
+
const s = i.owner || "", n = await M(s, a, c), p = _(n, r);
|
|
175
|
+
return h(t.Deprecated.tooltip, { owner: p });
|
|
173
176
|
}
|
|
174
177
|
case "DeprecatedItemType": {
|
|
175
178
|
const s = t.DeprecatedItemType.tooltip;
|
|
176
|
-
return
|
|
179
|
+
return P(i, a) ? s.webAppBuilder : s.general;
|
|
177
180
|
}
|
|
178
181
|
case "Retired": {
|
|
179
182
|
const s = t.Retired.tooltip;
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
183
|
-
const p = { [
|
|
184
|
-
return
|
|
183
|
+
if (A(i)) {
|
|
184
|
+
const n = oe(i);
|
|
185
|
+
if (n) {
|
|
186
|
+
const p = { [z]: n };
|
|
187
|
+
return h(s.classicStoryMap, p);
|
|
185
188
|
}
|
|
186
189
|
return s.classicStoryMapGeneric;
|
|
187
190
|
}
|
|
188
|
-
return
|
|
191
|
+
return j(i) ? s.cityEngine : T(i) || y(i, a) ? s.webAppBuilder : m(i) ? s.app : V(i) ? s.bdfs : s.general;
|
|
189
192
|
}
|
|
190
193
|
case "Subscriber": {
|
|
191
194
|
const s = t.Subscriber.tooltip;
|
|
@@ -197,36 +200,36 @@ async function oe({
|
|
|
197
200
|
}
|
|
198
201
|
case "Registered": {
|
|
199
202
|
const s = t.Registered.tooltip;
|
|
200
|
-
return
|
|
203
|
+
return a?.isPortal ? s.enterprise : s.online;
|
|
201
204
|
}
|
|
202
205
|
case "Personal credential":
|
|
203
206
|
return t["Personal credential"].tooltip;
|
|
204
207
|
case "Has Replacement": {
|
|
205
208
|
const s = t["Has Replacement"];
|
|
206
|
-
return
|
|
209
|
+
return a.isPortal ? (globalThis.location?.href || "").includes("item.html") ? s.itemPageTooltip : s.tooltip : s.itemPageTooltip;
|
|
207
210
|
}
|
|
208
211
|
default:
|
|
209
212
|
return t[e].tooltip;
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
|
-
function
|
|
215
|
+
function ce({
|
|
213
216
|
badgeType: e,
|
|
214
217
|
i18n: t,
|
|
215
218
|
item: i,
|
|
216
|
-
portal:
|
|
219
|
+
portal: r
|
|
217
220
|
}) {
|
|
218
|
-
if (e !== "Has Replacement" ||
|
|
221
|
+
if (e !== "Has Replacement" || r.isPortal)
|
|
219
222
|
return null;
|
|
220
|
-
const
|
|
221
|
-
return
|
|
223
|
+
const a = W(i);
|
|
224
|
+
return a ? {
|
|
222
225
|
title: t["Has Replacement"].link,
|
|
223
|
-
href:
|
|
226
|
+
href: le({ portal: r, itemId: a })
|
|
224
227
|
} : null;
|
|
225
228
|
}
|
|
226
|
-
function
|
|
229
|
+
function le({ itemId: e, portal: t }) {
|
|
227
230
|
return t?.restUrl ? `${t.restUrl.replace("sharing/rest", "home")}/item.html?id=${e}` : "";
|
|
228
231
|
}
|
|
229
|
-
function
|
|
232
|
+
function w() {
|
|
230
233
|
return {
|
|
231
234
|
loading: !1,
|
|
232
235
|
title: "",
|
|
@@ -234,29 +237,29 @@ function k() {
|
|
|
234
237
|
tooltipLink: null
|
|
235
238
|
};
|
|
236
239
|
}
|
|
237
|
-
class
|
|
240
|
+
class de extends v {
|
|
238
241
|
constructor() {
|
|
239
|
-
super(...arguments), this._messages =
|
|
242
|
+
super(...arguments), this._messages = B({ name: "portal-item-badges", blocking: !0 }), this.tooltipRequestId = 0, this.tooltipId = `portal-item-badge-${Math.random().toString(36).slice(2, 10)}`, this.details = w(), this.width = "full", this.scale = "m", this.showTooltip = !1;
|
|
240
243
|
}
|
|
241
244
|
static {
|
|
242
245
|
this.properties = { details: 16, item: 0, portal: 0, user: 0, badgeType: 1, width: 1, appearance: 1, scale: 1, showTooltip: 5, useProduction: 5 };
|
|
243
246
|
}
|
|
244
247
|
static {
|
|
245
|
-
this.styles =
|
|
248
|
+
this.styles = H;
|
|
246
249
|
}
|
|
247
250
|
willUpdate(t) {
|
|
248
251
|
(t.has("badgeType") || t.has("item") || t.has("portal") || t.has("user") || t.has("showTooltip") || t.has("useProduction")) && this.loadDetails();
|
|
249
252
|
}
|
|
250
253
|
loadDetails() {
|
|
251
254
|
if (!this.badgeType || !this.portal) {
|
|
252
|
-
this.details =
|
|
255
|
+
this.details = w();
|
|
253
256
|
return;
|
|
254
257
|
}
|
|
255
|
-
const t =
|
|
258
|
+
const t = se({
|
|
256
259
|
badgeType: this.badgeType,
|
|
257
260
|
i18n: this._messages,
|
|
258
261
|
portal: this.portal
|
|
259
|
-
}), i = this.item && this.portal ?
|
|
262
|
+
}), i = this.item && this.portal ? ce({
|
|
260
263
|
badgeType: this.badgeType,
|
|
261
264
|
i18n: this._messages,
|
|
262
265
|
item: this.item,
|
|
@@ -271,13 +274,13 @@ class le extends A {
|
|
|
271
274
|
};
|
|
272
275
|
return;
|
|
273
276
|
}
|
|
274
|
-
const
|
|
277
|
+
const r = ++this.tooltipRequestId;
|
|
275
278
|
this.details = {
|
|
276
279
|
loading: !0,
|
|
277
280
|
title: t,
|
|
278
281
|
tooltip: "",
|
|
279
282
|
tooltipLink: i
|
|
280
|
-
},
|
|
283
|
+
}, ne({
|
|
281
284
|
badgeType: this.badgeType,
|
|
282
285
|
i18n: this._messages,
|
|
283
286
|
item: this.item,
|
|
@@ -285,15 +288,15 @@ class le extends A {
|
|
|
285
288
|
portal: this.portal,
|
|
286
289
|
user: this.user,
|
|
287
290
|
useProduction: this.useProduction
|
|
288
|
-
}).then((
|
|
289
|
-
|
|
291
|
+
}).then((a) => {
|
|
292
|
+
r === this.tooltipRequestId && (this.details = {
|
|
290
293
|
loading: !1,
|
|
291
294
|
title: t,
|
|
292
|
-
tooltip:
|
|
295
|
+
tooltip: a,
|
|
293
296
|
tooltipLink: i
|
|
294
297
|
});
|
|
295
298
|
}).catch(() => {
|
|
296
|
-
|
|
299
|
+
r === this.tooltipRequestId && (this.details = {
|
|
297
300
|
loading: !1,
|
|
298
301
|
title: t,
|
|
299
302
|
tooltip: "",
|
|
@@ -304,7 +307,7 @@ class le extends A {
|
|
|
304
307
|
render() {
|
|
305
308
|
if (!this.badgeType)
|
|
306
309
|
return null;
|
|
307
|
-
const t =
|
|
310
|
+
const t = pe[this.badgeType], i = this.width === "narrow", r = this.showTooltip && (this.details.loading || !!this.details.tooltip || !!this.details.tooltipLink), a = {
|
|
308
311
|
badge: this.badgeType !== "Beta",
|
|
309
312
|
"badge--colored": this.badgeType === "Living Atlas" || this.badgeType === "Open Data" || this.badgeType === "Solution",
|
|
310
313
|
beta: this.badgeType === "Beta",
|
|
@@ -313,10 +316,10 @@ class le extends A {
|
|
|
313
316
|
narrow: i,
|
|
314
317
|
[`narrow--${this.scale}`]: i
|
|
315
318
|
};
|
|
316
|
-
return
|
|
319
|
+
return g`<calcite-chip id=${this.tooltipId ?? R} class=${D(a)} .value=${this.badgeType} .tabIndex=${this.showTooltip ? 0 : -1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i ? null : this.details.title}</calcite-chip>${r ? g`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i ? g`<h3 class="tooltip-title">${this.details.title}</h3>` : null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading ? this._messages.loading : this.details.tooltip}</p>${this.details.tooltipLink ? g`<calcite-link @click=${(o) => o.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>` : null}</calcite-tooltip>` : null}`;
|
|
317
320
|
}
|
|
318
321
|
}
|
|
319
|
-
const
|
|
322
|
+
const pe = {
|
|
320
323
|
Authoritative: "check-circle",
|
|
321
324
|
Beta: "beaker",
|
|
322
325
|
Collaboration: "collaboration-distributed",
|
|
@@ -339,8 +342,8 @@ const de = {
|
|
|
339
342
|
Solution: "arcgis-solutions",
|
|
340
343
|
Subscriber: "security"
|
|
341
344
|
};
|
|
342
|
-
I("arcgis-portal-item-badge",
|
|
345
|
+
I("arcgis-portal-item-badge", de);
|
|
343
346
|
export {
|
|
344
|
-
|
|
345
|
-
|
|
347
|
+
de as A,
|
|
348
|
+
Pe as g
|
|
346
349
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type OrgSettingsSecuritySection = (typeof orgSettingsSecuritySections)[number];
|
|
2
|
+
|
|
3
|
+
export type OrgSettingsSecurityCard = (typeof orgSettingsSecurityCards)[number];
|
|
4
|
+
|
|
5
|
+
export type ContentNewItemParamValue = (typeof contentNewItemParamValues)[number];
|
|
6
|
+
|
|
7
|
+
export const orgSettingsSecuritySections: readonly [
|
|
8
|
+
"customSignInSection",
|
|
9
|
+
"loginsSection",
|
|
10
|
+
"changeLoginProviderSection",
|
|
11
|
+
"multiFactorAuthSection",
|
|
12
|
+
"multifactorEnforcementSection",
|
|
13
|
+
"multifactorDesignatedAdminsSection"
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export const orgSettingsSecurityCards: readonly [
|
|
17
|
+
"customSignInCard",
|
|
18
|
+
"loginCard",
|
|
19
|
+
"multifactorAuthCard"
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export const contentNewItemParamValues: readonly [
|
|
23
|
+
"newItem",
|
|
24
|
+
"createLayer",
|
|
25
|
+
"developerCredentials"
|
|
26
|
+
];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { ContentNewItemParamValue, OrgSettingsSecurityCard, OrgSettingsSecuritySection } from "./portalRouteKeys.js";
|
|
2
|
+
|
|
1
3
|
/** A host-resolved Portal destination with an optional localized action label. */
|
|
2
4
|
export type PortalNavigationTarget = PortalNavigationDestination
|
|
3
5
|
& {
|
|
4
|
-
t9nKey?: string;
|
|
5
|
-
queryParams?: Record<string, string>;
|
|
6
6
|
buttonLabel?: string;
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -11,6 +11,7 @@ export type PartialPortalNavigationTargetMap = Partial<PortalNavigationTargetMap
|
|
|
11
11
|
export type PortalNavigationDestination = {
|
|
12
12
|
destinationType: "portal-content";
|
|
13
13
|
hash?: PortalContentNavigationHash;
|
|
14
|
+
queryParams?: PortalContentQueryParams;
|
|
14
15
|
} | { destinationType: "portal-gallery" | "portal-map-viewer" | "portal-notebooks" | "portal-scene-viewer"; } | {
|
|
15
16
|
destinationType: "portal-group";
|
|
16
17
|
groupId: string;
|
|
@@ -23,17 +24,18 @@ export type PortalNavigationDestination = {
|
|
|
23
24
|
} | {
|
|
24
25
|
destinationType: "portal-org";
|
|
25
26
|
hash?: PortalOrgNavigationHash;
|
|
27
|
+
queryParams?: PortalOrgQueryParams;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
export interface PortalNavigationTargetMap {
|
|
29
|
-
"portal-content": (hash?: PortalContentNavigationHash) => string;
|
|
31
|
+
"portal-content": (hash?: PortalContentNavigationHash, queryParams?: PortalContentQueryParams) => string;
|
|
30
32
|
"portal-gallery": string;
|
|
31
33
|
"portal-groups": (hash?: PortalGroupsNavigationHash) => string;
|
|
32
34
|
"portal-item": (itemId: string) => string;
|
|
33
35
|
"portal-group": (groupId: string) => string;
|
|
34
36
|
"portal-map-viewer": string;
|
|
35
37
|
"portal-notebooks": string;
|
|
36
|
-
"portal-org": (hash?: PortalOrgNavigationHash, queryParams?:
|
|
38
|
+
"portal-org": (hash?: PortalOrgNavigationHash, queryParams?: PortalOrgQueryParams) => string;
|
|
37
39
|
"portal-scene-viewer": string;
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -43,6 +45,19 @@ export type PortalGroupsNavigationHash = (typeof portalGroupsNavigationHashes)[n
|
|
|
43
45
|
|
|
44
46
|
export type PortalOrgNavigationHash = (typeof portalOrgNavigationHashes)[number];
|
|
45
47
|
|
|
48
|
+
export type PortalContentQueryParams = {
|
|
49
|
+
newItem?: ContentNewItemParamValue;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type PortalOrgQueryParams = {
|
|
53
|
+
tab?: "security";
|
|
54
|
+
section?: OrgSettingsSecurityCard;
|
|
55
|
+
subsection?: OrgSettingsSecuritySection;
|
|
56
|
+
period?: string;
|
|
57
|
+
startTime?: string;
|
|
58
|
+
endTime?: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
46
61
|
export const portalContentNavigationHashes: readonly [
|
|
47
62
|
"favorites",
|
|
48
63
|
"group",
|