@arcgis/portal-components 5.0.0-next.3 → 5.0.0-next.30

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 (44) hide show
  1. package/dist/cdn/37CJ7ZPN.js +4 -0
  2. package/dist/cdn/FDM2BMZA.js +4 -0
  3. package/dist/cdn/{4QBFY5OP.js → FSOTAKZX.js} +1 -1
  4. package/dist/cdn/{3E2NFBND.js → KRDSIQXE.js} +2 -2
  5. package/dist/cdn/L2AL45PM.js +4 -0
  6. package/dist/cdn/{CIYPYRHE.js → MDUJY57T.js} +1 -1
  7. package/dist/cdn/{DEE3QN4F.js → MGZ6ORVU.js} +2 -2
  8. package/dist/cdn/{O6EO42RZ.js → OSRC3N4T.js} +1 -1
  9. package/dist/cdn/OUZUMGSZ.js +4 -0
  10. package/dist/cdn/{PSHOQPAF.js → QIDBTFOE.js} +2 -2
  11. package/dist/cdn/{ONNLMSTK.js → SESGKCYZ.js} +2 -2
  12. package/dist/cdn/{PM4HJ7VO.js → Y65ESENL.js} +2 -2
  13. package/dist/cdn/index.js +2 -2
  14. package/dist/chunks/common.js +1 -1
  15. package/dist/chunks/fieldAddDelete.js +60 -56
  16. package/dist/chunks/loadClassificationData.js +1 -1
  17. package/dist/chunks/requests.js +1 -1
  18. package/dist/chunks/runtime.js +1 -1
  19. package/dist/chunks/useT9n.js +1 -1
  20. package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
  21. package/dist/components/arcgis-portal-classification-config/customElement.d.ts +1 -1
  22. package/dist/components/arcgis-portal-classification-config/customElement.js +111 -103
  23. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  24. package/dist/components/arcgis-portal-classification-form-element/customElement.d.ts +2 -1
  25. package/dist/components/arcgis-portal-classification-form-element/customElement.js +12 -12
  26. package/dist/components/arcgis-portal-field-delete/customElement.d.ts +2 -2
  27. package/dist/components/arcgis-portal-field-delete/customElement.js +22 -22
  28. package/dist/controllers/useClassificationModel.d.ts +1 -1
  29. package/dist/docs/api.json +19 -3
  30. package/dist/docs/docs.json +27 -5
  31. package/dist/docs/web-types.json +7 -3
  32. package/dist/index.js +1 -1
  33. package/dist/loader.js +2 -2
  34. package/dist/types/lumina.d.ts +1 -1
  35. package/dist/types/preact.d.ts +1 -1
  36. package/dist/types/preact10.d.ts +1 -1
  37. package/dist/types/react.d.ts +1 -1
  38. package/dist/types/stencil.d.ts +1 -1
  39. package/dist/utils/commonFunctions.d.ts +2 -1
  40. package/package.json +4 -4
  41. package/dist/cdn/KKDTLB74.js +0 -4
  42. package/dist/cdn/UMPZ42LP.js +0 -4
  43. package/dist/cdn/UYBAWNXV.js +0 -4
  44. package/dist/cdn/XMKXVPWL.js +0 -4
@@ -2,24 +2,27 @@ import * as I from "@arcgis/core/layers/support/fieldUtils.js";
2
2
  import Q from "@arcgis/core/layers/support/FeatureReductionBinning.js";
3
3
  import K from "@arcgis/core/layers/support/FeatureReductionCluster.js";
4
4
  import * as T from "@arcgis/core/renderers/support/jsonUtils.js";
5
- import v from "@arcgis/core/request.js";
6
- import * as L from "@arcgis/core/core/sql.js";
5
+ import L from "@arcgis/core/request.js";
6
+ import * as v from "@arcgis/core/core/sql.js";
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.3 */
9
+ v5.0.0-next.30 */
10
10
  var b = /* @__PURE__ */ ((e) => (e.expression = "expression/", e.raster = "Raster.", e.relationship = "relationships/", e))(b || {});
