@arcgis/portal-components 5.2.0-next.2 → 5.2.0-next.21

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.
Files changed (100) hide show
  1. package/dist/cdn/25UUUQAQ.js +71 -0
  2. package/dist/cdn/{OQDPULPD.js → 2RGMWFHB.js} +1 -1
  3. package/dist/cdn/3KS5IDT2.js +2 -0
  4. package/dist/cdn/{AQWTJKUH.js → 3MQIRMUM.js} +9 -7
  5. package/dist/cdn/{JNRN6DTV.js → 47NPIL2S.js} +1 -1
  6. package/dist/cdn/{LQ3DMZ3K.js → 5VHBNEN3.js} +1 -1
  7. package/dist/cdn/6AGZRMJC.js +2 -0
  8. package/dist/cdn/6W2IHKCA.js +2 -0
  9. package/dist/cdn/{WOZDQW3S.js → DBKSQGEI.js} +1 -1
  10. package/dist/cdn/DFTUMKSN.js +3 -0
  11. package/dist/cdn/{YMPTDKT6.js → EETBNQU2.js} +1 -1
  12. package/dist/cdn/EHRAFAEA.js +65 -0
  13. package/dist/cdn/EKO6SVAF.js +2 -0
  14. package/dist/cdn/{GHQ3ZW4U.js → FI45QCN2.js} +1 -1
  15. package/dist/cdn/GEIZTD7F.js +2 -0
  16. package/dist/cdn/{ZTHTFEYA.js → HGSK6OFA.js} +1 -1
  17. package/dist/cdn/{LAFNDBTQ.js → HIRM34QB.js} +1 -1
  18. package/dist/cdn/HMBSJR37.js +2 -0
  19. package/dist/cdn/KT7PE6UE.js +2 -0
  20. package/dist/cdn/{BEHLBKKM.js → KY7Q7DH3.js} +1 -1
  21. package/dist/cdn/{5DPWJ7DI.js → KZWW4BWJ.js} +1 -1
  22. package/dist/cdn/{N6G6Z7BF.js → MH7KZ5G3.js} +256 -154
  23. package/dist/cdn/MLTQECPL.js +2 -0
  24. package/dist/cdn/{G47ZZQYL.js → OKRYML2G.js} +1 -1
  25. package/dist/cdn/PDL3DPMG.js +2 -0
  26. package/dist/cdn/{QNUYUNEY.js → QJ2UHWPU.js} +1 -1
  27. package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
  28. package/dist/cdn/TSLW4FSA.js +2 -0
  29. package/dist/cdn/{72N3KAXN.js → TW4LFQA5.js} +1 -1
  30. package/dist/cdn/{7WZHZP6U.js → UR7W4CEV.js} +8 -2
  31. package/dist/cdn/{W6PSG4GX.js → VRXKORTR.js} +9 -4
  32. package/dist/cdn/VXCB2YBR.js +3 -0
  33. package/dist/cdn/{DHHSKOUY.js → WJ2NMHDE.js} +1 -1
  34. package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
  35. package/dist/cdn/{53MSUMA3.js → XCZSPNKS.js} +16 -0
  36. package/dist/cdn/{K3HS2LQ7.js → YECI7XG3.js} +1 -1
  37. package/dist/cdn/ZDLFZJBT.js +2 -0
  38. package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
  39. package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
  40. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
  41. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
  42. package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
  43. package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
  44. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  45. package/dist/cdn/assets/portal-user-popup/t9n/messages.en.json +1 -0
  46. package/dist/cdn/index.js +1 -1
  47. package/dist/cdn/main.css +1 -1
  48. package/dist/chunks/groups.js +7 -83
  49. package/dist/chunks/item2.js +86 -0
  50. package/dist/chunks/portal.js +48 -8
  51. package/dist/chunks/user2.js +26 -25
  52. package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
  53. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
  54. package/dist/components/arcgis-portal-ai-assistant/customElement.js +797 -488
  55. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
  56. package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
  57. package/dist/components/arcgis-portal-group-badges/customElement.js +50 -0
  58. package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
  59. package/dist/components/arcgis-portal-group-badges/index.js +3 -0
  60. package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
  61. package/dist/components/arcgis-portal-group-card/customElement.d.ts +167 -0
  62. package/dist/components/arcgis-portal-group-card/customElement.js +187 -0
  63. package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
  64. package/dist/components/arcgis-portal-group-card/index.js +8 -0
  65. package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
  66. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
  67. package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
  68. package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
  69. package/dist/components/arcgis-portal-item-type/customElement.d.ts +2 -0
  70. package/dist/components/arcgis-portal-item-type/customElement.js +45 -37
  71. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
  72. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -42
  73. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
  74. package/dist/components/arcgis-portal-user-popup/customElement.js +231 -0
  75. package/dist/components/arcgis-portal-user-popup/index.d.ts +1 -0
  76. package/dist/components/arcgis-portal-user-popup/index.js +5 -0
  77. package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
  78. package/dist/docs/api.json +1 -1
  79. package/dist/docs/docs.json +1 -1
  80. package/dist/docs/vscode.html-custom-data.json +1 -1
  81. package/dist/docs/web-types.json +1 -1
  82. package/dist/index.d.ts +30 -2
  83. package/dist/loader.js +8 -4
  84. package/dist/types/lumina.d.ts +26 -1
  85. package/dist/types/preact.d.ts +30 -1
  86. package/dist/types/react.d.ts +34 -1
  87. package/dist/types/stencil.d.ts +26 -1
  88. package/dist/types/tracking.d.ts +10 -0
  89. package/dist/types/user.d.ts +2 -2
  90. package/package.json +7 -7
  91. package/dist/cdn/5VSDGPHH.js +0 -2
  92. package/dist/cdn/CI5ENGVT.js +0 -2
  93. package/dist/cdn/EVDOPN3G.js +0 -54
  94. package/dist/cdn/GNOZCQ34.js +0 -2
  95. package/dist/cdn/KEKBRUUC.js +0 -2
  96. package/dist/cdn/RNLVNDGG.js +0 -2
  97. package/dist/cdn/SM4GWLRA.js +0 -66
  98. package/dist/cdn/TMYTUOSS.js +0 -2
  99. package/dist/cdn/YG5YYL6X.js +0 -2
  100. /package/dist/cdn/{B7633S2A.js → 5NIJVBS7.js} +0 -0
