@arcgis/portal-components 4.34.0-next.148 → 5.0.0-next.0
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/{7QRHBWCT.js → 2BGNA5B6.js} +3 -3
- package/dist/cdn/{MTLAUDY3.js → 3JA4XVXG.js} +3 -3
- package/dist/cdn/{CRDZ7DLA.js → E6A6P5DT.js} +3 -3
- package/dist/cdn/{D3S4K5JQ.js → HII3K2AH.js} +3 -3
- package/dist/cdn/{AG574UOF.js → HP6FLO6G.js} +2 -2
- package/dist/cdn/{BZJNFOI2.js → IPBJFU7J.js} +3 -3
- package/dist/cdn/{HGZ3JJO6.js → MFXEQDSV.js} +3 -3
- package/dist/cdn/{5732M3GW.js → N5WPRKA2.js} +2 -2
- package/dist/cdn/{77UH7MO5.js → O6FBVWEQ.js} +3 -3
- package/dist/cdn/SMUWQIWD.js +4 -0
- package/dist/cdn/{PFYNL3HX.js → XVHSY45D.js} +2 -2
- package/dist/cdn/{A4RTZ4F6.js → YHT2PRHK.js} +3 -3
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +3 -3
- package/dist/chunks/common.js +2 -2
- package/dist/chunks/fieldAddDelete.js +149 -140
- package/dist/chunks/loadClassificationData.js +2 -2
- package/dist/chunks/requests.js +2 -2
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/useT9n.js +2 -2
- package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
- package/dist/components/arcgis-portal-classification-form-element/customElement.js +2 -2
- package/dist/components/arcgis-portal-field-delete/customElement.js +58 -63
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +2 -2
- package/dist/loader.js +2 -2
- package/package.json +3 -3
- package/dist/cdn/372NXRME.js +0 -4
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
4
|
import * as T from "@arcgis/core/renderers/support/jsonUtils.js";
|
|
5
5
|
import v from "@arcgis/core/request.js";
|
|
6
6
|
import * as L from "@arcgis/core/core/sql.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
|
-
See https://js.arcgis.com/
|
|
9
|
-
|
|
8
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
9
|
+
v5.0.0-next.0 */
|
|
10
10
|
var b = /* @__PURE__ */ ((e) => (e.expression = "expression/", e.raster = "Raster.", e.relationship = "relationships/", e))(b || {});
|
|
11
11
|
function x(e) {
|
|
12
12
|
return e != null;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const i =
|
|
18
|
-
return i?.title ? i.title :
|
|
14
|
+
function Le(e, r) {
|
|
15
|
+
const t = e.fieldName;
|
|
16
|
+
if (t.includes(b.expression)) {
|
|
17
|
+
const i = r.get(t);
|
|
18
|
+
return i?.title ? i.title : t;
|
|
19
19
|
} else
|
|
20
|
-
return e.label ? e.label :
|
|
20
|
+
return e.label ? e.label : t;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Oe(e, r, t) {
|
|
23
23
|
let i = "";
|
|
24
24
|
if (/^raster.(?:item|service)pixelvalue/iu.test(e))
|
|
25
25
|
i = "number";
|
|
26
|
-
else if (
|
|
27
|
-
const s = t.get(e);
|
|
28
|
-
i = s.type ? s.type.toLowerCase() : "";
|
|
29
|
-
} else if (r.has(e)) {
|
|
26
|
+
else if (r.has(e)) {
|
|
30
27
|
const s = r.get(e);
|
|
28
|
+
i = s.type ? s.type.toLowerCase() : "";
|
|
29
|
+
} else if (t.has(e)) {
|
|
30
|
+
const s = t.get(e);
|
|
31
31
|
i = s.returnType ? s.returnType.toLowerCase() : "";
|
|
32
32
|
} else
|
|
33
33
|
i = "number";
|
|
34
34
|
return i;
|
|
35
35
|
}
|
|
36
|
-
async function
|
|
36
|
+
async function be(e) {
|
|
37
37
|
return new Map(
|
|
38
|
-
(await
|
|
38
|
+
(await H(e)).filter((r) => r.visible).map((r) => [r.name, r])
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return e?.expressionInfos && e.expressionInfos.forEach((
|
|
44
|
-
const i = `${b.expression}${
|
|
45
|
-
|
|
46
|
-
}),
|
|
41
|
+
function Re(e) {
|
|
42
|
+
const r = /* @__PURE__ */ new Map();
|
|
43
|
+
return e?.expressionInfos && e.expressionInfos.forEach((t) => {
|
|
44
|
+
const i = `${b.expression}${t.name}`;
|
|
45
|
+
r.set(i, t);
|
|
46
|
+
}), r;
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
49
|
-
return await new Promise((
|
|
48
|
+
async function H(e) {
|
|
49
|
+
return await new Promise((r, t) => {
|
|
50
50
|
switch (e.type) {
|
|
51
51
|
case "feature":
|
|
52
52
|
case "ogc-feature":
|
|
53
53
|
case "stream":
|
|
54
|
-
|
|
54
|
+
r(e.fields);
|
|
55
55
|
break;
|
|
56
56
|
case "sublayer": {
|
|
57
57
|
const i = e, s = i?.layer;
|
|
58
58
|
s?.portalItem && s.url.includes("https://demographics") && s.url.includes(".arcgis.com") ? s.portalItem?.fetchData().then((n) => {
|
|
59
59
|
if (n?.thematicGroup) {
|
|
60
60
|
const a = new Map(
|
|
61
|
-
i.fields.map((
|
|
62
|
-
),
|
|
63
|
-
|
|
64
|
-
a.has(
|
|
65
|
-
}),
|
|
61
|
+
i.fields.map((d) => [d.name, d])
|
|
62
|
+
), l = n.thematicGroup.fieldNames, c = [];
|
|
63
|
+
l.forEach((d) => {
|
|
64
|
+
a.has(d) && c.push(a.get(d));
|
|
65
|
+
}), r(c);
|
|
66
66
|
} else
|
|
67
|
-
|
|
67
|
+
r(i.fields);
|
|
68
68
|
}).catch((n) => {
|
|
69
|
-
|
|
70
|
-
}) :
|
|
69
|
+
t(new Error(n));
|
|
70
|
+
}) : r(i.fields);
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
case "imagery":
|
|
74
74
|
case "imagery-tile":
|
|
75
75
|
case "wcs":
|
|
76
|
-
|
|
76
|
+
r(e.rasterFields);
|
|
77
77
|
break;
|
|
78
78
|
default:
|
|
79
|
-
|
|
79
|
+
r("fields" in e ? e.fields ?? [] : []);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const z = (e) => e && !e.endsWith("/") ? `${e}/` : e;
|
|
84
84
|
function O(e) {
|
|
85
|
-
return
|
|
85
|
+
return z(e.restUrl);
|
|
86
86
|
}
|
|
87
|
-
function P(e,
|
|
88
|
-
return J(e,
|
|
87
|
+
function P(e, r) {
|
|
88
|
+
return J(e, r) || X(e, r);
|
|
89
89
|
}
|
|
90
|
-
function J(e,
|
|
91
|
-
return e.owner ===
|
|
90
|
+
function J(e, r) {
|
|
91
|
+
return e.owner === r.username;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
return e.portal?.isPortal && !J(e,
|
|
96
|
-
!s.includes(
|
|
93
|
+
function X(e, r) {
|
|
94
|
+
const t = e.owner, i = e.itemControl === "admin", s = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
|
|
95
|
+
return e.portal?.isPortal && !J(e, r) && i && t?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
|
|
96
|
+
!s.includes(t) ? !1 : i;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Y(e) {
|
|
99
99
|
return e.typeKeywords?.includes("Spatiotemporal");
|
|
100
100
|
}
|
|
101
101
|
function N(e) {
|
|
102
102
|
return e.typeKeywords?.includes("View Service");
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function G(e) {
|
|
105
105
|
return e.typeKeywords?.includes("Hosted Service");
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function E(e) {
|
|
108
108
|
return e.typeKeywords?.includes("Multi Services View");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function V(e) {
|
|
111
111
|
return e?.hasViews && !e.sourceSchemaChangesAllowed;
|
|
112
112
|
}
|
|
113
|
-
async function
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
113
|
+
async function D(e) {
|
|
114
|
+
const r = e?.portalItem;
|
|
115
|
+
if (!r)
|
|
116
116
|
return await Promise.resolve(null);
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
const i = `${O(
|
|
117
|
+
const t = r.portal;
|
|
118
|
+
if (t?.user) {
|
|
119
|
+
const i = `${O(t)}community/users/${t.user.username}`;
|
|
120
120
|
return await v(i, {
|
|
121
121
|
query: {
|
|
122
122
|
f: "json",
|
|
123
|
-
token:
|
|
123
|
+
token: r.portal.credential?.token
|
|
124
124
|
},
|
|
125
125
|
responseType: "json"
|
|
126
126
|
}).then(
|
|
@@ -134,124 +134,133 @@ async function G(e) {
|
|
|
134
134
|
return await Promise.resolve(null);
|
|
135
135
|
}
|
|
136
136
|
async function k(e) {
|
|
137
|
-
const
|
|
138
|
-
if (!
|
|
137
|
+
const r = e?.portalItem;
|
|
138
|
+
if (!r)
|
|
139
139
|
return await Promise.resolve(null);
|
|
140
|
-
const
|
|
140
|
+
const t = r.portal, i = `${O(t)}content/items/${r.id}/groups`;
|
|
141
141
|
return await v(i, {
|
|
142
142
|
query: {
|
|
143
143
|
f: "json",
|
|
144
|
-
token:
|
|
144
|
+
token: r.portal.credential?.token
|
|
145
145
|
},
|
|
146
146
|
responseType: "json"
|
|
147
147
|
}).then(
|
|
148
148
|
async (s) => {
|
|
149
|
-
const n = s.data?.admin ?? [], a = s.data?.member ?? [],
|
|
149
|
+
const n = s.data?.admin ?? [], a = s.data?.member ?? [], l = s.data?.other ?? [], c = [...n, ...a, ...l];
|
|
150
150
|
return await Promise.resolve(c);
|
|
151
151
|
},
|
|
152
152
|
async () => await Promise.reject(new Error("Failed to fetch item groups"))
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
|
-
async function j(e,
|
|
156
|
-
const s = `${O(
|
|
155
|
+
async function j(e, r, { relationshipType: t, direction: i }) {
|
|
156
|
+
const s = `${O(r)}content/items/${e}/relatedItems`;
|
|
157
157
|
return await v(s, {
|
|
158
|
-
query: { f: "json", relationshipType:
|
|
158
|
+
query: { f: "json", relationshipType: t, direction: i },
|
|
159
159
|
responseType: "json"
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
function A(e,
|
|
162
|
+
function A(e, r) {
|
|
163
163
|
return e?.some(
|
|
164
|
-
(
|
|
165
|
-
(i) =>
|
|
164
|
+
(t) => r?.some(
|
|
165
|
+
(i) => t.id === i.id && t.capabilities.includes("updateitemcontrol")
|
|
166
166
|
)
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
function o(e,
|
|
170
|
-
return !e || !
|
|
169
|
+
function o(e, r) {
|
|
170
|
+
return !e || !r ? !1 : e.toLocaleLowerCase() === r.toLocaleLowerCase();
|
|
171
171
|
}
|
|
172
|
-
async function
|
|
173
|
-
const
|
|
174
|
-
if (!
|
|
172
|
+
async function xe(e) {
|
|
173
|
+
const r = ["feature", "oriented-imagery"].includes(e.type), t = e?.portalItem, i = e.sourceJSON;
|
|
174
|
+
if (!r || !t)
|
|
175
175
|
return !1;
|
|
176
|
-
const s =
|
|
177
|
-
if (!s?.user || N(
|
|
176
|
+
const s = t.portal;
|
|
177
|
+
if (!s?.user || N(t) || !G(t) || E(t) || V(i))
|
|
178
178
|
return !1;
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
179
|
+
const d = P(t, s.user), I = await D(e) ?? [], F = await k(e) ?? [], f = A(I, F);
|
|
180
|
+
if (!d && !f)
|
|
181
181
|
return !1;
|
|
182
|
-
const
|
|
182
|
+
const h = await j(t.id, s, {
|
|
183
183
|
relationshipType: "Service2Service"
|
|
184
184
|
});
|
|
185
|
-
return !(
|
|
185
|
+
return !(h?.data?.relatedItems && h.data.relatedItems.some(
|
|
186
186
|
(S) => ["WMTS", "Map Service", "Vector Tile Service"].includes(S.type)
|
|
187
187
|
));
|
|
188
188
|
}
|
|
189
|
-
async function
|
|
190
|
-
if (!
|
|
189
|
+
async function Te(e, r, t, i) {
|
|
190
|
+
if (!t)
|
|
191
191
|
return !1;
|
|
192
|
-
const s = ["feature", "oriented-imagery"].includes(
|
|
193
|
-
if (!s || !n || !n.portal.user || !
|
|
192
|
+
const s = ["feature", "oriented-imagery"].includes(r.type), n = i?.item ?? r.portalItem, a = r.sourceJSON;
|
|
193
|
+
if (!s || !n || !n.portal.user || !G(n) || N(n) || E(n) || V(a) || n.portal.isPortal && Y(n) || ["oid", "global-id", "geometry"].includes(t.type) || await Z(r, t.name, i))
|
|
194
194
|
return !1;
|
|
195
|
-
const
|
|
196
|
-
if (o(
|
|
195
|
+
const w = r.sourceJSON.geometryProperties, S = w?.shapeLengthFieldName, $ = w?.shapeAreaFieldName;
|
|
196
|
+
if (o(S, t.name) || o($, t.name))
|
|
197
197
|
return !1;
|
|
198
|
-
const g =
|
|
199
|
-
if (g && (o(g.creationDateField,
|
|
198
|
+
const g = r.editFieldsInfo;
|
|
199
|
+
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)))
|
|
200
200
|
return !1;
|
|
201
|
-
if (!i?.ignoreLayerRenderer &&
|
|
202
|
-
const
|
|
203
|
-
if (await
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
), Array.from(
|
|
208
|
-
(
|
|
201
|
+
if (!i?.ignoreLayerRenderer && r.featureReduction) {
|
|
202
|
+
const u = /* @__PURE__ */ new Set();
|
|
203
|
+
if (await p.collectFeatureReductionFields(
|
|
204
|
+
u,
|
|
205
|
+
r,
|
|
206
|
+
r.featureReduction
|
|
207
|
+
), Array.from(u).some(
|
|
208
|
+
(y) => o(y, t.name)
|
|
209
209
|
))
|
|
210
210
|
return !1;
|
|
211
211
|
}
|
|
212
|
-
if (!i?.ignoreLayerRenderer && (await
|
|
212
|
+
if (!i?.ignoreLayerRenderer && (await p.getRendererFields(r.renderer, r.fieldsIndex)).some((y) => o(y, t.name)))
|
|
213
213
|
return !1;
|
|
214
214
|
if (!i?.ignoreLayerLabelingInfo) {
|
|
215
|
-
const
|
|
216
|
-
(
|
|
215
|
+
const u = r.labelingInfo?.map(
|
|
216
|
+
(m) => m.labelExpressionInfo?.expression
|
|
217
217
|
);
|
|
218
|
-
if (
|
|
218
|
+
if (u && ((await p.getExpressionFields(r, u)).some((Q) => o(Q, t.name)) || await U(r, t, "layer")))
|
|
219
219
|
return !1;
|
|
220
220
|
}
|
|
221
|
-
if (!i?.ignoreLayerDefinitionExpression &&
|
|
221
|
+
if (!i?.ignoreLayerDefinitionExpression && r.definitionExpression && (await L.parseWhereClause(r.definitionExpression, r.fieldsIndex)).fieldNames.some((y) => o(y, t.name)) || await re(r, t, i) || await te(r, t))
|
|
222
222
|
return !1;
|
|
223
|
-
if (await
|
|
223
|
+
if (await ie(r, t))
|
|
224
224
|
return await Promise.resolve(!1);
|
|
225
|
-
if (await
|
|
225
|
+
if (await se(r, t))
|
|
226
226
|
return await Promise.resolve(!1);
|
|
227
|
-
if (
|
|
227
|
+
if (ee(e, r, t) || r.relationships?.map((u) => u.keyField)?.some((u) => o(u, t.name)))
|
|
228
228
|
return !1;
|
|
229
|
-
const C = P(n, n.portal.user),
|
|
229
|
+
const C = P(n, n.portal.user), W = i?.userItemInfo?.userGroups ?? await D(r) ?? [], q = i?.userItemInfo?.itemGroups ?? await k(r) ?? [], B = A(W, q);
|
|
230
230
|
if (!C && !B)
|
|
231
231
|
return !1;
|
|
232
232
|
const R = i?.userItemInfo?.relatedItems ?? await j(n.id, n.portal, {
|
|
233
233
|
relationshipType: "Service2Service"
|
|
234
234
|
});
|
|
235
235
|
return !(R?.data?.relatedItems && R.data.relatedItems.some(
|
|
236
|
-
(
|
|
236
|
+
(m) => ["WMTS", "Map Service", "Vector Tile Service"].includes(m.type)
|
|
237
237
|
));
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
async function Z(e, r, t) {
|
|
240
|
+
const i = `${e.url}/${e.layerId}/fieldGroups`, s = t?.userItemInfo?.fieldGroups ?? (await v(i, {
|
|
241
|
+
query: { f: "json" },
|
|
242
|
+
responseType: "json"
|
|
243
|
+
}))?.data?.fieldGroups;
|
|
244
|
+
return s ? s.some(
|
|
245
|
+
(a) => a.fields.some((l) => o(l, r))
|
|
246
|
+
) : !1;
|
|
247
|
+
}
|
|
248
|
+
function ee(e, r, t) {
|
|
240
249
|
if (!e)
|
|
241
250
|
return !1;
|
|
242
251
|
const i = e.map?.applicationProperties?.viewing?.search;
|
|
243
252
|
if (i) {
|
|
244
|
-
const s = i.layers?.find((n) => n.id ===
|
|
253
|
+
const s = i.layers?.find((n) => n.id === r.id);
|
|
245
254
|
if (s) {
|
|
246
255
|
const n = s?.field?.name;
|
|
247
256
|
if (n)
|
|
248
|
-
return o(n,
|
|
257
|
+
return o(n, t.name);
|
|
249
258
|
}
|
|
250
259
|
}
|
|
251
260
|
return !1;
|
|
252
261
|
}
|
|
253
|
-
async function U(e,
|
|
254
|
-
const i =
|
|
262
|
+
async function U(e, r, t) {
|
|
263
|
+
const i = t === "layer" ? e.labelingInfo?.filter((a) => x(a.where)) : e.sourceJSON?.drawingInfo?.labelingInfo?.filter((a) => x(a.where));
|
|
255
264
|
if (!i?.length)
|
|
256
265
|
return !1;
|
|
257
266
|
const s = [
|
|
@@ -263,54 +272,54 @@ async function U(e, t, r) {
|
|
|
263
272
|
];
|
|
264
273
|
let n = !1;
|
|
265
274
|
for (let a = 0; a < s.length; a++) {
|
|
266
|
-
const
|
|
267
|
-
if (!n &&
|
|
275
|
+
const l = s[a].fieldNames?.some((c) => o(c, r.name));
|
|
276
|
+
if (!n && l) {
|
|
268
277
|
n = !0;
|
|
269
278
|
break;
|
|
270
279
|
}
|
|
271
280
|
}
|
|
272
281
|
return await Promise.resolve(n);
|
|
273
282
|
}
|
|
274
|
-
async function
|
|
283
|
+
async function re(e, r, t) {
|
|
275
284
|
const i = e.portalItem;
|
|
276
285
|
if (!i)
|
|
277
286
|
return !1;
|
|
278
|
-
const s = `${O(i.portal)}content/items/${i.id}/data`, a = (
|
|
287
|
+
const s = `${O(i.portal)}content/items/${i.id}/data`, a = (t?.userItemInfo?.itemData ?? await v(s, {
|
|
279
288
|
query: { f: "json" },
|
|
280
289
|
responseType: "json"
|
|
281
290
|
}))?.data;
|
|
282
291
|
if (!a)
|
|
283
292
|
return !1;
|
|
284
293
|
if (a?.layers) {
|
|
285
|
-
const c = a.layers.find((f) => f.id === e.layerId),
|
|
286
|
-
if (!
|
|
294
|
+
const c = a.layers.find((f) => f.id === e.layerId), d = c?.layerDefinition?.drawingInfo?.renderer, I = c?.layerDefinition?.featureReduction, F = c?.layerDefinition?.definitionExpression;
|
|
295
|
+
if (!d && !I && !F)
|
|
287
296
|
return !1;
|
|
288
|
-
if (!
|
|
289
|
-
const f = T.fromJSON(
|
|
290
|
-
if ((await
|
|
297
|
+
if (!t?.ignoreItemRenderer && d) {
|
|
298
|
+
const f = T.fromJSON(d);
|
|
299
|
+
if ((await p.getRendererFields(f, e.fieldsIndex)).some((S) => o(S, r.name)))
|
|
291
300
|
return !0;
|
|
292
301
|
}
|
|
293
|
-
if (!
|
|
302
|
+
if (!t?.ignoreItemFeatureReduction && I && await M(e, r, I) || F && (await L.parseWhereClause(F, e.fieldsIndex)).fieldNames.some((w) => o(w, r.name)))
|
|
294
303
|
return !0;
|
|
295
304
|
}
|
|
296
305
|
return !1;
|
|
297
306
|
}
|
|
298
|
-
async function
|
|
299
|
-
const
|
|
307
|
+
async function te(e, r) {
|
|
308
|
+
const t = e.sourceJSON, i = t?.drawingInfo?.renderer, s = t?.featureReduction;
|
|
300
309
|
if (!i && !s)
|
|
301
310
|
return !1;
|
|
302
311
|
if (i) {
|
|
303
312
|
const n = T.fromJSON(i);
|
|
304
|
-
if ((await
|
|
313
|
+
if ((await p.getRendererFields(n, e.fieldsIndex)).some((c) => o(c, r.name)))
|
|
305
314
|
return !0;
|
|
306
315
|
}
|
|
307
316
|
return !!(s && await M(
|
|
308
317
|
e,
|
|
309
|
-
|
|
318
|
+
r,
|
|
310
319
|
s
|
|
311
320
|
));
|
|
312
321
|
}
|
|
313
|
-
async function
|
|
322
|
+
async function ie(e, r) {
|
|
314
323
|
const i = e.sourceJSON?.drawingInfo?.labelingInfo;
|
|
315
324
|
if (!i)
|
|
316
325
|
return await Promise.resolve(!1);
|
|
@@ -318,30 +327,30 @@ async function te(e, t) {
|
|
|
318
327
|
(n) => n.labelExpressionInfo?.expression
|
|
319
328
|
);
|
|
320
329
|
if (s) {
|
|
321
|
-
if ((await
|
|
330
|
+
if ((await p.getExpressionFields(e, s)).some((c) => o(c, r.name)))
|
|
322
331
|
return await Promise.resolve(!0);
|
|
323
|
-
if (await U(e,
|
|
332
|
+
if (await U(e, r, "service"))
|
|
324
333
|
return await Promise.resolve(!0);
|
|
325
334
|
}
|
|
326
335
|
return await Promise.resolve(!1);
|
|
327
336
|
}
|
|
328
|
-
async function
|
|
337
|
+
async function se(e, r) {
|
|
329
338
|
const i = e.sourceJSON?.definitionQuery;
|
|
330
|
-
return i ? (await L.parseWhereClause(i, e.fieldsIndex)).fieldNames.some((a) => o(a,
|
|
339
|
+
return i ? (await L.parseWhereClause(i, e.fieldsIndex)).fieldNames.some((a) => o(a, r.name)) ? await Promise.resolve(!0) : await Promise.resolve(!1) : await Promise.resolve(!1);
|
|
331
340
|
}
|
|
332
|
-
async function M(e,
|
|
333
|
-
const i =
|
|
334
|
-
return await
|
|
335
|
-
(a) => o(a,
|
|
341
|
+
async function M(e, r, t) {
|
|
342
|
+
const i = t.type === "binning" ? K.fromJSON(t) : _.fromJSON(t), s = /* @__PURE__ */ new Set();
|
|
343
|
+
return await p.collectFeatureReductionFields(s, e, i), !!Array.from(s).some(
|
|
344
|
+
(a) => o(a, r.name)
|
|
336
345
|
);
|
|
337
346
|
}
|
|
338
347
|
export {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
348
|
+
Te as a,
|
|
349
|
+
Re as b,
|
|
350
|
+
xe as c,
|
|
351
|
+
Le as d,
|
|
343
352
|
O as e,
|
|
344
|
-
|
|
345
|
-
|
|
353
|
+
Oe as f,
|
|
354
|
+
be as g,
|
|
346
355
|
x as i
|
|
347
356
|
};
|
|
@@ -5,8 +5,8 @@ import { Deferred as h } from "@arcgis/toolkit/promise";
|
|
|
5
5
|
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
|
-
See https://js.arcgis.com/
|
|
9
|
-
|
|
8
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
9
|
+
v5.0.0-next.0 */
|
|
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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
|
-
See https://js.arcgis.com/
|
|
5
|
-
|
|
4
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
5
|
+
v5.0.0-next.0 */
|
|
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
|
@@ -2,8 +2,8 @@ import "../cdn/main.css";
|
|
|
2
2
|
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
|
-
See https://js.arcgis.com/
|
|
6
|
-
|
|
5
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
+
v5.0.0-next.0 */
|
|
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;
|
package/dist/chunks/useT9n.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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
|
-
See https://js.arcgis.com/
|
|
5
|
-
|
|
4
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
5
|
+
v5.0.0-next.0 */
|
|
6
6
|
const s = o(t);
|
|
7
7
|
export {
|
|
8
8
|
s as u
|
|
@@ -4,8 +4,8 @@ import { u as c, c as n } from "../../chunks/loadClassificationData.js";
|
|
|
4
4
|
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
|
-
See https://js.arcgis.com/
|
|
8
|
-
|
|
7
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
8
|
+
v5.0.0-next.0 */
|
|
9
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}`;
|
|
10
10
|
class h extends r {
|
|
11
11
|
constructor() {
|
|
@@ -12,8 +12,8 @@ import { d as h, a as d, g as R, r as m, c as A, b as _ } from "../../chunks/com
|
|
|
12
12
|
import { watch as F } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
13
|
import { r as D } from "../../chunks/requests.js";
|
|
14
14
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
15
|
-
See https://js.arcgis.com/
|
|
16
|
-
|
|
15
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
16
|
+
v5.0.0-next.0 */
|
|
17
17
|
async function T({
|
|
18
18
|
portalClassificationSchema: s,
|
|
19
19
|
itemClassification: t
|
|
@@ -6,8 +6,8 @@ import { u as f } from "../../chunks/useT9n.js";
|
|
|
6
6
|
import { u as d, r as v } from "../../chunks/requests.js";
|
|
7
7
|
import { g as h } from "../../chunks/common.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
|
-
See https://js.arcgis.com/
|
|
10
|
-
|
|
9
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
10
|
+
v5.0.0-next.0 */
|
|
11
11
|
const m = r`.select-favorite-label{display:flex;justify-content:space-between;align-items:center}.favorite-actions{display:flex;justify-content:flex-end;gap:1.5rem;align-items:center}.classification-favorite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: "var(--calcite-color-foreground-2)"}.save-new-favorite-button{display:flex;justify-content:flex-end;margin-top:.25rem;margin-bottom:1rem}.classification-favorite-item{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem;border-bottom:1px solid var(--calcite-color-border-1)}.classification-favorite-list,.classification-favorite-input-section{margin:1.75rem 1rem}`;
|
|
12
12
|
class C extends n {
|
|
13
13
|
constructor() {
|
|
@@ -4,8 +4,8 @@ import { LitElement as u, createEvent as b, nothing as a } from "@arcgis/lumina"
|
|
|
4
4
|
import { css as d, html as i } from "lit";
|
|
5
5
|
import { u as h } from "../../chunks/useT9n.js";
|
|
6
6
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
|
-
See https://js.arcgis.com/
|
|
8
|
-
|
|
7
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
8
|
+
v5.0.0-next.0 */
|
|
9
9
|
const m = d`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;
|
|
10
10
|
function l(n, e) {
|
|
11
11
|
return n.uiElement === e;
|