@arcgis/portal-components 5.0.0-next.126 → 5.0.0-next.127

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 (93) hide show
  1. package/dist/cdn/{ZXAIECQ4.js → 3IBU7OXU.js} +2 -2
  2. package/dist/cdn/{GIBWEC6K.js → 4ET2VMGZ.js} +2 -2
  3. package/dist/cdn/{SM2CK2AO.js → 4SVZNDD5.js} +2 -2
  4. package/dist/cdn/{AHCZTVJ4.js → 5C2GWXM2.js} +2 -2
  5. package/dist/cdn/{HW5C3XJH.js → 652FN34L.js} +1 -1
  6. package/dist/cdn/{OY4KOUHF.js → ALENKFUQ.js} +2 -2
  7. package/dist/cdn/{P4LUN5GB.js → BJPS5ZJM.js} +2 -2
  8. package/dist/cdn/{MX35WWUC.js → CW3FOKQP.js} +2 -2
  9. package/dist/cdn/{JA2VDMRG.js → DS7M5QVJ.js} +1 -1
  10. package/dist/cdn/{YMTH6GIB.js → ELOTJB56.js} +2 -2
  11. package/dist/cdn/{MKNHIW7X.js → GRJOT5E2.js} +2 -2
  12. package/dist/cdn/{WNOLDDB4.js → HXFIUZD3.js} +2 -2
  13. package/dist/cdn/{WKZKBMHW.js → IBJWSLIZ.js} +2 -2
  14. package/dist/cdn/{XUQULGNP.js → JWB6OMHQ.js} +1 -1
  15. package/dist/cdn/{GCTJZYV7.js → MROC3UG5.js} +2 -2
  16. package/dist/cdn/{UCKMUAOS.js → RYNNPJZT.js} +1 -1
  17. package/dist/cdn/XKIPHUMJ.js +4 -0
  18. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ar.json +1 -0
  19. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.bg.json +1 -0
  20. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.bs.json +1 -0
  21. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ca.json +1 -0
  22. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.cs.json +1 -0
  23. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.da.json +1 -0
  24. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.de.json +1 -0
  25. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.el.json +1 -0
  26. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.en.json +1 -1
  27. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.es.json +1 -0
  28. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.et.json +1 -0
  29. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.fi.json +1 -0
  30. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.fr.json +1 -0
  31. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.he.json +1 -0
  32. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.hr.json +1 -0
  33. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.hu.json +1 -0
  34. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.id.json +1 -0
  35. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.it.json +1 -0
  36. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ja.json +1 -0
  37. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ko.json +1 -0
  38. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.lt.json +1 -0
  39. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.lv.json +1 -0
  40. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.nl.json +1 -0
  41. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.no.json +1 -0
  42. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pl.json +1 -0
  43. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pt-BR.json +1 -0
  44. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.pt-PT.json +1 -0
  45. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ro.json +1 -0
  46. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.ru.json +1 -0
  47. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sk.json +1 -0
  48. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sl.json +1 -0
  49. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sr.json +1 -0
  50. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.sv.json +1 -0
  51. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.th.json +1 -0
  52. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.tr.json +1 -0
  53. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.uk.json +1 -0
  54. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.vi.json +1 -0
  55. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-CN.json +1 -0
  56. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-HK.json +1 -0
  57. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.zh-TW.json +1 -0
  58. package/dist/cdn/index.js +2 -2
  59. package/dist/chunks/common.js +1 -1
  60. package/dist/chunks/fieldAddDelete.js +2 -2
  61. package/dist/chunks/item.js +9 -9
  62. package/dist/chunks/loadClassificationData.js +1 -1
  63. package/dist/chunks/requests.js +1 -1
  64. package/dist/chunks/runtime.js +1 -1
  65. package/dist/chunks/useT9n.js +1 -1
  66. package/dist/components/arcgis-portal-classification-banner/customElement.js +1 -1
  67. package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
  68. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  69. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  70. package/dist/components/arcgis-portal-extent-picker/customElement.js +1 -1
  71. package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +1 -1
  72. package/dist/components/arcgis-portal-field-delete/customElement.js +2 -2
  73. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.d.ts +13 -6
  74. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +117 -38
  75. package/dist/components/arcgis-portal-replacement-item-redirect/index.d.ts +3 -1
  76. package/dist/components/arcgis-portal-replacement-item-redirect/index.js +3 -1
  77. package/dist/components/arcgis-portal-replacement-item-redirect/types/actions.d.ts +11 -0
  78. package/dist/components/arcgis-portal-replacement-item-redirect/utils/actions.d.ts +24 -0
  79. package/dist/components/arcgis-portal-replacement-item-redirect/utils/capabilities.d.ts +4 -0
  80. package/dist/components/arcgis-portal-replacement-item-redirect/utils/info.d.ts +2 -0
  81. package/dist/docs/api.json +33 -29
  82. package/dist/docs/docs.json +28 -26
  83. package/dist/docs/vscode.html-custom-data.json +8 -2
  84. package/dist/docs/web-types.json +27 -9
  85. package/dist/index.d.ts +6 -0
  86. package/dist/index.js +1 -1
  87. package/dist/loader.js +2 -2
  88. package/dist/types/lumina.d.ts +2 -1
  89. package/dist/types/preact.d.ts +2 -1
  90. package/dist/types/react.d.ts +2 -1
  91. package/dist/types/stencil.d.ts +2 -1
  92. package/package.json +3 -3
  93. package/dist/cdn/SV22LY6H.js +0 -4