11
+ const _ = ["feature"];
12
+ function H(e) {
13
+ return "fieldConfigurations" in e && _.includes(e.type);
14
+ }
11
15
  function x(e) {
12
16
  return e != null;
13
17
  }
14
- function ge(e, t) {
15
- const r = e.fieldName;
16
- if (r.includes(b.expression)) {
17
- const i = t.get(r);
18
- return i?.title ? i.title : r;
19
- } else
20
- return e.label ? e.label : r;
21
- }
22
18
  function ve(e, t, r) {
19
+ const i = t.fieldName;
20
+ if (i.includes(b.expression)) {
21
+ const s = r.get(i);
22
+ return s?.title ? s.title : i;
23
+ } else return H(e) && e.getFieldConfiguration(i) ? e.getFieldAlias(i) || i : t.label || i;
24
+ }
25
+ function Oe(e, t, r) {
23
26
  let i = "";
24
27
  if (/^raster.(?:item|service)pixelvalue/iu.test(e))
25
28
  i = "number";
@@ -33,19 +36,19 @@ function ve(e, t, r) {
33
36
  i = "number";
34
37
  return i;
35
38
  }
36
- async function Le(e) {
39
+ async function be(e) {
37
40
  return new Map(
38
- (await _(e)).filter((t) => t.visible).map((t) => [t.name, t])
41
+ (await z(e)).filter((t) => t.visible).map((t) => [t.name, t])
39
42
  );
40
43
  }
41
- function Oe(e) {
44
+ function Re(e) {
42
45
  const t = /* @__PURE__ */ new Map();
43
46
  return e?.expressionInfos && e.expressionInfos.forEach((r) => {
44
47
  const i = `${b.expression}${r.name}`;
45
48
  t.set(i, r);
46
49
  }), t;
47
50
  }
48
- async function _(e) {
51
+ async function z(e) {
49
52
  return await new Promise((t, r) => {
50
53
  switch (e.type) {
51
54
  case "feature":
@@ -80,22 +83,22 @@ async function _(e) {
80
83
  }
81
84
  });
82
85
  }
83
- const H = (e) => e && !e.endsWith("/") ? `${e}/` : e;
86
+ const X = (e) => e && !e.endsWith("/") ? `${e}/` : e;
84
87
  function O(e) {
85
- return H(e.restUrl);
88
+ return X(e.restUrl);
86
89
  }
87
90
  function P(e, t) {
88
- return J(e, t) || z(e, t);
91
+ return J(e, t) || Y(e, t);
89
92
  }
90
93
  function J(e, t) {
91
94
  return e.owner === t.username;
92
95
  }
93
- function z(e, t) {
96
+ function Y(e, t) {
94
97
  const r = e.owner, i = e.itemControl === "admin", s = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
95
98
  return e.portal?.isPortal && !J(e, t) && i && r?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
96
99
  !s.includes(r) ? !1 : i;
97
100
  }
98
- function X(e) {
101
+ function Z(e) {
99
102
  return e.typeKeywords?.includes("Spatiotemporal");
100
103
  }
101
104
  function N(e) {
@@ -117,7 +120,7 @@ async function G(e) {
117
120
  const r = t.portal;
118
121
  if (r?.user) {
119
122
  const i = `${O(r)}community/users/${r.user.username}`;
120
- return await v(i, {
123
+ return await L(i, {
121
124
  query: {
122
125
  f: "json",
123
126
  token: t.portal.credential?.token
@@ -138,7 +141,7 @@ async function k(e) {
138
141
  if (!t)
139
142
  return await Promise.resolve(null);
140
143
  const r = t.portal, i = `${O(r)}content/items/${t.id}/groups`;
141
- return await v(i, {
144
+ return await L(i, {
142
145
  query: {
143
146
  f: "json",
144
147
  token: t.portal.credential?.token
@@ -152,9 +155,9 @@ async function k(e) {
152
155
  async () => await Promise.reject(new Error("Failed to fetch item groups"))
153
156
  );
154
157
  }
155
- async function j(e, t, { relationshipType: r, direction: i }) {
158
+ async function C(e, t, { relationshipType: r, direction: i }) {
156
159
  const s = `${O(t)}content/items/${e}/relatedItems`;
157
- return await v(s, {
160
+ return await L(s, {
158
161
  query: { f: "json", relationshipType: r, direction: i },
159
162
  responseType: "json"
160
163
  });
@@ -169,7 +172,7 @@ function A(e, t) {
169
172
  function o(e, t) {
170
173
  return !e || !t ? !1 : e.toLocaleLowerCase() === t.toLocaleLowerCase();
171
174
  }
172
- async function be(e) {
175
+ async function xe(e) {
173
176
  const t = ["feature", "oriented-imagery"].includes(e.type), r = e?.portalItem, i = e.sourceJSON;
174
177
  if (!t || !r)
175
178
  return !1;
@@ -179,18 +182,18 @@ async function be(e) {
179
182
  const l = P(r, s.user), w = await G(e) ?? [], F = await k(e) ?? [], f = A(w, F);
180
183
  if (!l && !f)
181
184
  return !1;
182
- const m = await j(r.id, s, {
185
+ const m = await C(r.id, s, {
183
186
  relationshipType: "Service2Service"
184
187
  });
185
188
  return !(m?.data?.relatedItems && m.data.relatedItems.some(
186
189
  (S) => ["WMTS", "Map Service", "Vector Tile Service"].includes(S.type)
187
190
  ));
188
191
  }
189
- async function Re(e, t, r, i) {
192
+ async function Te(e, t, r, i) {
190
193
  if (!r)
191
194
  return !1;
192
195
  const s = ["feature", "oriented-imagery"].includes(t.type), n = i?.item ?? t.portalItem, a = t.sourceJSON;
193
- if (!s || !n || !n.portal.user || !E(n) || N(n) || V(n) || D(a) || n.portal.isPortal && X(n) || ["oid", "global-id", "geometry"].includes(r.type))
196
+ if (!s || !n || !n.portal.user || !E(n) || N(n) || V(n) || D(a) || n.portal.isPortal && Z(n) || ["oid", "global-id", "geometry"].includes(r.type))
194
197
  return !1;
195
198
  const m = t.sourceJSON.geometryProperties, y = m?.shapeLengthFieldName, S = m?.shapeAreaFieldName;
196
199
  if (o(y, r.name) || o(S, r.name))
@@ -215,28 +218,28 @@ async function Re(e, t, r, i) {
215
218
  const d = t.labelingInfo?.map(
216
219
  (p) => p.labelExpressionInfo?.expression
217
220
  );
218
- if (d && ((await I.getExpressionFields(t, d)).some((q) => o(q, r.name)) || await U(t, r, "layer")))
221
+ if (d && ((await I.getExpressionFields(t, d)).some((q) => o(q, r.name)) || await j(t, r, "layer")))
219
222
  return !1;
220
223
  }
221
- if (!i?.ignoreLayerDefinitionExpression && t.definitionExpression && (await L.parseWhereClause(t.definitionExpression, t.fieldsIndex)).fieldNames.some((h) => o(h, r.name)) || await Z(t, r, i) || await ee(t, r))
224
+ if (!i?.ignoreLayerDefinitionExpression && t.definitionExpression && (await v.parseWhereClause(t.definitionExpression, t.fieldsIndex)).fieldNames.some((h) => o(h, r.name)) || await te(t, r, i) || await re(t, r))
222
225
  return !1;
223
- if (await te(t, r))
226
+ if (await ie(t, r))
224
227
  return await Promise.resolve(!1);
225
- if (await re(t, r))
228
+ if (await se(t, r))
226
229
  return await Promise.resolve(!1);
227
- if (Y(e, t, r) || t.relationships?.map((d) => d.keyField)?.some((d) => o(d, r.name)))
230
+ if (ee(e, t, r) || t.relationships?.map((d) => d.keyField)?.some((d) => o(d, r.name)))
228
231
  return !1;
229
- const C = P(n, n.portal.user), $ = i?.userItemInfo?.userGroups ?? await G(t) ?? [], W = i?.userItemInfo?.itemGroups ?? await k(t) ?? [], B = A($, W);
230
- if (!C && !B)
232
+ const M = P(n, n.portal.user), $ = i?.userItemInfo?.userGroups ?? await G(t) ?? [], W = i?.userItemInfo?.itemGroups ?? await k(t) ?? [], B = A($, W);
233
+ if (!M && !B)
231
234
  return !1;
232
- const R = i?.userItemInfo?.relatedItems ?? await j(n.id, n.portal, {
235
+ const R = i?.userItemInfo?.relatedItems ?? await C(n.id, n.portal, {
233
236
  relationshipType: "Service2Service"
234
237
  });
235
238
  return !(R?.data?.relatedItems && R.data.relatedItems.some(
236
239
  (p) => ["WMTS", "Map Service", "Vector Tile Service"].includes(p.type)
237
240
  ));
238
241
  }
239
- function Y(e, t, r) {
242
+ function ee(e, t, r) {
240
243
  if (!e)
241
244
  return !1;
242
245
  const i = e.map?.applicationProperties?.viewing?.search;
@@ -250,14 +253,14 @@ function Y(e, t, r) {
250
253
  }
251
254
  return !1;
252
255
  }
253
- async function U(e, t, r) {
256
+ async function j(e, t, r) {
254
257
  const i = r === "layer" ? e.labelingInfo?.filter((a) => x(a.where)) : e.sourceJSON?.drawingInfo?.labelingInfo?.filter((a) => x(a.where));
255
258
  if (!i?.length)
256
259
  return !1;
257
260
  const s = [
258
261
  ...await Promise.all(
259
262
  i.map(
260
- async (a) => await L.parseWhereClause(a.where, e.fieldsIndex)
263
+ async (a) => await v.parseWhereClause(a.where, e.fieldsIndex)
261
264
  )
262
265
  )
263
266
  ];
@@ -271,11 +274,11 @@ async function U(e, t, r) {
271
274
  }
272
275
  return await Promise.resolve(n);
273
276
  }
274
- async function Z(e, t, r) {
277
+ async function te(e, t, r) {
275
278
  const i = e.portalItem;
276
279
  if (!i)
277
280
  return !1;
278
- const s = `${O(i.portal)}content/items/${i.id}/data`, a = (r?.userItemInfo?.itemData ?? await v(s, {
281
+ const s = `${O(i.portal)}content/items/${i.id}/data`, a = (r?.userItemInfo?.itemData ?? await L(s, {
279
282
  query: { f: "json" },
280
283
  responseType: "json"
281
284
  }))?.data;
@@ -290,12 +293,12 @@ async function Z(e, t, r) {
290
293
  if ((await I.getRendererFields(f, e.fieldsIndex)).some((S) => o(S, t.name)))
291
294
  return !0;
292
295
  }
293
- if (!r?.ignoreItemFeatureReduction && w && await M(e, t, w) || F && (await L.parseWhereClause(F, e.fieldsIndex)).fieldNames.some((y) => o(y, t.name)))
296
+ if (!r?.ignoreItemFeatureReduction && w && await U(e, t, w) || F && (await v.parseWhereClause(F, e.fieldsIndex)).fieldNames.some((y) => o(y, t.name)))
294
297
  return !0;
295
298
  }
296
299
  return !1;
297
300
  }
298
- async function ee(e, t) {
301
+ async function re(e, t) {
299
302
  const r = e.sourceJSON, i = r?.drawingInfo?.renderer, s = r?.featureReduction;
300
303
  if (!i && !s)
301
304
  return !1;
@@ -304,13 +307,13 @@ async function ee(e, t) {
304
307
  if ((await I.getRendererFields(n, e.fieldsIndex)).some((c) => o(c, t.name)))
305
308
  return !0;
306
309
  }
307
- return !!(s && await M(
310
+ return !!(s && await U(
308
311
  e,
309
312
  t,
310
313
  s
311
314
  ));
312
315
  }
313
- async function te(e, t) {
316
+ async function ie(e, t) {
314
317
  const i = e.sourceJSON?.drawingInfo?.labelingInfo;
315
318
  if (!i)
316
319
  return await Promise.resolve(!1);
@@ -320,28 +323,29 @@ async function te(e, t) {
320
323
  if (s) {
321
324
  if ((await I.getExpressionFields(e, s)).some((c) => o(c, t.name)))
322
325
  return await Promise.resolve(!0);
323
- if (await U(e, t, "service"))
326
+ if (await j(e, t, "service"))
324
327
  return await Promise.resolve(!0);
325
328
  }
326
329
  return await Promise.resolve(!1);
327
330
  }
328
- async function re(e, t) {
331
+ async function se(e, t) {
329
332
  const i = e.sourceJSON?.definitionQuery;
330
- return i ? (await L.parseWhereClause(i, e.fieldsIndex)).fieldNames.some((a) => o(a, t.name)) ? await Promise.resolve(!0) : await Promise.resolve(!1) : await Promise.resolve(!1);
333
+ return i ? (await v.parseWhereClause(i, e.fieldsIndex)).fieldNames.some((a) => o(a, t.name)) ? await Promise.resolve(!0) : await Promise.resolve(!1) : await Promise.resolve(!1);
331
334
  }
332
- async function M(e, t, r) {
335
+ async function U(e, t, r) {
333
336
  const i = r.type === "binning" ? Q.fromJSON(r) : K.fromJSON(r), s = /* @__PURE__ */ new Set();
334
337
  return await I.collectFeatureReductionFields(s, e, i), !!Array.from(s).some(
335
338
  (a) => o(a, t.name)
336
339
  );
337
340
  }
338
341
  export {
339
- Re as a,
340
- Oe as b,
341
- be as c,
342
- ge as d,
342
+ Te as a,
343
+ Re as b,
344
+ xe as c,
345
+ ve as d,
343
346
  O as e,
344
- ve as f,
345
- Le as g,
346
- x as i
347
+ Oe as f,
348
+ be as g,
349
+ x as i,
350
+ H as s
347
351
  };
@@ -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.3 */
9
+ v5.0.0-next.30 */
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.3 */
5
+ v5.0.0-next.30 */
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.3 */
6
+ v5.0.0-next.30 */
7
7
  const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/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.3 */
5
+ v5.0.0-next.30 */
6
6
  const s = o(t);
7
7
  export {
8
8
  s as u
@@ -5,8 +5,8 @@ import { u as f } from "../../chunks/useT9n.js";
5
5
  import { css as d, html as t } from "lit";
6
6
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
7
7
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
8
- v5.0.0-next.3 */
9
- const m = d`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-ui-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`;
8
+ v5.0.0-next.30 */
9
+ const m = d`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`;
10
10
  class h extends r {
11
11
  constructor() {
12
12
  super(...arguments), this.classificationModel = c(this), this.messages = f(), this._classificationDataTask = n(this), this.portalClassificationSchema = this.classificationModel.portalClassificationSchema, this.status = this.classificationModel.status, this.missingExistingClassification = !1, this.variant = "full", this.autoDestroyDisabled = !1, this.validationErrors = "";
@@ -40,6 +40,6 @@ export declare class ArcgisPortalClassificationConfig extends LitElement {
40
40
  validateForm(): Promise<void>;
41
41
  /** Event emitted when component property values status, values, or valid change. */
42
42
  readonly arcgisPropertyChange: TargetedEvent<this, {
43
- name: "values" | "valid" | "status";
43
+ name: "values" | "status" | "valid";
44
44
  }>;
45
45
  }