@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.
- package/dist/cdn/{RM6AIDDG.js → AHCZTVJ4.js} +2 -2
- package/dist/cdn/GCTJZYV7.js +4 -0
- package/dist/cdn/GIBWEC6K.js +4 -0
- package/dist/cdn/{KMD37AXG.js → HW5C3XJH.js} +1 -1
- package/dist/cdn/JA2VDMRG.js +4 -0
- package/dist/cdn/MKNHIW7X.js +4 -0
- package/dist/cdn/{K7OKVJO4.js → MX35WWUC.js} +2 -2
- package/dist/cdn/{DG5T5NHE.js → OY4KOUHF.js} +2 -2
- package/dist/cdn/P4LUN5GB.js +4 -0
- package/dist/cdn/{BXIFWHHK.js → SM2CK2AO.js} +2 -2
- package/dist/cdn/SV22LY6H.js +4 -0
- package/dist/cdn/{HWITQHPU.js → UCKMUAOS.js} +2 -2
- package/dist/cdn/WKZKBMHW.js +4 -0
- package/dist/cdn/{NY2LFOEQ.js → WNOLDDB4.js} +2 -2
- package/dist/cdn/{AZHELUFD.js → XUQULGNP.js} +1 -1
- package/dist/cdn/{26TRY2HX.js → YMTH6GIB.js} +2 -2
- package/dist/cdn/{XBTBPX2A.js → ZXAIECQ4.js} +2 -2
- package/dist/cdn/assets/portal-replacement-item-redirect/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/common.js +1 -1
- package/dist/chunks/fieldAddDelete.js +148 -234
- package/dist/chunks/item.js +103 -0
- package/dist/chunks/loadClassificationData.js +1 -1
- package/dist/chunks/requests.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-portal-classification-banner/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
- package/dist/components/arcgis-portal-extent-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +1 -1
- package/dist/components/arcgis-portal-field-delete/customElement.js +34 -33
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.d.ts +24 -0
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +72 -0
- package/dist/components/arcgis-portal-replacement-item-redirect/index.d.ts +4 -0
- package/dist/components/arcgis-portal-replacement-item-redirect/index.js +4 -0
- package/dist/docs/api.json +159 -2
- package/dist/docs/docs.json +165 -2
- package/dist/docs/vscode.html-custom-data.json +6 -0
- package/dist/docs/web-types.json +27 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/loader.js +3 -2
- package/dist/types/lumina.d.ts +5 -0
- package/dist/types/preact.d.ts +6 -0
- package/dist/types/react.d.ts +7 -0
- package/dist/types/stencil.d.ts +5 -0
- package/package.json +4 -3
- package/dist/cdn/CUDVRICK.js +0 -4
- package/dist/cdn/J6M2MF6L.js +0 -4
- package/dist/cdn/KRHBOI3V.js +0 -4
- package/dist/cdn/NHYKXE24.js +0 -4
- 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
|
|
3
|
-
import
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import * as
|
|
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.
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
return "fieldConfigurations" in
|
|
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
|
|
16
|
-
return
|
|
16
|
+
function b(r) {
|
|
17
|
+
return r != null;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
const s =
|
|
22
|
-
return s?.title ? s.title :
|
|
23
|
-
} else return
|
|
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
|
|
26
|
-
let
|
|
27
|
-
if (/^raster.(?:item|service)pixelvalue/iu.test(
|
|
28
|
-
|
|
29
|
-
else if (
|
|
30
|
-
const s =
|
|
31
|
-
|
|
32
|
-
} else if (
|
|
33
|
-
const s =
|
|
34
|
-
|
|
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
|
-
|
|
37
|
-
return
|
|
37
|
+
t = "number";
|
|
38
|
+
return t;
|
|
38
39
|
}
|
|
39
|
-
async function
|
|
40
|
+
async function be(r) {
|
|
40
41
|
return new Map(
|
|
41
|
-
(await
|
|
42
|
+
(await Y(r)).filter((e) => e.visible).map((e) => [e.name, e])
|
|
42
43
|
);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
}),
|
|
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
|
|
52
|
-
return await new Promise((
|
|
53
|
-
switch (
|
|
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
|
|
58
|
+
e(r.fields);
|
|
58
59
|
break;
|
|
59
60
|
case "sublayer": {
|
|
60
|
-
const
|
|
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
|
-
|
|
65
|
-
),
|
|
66
|
-
|
|
67
|
-
a.has(
|
|
68
|
-
}),
|
|
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
|
-
|
|
71
|
+
e(t.fields);
|
|
71
72
|
}).catch((n) => {
|
|
72
|
-
|
|
73
|
-
}) :
|
|
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
|
|
80
|
+
e(r.rasterFields);
|
|
80
81
|
break;
|
|
81
82
|
default:
|
|
82
|
-
|
|
83
|
+
e("fields" in r ? r.fields ?? [] : []);
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return Y(e.restUrl);
|
|
87
|
+
function o(r, e) {
|
|
88
|
+
return !r || !e ? !1 : r.toLocaleLowerCase() === e.toLocaleLowerCase();
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
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 =
|
|
180
|
-
if (!s?.user ||
|
|
94
|
+
const s = i.portal;
|
|
95
|
+
if (!s?.user || N(i) || !J(i) || T(i) || G(t))
|
|
181
96
|
return !1;
|
|
182
|
-
const
|
|
183
|
-
if (!
|
|
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
|
|
100
|
+
const S = await C(i.id, s, {
|
|
186
101
|
relationshipType: "Service2Service"
|
|
187
102
|
});
|
|
188
|
-
return !(
|
|
189
|
-
(
|
|
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
|
|
193
|
-
if (!
|
|
107
|
+
async function Je(r, e, i, t) {
|
|
108
|
+
if (!i)
|
|
194
109
|
return !1;
|
|
195
|
-
const s = ["feature", "oriented-imagery"].includes(
|
|
196
|
-
if (!s || !n || !n.portal.user || !
|
|
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 =
|
|
199
|
-
if (o(
|
|
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
|
|
202
|
-
if (
|
|
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 (!
|
|
205
|
-
const
|
|
119
|
+
if (!t?.ignoreLayerRenderer && e.featureReduction) {
|
|
120
|
+
const d = /* @__PURE__ */ new Set();
|
|
206
121
|
if (await p.collectFeatureReductionFields(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
), Array.from(
|
|
211
|
-
(
|
|
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 (!
|
|
130
|
+
if (!t?.ignoreLayerRenderer && (await p.getRendererFields(e.renderer, e.fieldsIndex)).some((h) => o(h, i.name)))
|
|
216
131
|
return !1;
|
|
217
|
-
if (!
|
|
218
|
-
const
|
|
132
|
+
if (!t?.ignoreLayerLabelingInfo) {
|
|
133
|
+
const d = e.labelingInfo?.map(
|
|
219
134
|
(m) => m.labelExpressionInfo?.expression
|
|
220
135
|
);
|
|
221
|
-
if (
|
|
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 (!
|
|
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
|
|
141
|
+
if (await ie(e, i))
|
|
227
142
|
return await Promise.resolve(!1);
|
|
228
|
-
if (await
|
|
143
|
+
if (await te(e, i))
|
|
229
144
|
return await Promise.resolve(!1);
|
|
230
|
-
if (
|
|
145
|
+
if (_(r, e, i) || e.relationships?.map((d) => d.keyField)?.some((d) => o(d, i.name)))
|
|
231
146
|
return !1;
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
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
|
|
150
|
+
const v = t?.userItemInfo?.relatedItems ?? await C(n.id, n.portal, {
|
|
236
151
|
relationshipType: "Service2Service"
|
|
237
152
|
});
|
|
238
|
-
return !(
|
|
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
|
|
243
|
-
const
|
|
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((
|
|
163
|
+
(a) => a.fields.some((f) => o(f, e))
|
|
249
164
|
) : !1;
|
|
250
165
|
}
|
|
251
|
-
function
|
|
252
|
-
if (!
|
|
166
|
+
function _(r, e, i) {
|
|
167
|
+
if (!r)
|
|
253
168
|
return !1;
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
const s =
|
|
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,
|
|
175
|
+
return o(n, i.name);
|
|
261
176
|
}
|
|
262
177
|
}
|
|
263
178
|
return !1;
|
|
264
179
|
}
|
|
265
|
-
async function
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
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
|
-
|
|
272
|
-
async (a) => await
|
|
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
|
|
279
|
-
if (!n &&
|
|
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
|
|
287
|
-
const
|
|
288
|
-
if (!
|
|
201
|
+
async function ee(r, e, i) {
|
|
202
|
+
const t = r.portalItem;
|
|
203
|
+
if (!t)
|
|
289
204
|
return !1;
|
|
290
|
-
const 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((
|
|
298
|
-
if (!
|
|
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 (!
|
|
301
|
-
const
|
|
302
|
-
if ((await p.getRendererFields(
|
|
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 (!
|
|
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
|
|
311
|
-
const
|
|
312
|
-
if (!
|
|
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 (
|
|
315
|
-
const n =
|
|
316
|
-
if ((await p.getRendererFields(n,
|
|
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
|
|
320
|
-
e,
|
|
234
|
+
return !!(s && await A(
|
|
321
235
|
r,
|
|
236
|
+
e,
|
|
322
237
|
s
|
|
323
238
|
));
|
|
324
239
|
}
|
|
325
|
-
async function
|
|
326
|
-
const
|
|
327
|
-
if (!
|
|
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 =
|
|
244
|
+
const s = t?.map(
|
|
330
245
|
(n) => n.labelExpressionInfo?.expression
|
|
331
246
|
);
|
|
332
247
|
if (s) {
|
|
333
|
-
if ((await p.getExpressionFields(
|
|
248
|
+
if ((await p.getExpressionFields(r, s)).some((c) => o(c, e.name)))
|
|
334
249
|
return await Promise.resolve(!0);
|
|
335
|
-
if (await
|
|
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
|
|
341
|
-
const
|
|
342
|
-
return
|
|
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
|
|
345
|
-
const
|
|
346
|
-
return await p.collectFeatureReductionFields(s,
|
|
347
|
-
(a) => o(a,
|
|
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
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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.
|
|
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);
|
package/dist/chunks/requests.js
CHANGED
|
@@ -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.
|
|
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 {
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -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.
|
|
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;
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -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.
|
|
5
|
+
v5.0.0-next.126 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|