@@ -1,53 +1,132 @@
1
- import { c as o } from "../../chunks/runtime.js";
2
- import { LitElement as c, nothing as a } from "@arcgis/lumina";
3
- import { g as n } from "../../chunks/item.js";
4
- import { html as l } from "lit";
5
- import { u as m } from "../../chunks/useT9n.js";
6
- import { createRef as p, ref as d } from "lit/directives/ref.js";
7
- import { unsafeHTML as h } from "lit/directives/unsafe-html.js";
1
+ import { c as d } from "../../chunks/runtime.js";
2
+ import { LitElement as h, createEvent as u, nothing as p } from "@arcgis/lumina";
3
+ import { g as f, h as I } from "../../chunks/item.js";
4
+ import { u as $ } from "../../chunks/useT9n.js";
5
+ import { createRef as w, ref as g } from "lit/directives/ref.js";
6
+ import { unsafeHTML as R } from "lit/directives/unsafe-html.js";
7
+ import y from "@arcgis/core/identity/IdentityManager.js";
8
+ import { css as A, html as o } from "lit";
8
9
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
9
10
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
10
- v5.0.0-next.126 */
11
- const u = 1e4;
12
- class f extends c {
11
+ v5.0.0-next.127 */
12
+ function T(e, t) {
13
+ return t && (b(e, t) || ["update", "admin"].includes(e.itemControl));
14
+ }
15
+ function b(e, t) {
16
+ return e.owner === t?.username;
17
+ }
18
+ const k = (e) => e.type === "PDF";
19
+ async function D({ item: e, user: t, portal: i }) {
20
+ const r = await y.getCredential(i.url), n = { item: e, user: t, portal: i, credential: r };
21
+ return k(e) ? {
22
+ action: async () => await v(n),
23
+ newTab: !0
24
+ } : e.type === "StoryMap" ? { link: e.url, newTab: !0 } : null;
25
+ }
26
+ async function v({ item: e, user: t, portal: i, credential: r }) {
27
+ const n = P(e, i, r);
28
+ await C({ item: e, user: t, portal: i, url: n });
29
+ }
30
+ function P(e, t, i) {
31
+ if (!e)
32
+ return "";
33
+ const r = U(e, t), n = i?.token;
34
+ let a = n ? `?token=${n}` : "";
35
+ return e.type === "KML" ? (a = e.access !== "public" && n ? `?token=${n}` : "", e.url?.includes(r) ? `${r}${a}` : `${e.url}${a}`) : `${r}${a}`;
36
+ }
37
+ function U(e, t) {
38
+ return `${f(t)}content/items/${e.id}/data`;
39
+ }
40
+ async function C({ item: e, user: t, portal: i, url: r }) {
41
+ if (T(e, t))
42
+ l(r);
43
+ else
44
+ try {
45
+ if (await F(r, i))
46
+ l(r, !0);
47
+ else
48
+ throw new Error("Access denied");
49
+ } catch (n) {
50
+ throw n;
51
+ }
52
+ }
53
+ function l(e, t) {
54
+ window.location.href = e;
55
+ }
56
+ async function F(e, t) {
57
+ try {
58
+ return await fetch(e, {
59
+ method: "HEAD",
60
+ credentials: t?.isPortal ? "include" : "same-origin"
61
+ }), !0;
62
+ } catch {
63
+ return !1;
64
+ }
65
+ }
66
+ const E = A`.thumbnail-container{width:100%}`, H = 1e4;
67
+ class L extends h {
13
68
  constructor() {
14
- super(...arguments), this.replacementId = null, this.timerId = void 0, this.t9n = m({ blocking: !0 }), this.primaryActionRef = p(), this.getItemDetailsUrl = ({ portal: t, itemId: e }) => {
15
- const i = t.restUrl;
16
- return i ? `${i.replace("sharing/rest", "home")}/item.html?id=${e}` : "";
17
- }, this.replacementItem = null, this.redirectAction = null, this.open = !1;
69
+ super(...arguments), this.replacementId = null, this.timerId = void 0, this.t9n = $({ blocking: !0 }), this.primaryActionRef = w(), this.getItemDetailsUrl = ({ portal: t, itemId: i }) => {
70
+ const r = t.restUrl;
71
+ return r ? `${r.replace("sharing/rest", "home")}/item.html?id=${i}` : "";
72
+ }, this.itemTitle = "", this.replacementItem = null, this.redirectAction = null, this.canRedirect = !1, this.open = !1, this.arcgisPortalReplacementItemFetch = u();
73
+ }
74
+ static {
75
+ this.properties = { itemTitle: 16, replacementItem: 16, redirectAction: 16, canRedirect: 16, open: 16, itemId: 1, portal: 0, user: 0 };
18
76
  }
19
77
  static {
20
- this.properties = { replacementItem: 16, redirectAction: 16, open: 16, item: 0, portal: 0, user: 0 };
78
+ this.styles = E;
21
79
  }
22
80
  async setFocus() {
23
81
  this.primaryActionRef.value?.setFocus();
24
82
  }
25
83
  willUpdate(t) {
26
- t.has("item") && this.initItem();
84
+ (t.has("itemId") || t.has("portal") || t.has("user")) && this.initItem();
27
85
  }
28
- getRedirectAction() {
29
- return null;
86
+ async handleRedirectAction() {
87
+ const { action: t, link: i } = this.redirectAction || {};
88
+ if ((t || i) && (this.canRedirect = !0), t) {
89
+ t();
90
+ return;
91
+ } else i && window.open(i, "_self");
30
92
  }
31
93
  setupTimer({ onComplete: t }) {
32
94
  typeof this.timerId == "number" && clearTimeout(this.timerId);
33
- const e = setTimeout(() => {
95
+ const i = setTimeout(() => {
34
96
  t(), this.timerId = void 0;
35
- }, u);
36
- this.timerId = +e;
97
+ }, H);
98
+ this.timerId = +i;
37
99
  }
38
100
  cancelTimer({ onCancel: t } = {}) {
39
101
  t?.(), clearTimeout(this.timerId);
40
102
  }
103
+ handleClose() {
104
+ this.cancelTimer(), this.itemId = "", this.itemTitle = "", this.open = !1;
105
+ }
41
106
  async initItem() {
42
- if (!this.item)
107
+ if (!this.itemId)
43
108
  return;
44
- const { item: t, portal: e } = this, i = (await n(t.id, e, {
109
+ const { itemId: t, portal: i } = this, r = await i.queryItems({ query: `id:${t}` });
110
+ this.itemTitle = r?.results[0]?.title || "";
111
+ const n = await I(t, i, {
45
112
  relationshipType: "ReplacementItem2Item",
46
113
  direction: "reverse"
47
- })).data?.relatedItems?.[0];
48
- this.redirectAction = this.getRedirectAction(), this.replacementItem = i, this.replacementId = i.id, this.redirectAction && this.setupTimer({
49
- onComplete: () => {
50
- this.viewItemDetailsPage();
114
+ }), a = n.data?.aggregations?.total?.count > 0 && n.data?.relatedItems?.length === 0, s = n.data?.relatedItems?.[0];
115
+ if (this.arcgisPortalReplacementItemFetch.emit({
116
+ replacementItem: a ? {} : s || null
117
+ }), !s) {
118
+ this.handleClose();
119
+ return;
120
+ }
121
+ this.replacementItem = s, this.redirectAction = await D({
122
+ item: this.replacementItem,
123
+ portal: this.portal,
124
+ user: this.user || this.portal.user
125
+ });
126
+ const { action: c, link: m } = this.redirectAction || {};
127
+ this.canRedirect = !!(c || m), this.replacementId = s.id, this.canRedirect && this.setupTimer({
128
+ onComplete: async () => {
129
+ await this.handleRedirectAction();
51
130
  }
52
131
  }), this.open = !0;
53
132
  }
@@ -55,18 +134,18 @@ class f extends c {
55
134
  window.open(this.getItemDetailsUrl({ portal: this.portal, itemId: this.replacementId }), "_self");
56
135
  }
57
136
  render() {
58
- const { open: t, t9n: e, item: i, replacementItem: s, redirectAction: r } = this;
59
- if (s)
60
- return l`<calcite-dialog modal .open=${t} width=s kind=info outside-close-disabled .heading=${r ? e.redirectToReplacement : e.replacementAvailable} @calciteDialogClose=${() => {
61
- this.cancelTimer(), this.item = null, this.open = !1;
62
- }}><div>${h(e.deprecatedHasReplacement.replace("${itemTitle}", i?.title || ""))}</div><arcgis-item-card disable-selection .item=${s} .portal=${this.portal} show-item-type show-badges show-item-type-hosted>${!!r && l`<calcite-button appearance=outline-fill kind=neutral slot=actions-end @click=${() => this.viewItemDetailsPage()}>${e.viewItemDetails}</calcite-button>` || ""}</arcgis-item-card><calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${() => {
63
- this.cancelTimer(), this.open = !1;
64
- }}>${e.cancel}</calcite-button><calcite-button slot=footer-end @click=${() => {
65
- this.cancelTimer(), r ? r() : this.viewItemDetailsPage();
66
- }} icon-end=${(r ? void 0 : "launch") ?? a} ${d(this.primaryActionRef)}>${r ? e.redirect : e.viewItemDetails}</calcite-button></calcite-dialog>`;
137
+ const { open: t, t9n: i, itemTitle: r, replacementItem: n, canRedirect: a, portal: s, user: c } = this;
138
+ if (n)
139
+ return o`<calcite-dialog modal .open=${t} width=s kind=info outside-close-disabled .heading=${a ? i.redirectToReplacement : i.replacementAvailable} @calciteDialogClose=${() => {
140
+ this.cancelTimer(), this.itemId = "", this.itemTitle = "", this.open = !1;
141
+ }}><div>${R(i.deprecatedHasReplacement.replace("${itemTitle}", r))}</div><calcite-card thumbnail-position=inline-start><arcgis-item-thumbnail slot=thumbnail class="thumbnail-container" .item=${n} .user=${c || s.user} .portal=${s}></arcgis-item-thumbnail><span slot=heading>${n.title}</span><span slot=description>${`Owned by: ${n.owner}`}</span>${a && o`<calcite-link slot=footer-start icon-start=launch .href=${this.getItemDetailsUrl({ portal: this.portal, itemId: this.replacementId })}>${i.moreDetails}</calcite-link>` || ""}</calcite-card><calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${() => {
142
+ this.handleClose();
143
+ }}>${i.cancel}</calcite-button><calcite-button slot=footer-end @click=${async () => {
144
+ this.cancelTimer(), this.canRedirect ? await this.handleRedirectAction() : this.viewItemDetailsPage();
145
+ }} icon-end=${(this.canRedirect ? void 0 : "launch") ?? p} ${g(this.primaryActionRef)}>${this.canRedirect ? i.redirect : i.moreDetails}</calcite-button></calcite-dialog>`;
67
146
  }
68
147
  }
69
- o("arcgis-portal-replacement-item-redirect", f);
148
+ d("arcgis-portal-replacement-item-redirect", L);
70
149
  export {
71
- f as ArcgisPortalReplacementItemRedirect
150
+ L as ArcgisPortalReplacementItemRedirect
72
151
  };
@@ -1,4 +1,6 @@
1
1
  import "@esri/calcite-components/components/calcite-dialog";
2
- import "@arcgis/app-components/dist/components/arcgis-item-card.js";
2
+ import "@esri/calcite-components/components/calcite-card";
3
+ import "@arcgis/app-components/dist/components/arcgis-item-thumbnail.js";
4
+ import "@esri/calcite-components/components/calcite-link";
3
5
  import "@esri/calcite-components/components/calcite-button";
4
6
  export * from "./customElement.js";
@@ -1,4 +1,6 @@
1
1
  import "@esri/calcite-components/components/calcite-dialog";
2
- import "@arcgis/app-components/dist/components/arcgis-item-card.js";
2
+ import "@esri/calcite-components/components/calcite-card";
3
+ import "@arcgis/app-components/dist/components/arcgis-item-thumbnail.js";
4
+ import "@esri/calcite-components/components/calcite-link";
3
5
  import "@esri/calcite-components/components/calcite-button";
4
6
  export * from "./customElement.js";
@@ -0,0 +1,11 @@
1
+ export type ItemActionCache = Record<string, ItemAction[]>;
2
+ export interface ItemAction<R = void> {
3
+ action?: () => R;
4
+ link?: string;
5
+ id?: string;
6
+ tooltip?: string;
7
+ disabled?: boolean;
8
+ target?: string;
9
+ desktopOnly?: boolean;
10
+ newTab?: boolean;
11
+ }
@@ -0,0 +1,24 @@
1
+ /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ import { default as PortalUser } from '@arcgis/core/portal/PortalUser';
3
+ import { default as Credential } from '@arcgis/core/identity/Credential';
4
+ import { ItemAction } from '../types/actions';
5
+ interface ActionParams {
6
+ item: __esri.PortalItem;
7
+ user: PortalUser;
8
+ portal: __esri.Portal;
9
+ credential?: Credential;
10
+ }
11
+ interface RedirectParams extends Pick<ActionParams, "item" | "portal" | "user"> {
12
+ url: string;
13
+ }
14
+ export declare function getDefaultActionForItemType({ item, user, portal }: ActionParams): Promise<ItemAction | null>;
15
+ export declare function download({ item, user, portal, credential }: ActionParams): Promise<void>;
16
+ export declare function getItemDataPath(item: __esri.PortalItem, portal: __esri.Portal, credential: Credential): string;
17
+ export declare function getItemDataUrl(item: __esri.PortalItem, portal: __esri.Portal): string;
18
+ /**
19
+ * An item can be public but its /data will be licensed and only allowed access by licensed users.
20
+ * This function makes a HEAD request against /data and check the result. If valid, will open given url
21
+ */
22
+ export declare function checkItemAccessAndRedirect({ item, user, portal, url }: RedirectParams): Promise<void>;
23
+ export declare function openPage(url: string, sameWindow?: boolean): void;
24
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ import { default as PortalUser } from '@arcgis/core/portal/PortalUser';
3
+ export declare function canUpdate(item: Pick<__esri.PortalItem, "itemControl" | "owner">, user: PortalUser): boolean;
4
+ export declare function isItemOwner(item: Pick<__esri.PortalItem, "owner">, user: Pick<PortalUser, "username">): boolean;
@@ -0,0 +1,2 @@
1
+ /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ export declare const isPDF: (item: __esri.PortalItem) => boolean;
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2026-01-15T04:43:01",
2
+ "timestamp": "2026-01-16T04:42:12",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "5.0.0-next.126",
5
+ "version": "5.0.0-next.127",
6
6
  "typescriptVersion": "5.9.3"
7
7
  },
8
8
  "schemaVersion": "2.1.0",
@@ -1455,7 +1455,7 @@
1455
1455
  "name": "ArcgisPortalReplacementItemRedirect",
1456
1456
  "tagName": "arcgis-portal-replacement-item-redirect",
1457
1457
  "pascalCaseName": "ArcgisPortalReplacementItemRedirect",
1458
- "description": "The `arcgis-portal-replacement-item-redirect` component takes an item on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.",
1458
+ "description": "The `arcgis-portal-replacement-item-redirect` component takes an item id on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.",
1459
1459
  "docsTags": [
1460
1460
  {
1461
1461
  "name": "internal"
@@ -1469,36 +1469,17 @@
1469
1469
  "members": [
1470
1470
  {
1471
1471
  "kind": "field",
1472
- "name": "item",
1473
- "description": "The deprecated/retired item to be checked for a replacement",
1472
+ "name": "itemId",
1473
+ "description": "The id of a deprecated/retired item to be checked for a replacement",
1474
1474
  "type": {
1475
- "text": "PortalItem | SearchResultItem",
1476
- "references": [
1477
- {
1478
- "name": "PortalItem",
1479
- "package": "@arcgis/core",
1480
- "module": "portal/PortalItem.d.ts",
1481
- "viewUrl": "https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html",
1482
- "start": 0,
1483
- "end": 10
1484
- },
1485
- {
1486
- "name": "SearchResultItem",
1487
- "package": "@arcgis/app-components",
1488
- "module": "dist/types/utils/types.d.ts",
1489
- "start": 13,
1490
- "end": 29
1491
- }
1492
- ],
1475
+ "text": "string",
1493
1476
  "values": [
1494
1477
  {
1495
- "type": "PortalItem"
1496
- },
1497
- {
1498
- "type": "SearchResultItem"
1478
+ "type": "string"
1499
1479
  }
1500
1480
  ]
1501
- }
1481
+ },
1482
+ "attribute": "item-id"
1502
1483
  },
1503
1484
  {
1504
1485
  "kind": "field",
@@ -1521,7 +1502,7 @@
1521
1502
  {
1522
1503
  "kind": "field",
1523
1504
  "name": "user",
1524
- "description": "The signed in user",
1505
+ "description": "The user. Defaults to `portal.user` if omitted",
1525
1506
  "type": {
1526
1507
  "text": "PortalUser",
1527
1508
  "references": [
@@ -1588,6 +1569,29 @@
1588
1569
  "signature": "(): Promise<void>"
1589
1570
  }
1590
1571
  ],
1572
+ "attributes": [
1573
+ {
1574
+ "name": "item-id",
1575
+ "description": "The id of a deprecated/retired item to be checked for a replacement",
1576
+ "type": {
1577
+ "text": "string",
1578
+ "values": [
1579
+ {
1580
+ "type": "string"
1581
+ }
1582
+ ]
1583
+ },
1584
+ "fieldName": "itemId"
1585
+ }
1586
+ ],
1587
+ "events": [
1588
+ {
1589
+ "name": "arcgisPortalReplacementItemFetch",
1590
+ "type": {
1591
+ "text": "{ replacementItem: object | PortalItem | null; }"
1592
+ }
1593
+ }
1594
+ ],
1591
1595
  "importPath": "components/arcgis-portal-replacement-item-redirect"
1592
1596
  }
1593
1597
  ],
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2026-01-15T04:43:01",
2
+ "timestamp": "2026-01-16T04:42:12",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "5.0.0-next.126",
5
+ "version": "5.0.0-next.127",
6
6
  "typescriptVersion": "5.9.3"
7
7
  },
8
8
  "components": [
@@ -1356,7 +1356,7 @@
1356
1356
  "overview": "",
1357
1357
  "readme": "",
1358
1358
  "usage": {},
1359
- "docs": "The `arcgis-portal-replacement-item-redirect` component takes an item on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.",
1359
+ "docs": "The `arcgis-portal-replacement-item-redirect` component takes an item id on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.",
1360
1360
  "docsTags": [
1361
1361
  {
1362
1362
  "name": "internal"
@@ -1372,34 +1372,21 @@
1372
1372
  "dependencyGraph": {},
1373
1373
  "props": [
1374
1374
  {
1375
- "name": "item",
1376
- "type": "PortalItem | SearchResultItem",
1375
+ "name": "itemId",
1376
+ "type": "string",
1377
1377
  "complexType": {
1378
- "original": "PortalItem | SearchResultItem",
1379
- "resolved": "PortalItem | SearchResultItem",
1380
- "references": {
1381
- "PortalItem": {
1382
- "location": "import",
1383
- "path": "@arcgis/core/portal/PortalItem.d.ts",
1384
- "id": "notImplemented"
1385
- },
1386
- "SearchResultItem": {
1387
- "location": "import",
1388
- "path": "@arcgis/app-components/dist/types/utils/types.d.ts",
1389
- "id": "notImplemented"
1390
- }
1391
- }
1378
+ "original": "string",
1379
+ "resolved": "string",
1380
+ "references": {}
1392
1381
  },
1393
1382
  "mutable": true,
1383
+ "attr": "item-id",
1394
1384
  "reflectToAttr": false,
1395
- "docs": "The deprecated/retired item to be checked for a replacement",
1385
+ "docs": "The id of a deprecated/retired item to be checked for a replacement",
1396
1386
  "docsTags": [],
1397
1387
  "values": [
1398
1388
  {
1399
- "type": "PortalItem"
1400
- },
1401
- {
1402
- "type": "SearchResultItem"
1389
+ "type": "string"
1403
1390
  }
1404
1391
  ],
1405
1392
  "optional": true,
@@ -1443,7 +1430,7 @@
1443
1430
  },
1444
1431
  "mutable": true,
1445
1432
  "reflectToAttr": false,
1446
- "docs": "The signed in user",
1433
+ "docs": "The user. Defaults to `portal.user` if omitted",
1447
1434
  "docsTags": [],
1448
1435
  "values": [],
1449
1436
  "optional": true,
@@ -1507,7 +1494,22 @@
1507
1494
  "docsTags": []
1508
1495
  }
1509
1496
  ],
1510
- "events": [],
1497
+ "events": [
1498
+ {
1499
+ "event": "arcgisPortalReplacementItemFetch",
1500
+ "detail": "{ replacementItem: object | PortalItem | null; }",
1501
+ "bubbles": true,
1502
+ "complexType": {
1503
+ "original": "{ replacementItem: object | PortalItem | null; }",
1504
+ "resolved": "{ replacementItem: object | PortalItem | null; }",
1505
+ "references": {}
1506
+ },
1507
+ "cancelable": true,
1508
+ "composed": true,
1509
+ "docs": "",
1510
+ "docsTags": []
1511
+ }
1512
+ ],
1511
1513
  "styles": [],
1512
1514
  "slots": [],
1513
1515
  "parts": [],
@@ -128,8 +128,14 @@
128
128
  },
129
129
  {
130
130
  "name": "arcgis-portal-replacement-item-redirect",
131
- "description": "The `arcgis-portal-replacement-item-redirect` component takes an item on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.\n--\n\n### Methods\n- `componentOnReady(): Promise<this>` - Create a promise that resolves once component is fully loaded.\n- `setFocus(): Promise<void>` - Set focus on the component",
132
- "attributes": [],
131
+ "description": "The `arcgis-portal-replacement-item-redirect` component takes an item id on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.\n--\n\n### Events\n- **arcgisPortalReplacementItemFetch**\n\n### Methods\n- `componentOnReady(): Promise<this>` - Create a promise that resolves once component is fully loaded.\n- `setFocus(): Promise<void>` - Set focus on the component",
132
+ "attributes": [
133
+ {
134
+ "name": "item-id",
135
+ "description": "The id of a deprecated/retired item to be checked for a replacement",
136
+ "values": []
137
+ }
138
+ ],
133
139
  "references": []
134
140
  }
135
141
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@arcgis/portal-components",
4
- "version": "5.0.0-next.126",
4
+ "version": "5.0.0-next.127",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -432,15 +432,28 @@
432
432
  },
433
433
  {
434
434
  "name": "arcgis-portal-replacement-item-redirect",
435
- "description": "The `arcgis-portal-replacement-item-redirect` component takes an item on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.\n--\n\n### Methods\n- `componentOnReady(): Promise<this>` - Create a promise that resolves once component is fully loaded.\n- `setFocus(): Promise<void>` - Set focus on the component",
436
- "attributes": [],
437
- "events": [],
435
+ "description": "The `arcgis-portal-replacement-item-redirect` component takes an item id on a given portal, and checks if there is a replacement item associated with it\nvia the `ReplacementItem2Item` relationship.\n\nIf so, it displays a dialog to the user notifying them of the replacement item, and redirects to the replacement item's default Open Action after a timeout.\n--\n\n### Events\n- **arcgisPortalReplacementItemFetch**\n\n### Methods\n- `componentOnReady(): Promise<this>` - Create a promise that resolves once component is fully loaded.\n- `setFocus(): Promise<void>` - Set focus on the component",
436
+ "attributes": [
437
+ {
438
+ "name": "item-id",
439
+ "description": "The id of a deprecated/retired item to be checked for a replacement",
440
+ "value": {
441
+ "type": "string"
442
+ }
443
+ }
444
+ ],
445
+ "events": [
446
+ {
447
+ "name": "arcgisPortalReplacementItemFetch",
448
+ "type": "{ replacementItem: object | PortalItem | null; }"
449
+ }
450
+ ],
438
451
  "js": {
439
452
  "properties": [
440
453
  {
441
- "name": "item",
442
- "description": "The deprecated/retired item to be checked for a replacement",
443
- "type": "PortalItem | SearchResultItem"
454
+ "name": "itemId",
455
+ "description": "The id of a deprecated/retired item to be checked for a replacement",
456
+ "type": "string"
444
457
  },
445
458
  {
446
459
  "name": "portal",
@@ -449,11 +462,16 @@
449
462
  },
450
463
  {
451
464
  "name": "user",
452
- "description": "The signed in user",
465
+ "description": "The user. Defaults to `portal.user` if omitted",
453
466
  "type": "PortalUser"
454
467
  }
455
468
  ],
456
- "events": []
469
+ "events": [
470
+ {
471
+ "name": "arcgisPortalReplacementItemFetch",
472
+ "type": "{ replacementItem: object | PortalItem | null; }"
473
+ }
474
+ ]
457
475
  }
458
476
  }
459
477
  ]
package/dist/index.d.ts CHANGED
@@ -37,6 +37,11 @@ export interface ArcgisPortalFieldDeleteCustomEvent<T> extends CustomEvent<T> {
37
37
  target: ArcgisPortalFieldDelete;
38
38
  currentTarget: ArcgisPortalFieldDelete;
39
39
  }
40
+ export interface ArcgisPortalReplacementItemRedirectCustomEvent<T> extends CustomEvent<T> {
41
+ detail: T;
42
+ target: ArcgisPortalReplacementItemRedirect;
43
+ currentTarget: ArcgisPortalReplacementItemRedirect;
44
+ }
40
45
 
41
46
  export { ToEvents, TargetedEvent } from "@arcgis/lumina";
42
47
 
@@ -73,6 +78,7 @@ declare global {
73
78
  type HTMLArcgisPortalFieldDeleteElement = ArcgisPortalFieldDelete;
74
79
 
75
80
 
81
+ type HTMLArcgisPortalReplacementItemRedirectElementEventMap = ArcgisPortalReplacementItemRedirect["@eventTypes"];
76
82
  type HTMLArcgisPortalReplacementItemRedirectElement = ArcgisPortalReplacementItemRedirect;
77
83
 
78
84
 
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { g as a, s as t } from "./chunks/runtime.js";
2
2
  import { c as o, a as r } from "./chunks/fieldAddDelete.js";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
5
- v5.0.0-next.126 */
5
+ v5.0.0-next.127 */
6
6
  export {
7
7
  o as canAddField,
8
8
  r as canDeleteField,
package/dist/loader.js CHANGED
@@ -2,7 +2,7 @@ import { r as e } from "./chunks/runtime.js";
2
2
  import { makeDefineCustomElements as t } from "@arcgis/lumina";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
5
- v5.0.0-next.126 */
5
+ v5.0.0-next.127 */
6
6
  const r = t(e, {
7
7
  "arcgis-portal-classification-banner": [() => import("./components/arcgis-portal-classification-banner/customElement.js"), "autoDestroyDisabled,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],
8
8
  "arcgis-portal-classification-config": [() => import("./components/arcgis-portal-classification-config/customElement.js"), "autoDestroyDisabled,portalItem:,status,valid,values;destroy,resetForm,validateForm"],
@@ -11,7 +11,7 @@ const r = t(e, {
11
11
  "arcgis-portal-extent-picker": [() => import("./components/arcgis-portal-extent-picker/customElement.js"), "active,contentOnly,extentService,extentValue:,isArea,itemId,portal:;;getExtent"],
12
12
  "arcgis-portal-extent-picker-coord-field": [() => import("./components/arcgis-portal-extent-picker-coord-field/customElement.js"), "errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],
13
13
  "arcgis-portal-field-delete": [() => import("./components/arcgis-portal-field-delete/customElement.js"), "config:,fieldNames:,layer:,mapView:,options:"],
14
- "arcgis-portal-replacement-item-redirect": [() => import("./components/arcgis-portal-replacement-item-redirect/customElement.js"), "item:,portal:,user:;setFocus"]
14
+ "arcgis-portal-replacement-item-redirect": [() => import("./components/arcgis-portal-replacement-item-redirect/customElement.js"), "itemId,portal:,user:;setFocus"]
15
15
  });
16
16
  export {
17
17
  r as defineCustomElements
@@ -35,7 +35,8 @@ interface LuminaArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDe
35
35
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
36
36
  }
37
37
 
38
- interface LuminaArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'item' | 'portal' | 'user'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalReplacementItemRedirectElement> {
38
+ interface LuminaArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'itemId' | 'portal' | 'user'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalReplacementItemRedirectElement> {
39
+ onarcgisPortalReplacementItemFetch?: EventHandler<HTMLArcgisPortalReplacementItemRedirectElement["arcgisPortalReplacementItemFetch"]>;
39
40
  }
40
41
 
41
42
  declare module "@arcgis/lumina" {
@@ -36,7 +36,8 @@ interface PreactArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDe
36
36
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
37
37
  }
38
38
 
39
- interface PreactArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'item' | 'portal' | 'user'>>, HTMLAttributes<HTMLArcgisPortalReplacementItemRedirectElement> {
39
+ interface PreactArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'itemId' | 'portal' | 'user'>>, HTMLAttributes<HTMLArcgisPortalReplacementItemRedirectElement> {
40
+ onarcgisPortalReplacementItemFetch?: EventHandler<HTMLArcgisPortalReplacementItemRedirectElement["arcgisPortalReplacementItemFetch"]>;
40
41
  }
41
42
 
42
43
  declare module 'preact' {
@@ -36,7 +36,8 @@ interface ReactArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDel
36
36
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
37
37
  }
38
38
 
39
- interface ReactArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'item' | 'portal' | 'user'>>, HTMLProps<HTMLArcgisPortalReplacementItemRedirectElement> {
39
+ interface ReactArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'itemId' | 'portal' | 'user'>>, HTMLProps<HTMLArcgisPortalReplacementItemRedirectElement> {
40
+ onarcgisPortalReplacementItemFetch?: EventHandler<HTMLArcgisPortalReplacementItemRedirectElement["arcgisPortalReplacementItemFetch"]>;
40
41
  }
41
42
 
42
43
  declare module "react" {
@@ -36,7 +36,8 @@ interface StencilArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldD
36
36
  onArcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
37
37
  }
38
38
 
39
- interface StencilArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'item' | 'portal' | 'user'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalReplacementItemRedirectElement> {
39
+ interface StencilArcgisPortalReplacementItemRedirect extends Partial<Pick<ArcgisPortalReplacementItemRedirect, 'itemId' | 'portal' | 'user'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalReplacementItemRedirectElement> {
40
+ onArcgisPortalReplacementItemFetch?: EventHandler<HTMLArcgisPortalReplacementItemRedirectElement["arcgisPortalReplacementItemFetch"]>;
40
41
  }
41
42
 
42
43
  interface ExposedElements {