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

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 (55) hide show
  1. package/dist/cdn/{RM6AIDDG.js → AHCZTVJ4.js} +2 -2
  2. package/dist/cdn/GCTJZYV7.js +4 -0
  3. package/dist/cdn/GIBWEC6K.js +4 -0
  4. package/dist/cdn/{KMD37AXG.js → HW5C3XJH.js} +1 -1
  5. package/dist/cdn/JA2VDMRG.js +4 -0
  6. package/dist/cdn/MKNHIW7X.js +4 -0
  7. package/dist/cdn/{K7OKVJO4.js → MX35WWUC.js} +2 -2
  8. package/dist/cdn/{DG5T5NHE.js → OY4KOUHF.js} +2 -2
  9. package/dist/cdn/P4LUN5GB.js +4 -0
  10. package/dist/cdn/{BXIFWHHK.js → SM2CK2AO.js} +2 -2
  11. package/dist/cdn/SV22LY6H.js +4 -0
  12. package/dist/cdn/{HWITQHPU.js → UCKMUAOS.js} +2 -2
  13. package/dist/cdn/WKZKBMHW.js +4 -0
  14. package/dist/cdn/{NY2LFOEQ.js → WNOLDDB4.js} +2 -2
  15. package/dist/cdn/{AZHELUFD.js → XUQULGNP.js} +1 -1
  16. package/dist/cdn/{26TRY2HX.js → YMTH6GIB.js} +2 -2
  17. package/dist/cdn/{XBTBPX2A.js → ZXAIECQ4.js} +2 -2
  18. package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.en.json +1 -0
  19. package/dist/cdn/index.js +2 -2
  20. package/dist/cdn/main.css +1 -1
  21. package/dist/chunks/common.js +1 -1
  22. package/dist/chunks/fieldAddDelete.js +148 -234
  23. package/dist/chunks/item.js +103 -0
  24. package/dist/chunks/loadClassificationData.js +1 -1
  25. package/dist/chunks/requests.js +1 -1
  26. package/dist/chunks/runtime.js +1 -1
  27. package/dist/chunks/useT9n.js +1 -1
  28. package/dist/components/arcgis-portal-classification-banner/customElement.js +1 -1
  29. package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
  30. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  31. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  32. package/dist/components/arcgis-portal-extent-picker/customElement.js +1 -1
  33. package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +1 -1
  34. package/dist/components/arcgis-portal-field-delete/customElement.js +34 -33
  35. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.d.ts +24 -0
  36. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +72 -0
  37. package/dist/components/arcgis-portal-replacement-item-redirect/index.d.ts +4 -0
  38. package/dist/components/arcgis-portal-replacement-item-redirect/index.js +4 -0
  39. package/dist/docs/api.json +159 -2
  40. package/dist/docs/docs.json +165 -2
  41. package/dist/docs/vscode.html-custom-data.json +6 -0
  42. package/dist/docs/web-types.json +27 -1
  43. package/dist/index.d.ts +5 -0
  44. package/dist/index.js +1 -1
  45. package/dist/loader.js +3 -2
  46. package/dist/types/lumina.d.ts +5 -0
  47. package/dist/types/preact.d.ts +6 -0
  48. package/dist/types/react.d.ts +7 -0
  49. package/dist/types/stencil.d.ts +5 -0
  50. package/package.json +4 -3
  51. package/dist/cdn/CUDVRICK.js +0 -4
  52. package/dist/cdn/J6M2MF6L.js +0 -4
  53. package/dist/cdn/KRHBOI3V.js +0 -4
  54. package/dist/cdn/NHYKXE24.js +0 -4
  55. package/dist/cdn/YJVU6YU3.js +0 -4
@@ -1,360 +1,274 @@
1
1
  import * as p from "@arcgis/core/layers/support/fieldUtils.js";