@@ -0,0 +1,153 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as p } from "../../chunks/runtime.js";
3
+ import { LitElement as m, nothing as f, safeStyleMap as g } from "@arcgis/lumina";
4
+ import { css as d, html as l } from "lit";
5
+ import { createRef as c, ref as h } from "lit/directives/ref.js";
6
+ import { a as $, g as b } from "../../chunks/portal.js";
7
+ const x = /^#[0-9a-f]{3}$/iu, k = /^#[0-9a-f]{6}$/iu;
8
+ function u(r) {
9
+ return E(r) || I(r);
10
+ }
11
+ function E(r) {
12
+ return r?.length === 4 && x.test(r);
13
+ }
14
+ function I(r) {
15
+ return r?.length === 7 && k.test(r);
16
+ }
17
+ function O(r) {
18
+ if (!u(r))
19
+ return null;
20
+ const t = r.replace("#", "");
21
+ if (t.length === 3) {
22
+ const [e, i, o] = t.split("");
23
+ return {
24
+ r: Number.parseInt(`${e}${e}`, 16),
25
+ g: Number.parseInt(`${i}${i}`, 16),
26
+ b: Number.parseInt(`${o}${o}`, 16)
27
+ };
28
+ }
29
+ return {
30
+ r: Number.parseInt(t.slice(0, 2), 16),
31
+ g: Number.parseInt(t.slice(2, 4), 16),
32
+ b: Number.parseInt(t.slice(4, 6), 16)
33
+ };
34
+ }
35
+ function T(r) {
36
+ let t = 0;
37
+ for (let i = 0; i < r.length; i++)
38
+ t = r.charCodeAt(i) + ((t << 5) - t);
39
+ let e = "#";
40
+ for (let i = 0; i < 3; i++) {
41
+ const o = t >> i * 8 & 255;
42
+ e += `00${o.toString(16)}`.slice(-2);
43
+ }
44
+ return e;
45
+ }
46
+ function v(r) {
47
+ let { r: t, g: e, b: i } = r;
48
+ t /= 255, e /= 255, i /= 255;
49
+ const o = Math.max(t, e, i), n = Math.min(t, e, i), s = o - n;
50
+ if (s === 0)
51
+ return 0;
52
+ let a = 0;
53
+ switch (o) {
54
+ case t:
55
+ a = (e - i) / s + (e < i ? 6 : 0);
56
+ break;
57
+ case e:
58
+ a = (i - t) / s + 2;
59
+ break;
60
+ default:
61
+ a = (t - e) / s + 4;
62
+ break;
63
+ }
64
+ return Math.round(a * 60);
65
+ }
66
+ function w(r) {
67
+ const t = O(r);
68
+ return t ? v(t) : 0;
69
+ }
70
+ const H = d`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`;
71
+ class y extends m {
72
+ constructor() {
73
+ super(...arguments), this.imageEl = c(), this.fallbackEl = c(), this.tooltipEl = c(), this.imageError = !1, this.tooltipOpen = !1, this.tooltip = !1, this.scale = "m";
74
+ }
75
+ static {
76
+ this.properties = { imageError: 16, tooltipOpen: 16, group: 0, portal: 0, tooltip: 5, scale: 3 };
77
+ }
78
+ static {
79
+ this.styles = H;
80
+ }
81
+ willUpdate(t) {
82
+ t.has("group") && (this.imageError = !1);
83
+ }
84
+ updated() {
85
+ const t = this.tooltipEl.value, e = this.imageEl.value || this.fallbackEl.value;
86
+ t && e && (t.referenceElement = e);
87
+ }
88
+ isDarkMode() {
89
+ return !!this.el.closest(".calcite-mode-dark");
90
+ }
91
+ getThumbnailURI() {
92
+ const { group: t, portal: e } = this;
93
+ if (!t)
94
+ return null;
95
+ if (t.thumbnailUrl)
96
+ return t.thumbnailUrl;
97
+ const i = t.thumbnail;
98
+ if (!i)
99
+ return null;
100
+ if (i.startsWith("http"))
101
+ return i;
102
+ if (!e || !t.id)
103
+ return null;
104
+ const o = $(e), n = o ? `?token=${o}` : "";
105
+ return `${b(e)}community/groups/${t.id}/info/${i}${n}`;
106
+ }
107
+ generateFillColor() {
108
+ const { id: t, title: e } = this.group || {}, i = t ? `#${t.slice(Math.max(0, t.length - 6))}` : "", o = t && u(i) ? i : T(e || "");
109
+ if (!t && !e || !u(o))
110
+ return "var(--calcite-color-foreground-2)";
111
+ const n = w(o), s = this.isDarkMode() ? 20 : 90;
112
+ return `hsl(${n}, 60%, ${s}%)`;
113
+ }
114
+ generateInitials() {
115
+ const t = this.group?.title?.trim().charAt(0);
116
+ return t?.match(/^\w+$/u) ? t : null;
117
+ }
118
+ getIconScale() {
119
+ return this.scale === "xl" ? "l" : this.scale === "xs" ? "s" : this.scale;
120
+ }
121
+ renderTooltip() {
122
+ return !this.tooltip || !this.group?.title ? null : l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`;
123
+ }
124
+ render() {
125
+ const t = this.getThumbnailURI();
126
+ if (t && !this.imageError)
127
+ return l`<img class="thumbnail" src=${t ?? f} alt @error=${() => {
128
+ this.imageError = !0;
129
+ }} @mouseenter=${() => {
130
+ this.tooltipOpen = !0;
131
+ }} @mouseleave=${() => {
132
+ this.tooltipOpen = !1;
133
+ }} @focusin=${() => {
134
+ this.tooltipOpen = !0;
135
+ }} @focusout=${() => {
136
+ this.tooltipOpen = !1;
137
+ }} ${h(this.imageEl)}>${this.renderTooltip()}`;
138
+ const e = this.generateInitials();
139
+ return l`<span class="background" style=${g({ backgroundColor: this.generateFillColor() })} @mouseenter=${() => {
140
+ this.tooltipOpen = !0;
141
+ }} @mouseleave=${() => {
142
+ this.tooltipOpen = !1;
143
+ }} @focusin=${() => {
144
+ this.tooltipOpen = !0;
145
+ }} @focusout=${() => {
146
+ this.tooltipOpen = !1;
147
+ }} ${h(this.fallbackEl)}>${e ? l`<span aria-hidden=true class="initials">${e}</span>` : l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`;
148
+ }
149
+ }
150
+ p("arcgis-portal-group-thumbnail", y);
151
+ export {
152
+ y as ArcgisPortalGroupThumbnail
153
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,3 @@
1
+ import "@esri/calcite-components/components/calcite-tooltip";
2
+ import "@esri/calcite-components/components/calcite-icon";
3
+ export * from "./customElement.js";
@@ -28,6 +28,7 @@ export abstract class ArcgisPortalItemType extends LitElement {
28
28
  hostedCollectionMultidimensional: string;
29
29
  collectionMultidimensional: string;
30
30
  multidimensional: string;
31
+ query: string;
31
32
  collection: string;
32
33
  photoLocations: string;
33
34
  locatorView: string;
@@ -56,6 +57,7 @@ export abstract class ArcgisPortalItemType extends LitElement {
56
57
  hostedCollectionMultidimensional: string;
57
58
  collectionMultidimensional: string;
58
59
  multidimensional: string;
60
+ query: string;
59
61
  collection: string;
60
62
  photoLocations: string;
61
63
  locatorView: string;
@@ -1,33 +1,33 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { g as A, c as x } from "../../chunks/runtime.js";
3
- import { css as C, html as y } from "lit";
4
- import { LitElement as T, nothing as f, safeClassMap as j } from "@arcgis/lumina";
5
- import { u as G } from "../../chunks/useT9n.js";
6
- import { u as v, h as w, j as E, k as L, m as W, n as $, o as R, p as B } from "../../chunks/item.js";
7
- const H = C`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`, V = (t) => typeof t?.role == "string" && t?.role ? t?.role : t?.roleId ?? t?.sourceJSON?.id;
8
- function S(t) {
9
- return ["org_admin", "account_admin"].includes(V(t)) && !t?.roleId;
2
+ import { g as x, c as C } from "../../chunks/runtime.js";
3
+ import { css as T, html as m } from "lit";
4
+ import { LitElement as j, nothing as h, safeClassMap as G } from "@arcgis/lumina";
5
+ import { u as L } from "../../chunks/useT9n.js";
6
+ import { u as w, h as S, j as E, k as W, m as $, n as R, o as B, p as H } from "../../chunks/item.js";
7
+ const V = T`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`, O = (t) => typeof t?.role == "string" && t?.role ? t?.role : t?.roleId ?? t?.sourceJSON?.id;
8
+ function P(t) {
9
+ return ["org_admin", "account_admin"].includes(O(t)) && !t?.roleId;
10
10
  }
11
- function O(t) {
11
+ function F(t) {
12
12
  return !!(t?.roleId && t.roleId.length > 0);
13
13
  }
14
- function N(t) {
14
+ function K(t) {
15
15
  return !!t?.privileges?.includes("portal:admin:deleteItems");
16
16
  }
17
- function F(t, r) {
18
- return r ? v(t, r) || t.itemControl === "update" || w([t], r) && S(r) : !1;
17
+ function N(t, r) {
18
+ return r ? w(t, r) || t.itemControl === "update" || S([t], r) && P(r) : !1;
19
19
  }
20
- function K(t, r) {
20
+ function q(t, r) {
21
21
  if (!r)
22
22
  return !1;
23
- const a = w([t], r), e = v(t, r) || S(r) && a, i = O(r) && N(r);
23
+ const a = S([t], r), e = w(t, r) || P(r) && a, i = F(r) && K(r);
24
24
  return !!(e || a && i);
25
25
  }
26
26
  async function z({ item: t, messages: r, user: a, serviceInfo: e, portal: i }) {
27
- const o = Q(t), n = _(t, r, i);
27
+ const o = J(t), n = _(t, r, i);
28
28
  return {
29
- displayName: h(n, { item: t, user: a, messages: r, serviceInfo: e }, !1),
30
- displayNameHosted: h(n, { item: t, user: a, messages: r, serviceInfo: e }, !0),
29
+ displayName: v(n, { item: t, user: a, messages: r, serviceInfo: e }, !1),
30
+ displayNameHosted: v(n, { item: t, user: a, messages: r, serviceInfo: e }, !0),
31
31
  icon: o
32
32
  };
33
33
  }
@@ -37,35 +37,37 @@ function U(t) {
37
37
  const r = t.typeKeywords;
38
38
  return r?.includes("IntegratedMesh") ? "mesh" : r?.includes("3DObject") ? "3D object" : r?.includes("Point") ? "3D point" : r?.includes("PointCloud") ? "point cloud" : r?.includes("Building") ? "building" : r?.includes("Voxel") ? "voxel" : null;
39
39
  }
40
- function h(t, { item: r, user: a, messages: e, serviceInfo: i }, o = !0) {
40
+ function v(t, { item: r, user: a, messages: e, serviceInfo: i }, o = !0) {
41
41
  const n = r.type === "Image Service";
42
42
  if (!r || !e || !(o && a) && r.type !== "Image Service")
43
43
  return t;
44
- const c = r.type === "Feature Service" && r.typeKeywords?.includes("UtilityNetwork"), l = r.type === "Feature Service" && r.typeKeywords?.includes("ParcelFabric"), u = a && F(r, a), d = a && K(r, a), p = E(r), m = (u || d) && p, k = (u || d) && o;
44
+ const c = r.type === "Feature Service" && r.typeKeywords?.includes("UtilityNetwork"), l = r.type === "Feature Service" && r.typeKeywords?.includes("ParcelFabric"), g = r.type === "Feature Service" && r.typeKeywords?.includes("Query Layer"), u = a && N(r, a), p = a && q(r, a), y = E(r), f = (u || p) && y, k = (u || p) && o;
45
+ if (g)
46
+ return `${t} (${e.query})`;
45
47
  if (l)
46
- return `${t} (${m ? e.parcelFabricHosted : e.parcelFabric})`;
48
+ return `${t} (${f ? e.parcelFabricHosted : e.parcelFabric})`;
47
49
  if (c) {
48
- const s = m ? `, ${e.hosted}` : "";
50
+ const s = f ? `, ${e.hosted}` : "";
49
51
  return `${t} (${e.utilityNetwork}${s})`;
50
52
  }
51
53
  if (n) {
52
- const s = r.typeKeywords?.includes("Elevation 3D Layer"), I = k && p, P = L(r, i) && !s, D = W(r, i) && !s, g = `${I ? "Hosted" : ""}${D ? "Collection" : ""}${P ? "Multidimensional" : ""}`, b = g && `${g[0].toLowerCase()}${g.slice(1)}`, M = b ? ` (${e[b]})` : "";
53
- return `${t}${M}`;
54
+ const s = r.typeKeywords?.includes("Elevation 3D Layer"), I = k && y, D = W(r, i) && !s, M = $(r, i) && !s, d = `${I ? "Hosted" : ""}${M ? "Collection" : ""}${D ? "Multidimensional" : ""}`, b = d && `${d[0].toLowerCase()}${d.slice(1)}`, A = b ? ` (${e[b]})` : "";
55
+ return `${t}${A}`;
54
56
  }
55
57
  if (k) {
56
58
  if (r.type === "Scene Service" || r.type === "3DTiles Service") {
57
59
  const s = U(r);
58
60
  s && (t = `${t} - ${e[s] || s}`);
59
61
  }
60
- if (p) {
61
- const s = ` (${$(r) ? e.hostedView : e.hosted})`;
62
+ if (y) {
63
+ const s = ` (${R(r) ? e.hostedView : e.hosted})`;
62
64
  return `${t}${s}`;
63
65
  }
64
- return R(r) ? `${t} (${e.locatorView})` : B(r) ? `${t} (${e.photoLocations})` : t;
66
+ return B(r) ? `${t} (${e.locatorView})` : H(r) ? `${t} (${e.photoLocations})` : t;
65
67
  }
66
68
  return t;
67
69
  }
68
- const q = {
70
+ const Q = {
69
71
  "360 VR Experience": "360 VR experience",
70
72
  "3DTiles Package": "3D tiles package",
71
73
  "3DTiles Service": "3D tiles layer",
@@ -182,6 +184,8 @@ const q = {
182
184
  "Oriented Imagery Catalog": "Oriented imagery catalog",
183
185
  "Ortho Mapping Project": "Ortho mapping project",
184
186
  "Ortho Mapping Template": "Ortho mapping template",
187
+ "Parquet Feature Layer": "Parquet feature layer",
188
+ "Parquet Collection": "Parquet collection",
185
189
  "Pro Map": "Pro map",
186
190
  "Pro Presentation": "Pro presentation",
187
191
  "Pro Project": "Pro project",
@@ -321,10 +325,10 @@ function _(t, r, a) {
321
325
  return "Instant App";
322
326
  break;
323
327
  }
324
- const i = q[t.type] || t.type;
328
+ const i = Q[t.type] || t.type;
325
329
  return i?.toLowerCase().includes("add in") ? i.replace(/(add in)/giu, "add-in") : i;
326
330
  }
327
- function Q(t) {
331
+ function J(t) {
328
332
  const r = t.type?.toLowerCase() || "", a = t.typeKeywords || [], e = a.includes("Hosted Service");
329
333
  switch (r.trim()) {
330
334
  case "360 vr experience":
@@ -549,7 +553,7 @@ function Q(t) {
549
553
  case "reality mapping project":
550
554
  return "realitymappingproject";
551
555
  case "storymap":
552
- return a.includes("storymaptemplate") ? "storymapstemplate" : a.includes("storymapcollection") ? "storymapcollection" : a.includes("storymapbriefing") ? "storymapbriefing" : "storymap";
556
+ return a.includes("storymaptemplate") ? "storymapstemplate" : a.includes("storymapcollection") ? "storymapcollection" : a.includes("storymapbriefing") ? "storymapbriefing" : a.includes("storymapframe") ? "storymapframe" : "storymap";
553
557
  case "survey123 add in":
554
558
  return "survey123addin";
555
559
  case "mission":
@@ -627,6 +631,10 @@ function Q(t) {
627
631
  return "datastore";
628
632
  case "data pipeline":
629
633
  return "datapipeline";
634
+ case "parquet collection":
635
+ return "datafilesgray";
636
+ case "parquet feature layer":
637
+ return "parquetfeaturelayer";
630
638
  case "service connection":
631
639
  return "serviceconnection";
632
640
  case "xr experience":
@@ -634,15 +642,15 @@ function Q(t) {
634
642
  }
635
643
  return a.includes("Document") ? "datafilesgray" : r.includes("service") ? "layers" : "maps";
636
644
  }
637
- class J extends T {
645
+ class X extends j {
638
646
  constructor() {
639
- super(...arguments), this.messages = G({ blocking: !0 }), this.icon = null, this.displayName = "", this.displayNameHosted = "", this.scale = "s";
647
+ super(...arguments), this.messages = L({ blocking: !0 }), this.icon = null, this.displayName = "", this.displayNameHosted = "", this.scale = "s";
640
648
  }
641
649
  static {
642
650
  this.properties = { icon: 16, displayName: 16, displayNameHosted: 16, item: 0, serviceInfo: 0, portal: 0, user: 0, scale: 3, hideText: 5, hideIcon: 5, ellipsis: 5, showHosted: 5 };
643
651
  }
644
652
  static {
645
- this.styles = H;
653
+ this.styles = V;
646
654
  }
647
655
  async load() {
648
656
  this.item && await this.getItemDisplayInformation();
@@ -661,11 +669,11 @@ class J extends T {
661
669
  const { showHosted: r, displayNameHosted: a, scale: e, icon: i, hideText: o, hideIcon: n, ellipsis: c } = this;
662
670
  if (!i)
663
671
  return null;
664
- const l = r ? a : this.displayName, u = l?.includes("(") ? "" : "&#x202D;", d = A(`./assets/portal-item-type/icons/${i}16.svg`), p = this.hideText ? l : void 0;
665
- return y`${!n && y`<span class="icon"><img src=${d ?? f} alt=${(p || "") ?? f} class=${`icon icon--${e}`}></span>` || ""}${!o && y`<span class=${j({ text: !0, "text--spaced": !n, "text--ellipsis": c })} .innerHTML=${`${u}${l}`}></span>` || ""}`;
672
+ const l = r ? a : this.displayName, g = l?.includes("(") ? "" : "&#x202D;", u = x(`./assets/portal-item-type/icons/${i}16.svg`), p = this.hideText ? l : void 0;
673
+ return m`${!n && m`<span class="icon"><img src=${u ?? h} alt=${(p || "") ?? h} class=${`icon icon--${e}`}></span>` || ""}${!o && m`<span class=${G({ text: !0, "text--spaced": !n, "text--ellipsis": c })} .innerHTML=${`${g}${l}`}></span>` || ""}`;
666
674
  }
667
675
  }
668
- x("arcgis-portal-item-type", J);
676
+ C("arcgis-portal-item-type", X);
669
677
  export {
670
- J as ArcgisPortalItemType
678
+ X as ArcgisPortalItemType
671
679
  };
@@ -5,7 +5,7 @@ import { html as u, css as k } from "lit";
5
5
  import { ref as M, createRef as E } from "lit/directives/ref.js";
6
6
  import { makeGenericController as P } from "@arcgis/lumina/controllers";
7
7
  import { debounce as R } from "@arcgis/toolkit/function";
8
- import { q as L, s as U } from "../../chunks/groups.js";
8
+ import { q as L, s as U } from "../../chunks/item2.js";
9
9
  import { a as w, b as D } from "../../chunks/user2.js";
10
10
  import { keyed as q } from "lit/directives/keyed.js";
11
11
  const v = ["@", "#", "$"], O = 400;
@@ -1,15 +1,17 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { g as h, c as f } from "../../chunks/runtime.js";
3
- import { LitElement as g, createEvent as v, nothing as b } from "@arcgis/lumina";
4
- import { f as y } from "../../chunks/item.js";
5
- import { u as I } from "../../chunks/useT9n.js";
6
- import { createRef as w, ref as R } from "lit/directives/ref.js";
7
- import { unsafeHTML as k } from "lit/directives/unsafe-html.js";
8
- import { css as S, html as l } from "lit";
2
+ import { g as f, c as g } from "../../chunks/runtime.js";
3
+ import { LitElement as v, createEvent as b, nothing as y } from "@arcgis/lumina";
4
+ import { f as I } from "../../chunks/item.js";
5
+ import { u as w } from "../../chunks/useT9n.js";
6
+ import { createRef as R, ref as k } from "lit/directives/ref.js";
7
+ import { unsafeHTML as S } from "lit/directives/unsafe-html.js";
8
+ import { css as M, html as l } from "lit";
9
9
  import m from "@arcgis/core/portal/PortalItem.js";
10
- import { f as M } from "../../chunks/user2.js";
11
- import { g as T } from "../../chunks/user.js";
12
- const $ = S`.thumbnail-container{width:100%}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`, C = [
10
+ import { g as T, b as $ } from "../../chunks/portal.js";
11
+ import C from "@arcgis/core/request.js";
12
+ import { f as P } from "../../chunks/user2.js";
13
+ import { g as A } from "../../chunks/user.js";
14
+ const U = M`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`, j = [
13
15
  "360 VR Experience",
14
16
  "Big Data Analytic",
15
17
  "Dashboard",
@@ -39,8 +41,7 @@ const $ = S`.thumbnail-container{width:100%}.replacement-container{margin:.5rem}
39
41
  "Notebook",
40
42
  "OGCFeatureServer",
41
43
  "Ortho Mapping Project",
42
- "Parquet Layer",
43
- "PDF",
44
+ "Parquet Feature Layer",
44
45
  "Real Time Analytic",
45
46
  "Route Layer",
46
47
  "Scene Service",
@@ -59,7 +60,7 @@ const $ = S`.thumbnail-container{width:100%}.replacement-container{margin:.5rem}
59
60
  "Web Scene",
60
61
  "WFS",
61
62
  "Workflow"
62
- ], P = [
63
+ ], L = [
63
64
  "3DInsetMap",
64
65
  "3DScene",
65
66
  "3DViz",
@@ -141,16 +142,16 @@ const $ = S`.thumbnail-container{width:100%}.replacement-container{margin:.5rem}
141
142
  "View",
142
143
  "Viewer",
143
144
  "ZoneLookup"
144
- ], A = (i) => {
145
+ ], D = (i) => {
145
146
  if (!i)
146
147
  return !1;
147
- const e = P.some((t) => {
148
+ const e = L.some((t) => {
148
149
  const r = t.includes(".html"), a = `/apps/${t}${r ? "" : "/"}`;
149
150
  return decodeURIComponent(i.url)?.includes(a);
150
151
  });
151
152
  return i.type === "Web Mapping Application" && !!i.url && e;
152
153
  };
153
- function U(i) {
154
+ function x(i) {
154
155
  const e = [
155
156
  "Cascade",
156
157
  "MapTour",
@@ -161,9 +162,9 @@ function U(i) {
161
162
  "SwipeSpyglass",
162
163
  "Story Map"
163
164
  ];
164
- return i.type === "Web Mapping Application" && (L(e, i) || D(i));
165
+ return i.type === "Web Mapping Application" && (B(e, i) || F(i));
165
166
  }
166
- function D(i) {
167
+ function F(i) {
167
168
  return [
168
169
  "Cascade",
169
170
  "MapTour",
@@ -177,17 +178,17 @@ function D(i) {
177
178
  return decodeURIComponent(i.url)?.includes(r);
178
179
  });
179
180
  }
180
- function L(i, e) {
181
+ function B(i, e) {
181
182
  return i?.some((t) => e?.typeKeywords?.includes(t));
182
183
  }
183
- function j(i) {
184
- return !!i && C.some((e) => i.type === e);
184
+ function E(i) {
185
+ return !!i && j.some((e) => i.type === e);
185
186
  }
186
187
  function d(i) {
187
- const e = x(i);
188
- return h(`assets/portal-item-thumbnail/${e}`);
188
+ const e = V(i);
189
+ return f(`assets/portal-item-thumbnail/${e}`);
189
190
  }
190
- function x(i) {
191
+ function V(i) {
191
192
  const e = i.type?.toLowerCase(), t = i.typeKeywords || [];
192
193
  switch (e) {
193
194
  case "web mapping application":
@@ -347,8 +348,8 @@ function x(i) {
347
348
  return "default.avif";
348
349
  }
349
350
  }
350
- function F(i, e, t) {
351
- const { restUrl: r } = i, a = E(i), s = a ? `token=${a}` : "", o = `${r}/content/items/${e.id}`;
351
+ function H(i, e, t) {
352
+ const { restUrl: r } = i, a = G(i), s = a ? `token=${a}` : "", o = `${r}/content/items/${e.id}`;
352
353
  if (e.thumbnail) {
353
354
  const c = e.thumbnailUrl;
354
355
  if (c) {
@@ -360,36 +361,44 @@ function F(i, e, t) {
360
361
  return `${o}/data?${s}`;
361
362
  return d(e);
362
363
  }
363
- function E(i) {
364
+ function G(i) {
364
365
  return (
365
366
  // @ts-ignore
366
367
  i?.credential?.token || i?.token || i?.user?.credential?.token || i?.portalUser?.token || ""
367
368
  );
368
369
  }
369
- function V({
370
+ function _({
370
371
  portal: i,
371
372
  usePortalHostname: e
372
373
  }) {
373
374
  const { customBaseUrl: t, portalHostname: r, urlKey: a } = i, { protocol: s } = window.location, o = !e && a ? `${a}.${t}` : r;
374
375
  return `${s}//${o}`;
375
376
  }
377
+ async function O(i) {
378
+ if (!i?.user)
379
+ return [];
380
+ const e = `${T(i)}portals/self/signinSettings`;
381
+ return (await C(e, {
382
+ query: { f: "json" }
383
+ }))?.data.blockedApps || [];
384
+ }
376
385
  const u = 5e3;
377
- class H extends g {
386
+ class W extends v {
378
387
  constructor() {
379
- super(...arguments), this.replacementId = null, this.itemOwnerName = "", this.replacementItemInRecycleBin = !1, this.hasInaccessibleReplacementItem = !1, this.replacementItemSupportsOpenActions = !1, this.thumbnailUrl = null, this.timer = void 0, this.messages = I({ blocking: !0 }), this.primaryActionRef = w(), this.getItemDetailsUrl = ({ portal: e, itemId: t, redirect: r }) => {
380
- const a = V({ portal: e, usePortalHostname: !this.user });
388
+ super(...arguments), this.replacementId = null, this.itemOwnerName = "", this.replacementItemInRecycleBin = !1, this.hasInaccessibleReplacementItem = !1, this.replacementItemSupportsOpenActions = !1, this.thumbnailUrl = null, this.timer = void 0, this.messages = w({ blocking: !0 }), this.primaryActionRef = R(), this.getItemDetailsUrl = ({ portal: e, itemId: t, redirect: r }) => {
389
+ const a = _({ portal: e, usePortalHostname: !this.user });
381
390
  return a ? `${`${a}/home`}/item.html?id=${t}${r ? "&performRedirectAction=true" : ""}` : "";
382
391
  }, this.performRedirectAction = () => {
383
392
  window.open(this.getItemDetailsUrl({ portal: this.portal, itemId: this.replacementId, redirect: !0 }), "_self");
384
393
  }, this.viewItemDetailsPage = () => {
385
394
  window.open(this.getItemDetailsUrl({ portal: this.portal, itemId: this.replacementId ?? this.itemId }), this.supportsReplacement ? "_self" : "_blank");
386
- }, this.canRedirect = !1, this.item = null, this.replacementItem = null, this.redirectAction = null, this.supportsReplacement = !1, this.redirectCancelled = !1, this.open = !1, this.redirectTimeRemaining = u / 1e3, this.arcgisPortalReplacementItemFetch = v();
395
+ }, this.canRedirect = !1, this.item = null, this.replacementItem = null, this.redirectAction = null, this.supportsReplacement = !1, this.redirectCancelled = !1, this.open = !1, this.redirectTimeRemaining = u / 1e3, this.arcgisPortalReplacementItemFetch = b();
387
396
  }
388
397
  static {
389
398
  this.properties = { item: 16, replacementItem: 16, redirectAction: 16, supportsReplacement: 16, redirectCancelled: 16, open: 16, redirectTimeRemaining: 16, itemId: 1, portal: 0, user: 0 };
390
399
  }
391
400
  static {
392
- this.styles = $;
401
+ this.styles = U;
393
402
  }
394
403
  async setFocus() {
395
404
  this.primaryActionRef.value?.setFocus();
@@ -416,7 +425,7 @@ class H extends g {
416
425
  this.cancelTimer(), this.redirectCancelled = !0;
417
426
  }
418
427
  isItemRetired(e) {
419
- return A(e) || U(e);
428
+ return D(e) || x(e);
420
429
  }
421
430
  async initItem() {
422
431
  if (!this.itemId)
@@ -426,7 +435,7 @@ class H extends g {
426
435
  portal: t
427
436
  });
428
437
  this.item = await a?.load();
429
- const s = await y(e, t, {
438
+ const s = await I(e, t, {
430
439
  relationshipType: "ReplacementItem2Item",
431
440
  direction: "reverse"
432
441
  }, !0), o = s.data?.relatedItems?.[0];
@@ -438,8 +447,10 @@ class H extends g {
438
447
  await n?.load(), this.replacementItem = n, this.hasInaccessibleReplacementItem = this.replacementItemInRecycleBin || !n && s.data?.aggregations?.total?.count > 0 && s.data?.relatedItems?.length === 0, this.arcgisPortalReplacementItemFetch.emit({
439
448
  replacementItem: this.hasInaccessibleReplacementItem ? {} : n || null
440
449
  }), this.replacementItem = n;
441
- const p = !!a.owner && await M(a.owner, t);
442
- this.itemOwnerName = p ? T(p, this.messages?._t9nLocale || "en") : a.owner || "", this.replacementItemSupportsOpenActions = j(n), this.thumbnailUrl = F(t, n ?? this.item), this.supportsReplacement = !!n && this.isItemRetired(a), this.canRedirect = this.supportsReplacement && this.replacementItemSupportsOpenActions, this.replacementId = n?.id || null, this.canRedirect && this.setupTimer({
450
+ const p = this.replacementItem?.owner ?? (a?.owner || null);
451
+ this.itemOwnerName = p ? A(await P(p, t), this.messages?._t9nLocale || "en") : "", this.replacementItemSupportsOpenActions = E(n), this.thumbnailUrl = H(t, n ?? this.item), this.supportsReplacement = !!n && this.isItemRetired(a);
452
+ const h = $(this.replacementItem, await O(this.portal), this.portal?.isPortal ?? !1);
453
+ this.canRedirect = this.supportsReplacement && this.replacementItemSupportsOpenActions && !h, this.replacementId = n?.id || null, this.canRedirect && this.setupTimer({
443
454
  onComplete: () => r()
444
455
  }), this.open = !0;
445
456
  }
@@ -457,19 +468,19 @@ class H extends g {
457
468
  }
458
469
  renderCard(e) {
459
470
  const { canRedirect: t, messages: r } = this;
460
- return l`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl || void 0) ?? b} @error=${async () => this.thumbnailUrl = d(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${r.ownedBy?.replace("${owner}", this.itemOwnerName)}</span>${t && l`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({ portal: this.portal, itemId: this.replacementId })} target=_blank>${r.moreDetails}</calcite-link>` || ""}</calcite-card>`;
471
+ return l`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl || void 0) ?? y} @error=${async () => this.thumbnailUrl = d(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${r.ownedBy?.replace("${owner}", this.itemOwnerName)}</span>${t && l`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({ portal: this.portal, itemId: this.replacementId })} target=_blank>${r.moreDetails}</calcite-link>` || ""}</calcite-card>`;
461
472
  }
462
473
  render() {
463
474
  const { open: e, messages: t, item: r, replacementItem: a, supportsReplacement: s, canRedirect: o, redirectCancelled: c } = this;
464
475
  if (!(!r || !this.isItemRetired(r)))
465
- return l`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${() => this.handleClose()}><div class="replacement-container"><div class="replacement-message">${k(this.getReplacementMessage()?.replace("${itemTitle}", this.item?.title || ""))}</div>${this.renderCard(s ? a : r)}</div>${o && !c && l`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${() => {
476
+ return l`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${() => this.handleClose()}><div class="replacement-container"><div class="replacement-message">${S(this.getReplacementMessage()?.replace("${itemTitle}", this.item?.title || ""))}</div>${this.renderCard(s ? a : r)}</div>${o && !c && l`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${() => {
466
477
  this.cancelRedirect();
467
478
  }}>${t.cancelRedirection}</calcite-button>` || ""}<calcite-button slot=footer-end @click=${() => {
468
479
  this.cancelTimer(), o ? this.performRedirectAction() : this.viewItemDetailsPage();
469
- }} .iconEnd=${o ? void 0 : "launch"} icon-flip-rtl=end ${R(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`;
480
+ }} .iconEnd=${o ? void 0 : "launch"} ${k(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`;
470
481
  }
471
482
  }
472
- f("arcgis-portal-replacement-item-redirect", H);
483
+ g("arcgis-portal-replacement-item-redirect", W);
473
484
  export {
474
- H as ArcgisPortalReplacementItemRedirect
485
+ W as ArcgisPortalReplacementItemRedirect
475
486
  };