2
- import K from "@arcgis/core/layers/support/FeatureReductionBinning.js";
3
- import _ from "@arcgis/core/layers/support/FeatureReductionCluster.js";
4
- import * as T from "@arcgis/core/renderers/support/jsonUtils.js";
5
- import L from "@arcgis/core/request.js";
6
- import * as v from "@arcgis/core/core/sql.js";
2
+ import Q from "@arcgis/core/layers/support/FeatureReductionBinning.js";
3
+ import q from "@arcgis/core/layers/support/FeatureReductionCluster.js";
4
+ import * as R from "@arcgis/core/renderers/support/jsonUtils.js";
5
+ import x from "@arcgis/core/request.js";
6
+ import * as L from "@arcgis/core/core/sql.js";
7
+ import { i as J, b as N, l as T, c as G, d as H, u as P, e as E, f as D, h as V, g as C, a as z } from "./item.js";
7
8
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
9
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
9
- v5.0.0-next.124 */
10
- var b = /* @__PURE__ */ ((e) => (e.expression = "expression/", e.raster = "Raster.", e.relationship = "relationships/", e))(b || {});
11
- const H = ["feature"];
12
- function z(e) {
13
- return "fieldConfigurations" in e && H.includes(e.type);
10
+ v5.0.0-next.126 */
11
+ var O = /* @__PURE__ */ ((r) => (r.expression = "expression/", r.raster = "Raster.", r.relationship = "relationships/", r))(O || {});
12
+ const K = ["feature"];
13
+ function X(r) {
14
+ return "fieldConfigurations" in r && K.includes(r.type);
14
15
  }
15
- function x(e) {
16
- return e != null;
16
+ function b(r) {
17
+ return r != null;
17
18
  }
18
- function be(e, r, t) {
19
- const i = r.fieldName;
20
- if (i.includes(b.expression)) {
21
- const s = t.get(i);
22
- return s?.title ? s.title : i;
23
- } else return z(e) && e.getFieldConfiguration(i) ? e.getFieldAlias(i) || i : r.label || i;
19
+ function Oe(r, e, i) {
20
+ const t = e.fieldName;
21
+ if (t.includes(O.expression)) {
22
+ const s = i.get(t);
23
+ return s?.title ? s.title : t;
24
+ } else return X(r) && r.getFieldConfiguration(t) ? r.getFieldAlias(t) || t : e.label || t;
24
25
  }
25
- function Re(e, r, t) {
26
- let i = "";
27
- if (/^raster.(?:item|service)pixelvalue/iu.test(e))
28
- i = "number";
29
- else if (r.has(e)) {
30
- const s = r.get(e);
31
- i = s.type ? s.type.toLowerCase() : "";
32
- } else if (t.has(e)) {
33
- const s = t.get(e);
34
- i = s.returnType ? s.returnType.toLowerCase() : "";
26
+ function ve(r, e, i) {
27
+ let t = "";
28
+ if (/^raster.(?:item|service)pixelvalue/iu.test(r))
29
+ t = "number";
30
+ else if (e.has(r)) {
31
+ const s = e.get(r);
32
+ t = s.type ? s.type.toLowerCase() : "";
33
+ } else if (i.has(r)) {
34
+ const s = i.get(r);
35
+ t = s.returnType ? s.returnType.toLowerCase() : "";
35
36
  } else
36
- i = "number";
37
- return i;
37
+ t = "number";
38
+ return t;
38
39
  }
39
- async function xe(e) {
40
+ async function be(r) {
40
41
  return new Map(
41
- (await X(e)).filter((r) => r.visible).map((r) => [r.name, r])
42
+ (await Y(r)).filter((e) => e.visible).map((e) => [e.name, e])
42
43
  );
43
44
  }
44
- function Te(e) {
45
- const r = /* @__PURE__ */ new Map();
46
- return e?.expressionInfos && e.expressionInfos.forEach((t) => {
47
- const i = `${b.expression}${t.name}`;
48
- r.set(i, t);
49
- }), r;
45
+ function Re(r) {
46
+ const e = /* @__PURE__ */ new Map();
47
+ return r?.expressionInfos && r.expressionInfos.forEach((i) => {
48
+ const t = `${O.expression}${i.name}`;
49
+ e.set(t, i);
50
+ }), e;
50
51
  }
51
- async function X(e) {
52
- return await new Promise((r, t) => {
53
- switch (e.type) {
52
+ async function Y(r) {
53
+ return await new Promise((e, i) => {
54
+ switch (r.type) {
54
55
  case "feature":
55
56
  case "ogc-feature":
56
57
  case "stream":
57
- r(e.fields);
58
+ e(r.fields);
58
59
  break;
59
60
  case "sublayer": {
60
- const i = e, s = i?.layer;
61
+ const t = r, s = t?.layer;
61
62
  s?.portalItem && s.url.includes("https://demographics") && s.url.includes(".arcgis.com") ? s.portalItem?.fetchData().then((n) => {
62
63
  if (n?.thematicGroup) {
63
64
  const a = new Map(
64
- i.fields.map((d) => [d.name, d])
65
- ), l = n.thematicGroup.fieldNames, c = [];
66
- l.forEach((d) => {
67
- a.has(d) && c.push(a.get(d));
68
- }), r(c);
65
+ t.fields.map((l) => [l.name, l])
66
+ ), f = n.thematicGroup.fieldNames, c = [];
67
+ f.forEach((l) => {
68
+ a.has(l) && c.push(a.get(l));
69
+ }), e(c);
69
70
  } else
70
- r(i.fields);
71
+ e(t.fields);
71
72
  }).catch((n) => {
72
- t(new Error(n));
73
- }) : r(i.fields);
73
+ i(new Error(n));
74
+ }) : e(t.fields);
74
75
  break;
75
76
  }
76
77
  case "imagery":
77
78
  case "imagery-tile":
78
79
  case "wcs":
79
- r(e.rasterFields);
80
+ e(r.rasterFields);
80
81
  break;
81
82
  default:
82
- r("fields" in e ? e.fields ?? [] : []);
83
+ e("fields" in r ? r.fields ?? [] : []);
83
84
  }
84
85
  });
85
86
  }
86
- const Y = (e) => e && !e.endsWith("/") ? `${e}/` : e;
87
- function O(e) {
88
- return Y(e.restUrl);
87
+ function o(r, e) {
88
+ return !r || !e ? !1 : r.toLocaleLowerCase() === e.toLocaleLowerCase();
89
89
  }
90
- function P(e, r) {
91
- return G(e, r) || Z(e, r);
92
- }
93
- function G(e, r) {
94
- return e.owner === r.username;
95
- }
96
- function Z(e, r) {
97
- const t = e.owner, i = e.itemControl === "admin", s = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
98
- return e.portal?.isPortal && !G(e, r) && i && t?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
99
- !s.includes(t) ? !1 : i;
100
- }
101
- function ee(e) {
102
- return e.typeKeywords?.includes("Spatiotemporal");
103
- }
104
- function J(e) {
105
- return e.typeKeywords?.includes("View Service");
106
- }
107
- function N(e) {
108
- return e.typeKeywords?.includes("Hosted Service");
109
- }
110
- function E(e) {
111
- return e.typeKeywords?.includes("Multi Services View");
112
- }
113
- function V(e) {
114
- return e?.hasViews && !e.sourceSchemaChangesAllowed;
115
- }
116
- async function D(e) {
117
- const r = e?.portalItem;
118
- if (!r)
119
- return await Promise.resolve(null);
120
- const t = r.portal;
121
- if (t?.user) {
122
- const i = `${O(t)}community/users/${t.user.username}`;
123
- return await L(i, {
124
- query: {
125
- f: "json",
126
- token: r.portal.credential?.token
127
- },
128
- responseType: "json"
129
- }).then(
130
- async (s) => {
131
- const n = s.data?.groups ?? [];
132
- return await Promise.resolve(n);
133
- },
134
- async () => await Promise.reject(new Error("Failed to fetch user groups"))
135
- );
136
- }
137
- return await Promise.resolve(null);
138
- }
139
- async function k(e) {
140
- const r = e?.portalItem;
141
- if (!r)
142
- return await Promise.resolve(null);
143
- const t = r.portal, i = `${O(t)}content/items/${r.id}/groups`;
144
- return await L(i, {
145
- query: {
146
- f: "json",
147
- token: r.portal.credential?.token
148
- },
149
- responseType: "json"
150
- }).then(
151
- async (s) => {
152
- const n = s.data?.admin ?? [], a = s.data?.member ?? [], l = s.data?.other ?? [], c = [...n, ...a, ...l];
153
- return await Promise.resolve(c);
154
- },
155
- async () => await Promise.reject(new Error("Failed to fetch item groups"))
156
- );
157
- }
158
- async function C(e, r, { relationshipType: t, direction: i }) {
159
- const s = `${O(r)}content/items/${e}/relatedItems`;
160
- return await L(s, {
161
- query: { f: "json", relationshipType: t, direction: i },
162
- responseType: "json"
163
- });
164
- }
165
- function j(e, r) {
166
- return e?.some(
167
- (t) => r?.some(
168
- (i) => t.id === i.id && t.capabilities.includes("updateitemcontrol")
169
- )
170
- );
171
- }
172
- function o(e, r) {
173
- return !e || !r ? !1 : e.toLocaleLowerCase() === r.toLocaleLowerCase();
174
- }
175
- async function Pe(e) {
176
- const r = ["feature", "oriented-imagery"].includes(e.type), t = e?.portalItem, i = e.sourceJSON;
177
- if (!r || !t)
90
+ async function xe(r) {
91
+ const e = ["feature", "oriented-imagery"].includes(r.type), i = r?.portalItem, t = r.sourceJSON;
92
+ if (!e || !i)
178
93
  return !1;
179
- const s = t.portal;
180
- if (!s?.user || J(t) || !N(t) || E(t) || V(i))
94
+ const s = i.portal;
95
+ if (!s?.user || N(i) || !J(i) || T(i) || G(t))
181
96
  return !1;
182
- const d = P(t, s.user), I = await D(e) ?? [], F = await k(e) ?? [], f = j(I, F);
183
- if (!d && !f)
97
+ const l = P(i, s.user), I = await E(r) ?? [], F = await D(r) ?? [], u = V(I, F);
98
+ if (!l && !u)
184
99
  return !1;
185
- const h = await C(t.id, s, {
100
+ const S = await C(i.id, s, {
186
101
  relationshipType: "Service2Service"
187
102
  });
188
- return !(h?.data?.relatedItems && h.data.relatedItems.some(
189
- (S) => ["WMTS", "Map Service", "Vector Tile Service"].includes(S.type)
103
+ return !(S?.data?.relatedItems && S.data.relatedItems.some(
104
+ (g) => ["WMTS", "Map Service", "Vector Tile Service"].includes(g.type)
190
105
  ));
191
106
  }
192
- async function Ge(e, r, t, i) {
193
- if (!t)
107
+ async function Je(r, e, i, t) {
108
+ if (!i)
194
109
  return !1;
195
- const s = ["feature", "oriented-imagery"].includes(r.type), n = i?.item ?? r.portalItem, a = r.sourceJSON;
196
- if (!s || !n || !n.portal.user || !N(n) || J(n) || E(n) || V(a) || n.portal.isPortal && ee(n) || ["oid", "global-id", "geometry"].includes(t.type) || await re(r, t.name, i))
110
+ const s = ["feature", "oriented-imagery"].includes(e.type), n = t?.item ?? e.portalItem, a = e.sourceJSON;
111
+ if (!s || !n || !n.portal.user || !J(n) || N(n) || T(n) || G(a) || n.portal.isPortal && H(n) || ["oid", "global-id", "geometry"].includes(i.type) || await Z(e, i.name, t))
197
112
  return !1;
198
- const w = r.sourceJSON.geometryProperties, S = w?.shapeLengthFieldName, M = w?.shapeAreaFieldName;
199
- if (o(S, t.name) || o(M, t.name))
113
+ const w = e.sourceJSON.geometryProperties, g = w?.shapeLengthFieldName, M = w?.shapeAreaFieldName;
114
+ if (o(g, i.name) || o(M, i.name))
200
115
  return !1;
201
- const g = r.editFieldsInfo;
202
- if (g && (o(g.creationDateField, t.name) || o(g.creatorField, t.name) || o(g.editDateField, t.name) || o(g.editorField, t.name)) || o(r.objectIdField, t.name) || o(r.displayField, t.name) || o(r.typeIdField, t.name) || o(r.subtypeField, t.name) || r.timeInfo && (o(r.timeInfo.startField, t.name) || o(r.timeInfo.endField, t.name) || o(r.timeInfo.trackIdField, t.name)))
116
+ const y = e.editFieldsInfo;
117
+ if (y && (o(y.creationDateField, i.name) || o(y.creatorField, i.name) || o(y.editDateField, i.name) || o(y.editorField, i.name)) || o(e.objectIdField, i.name) || o(e.displayField, i.name) || o(e.typeIdField, i.name) || o(e.subtypeField, i.name) || e.timeInfo && (o(e.timeInfo.startField, i.name) || o(e.timeInfo.endField, i.name) || o(e.timeInfo.trackIdField, i.name)))
203
118
  return !1;
204
- if (!i?.ignoreLayerRenderer && r.featureReduction) {
205
- const u = /* @__PURE__ */ new Set();
119
+ if (!t?.ignoreLayerRenderer && e.featureReduction) {
120
+ const d = /* @__PURE__ */ new Set();
206
121
  if (await p.collectFeatureReductionFields(
207
- u,
208
- r,
209
- r.featureReduction
210
- ), Array.from(u).some(
211
- (y) => o(y, t.name)
122
+ d,
123
+ e,
124
+ e.featureReduction
125
+ ), Array.from(d).some(
126
+ (h) => o(h, i.name)
212
127
  ))
213
128
  return !1;
214
129
  }
215
- if (!i?.ignoreLayerRenderer && (await p.getRendererFields(r.renderer, r.fieldsIndex)).some((y) => o(y, t.name)))
130
+ if (!t?.ignoreLayerRenderer && (await p.getRendererFields(e.renderer, e.fieldsIndex)).some((h) => o(h, i.name)))
216
131
  return !1;
217
- if (!i?.ignoreLayerLabelingInfo) {
218
- const u = r.labelingInfo?.map(
132
+ if (!t?.ignoreLayerLabelingInfo) {
133
+ const d = e.labelingInfo?.map(
219
134
  (m) => m.labelExpressionInfo?.expression
220
135
  );
221
- if (u && ((await p.getExpressionFields(r, u)).some((Q) => o(Q, t.name)) || await A(r, t, "layer")))
136
+ if (d && ((await p.getExpressionFields(e, d)).some(($) => o($, i.name)) || await k(e, i, "layer")))
222
137
  return !1;
223
138
  }
224
- if (!i?.ignoreLayerDefinitionExpression && r.definitionExpression && (await v.parseWhereClause(r.definitionExpression, r.fieldsIndex)).fieldNames.some((y) => o(y, t.name)) || await ie(r, t, i) || await se(r, t))
139
+ if (!t?.ignoreLayerDefinitionExpression && e.definitionExpression && (await L.parseWhereClause(e.definitionExpression, e.fieldsIndex)).fieldNames.some((h) => o(h, i.name)) || await ee(e, i, t) || await re(e, i))
225
140
  return !1;
226
- if (await ne(r, t))
141
+ if (await ie(e, i))
227
142
  return await Promise.resolve(!1);
228
- if (await ae(r, t))
143
+ if (await te(e, i))
229
144
  return await Promise.resolve(!1);
230
- if (te(e, r, t) || r.relationships?.map((u) => u.keyField)?.some((u) => o(u, t.name)))
145
+ if (_(r, e, i) || e.relationships?.map((d) => d.keyField)?.some((d) => o(d, i.name)))
231
146
  return !1;
232
- const $ = P(n, n.portal.user), W = i?.userItemInfo?.userGroups ?? await D(r) ?? [], q = i?.userItemInfo?.itemGroups ?? await k(r) ?? [], B = j(W, q);
233
- if (!$ && !B)
147
+ const U = P(n, n.portal.user), j = t?.userItemInfo?.userGroups ?? await E(e) ?? [], W = t?.userItemInfo?.itemGroups ?? await D(e) ?? [], B = V(j, W);
148
+ if (!U && !B)
234
149
  return !1;
235
- const R = i?.userItemInfo?.relatedItems ?? await C(n.id, n.portal, {
150
+ const v = t?.userItemInfo?.relatedItems ?? await C(n.id, n.portal, {
236
151
  relationshipType: "Service2Service"
237
152
  });
238
- return !(R?.data?.relatedItems && R.data.relatedItems.some(
153
+ return !(v?.data?.relatedItems && v.data.relatedItems.some(
239
154
  (m) => ["WMTS", "Map Service", "Vector Tile Service"].includes(m.type)
240
155
  ));
241
156
  }
242
- async function re(e, r, t) {
243
- const i = `${e.url}/${e.layerId}/fieldGroups`, s = t?.userItemInfo && "fieldGroups" in t.userItemInfo ? t.userItemInfo.fieldGroups : (await L(i, {
157
+ async function Z(r, e, i) {
158
+ const t = `${r.url}/${r.layerId}/fieldGroups`, s = i?.userItemInfo && "fieldGroups" in i.userItemInfo ? i.userItemInfo.fieldGroups : (await x(t, {
244
159
  query: { f: "json" },
245
160
  responseType: "json"
246
161
  }))?.data?.fieldGroups;
247
162
  return s ? s.some(
248
- (a) => a.fields.some((l) => o(l, r))
163
+ (a) => a.fields.some((f) => o(f, e))
249
164
  ) : !1;
250
165
  }
251
- function te(e, r, t) {
252
- if (!e)
166
+ function _(r, e, i) {
167
+ if (!r)
253
168
  return !1;
254
- const i = e.map?.applicationProperties?.viewing?.search;
255
- if (i) {
256
- const s = i.layers?.find((n) => n.id === r.id);
169
+ const t = r.map?.applicationProperties?.viewing?.search;
170
+ if (t) {
171
+ const s = t.layers?.find((n) => n.id === e.id);
257
172
  if (s) {
258
173
  const n = s?.field?.name;
259
174
  if (n)
260
- return o(n, t.name);
175
+ return o(n, i.name);
261
176
  }
262
177
  }
263
178
  return !1;
264
179
  }
265
- async function A(e, r, t) {
266
- const i = t === "layer" ? e.labelingInfo?.filter((a) => x(a.where)) : e.sourceJSON?.drawingInfo?.labelingInfo?.filter((a) => x(a.where));
267
- if (!i?.length)
180
+ async function k(r, e, i) {
181
+ const t = i === "layer" ? r.labelingInfo?.filter((a) => b(a.where)) : r.sourceJSON?.drawingInfo?.labelingInfo?.filter((a) => b(a.where));
182
+ if (!t?.length)
268
183
  return !1;
269
184
  const s = [
270
185
  ...await Promise.all(
271
- i.map(
272
- async (a) => await v.parseWhereClause(a.where, e.fieldsIndex)
186
+ t.map(
187
+ async (a) => await L.parseWhereClause(a.where, r.fieldsIndex)
273
188
  )
274
189
  )
275
190
  ];
276
191
  let n = !1;
277
192
  for (let a = 0; a < s.length; a++) {
278
- const l = s[a].fieldNames?.some((c) => o(c, r.name));
279
- if (!n && l) {
193
+ const f = s[a].fieldNames?.some((c) => o(c, e.name));
194
+ if (!n && f) {
280
195
  n = !0;
281
196
  break;
282
197
  }
283
198
  }
284
199
  return await Promise.resolve(n);
285
200
  }
286
- async function ie(e, r, t) {
287
- const i = e.portalItem;
288
- if (!i)
201
+ async function ee(r, e, i) {
202
+ const t = r.portalItem;
203
+ if (!t)
289
204
  return !1;
290
- const s = `${O(i.portal)}content/items/${i.id}/data`, a = (t?.userItemInfo?.itemData ?? await L(s, {
205
+ const s = `${z(t.portal)}content/items/${t.id}/data`, a = (i?.userItemInfo?.itemData ?? await x(s, {
291
206
  query: { f: "json" },
292
207
  responseType: "json"
293
208
  }))?.data;
294
209
  if (!a)
295
210
  return !1;
296
211
  if (a?.layers) {
297
- const c = a.layers.find((f) => f.id === e.layerId), d = c?.layerDefinition?.drawingInfo?.renderer, I = c?.layerDefinition?.featureReduction, F = c?.layerDefinition?.definitionExpression;
298
- if (!d && !I && !F)
212
+ const c = a.layers.find((u) => u.id === r.layerId), l = c?.layerDefinition?.drawingInfo?.renderer, I = c?.layerDefinition?.featureReduction, F = c?.layerDefinition?.definitionExpression;
213
+ if (!l && !I && !F)
299
214
  return !1;
300
- if (!t?.ignoreItemRenderer && d) {
301
- const f = T.fromJSON(d);
302
- if ((await p.getRendererFields(f, e.fieldsIndex)).some((S) => o(S, r.name)))
215
+ if (!i?.ignoreItemRenderer && l) {
216
+ const u = R.fromJSON(l);
217
+ if ((await p.getRendererFields(u, r.fieldsIndex)).some((g) => o(g, e.name)))
303
218
  return !0;
304
219
  }
305
- if (!t?.ignoreItemFeatureReduction && I && await U(e, r, I) || F && (await v.parseWhereClause(F, e.fieldsIndex)).fieldNames.some((w) => o(w, r.name)))
220
+ if (!i?.ignoreItemFeatureReduction && I && await A(r, e, I) || F && (await L.parseWhereClause(F, r.fieldsIndex)).fieldNames.some((w) => o(w, e.name)))
306
221
  return !0;
307
222
  }
308
223
  return !1;
309
224
  }
310
- async function se(e, r) {
311
- const t = e.sourceJSON, i = t?.drawingInfo?.renderer, s = t?.featureReduction;
312
- if (!i && !s)
225
+ async function re(r, e) {
226
+ const i = r.sourceJSON, t = i?.drawingInfo?.renderer, s = i?.featureReduction;
227
+ if (!t && !s)
313
228
  return !1;
314
- if (i) {
315
- const n = T.fromJSON(i);
316
- if ((await p.getRendererFields(n, e.fieldsIndex)).some((c) => o(c, r.name)))
229
+ if (t) {
230
+ const n = R.fromJSON(t);
231
+ if ((await p.getRendererFields(n, r.fieldsIndex)).some((c) => o(c, e.name)))
317
232
  return !0;
318
233
  }
319
- return !!(s && await U(
320
- e,
234
+ return !!(s && await A(
321
235
  r,
236
+ e,
322
237
  s
323
238
  ));
324
239
  }
325
- async function ne(e, r) {
326
- const i = e.sourceJSON?.drawingInfo?.labelingInfo;
327
- if (!i)
240
+ async function ie(r, e) {
241
+ const t = r.sourceJSON?.drawingInfo?.labelingInfo;
242
+ if (!t)
328
243
  return await Promise.resolve(!1);
329
- const s = i?.map(
244
+ const s = t?.map(
330
245
  (n) => n.labelExpressionInfo?.expression
331
246
  );
332
247
  if (s) {
333
- if ((await p.getExpressionFields(e, s)).some((c) => o(c, r.name)))
248
+ if ((await p.getExpressionFields(r, s)).some((c) => o(c, e.name)))
334
249
  return await Promise.resolve(!0);
335
- if (await A(e, r, "service"))
250
+ if (await k(r, e, "service"))
336
251
  return await Promise.resolve(!0);
337
252
  }
338
253
  return await Promise.resolve(!1);
339
254
  }
340
- async function ae(e, r) {
341
- const i = e.sourceJSON?.definitionQuery;
342
- return i ? (await v.parseWhereClause(i, e.fieldsIndex)).fieldNames.some((a) => o(a, r.name)) ? await Promise.resolve(!0) : await Promise.resolve(!1) : await Promise.resolve(!1);
255
+ async function te(r, e) {
256
+ const t = r.sourceJSON?.definitionQuery;
257
+ return t ? (await L.parseWhereClause(t, r.fieldsIndex)).fieldNames.some((a) => o(a, e.name)) ? await Promise.resolve(!0) : await Promise.resolve(!1) : await Promise.resolve(!1);
343
258
  }
344
- async function U(e, r, t) {
345
- const i = t.type === "binning" ? K.fromJSON(t) : _.fromJSON(t), s = /* @__PURE__ */ new Set();
346
- return await p.collectFeatureReductionFields(s, e, i), !!Array.from(s).some(
347
- (a) => o(a, r.name)
259
+ async function A(r, e, i) {
260
+ const t = i.type === "binning" ? Q.fromJSON(i) : q.fromJSON(i), s = /* @__PURE__ */ new Set();
261
+ return await p.collectFeatureReductionFields(s, r, t), !!Array.from(s).some(
262
+ (a) => o(a, e.name)
348
263
  );
349
264
  }
350
265
  export {
351
- Ge as a,
352
- Te as b,
353
- Pe as c,
354
- be as d,
355
- O as e,
356
- Re as f,
357
- xe as g,
358
- x as i,
359
- z as s
266
+ Je as a,
267
+ Re as b,
268
+ xe as c,
269
+ Oe as d,
270
+ ve as e,
271
+ be as g,
272
+ b as i,
273
+ X as s
360
274
  };
@@ -0,0 +1,103 @@
1
+ import i from "@arcgis/core/request.js";
2
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ v5.0.0-next.126 */
5
+ const m = (e) => e && !e.endsWith("/") ? `${e}/` : e;
6
+ function a(e) {
7
+ return m(e.restUrl);
8
+ }
9
+ function w(e, r) {
10
+ return u(e, r) || p(e, r);
11
+ }
12
+ function u(e, r) {
13
+ return e.owner === r.username;
14
+ }
15
+ function p(e, r) {
16
+ const t = e.owner, n = e.itemControl === "admin", s = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
17
+ return e.portal?.isPortal && !u(e, r) && n && t?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
18
+ !s.includes(t) ? !1 : n;
19
+ }
20
+ function y(e) {
21
+ return e.typeKeywords?.includes("Spatiotemporal");
22
+ }
23
+ function g(e) {
24
+ return e.typeKeywords?.includes("View Service");
25
+ }
26
+ function h(e) {
27
+ return e.typeKeywords?.includes("Hosted Service");
28
+ }
29
+ function v(e) {
30
+ return e.typeKeywords?.includes("Multi Services View");
31
+ }
32
+ function I(e) {
33
+ return e?.hasViews && !e.sourceSchemaChangesAllowed;
34
+ }
35
+ async function P(e) {
36
+ const r = e?.portalItem;
37
+ if (!r)
38
+ return await Promise.resolve(null);
39
+ const t = r.portal;
40
+ if (t?.user) {
41
+ const n = `${a(t)}community/users/${t.user.username}`;
42
+ return await i(n, {
43
+ query: {
44
+ f: "json",
45
+ token: r.portal.credential?.token
46
+ },
47
+ responseType: "json"
48
+ }).then(
49
+ async (s) => {
50
+ const o = s.data?.groups ?? [];
51
+ return await Promise.resolve(o);
52
+ },
53
+ async () => await Promise.reject(new Error("Failed to fetch user groups"))
54
+ );
55
+ }
56
+ return await Promise.resolve(null);
57
+ }
58
+ async function S(e) {
59
+ const r = e?.portalItem;
60
+ if (!r)
61
+ return await Promise.resolve(null);
62
+ const t = r.portal, n = `${a(t)}content/items/${r.id}/groups`;
63
+ return await i(n, {
64
+ query: {
65
+ f: "json",
66
+ token: r.portal.credential?.token
67
+ },
68
+ responseType: "json"
69
+ }).then(
70
+ async (s) => {
71
+ const o = s.data?.admin ?? [], c = s.data?.member ?? [], l = s.data?.other ?? [], d = [...o, ...c, ...l];
72
+ return await Promise.resolve(d);
73
+ },
74
+ async () => await Promise.reject(new Error("Failed to fetch item groups"))
75
+ );
76
+ }
77
+ async function j(e, r, { relationshipType: t, direction: n }) {
78
+ const s = `${a(r)}content/items/${e}/relatedItems`;
79
+ return await i(s, {
80
+ query: { f: "json", relationshipType: t, direction: n },
81
+ responseType: "json"
82
+ });
83
+ }
84
+ function G(e, r) {
85
+ return e?.some(
86
+ (t) => r?.some(
87
+ (n) => t.id === n.id && t.capabilities.includes("updateitemcontrol")
88
+ )
89
+ );
90
+ }
91
+ export {
92
+ a,
93
+ g as b,
94
+ I as c,
95
+ y as d,
96
+ P as e,
97
+ S as f,
98
+ j as g,
99
+ G as h,
100
+ h as i,
101
+ v as l,
102
+ w as u
103
+ };
@@ -6,7 +6,7 @@ import { makeAccessorController as C } from "@arcgis/lumina/controllers/accessor
6
6
  import { Task as v } from "@lit/task";
7
7
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
8
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
9
- v5.0.0-next.124 */
9
+ v5.0.0-next.126 */
10
10
  var w = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (i, a, s, t) => {
11
11
  for (var r = t > 1 ? void 0 : t ? g(a, s) : a, l = i.length - 1, c; l >= 0; l--)
12
12
  (c = i[l]) && (r = (t ? c(a, s, r) : c(r)) || r);
@@ -2,7 +2,7 @@ import n from "@arcgis/core/request.js";
2
2
  import { once as c } from "@arcgis/core/core/reactiveUtils.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.124 */
5
+ v5.0.0-next.126 */
6
6
  async function f(s, t) {
7
7
  const i = `${s}/portals/self/classification/classificationSchema`, e = {};
8
8
  try {
@@ -3,7 +3,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
3
3
  import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
4
4
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
6
- v5.0.0-next.124 */
6
+ v5.0.0-next.126 */
7
7
  const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/5.0.0-next/portal-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
8
8
  t.t = s;
9
9
  t.o = r;
@@ -2,7 +2,7 @@ import { makeT9nController as o } from "@arcgis/lumina/controllers";
2
2
  import { g as t } from "./runtime.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.124 */
5
+ v5.0.0-next.126 */
6
6
  const s = o(t);
7
7
  export {
8
8
  s as u