@agentic-ui-experience/ui-arcgis 0.0.1-beta.2 → 0.0.1-beta.4
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/README.md +84 -3
- package/dist/ArcGISMapView.js +1 -1
- package/dist/api.js +1 -1
- package/dist/catalog.js +1 -1
- package/dist/controller/api.d.ts +300 -22
- package/dist/controller/api.js +1 -1
- package/dist/controller/createArcGISMapController.js +1 -1
- package/dist/controller/featureFilter.d.ts +425 -0
- package/dist/controller/featureFilter.js +1 -0
- package/dist/controller/featureFilterExpression.d.ts +16 -0
- package/dist/controller/featureFilterExpression.js +1 -0
- package/dist/controller/featureFilterRuntime.d.ts +19 -0
- package/dist/controller/featureFilterRuntime.js +1 -0
- package/dist/controller/featureQuery.d.ts +275 -0
- package/dist/controller/featureQuery.js +1 -0
- package/dist/controller/featureQueryExpression.d.ts +16 -0
- package/dist/controller/featureQueryExpression.js +1 -0
- package/dist/controller/featureQueryRuntime.d.ts +12 -0
- package/dist/controller/featureQueryRuntime.js +1 -0
- package/dist/controller/useArcGISMapController.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/prompt.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ArcGISFeatureStatisticTypes: readonly ["count", "sum", "min", "max", "avg"];
|
|
3
|
+
export declare const ArcGISFeatureQueryRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
4
|
+
layerId: z.ZodString;
|
|
5
|
+
mode: z.ZodEnum<["features", "count", "statistics"]>;
|
|
6
|
+
logic: z.ZodEnum<["and", "or"]>;
|
|
7
|
+
predicates: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
8
|
+
fieldName: z.ZodString;
|
|
9
|
+
operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"]>;
|
|
10
|
+
values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
values: (string | number)[];
|
|
13
|
+
fieldName: string;
|
|
14
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
15
|
+
}, {
|
|
16
|
+
values: (string | number)[];
|
|
17
|
+
fieldName: string;
|
|
18
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
19
|
+
}>, {
|
|
20
|
+
values: (string | number)[];
|
|
21
|
+
fieldName: string;
|
|
22
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
23
|
+
}, {
|
|
24
|
+
values: (string | number)[];
|
|
25
|
+
fieldName: string;
|
|
26
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
27
|
+
}>, {
|
|
28
|
+
values: (string | number)[];
|
|
29
|
+
fieldName: string;
|
|
30
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
31
|
+
}, {
|
|
32
|
+
values: (string | number)[];
|
|
33
|
+
fieldName: string;
|
|
34
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
35
|
+
}>, "many">;
|
|
36
|
+
outFields: z.ZodArray<z.ZodString, "many">;
|
|
37
|
+
groupByFields: z.ZodArray<z.ZodString, "many">;
|
|
38
|
+
statistics: z.ZodArray<z.ZodObject<{
|
|
39
|
+
fieldName: z.ZodNullable<z.ZodString>;
|
|
40
|
+
statisticType: z.ZodEnum<["count", "sum", "min", "max", "avg"]>;
|
|
41
|
+
outputName: z.ZodString;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
fieldName: string | null;
|
|
44
|
+
statisticType: "count" | "sum" | "min" | "max" | "avg";
|
|
45
|
+
outputName: string;
|
|
46
|
+
}, {
|
|
47
|
+
fieldName: string | null;
|
|
48
|
+
statisticType: "count" | "sum" | "min" | "max" | "avg";
|
|
49
|
+
outputName: string;
|
|
50
|
+
}>, "many">;
|
|
51
|
+
orderBy: z.ZodArray<z.ZodObject<{
|
|
52
|
+
fieldName: z.ZodString;
|
|
53
|
+
direction: z.ZodEnum<["asc", "desc"]>;
|
|
54
|
+
}, "strict", z.ZodTypeAny, {
|
|
55
|
+
fieldName: string;
|
|
56
|
+
direction: "desc" | "asc";
|
|
57
|
+
}, {
|
|
58
|
+
fieldName: string;
|
|
59
|
+
direction: "desc" | "asc";
|
|
60
|
+
}>, "many">;
|
|
61
|
+
resultLimit: z.ZodNumber;
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
|
+
layerId: string;
|
|
64
|
+
logic: "and" | "or";
|
|
65
|
+
predicates: {
|
|
66
|
+
values: (string | number)[];
|
|
67
|
+
fieldName: string;
|
|
68
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
69
|
+
}[];
|
|
70
|
+
mode: "count" | "features" | "statistics";
|
|
71
|
+
statistics: {
|
|
72
|
+
fieldName: string | null;
|
|
73
|
+
statisticType: "count" | "sum" | "min" | "max" | "avg";
|
|
74
|
+
outputName: string;
|
|
75
|
+
}[];
|
|
76
|
+
outFields: string[];
|
|
77
|
+
groupByFields: string[];
|
|
78
|
+
orderBy: {
|
|
79
|
+
fieldName: string;
|
|
80
|
+
direction: "desc" | "asc";
|
|
81
|
+
}[];
|
|
82
|
+
resultLimit: number;
|
|
83
|
+
}, {
|
|
84
|
+
layerId: string;
|
|
85
|
+
logic: "and" | "or";
|
|
86
|
+
predicates: {
|
|
87
|
+
values: (string | number)[];
|
|
88
|
+
fieldName: string;
|
|
89
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
90
|
+
}[];
|
|
91
|
+
mode: "count" | "features" | "statistics";
|
|
92
|
+
statistics: {
|
|
93
|
+
fieldName: string | null;
|
|
94
|
+
statisticType: "count" | "sum" | "min" | "max" | "avg";
|
|
95
|
+
outputName: string;
|
|
96
|
+
}[];
|
|
97
|
+
outFields: string[];
|
|
98
|
+
groupByFields: string[];
|
|
99
|
+
orderBy: {
|
|
100
|
+
fieldName: string;
|
|
101
|
+
direction: "desc" | "asc";
|
|
102
|
+
}[];
|
|
103
|
+
resultLimit: number;
|
|
104
|
+
}>, {
|
|
105
|
+
layerId: string;
|
|
106
|
+
logic: "and" | "or";
|
|
107
|
+
predicates: {
|
|
108
|
+
values: (string | number)[];
|
|
109
|
+
fieldName: string;
|
|
110
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
111
|
+
}[];
|
|
112
|
+
mode: "count" | "features" | "statistics";
|
|
113
|
+
statistics: {
|
|
114
|
+
fieldName: string | null;
|
|
115
|
+
statisticType: "count" | "sum" | "min" | "max" | "avg";
|
|
116
|
+
outputName: string;
|
|
117
|
+
}[];
|
|
118
|
+
outFields: string[];
|
|
119
|
+
groupByFields: string[];
|
|
120
|
+
orderBy: {
|
|
121
|
+
fieldName: string;
|
|
122
|
+
direction: "desc" | "asc";
|
|
123
|
+
}[];
|
|
124
|
+
resultLimit: number;
|
|
125
|
+
}, {
|
|
126
|
+
layerId: string;
|
|
127
|
+
logic: "and" | "or";
|
|
128
|
+
predicates: {
|
|
129
|
+
values: (string | number)[];
|
|
130
|
+
fieldName: string;
|
|
131
|
+
operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
|
|
132
|
+
}[];
|
|
133
|
+
mode: "count" | "features" | "statistics";
|
|
134
|
+
statistics: {
|
|
135
|
+
fieldName: string | null;
|
|
136
|
+
statisticType: "count" | "sum" | "min" | "max" | "avg";
|
|
137
|
+
outputName: string;
|
|
138
|
+
}[];
|
|
139
|
+
outFields: string[];
|
|
140
|
+
groupByFields: string[];
|
|
141
|
+
orderBy: {
|
|
142
|
+
fieldName: string;
|
|
143
|
+
direction: "desc" | "asc";
|
|
144
|
+
}[];
|
|
145
|
+
resultLimit: number;
|
|
146
|
+
}>;
|
|
147
|
+
export type ArcGISFeatureQueryRequest = z.infer<typeof ArcGISFeatureQueryRequestSchema>;
|
|
148
|
+
export declare const ArcGISFeatureQueryErrorCodes: readonly ["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "cancelled", "stale-controller"];
|
|
149
|
+
export type ArcGISFeatureQueryErrorCode = (typeof ArcGISFeatureQueryErrorCodes)[number];
|
|
150
|
+
export declare const ArcGISFeatureQueryResultSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
|
|
151
|
+
ok: z.ZodLiteral<true>;
|
|
152
|
+
operation: z.ZodLiteral<"queryFeatureLayer">;
|
|
153
|
+
layer: z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
title: z.ZodString;
|
|
156
|
+
}, "strict", z.ZodTypeAny, {
|
|
157
|
+
title: string;
|
|
158
|
+
id: string;
|
|
159
|
+
}, {
|
|
160
|
+
title: string;
|
|
161
|
+
id: string;
|
|
162
|
+
}>;
|
|
163
|
+
mode: z.ZodEnum<["features", "count", "statistics"]>;
|
|
164
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
alias: z.ZodString;
|
|
167
|
+
type: z.ZodString;
|
|
168
|
+
}, "strict", z.ZodTypeAny, {
|
|
169
|
+
type: string;
|
|
170
|
+
name: string;
|
|
171
|
+
alias: string;
|
|
172
|
+
}, {
|
|
173
|
+
type: string;
|
|
174
|
+
name: string;
|
|
175
|
+
alias: string;
|
|
176
|
+
}>, "many">;
|
|
177
|
+
rows: z.ZodArray<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>, "many">;
|
|
178
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
179
|
+
truncated: z.ZodBoolean;
|
|
180
|
+
}, "strict", z.ZodTypeAny, {
|
|
181
|
+
ok: true;
|
|
182
|
+
operation: "queryFeatureLayer";
|
|
183
|
+
layer: {
|
|
184
|
+
title: string;
|
|
185
|
+
id: string;
|
|
186
|
+
};
|
|
187
|
+
count: number | null;
|
|
188
|
+
mode: "count" | "features" | "statistics";
|
|
189
|
+
columns: {
|
|
190
|
+
type: string;
|
|
191
|
+
name: string;
|
|
192
|
+
alias: string;
|
|
193
|
+
}[];
|
|
194
|
+
rows: Record<string, string | number | boolean | null>[];
|
|
195
|
+
truncated: boolean;
|
|
196
|
+
}, {
|
|
197
|
+
ok: true;
|
|
198
|
+
operation: "queryFeatureLayer";
|
|
199
|
+
layer: {
|
|
200
|
+
title: string;
|
|
201
|
+
id: string;
|
|
202
|
+
};
|
|
203
|
+
count: number | null;
|
|
204
|
+
mode: "count" | "features" | "statistics";
|
|
205
|
+
columns: {
|
|
206
|
+
type: string;
|
|
207
|
+
name: string;
|
|
208
|
+
alias: string;
|
|
209
|
+
}[];
|
|
210
|
+
rows: Record<string, string | number | boolean | null>[];
|
|
211
|
+
truncated: boolean;
|
|
212
|
+
}>, z.ZodObject<{
|
|
213
|
+
ok: z.ZodLiteral<false>;
|
|
214
|
+
operation: z.ZodLiteral<"queryFeatureLayer">;
|
|
215
|
+
layerId: z.ZodString;
|
|
216
|
+
code: z.ZodEnum<["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "cancelled", "stale-controller"]>;
|
|
217
|
+
message: z.ZodString;
|
|
218
|
+
}, "strict", z.ZodTypeAny, {
|
|
219
|
+
code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "cancelled" | "stale-controller";
|
|
220
|
+
message: string;
|
|
221
|
+
layerId: string;
|
|
222
|
+
ok: false;
|
|
223
|
+
operation: "queryFeatureLayer";
|
|
224
|
+
}, {
|
|
225
|
+
code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "cancelled" | "stale-controller";
|
|
226
|
+
message: string;
|
|
227
|
+
layerId: string;
|
|
228
|
+
ok: false;
|
|
229
|
+
operation: "queryFeatureLayer";
|
|
230
|
+
}>]>, {
|
|
231
|
+
ok: true;
|
|
232
|
+
operation: "queryFeatureLayer";
|
|
233
|
+
layer: {
|
|
234
|
+
title: string;
|
|
235
|
+
id: string;
|
|
236
|
+
};
|
|
237
|
+
count: number | null;
|
|
238
|
+
mode: "count" | "features" | "statistics";
|
|
239
|
+
columns: {
|
|
240
|
+
type: string;
|
|
241
|
+
name: string;
|
|
242
|
+
alias: string;
|
|
243
|
+
}[];
|
|
244
|
+
rows: Record<string, string | number | boolean | null>[];
|
|
245
|
+
truncated: boolean;
|
|
246
|
+
} | {
|
|
247
|
+
code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "cancelled" | "stale-controller";
|
|
248
|
+
message: string;
|
|
249
|
+
layerId: string;
|
|
250
|
+
ok: false;
|
|
251
|
+
operation: "queryFeatureLayer";
|
|
252
|
+
}, {
|
|
253
|
+
ok: true;
|
|
254
|
+
operation: "queryFeatureLayer";
|
|
255
|
+
layer: {
|
|
256
|
+
title: string;
|
|
257
|
+
id: string;
|
|
258
|
+
};
|
|
259
|
+
count: number | null;
|
|
260
|
+
mode: "count" | "features" | "statistics";
|
|
261
|
+
columns: {
|
|
262
|
+
type: string;
|
|
263
|
+
name: string;
|
|
264
|
+
alias: string;
|
|
265
|
+
}[];
|
|
266
|
+
rows: Record<string, string | number | boolean | null>[];
|
|
267
|
+
truncated: boolean;
|
|
268
|
+
} | {
|
|
269
|
+
code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "cancelled" | "stale-controller";
|
|
270
|
+
message: string;
|
|
271
|
+
layerId: string;
|
|
272
|
+
ok: false;
|
|
273
|
+
operation: "queryFeatureLayer";
|
|
274
|
+
}>;
|
|
275
|
+
export type ArcGISFeatureQueryResult = z.infer<typeof ArcGISFeatureQueryResultSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x28b74d=_0x9c07;(function(_0x258e75,_0x26a0bb){const _0x1776b0=_0x9c07,_0x52b161=_0x258e75();while(!![]){try{const _0x3c8374=parseInt(_0x1776b0(0xe3))/0x1*(parseInt(_0x1776b0(0xaf))/0x2)+parseInt(_0x1776b0(0xca))/0x3*(parseInt(_0x1776b0(0xb0))/0x4)+-parseInt(_0x1776b0(0xd7))/0x5*(parseInt(_0x1776b0(0xd8))/0x6)+parseInt(_0x1776b0(0xc8))/0x7+parseInt(_0x1776b0(0xb2))/0x8+parseInt(_0x1776b0(0xb4))/0x9*(-parseInt(_0x1776b0(0xbe))/0xa)+-parseInt(_0x1776b0(0xbf))/0xb*(-parseInt(_0x1776b0(0xe6))/0xc);if(_0x3c8374===_0x26a0bb)break;else _0x52b161['push'](_0x52b161['shift']());}catch(_0x4ebcdc){_0x52b161['push'](_0x52b161['shift']());}}}(_0x5a44,0x72381));import{z}from'zod';import{ArcGISFeaturePredicateSchema}from'./featureFilter.js';const MAX_IDENTIFIER_LENGTH=0x100,MAX_TEXT_LENGTH=0x3e8,MAX_COLUMNS=0x14,MAX_ROWS=0x1f4,FeatureQueryIdentifierSchema=z[_0x28b74d(0xc9)]()['min'](0x1)['max'](MAX_IDENTIFIER_LENGTH),ArcGISFeatureQueryPredicateSchema=ArcGISFeaturePredicateSchema[_0x28b74d(0xb8)](_0x59f9a1=>_0x59f9a1[_0x28b74d(0xdd)]['length']<=MAX_IDENTIFIER_LENGTH,{'path':['fieldName'],'message':'Field\x20names\x20must\x20contain\x20at\x20most\x20'+MAX_IDENTIFIER_LENGTH+'\x20characters.'}),ArcGISFeatureStatisticTypes=['count',_0x28b74d(0xb7),'min',_0x28b74d(0xe0),'avg'],ArcGISFeatureStatisticTypeSchema=z['enum'](ArcGISFeatureStatisticTypes),ArcGISFeatureQueryStatisticSchema=z[_0x28b74d(0xd9)]({'fieldName':FeatureQueryIdentifierSchema[_0x28b74d(0xd3)](),'statisticType':ArcGISFeatureStatisticTypeSchema,'outputName':z[_0x28b74d(0xc9)]()[_0x28b74d(0xd2)](/^[A-Za-z][A-Za-z0-9_]{0,63}$/)})[_0x28b74d(0xb9)](),ArcGISFeatureQueryOrderSchema=z[_0x28b74d(0xd9)]({'fieldName':FeatureQueryIdentifierSchema,'direction':z[_0x28b74d(0xc5)]([_0x28b74d(0xc3),_0x28b74d(0xde)])})['strict']();function addIssue(_0xc82806,_0x2ddbb1,_0x15ba7f){const _0x3372ae=_0x28b74d;_0xc82806[_0x3372ae(0xc1)]({'code':'custom','path':_0x2ddbb1,'message':_0x15ba7f});}function _0x5a44(){const _0xe3f2b=['Ambiguous\x20output\x20name\x20','9lnzWoE','Feature\x20queries\x20cannot\x20calculate\x20statistics.','array','sum','refine','strict','and','toLocaleLowerCase','rows','features','8247410UCXwXJ','605TxkdBh','size','addIssue','map','asc','discriminatedUnion','enum','finite','keys','2182327thlCoX','string','3tVSzbZ','groupByFields','has','Feature\x20queries\x20require\x20an\x20output\x20field.','outFields','map-not-ready','Duplicate\x20field\x20name\x20','Statistics\x20queries\x20derive\x20output\x20columns\x20from\x20groupByFields\x20and\x20statistics.','regex','nullable','Statistics\x20queries\x20require\x20a\x20statistic.','statistics','literal','1920QoBsVR','3180zDAhmR','object','invalid-predicate','add','Row\x20keys\x20must\x20exactly\x20match\x20the\x20declared\x20result\x20columns.','fieldName','desc','count','max','number','mode','451301FwSGus','Feature\x20queries\x20cannot\x20group\x20results.','columns','43788GkTnex','int','boolean','forEach','length','2BEfsvH','279428cTiCxC','orderBy','3699904oetymm'];_0x5a44=function(){return _0xe3f2b;};return _0x5a44();}function findDuplicate(_0x388559){const _0x306572=_0x28b74d,_0x275d69=new Set();for(const _0x1d3e46 of _0x388559){const _0xb4c071=_0x1d3e46[_0x306572(0xbb)]('en-US');if(_0x275d69['has'](_0xb4c071))return _0x1d3e46;_0x275d69[_0x306572(0xdb)](_0xb4c071);}return null;}const ArcGISFeatureQueryRequestSchema=z['object']({'layerId':FeatureQueryIdentifierSchema,'mode':z['enum']([_0x28b74d(0xbd),_0x28b74d(0xdf),'statistics']),'logic':z[_0x28b74d(0xc5)]([_0x28b74d(0xba),'or']),'predicates':z['array'](ArcGISFeatureQueryPredicateSchema)[_0x28b74d(0xe0)](0x8),'outFields':z[_0x28b74d(0xb6)](FeatureQueryIdentifierSchema)['max'](MAX_COLUMNS),'groupByFields':z['array'](FeatureQueryIdentifierSchema)['max'](0x4),'statistics':z['array'](ArcGISFeatureQueryStatisticSchema)[_0x28b74d(0xe0)](0x8),'orderBy':z[_0x28b74d(0xb6)](ArcGISFeatureQueryOrderSchema)[_0x28b74d(0xe0)](0x8),'resultLimit':z[_0x28b74d(0xe1)]()[_0x28b74d(0xe7)]()['min'](0x1)['max'](MAX_ROWS)})['strict']()['superRefine']((_0x29dfb2,_0x51b3a8)=>{const _0x17cf6c=_0x28b74d;if(_0x29dfb2['mode']===_0x17cf6c(0xbd))_0x29dfb2['outFields'][_0x17cf6c(0xea)]===0x0&&addIssue(_0x51b3a8,[_0x17cf6c(0xce)],_0x17cf6c(0xcd)),_0x29dfb2['groupByFields'][_0x17cf6c(0xea)]!==0x0&&addIssue(_0x51b3a8,[_0x17cf6c(0xcb)],_0x17cf6c(0xe4)),_0x29dfb2['statistics'][_0x17cf6c(0xea)]!==0x0&&addIssue(_0x51b3a8,['statistics'],_0x17cf6c(0xb5));else{if(_0x29dfb2[_0x17cf6c(0xe2)]==='count')for(const _0x385272 of[_0x17cf6c(0xce),'groupByFields','statistics',_0x17cf6c(0xb1)]){_0x29dfb2[_0x385272][_0x17cf6c(0xea)]!==0x0&&addIssue(_0x51b3a8,[_0x385272],'Count\x20queries\x20require\x20this\x20collection\x20to\x20be\x20empty.');}else _0x29dfb2['outFields']['length']!==0x0&&addIssue(_0x51b3a8,['outFields'],_0x17cf6c(0xd1)),_0x29dfb2['statistics'][_0x17cf6c(0xea)]===0x0&&addIssue(_0x51b3a8,[_0x17cf6c(0xd5)],_0x17cf6c(0xd4));}_0x29dfb2['statistics']['forEach']((_0x5268c8,_0x3c18f7)=>{const _0x29b85d=_0x17cf6c;_0x5268c8['statisticType']!==_0x29b85d(0xdf)&&_0x5268c8['fieldName']===null&&addIssue(_0x51b3a8,['statistics',_0x3c18f7,'fieldName'],'Only\x20count\x20statistics\x20may\x20use\x20a\x20null\x20field\x20name.');});for(const [_0x45e858,_0x162516]of[['outFields',_0x29dfb2['outFields']],['groupByFields',_0x29dfb2[_0x17cf6c(0xcb)]],[_0x17cf6c(0xb1),_0x29dfb2[_0x17cf6c(0xb1)]['map'](({fieldName:_0x292aa0})=>_0x292aa0)]]){const _0x16ba67=findDuplicate(_0x162516);_0x16ba67!==null&&addIssue(_0x51b3a8,[_0x45e858],_0x17cf6c(0xd0)+_0x16ba67+'.');}const _0x1a1708=[..._0x29dfb2[_0x17cf6c(0xce)],..._0x29dfb2[_0x17cf6c(0xcb)],..._0x29dfb2[_0x17cf6c(0xd5)][_0x17cf6c(0xc2)](({outputName:_0x208d32})=>_0x208d32)],_0x2158a3=findDuplicate(_0x1a1708);_0x2158a3!==null&&addIssue(_0x51b3a8,['statistics'],_0x17cf6c(0xb3)+_0x2158a3+'.');if(_0x29dfb2[_0x17cf6c(0xe2)]==='statistics'){const _0x3e133b=new Set(_0x29dfb2['groupByFields']);_0x29dfb2[_0x17cf6c(0xb1)][_0x17cf6c(0xe9)](({fieldName:_0x14c1d6},_0x5cc146)=>{const _0x317711=_0x17cf6c;!_0x3e133b[_0x317711(0xcc)](_0x14c1d6)&&addIssue(_0x51b3a8,['orderBy',_0x5cc146,_0x317711(0xdd)],'Statistics\x20queries\x20may\x20order\x20only\x20by\x20a\x20group\x20field.');});}}),ArcGISFeatureQueryErrorCodes=[_0x28b74d(0xcf),'layer-not-found','unsupported-layer','field-not-found',_0x28b74d(0xda),'query-failed','cancelled','stale-controller'],ArcGISFeatureQueryErrorCodeSchema=z[_0x28b74d(0xc5)](ArcGISFeatureQueryErrorCodes),ArcGISFeatureQueryColumnSchema=z[_0x28b74d(0xd9)]({'name':FeatureQueryIdentifierSchema,'alias':z[_0x28b74d(0xc9)]()[_0x28b74d(0xe0)](0x200),'type':z['string']()['min'](0x1)[_0x28b74d(0xe0)](0x80)})[_0x28b74d(0xb9)](),ArcGISFeatureQueryRowValueSchema=z['union']([z[_0x28b74d(0xc9)](),z[_0x28b74d(0xe1)]()[_0x28b74d(0xc6)](),z[_0x28b74d(0xe8)](),z['null']()]),ArcGISFeatureQueryRowSchema=z['record'](ArcGISFeatureQueryRowValueSchema)['superRefine']((_0x5cbad7,_0x1aec90)=>{const _0x319488=_0x28b74d;Object['keys'](_0x5cbad7)[_0x319488(0xea)]>MAX_COLUMNS&&addIssue(_0x1aec90,[],'Rows\x20may\x20contain\x20at\x20most\x20'+MAX_COLUMNS+'\x20values.');}),ArcGISFeatureQuerySuccessSchema=z[_0x28b74d(0xd9)]({'ok':z['literal'](!![]),'operation':z[_0x28b74d(0xd6)]('queryFeatureLayer'),'layer':z['object']({'id':FeatureQueryIdentifierSchema,'title':z['string']()['max'](0x200)})[_0x28b74d(0xb9)](),'mode':z[_0x28b74d(0xc5)](['features','count','statistics']),'columns':z['array'](ArcGISFeatureQueryColumnSchema)[_0x28b74d(0xe0)](MAX_COLUMNS),'rows':z['array'](ArcGISFeatureQueryRowSchema)[_0x28b74d(0xe0)](MAX_ROWS),'count':z['number']()[_0x28b74d(0xe7)]()['nonnegative']()['nullable'](),'truncated':z['boolean']()})['strict'](),ArcGISFeatureQueryFailureSchema=z[_0x28b74d(0xd9)]({'ok':z[_0x28b74d(0xd6)](![]),'operation':z[_0x28b74d(0xd6)]('queryFeatureLayer'),'layerId':FeatureQueryIdentifierSchema,'code':ArcGISFeatureQueryErrorCodeSchema,'message':z[_0x28b74d(0xc9)]()['min'](0x1)[_0x28b74d(0xe0)](MAX_TEXT_LENGTH)})['strict'](),ArcGISFeatureQueryResultSchema=z[_0x28b74d(0xc4)]('ok',[ArcGISFeatureQuerySuccessSchema,ArcGISFeatureQueryFailureSchema])['superRefine']((_0x1e0b32,_0x463b60)=>{const _0x75fb49=_0x28b74d;if(!_0x1e0b32['ok'])return;if(_0x1e0b32[_0x75fb49(0xe2)]==='count'){(_0x1e0b32[_0x75fb49(0xe5)][_0x75fb49(0xea)]!==0x0||_0x1e0b32[_0x75fb49(0xbc)]['length']!==0x0)&&addIssue(_0x463b60,['mode'],'Count\x20results\x20cannot\x20contain\x20columns\x20or\x20rows.');_0x1e0b32[_0x75fb49(0xdf)]===null&&addIssue(_0x463b60,[_0x75fb49(0xdf)],'Count\x20results\x20require\x20a\x20count\x20value.');_0x1e0b32['truncated']&&addIssue(_0x463b60,['truncated'],'Count\x20results\x20cannot\x20be\x20truncated.');return;}_0x1e0b32['count']!==null&&addIssue(_0x463b60,[_0x75fb49(0xdf)],'Row\x20results\x20must\x20use\x20a\x20null\x20count\x20value.');if(_0x1e0b32['columns'][_0x75fb49(0xea)]===0x0){addIssue(_0x463b60,[_0x75fb49(0xe5)],'Row\x20results\x20require\x20at\x20least\x20one\x20column.');return;}const _0x17eea4=_0x1e0b32['columns'][_0x75fb49(0xc2)](({name:_0x21674d})=>_0x21674d),_0x266686=findDuplicate(_0x17eea4);_0x266686!==null&&addIssue(_0x463b60,['columns'],'Duplicate\x20result\x20column\x20'+_0x266686+'.');const _0x5ed99b=new Set(_0x17eea4);_0x1e0b32[_0x75fb49(0xbc)]['forEach']((_0x5dd7aa,_0x3c958e)=>{const _0x38b2d7=_0x75fb49,_0x4a8c7b=Object[_0x38b2d7(0xc7)](_0x5dd7aa);(_0x4a8c7b[_0x38b2d7(0xea)]!==_0x5ed99b[_0x38b2d7(0xc0)]||_0x4a8c7b['some'](_0x10b46c=>!_0x5ed99b['has'](_0x10b46c)))&&addIssue(_0x463b60,['rows',_0x3c958e],_0x38b2d7(0xdc));});});function _0x9c07(_0xc3d412,_0x493bd6){_0xc3d412=_0xc3d412-0xaf;const _0x5a4410=_0x5a44();let _0x9c07fd=_0x5a4410[_0xc3d412];return _0x9c07fd;}export{ArcGISFeatureQueryErrorCodes,ArcGISFeatureQueryRequestSchema,ArcGISFeatureQueryResultSchema,ArcGISFeatureStatisticTypes};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StatisticDefinitionProperties } from "@arcgis/core/rest/support/StatisticDefinition.js";
|
|
2
|
+
import { type ArcGISFeatureQueryRequest } from "./featureQuery.js";
|
|
3
|
+
import { type FeatureFilterFieldMetadata } from "./featureFilterExpression.js";
|
|
4
|
+
export declare class FeatureQueryExpressionError extends Error {
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
}
|
|
7
|
+
export interface CompiledFeatureQueryProperties {
|
|
8
|
+
where: string;
|
|
9
|
+
outFields: string[];
|
|
10
|
+
orderByFields: string[];
|
|
11
|
+
groupByFieldsForStatistics: string[];
|
|
12
|
+
outStatistics: StatisticDefinitionProperties[];
|
|
13
|
+
returnGeometry: false;
|
|
14
|
+
num: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function compileFeatureQueryProperties(request: ArcGISFeatureQueryRequest, fields: readonly FeatureFilterFieldMetadata[]): CompiledFeatureQueryProperties;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x234001,_0x4a5a07){const _0x5e4ae5=_0x230a,_0x1222a8=_0x234001();while(!![]){try{const _0x5236cb=parseInt(_0x5e4ae5(0x1ea))/0x1+parseInt(_0x5e4ae5(0x1e6))/0x2*(-parseInt(_0x5e4ae5(0x1f8))/0x3)+parseInt(_0x5e4ae5(0x1e5))/0x4*(parseInt(_0x5e4ae5(0x1f5))/0x5)+parseInt(_0x5e4ae5(0x1ec))/0x6+parseInt(_0x5e4ae5(0x1f9))/0x7+-parseInt(_0x5e4ae5(0x1ef))/0x8+-parseInt(_0x5e4ae5(0x1f4))/0x9;if(_0x5236cb===_0x4a5a07)break;else _0x1222a8['push'](_0x1222a8['shift']());}catch(_0x3634cd){_0x1222a8['push'](_0x1222a8['shift']());}}}(_0x3b05,0x60f89));import{sqlName}from'@arcgis/core/core/sql.js';import{ArcGISFeatureQueryRequestSchema}from'./featureQuery.js';import{compileFeaturePredicateWhere}from'./featureFilterExpression.js';class FeatureQueryExpressionError extends Error{constructor(_0x27a8d4){const _0x5750a9=_0x230a;super(_0x27a8d4),this[_0x5750a9(0x1fb)]=_0x5750a9(0x1e7);}}function createExactFieldIndex(_0x410ad4){const _0xc2237f=_0x230a,_0x17cf17=new Map();for(const _0x43fc71 of _0x410ad4){if(_0x17cf17[_0xc2237f(0x1e9)](_0x43fc71['name']))throw new FeatureQueryExpressionError('Live\x20field\x20metadata\x20is\x20ambiguous\x20for\x20'+_0x43fc71['name']+'.');_0x17cf17['set'](_0x43fc71['name'],_0x43fc71);}return _0x17cf17;}function _0x3b05(){const _0x2466ea=['Feature\x20predicate\x20compilation\x20failed.','orderBy','success','2829987JiEjNQ','35hXLqvP','groupByFields','Field\x20','11811aUflzX','1832754bkTSYI','fieldName','name','\x20was\x20not\x20found\x20with\x20an\x20exact\x20live-schema\x20match.','logic','resultLimit','predicates','map','data','79436HUUHZL','16zJsJfL','FeatureQueryExpressionError','outFields','has','38308WZxugk','toUpperCase','2994858MKeNBz','Invalid\x20feature\x20query\x20request:\x20','get','1561232rhCNDV','message'];_0x3b05=function(){return _0x2466ea;};return _0x3b05();}function _0x230a(_0x2487f7,_0x191bdb){_0x2487f7=_0x2487f7-0x1e0;const _0x3b0510=_0x3b05();let _0x230ae4=_0x3b0510[_0x2487f7];return _0x230ae4;}function requireExactField(_0x1f21a5,_0x21871d){const _0x5a717f=_0x230a,_0x2277d0=_0x21871d[_0x5a717f(0x1ee)](_0x1f21a5);if(!_0x2277d0)throw new FeatureQueryExpressionError(_0x5a717f(0x1f7)+_0x1f21a5+_0x5a717f(0x1fc));return _0x2277d0;}function quoteIdentifier(_0x19df18,_0x166a64){return sqlName(requireExactField(_0x19df18,_0x166a64)['name']);}function toStatisticDefinition(_0x2441f9,_0x3c47ef){const _0x52b8b4=_0x230a,_0x32449c=_0x2441f9[_0x52b8b4(0x1fa)]===null?'*':requireExactField(_0x2441f9[_0x52b8b4(0x1fa)],_0x3c47ef)['name'];return{'onStatisticField':_0x32449c,'outStatisticFieldName':_0x2441f9['outputName'],'statisticType':_0x2441f9['statisticType']};}function compileFeatureQueryProperties(_0x1caa62,_0x562b2d){const _0x1311eb=_0x230a,_0x5829b7=ArcGISFeatureQueryRequestSchema['safeParse'](_0x1caa62);if(!_0x5829b7[_0x1311eb(0x1f3)])throw new FeatureQueryExpressionError(_0x1311eb(0x1ed)+(_0x5829b7['error']['issues'][0x0]?.['message']??'unknown\x20validation\x20error'));const _0x2829c2=createExactFieldIndex(_0x562b2d);for(const _0x423a2b of[..._0x5829b7[_0x1311eb(0x1e4)][_0x1311eb(0x1e8)],..._0x5829b7['data']['groupByFields'],..._0x5829b7['data'][_0x1311eb(0x1f2)][_0x1311eb(0x1e3)](({fieldName:_0x51545d})=>_0x51545d)]){requireExactField(_0x423a2b,_0x2829c2);}for(const _0x22edad of _0x5829b7[_0x1311eb(0x1e4)]['statistics']){_0x22edad['fieldName']!==null&&requireExactField(_0x22edad['fieldName'],_0x2829c2);}let _0x3ab78a;try{_0x3ab78a=compileFeaturePredicateWhere(_0x5829b7[_0x1311eb(0x1e4)][_0x1311eb(0x1e0)],_0x5829b7[_0x1311eb(0x1e4)][_0x1311eb(0x1e2)],_0x562b2d);}catch(_0x30b54a){throw new FeatureQueryExpressionError(_0x30b54a instanceof Error?_0x30b54a[_0x1311eb(0x1f0)]:_0x1311eb(0x1f1));}return{'where':_0x3ab78a,'outFields':[..._0x5829b7['data']['outFields']],'orderByFields':_0x5829b7[_0x1311eb(0x1e4)][_0x1311eb(0x1f2)][_0x1311eb(0x1e3)](({fieldName:_0x57ccc7,direction:_0x54ba31})=>quoteIdentifier(_0x57ccc7,_0x2829c2)+'\x20'+_0x54ba31[_0x1311eb(0x1eb)]()),'groupByFieldsForStatistics':[..._0x5829b7['data'][_0x1311eb(0x1f6)]],'outStatistics':_0x5829b7['data']['statistics']['map'](_0x43a97e=>toStatisticDefinition(_0x43a97e,_0x2829c2)),'returnGeometry':![],'num':_0x5829b7['data'][_0x1311eb(0x1e1)]};}export{FeatureQueryExpressionError,compileFeatureQueryProperties};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
|
|
2
|
+
import type { ArcGISMapController } from "./api.js";
|
|
3
|
+
export interface FeatureQueryRuntime {
|
|
4
|
+
queryFeatureLayer: ArcGISMapController["queryFeatureLayer"];
|
|
5
|
+
dispose(): void;
|
|
6
|
+
}
|
|
7
|
+
export interface FeatureQueryRuntimeDependencies {
|
|
8
|
+
isReady(): boolean;
|
|
9
|
+
isDisposed(): boolean;
|
|
10
|
+
resolveLayer(layerId: string): FeatureLayer | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare function createFeatureQueryRuntime(dependencies: FeatureQueryRuntimeDependencies): FeatureQueryRuntime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x5acca8=_0xbf13;(function(_0x515ca9,_0x28390e){const _0x292a5c=_0xbf13,_0x46c1ea=_0x515ca9();while(!![]){try{const _0x5d1840=parseInt(_0x292a5c(0xf1))/0x1*(-parseInt(_0x292a5c(0xd5))/0x2)+parseInt(_0x292a5c(0xe0))/0x3*(-parseInt(_0x292a5c(0xf3))/0x4)+-parseInt(_0x292a5c(0x105))/0x5*(-parseInt(_0x292a5c(0xd9))/0x6)+-parseInt(_0x292a5c(0xf6))/0x7+-parseInt(_0x292a5c(0xfa))/0x8*(-parseInt(_0x292a5c(0xea))/0x9)+parseInt(_0x292a5c(0xd1))/0xa*(-parseInt(_0x292a5c(0x103))/0xb)+parseInt(_0x292a5c(0xf0))/0xc;if(_0x5d1840===_0x28390e)break;else _0x46c1ea['push'](_0x46c1ea['shift']());}catch(_0x45a754){_0x46c1ea['push'](_0x46c1ea['shift']());}}}(_0x2bd0,0xa7947));import{ArcGISFeatureQueryRequestSchema}from'./featureQuery.js';function _0x2bd0(){const _0x481537=['num','6818184pnLAyt','queryFailed','query-failed','string','aborted','code','21561384tzyKRe','106jqqBgG','flatMap','68zodAMS','signal','data','2069389HgKvLU','unsupported-layer','predicates','message','8yrgayS','object','isArray','field-not-found','fieldName','map','groupByFields','safeParse','isSafeInteger','11IEABVK','outputName','13270NiyXKI','attributes','resolveLayer','queryFeatureCount','metadataFailed','layer-not-found','Feature\x20layer\x20metadata\x20could\x20not\x20be\x20loaded.','orderBy','invalidPredicate','isReady','count','getTimeZone','queryFeatureLayer','Feature\x20query\x20failed.','success','6100890sVWOkN','get','unknown','feature','16498EEPxPF','type','features','\x20was\x20not\x20found.','300XxLXNk','statisticType','fieldsIndex','mode','number','has','stale','38919PEcKBE','Feature\x20query\x20predicate\x20is\x20invalid.','Feature\x20query\x20returned\x20an\x20invalid\x20feature\x20collection.','invalid-predicate','Map\x20controller\x20is\x20no\x20longer\x20active.','name','integer','slice','fields'];_0x2bd0=function(){return _0x481537;};return _0x2bd0();}function _0xbf13(_0x144f3d,_0x273926){_0x144f3d=_0x144f3d-0xc7;const _0x2bd058=_0x2bd0();let _0xbf136a=_0x2bd058[_0x144f3d];return _0xbf136a;}import{compileFeatureQueryProperties}from'./featureQueryExpression.js';const MESSAGES={'cancelled':'Feature\x20query\x20was\x20cancelled.','stale':_0x5acca8(0xe4),'notReady':'ArcGIS\x20map\x20view\x20is\x20not\x20ready.','invalidRequest':'Feature\x20query\x20request\x20is\x20invalid.','fieldNotFound':'Feature\x20query\x20references\x20an\x20unavailable\x20field.','invalidPredicate':_0x5acca8(0xe1),'metadataFailed':_0x5acca8(0xc8),'queryFailed':_0x5acca8(0xcf)};function queryFailure(_0x423308,_0x5af6d9,_0x39e09a){const _0x46d84e=_0x5acca8;return{'ok':![],'operation':_0x46d84e(0xce),'layerId':_0x423308,'code':_0x5af6d9,'message':_0x39e09a};}function unavailableLayerMessage(_0x5879d){const _0x433d22=_0x5acca8;return'Layer\x20'+_0x5879d+_0x433d22(0xd8);}function unsupportedLayerMessage(_0x488b7b){return'Layer\x20'+_0x488b7b+'\x20does\x20not\x20support\x20feature\x20queries.';}function requestedFieldNames(_0x2fd781){const _0x1aa25a=_0x5acca8;return[..._0x2fd781[_0x1aa25a(0xf8)]['map'](({fieldName:_0x7936a7})=>_0x7936a7),..._0x2fd781['outFields'],..._0x2fd781[_0x1aa25a(0x100)],..._0x2fd781['statistics'][_0x1aa25a(0xf2)](({fieldName:_0x398b97})=>_0x398b97===null?[]:[_0x398b97]),..._0x2fd781[_0x1aa25a(0xc9)]['map'](({fieldName:_0x2f0171})=>_0x2f0171)];}function resultColumns(_0x213dcc,_0x11afe4){const _0x55c528=_0x5acca8,_0x32f2d3=new Map(_0x11afe4['map'](_0x43cf34=>[_0x43cf34[_0x55c528(0xe5)],_0x43cf34]));if(_0x213dcc['mode']===_0x55c528(0xd7))return _0x213dcc['outFields']['map'](_0xb25ccb=>{const _0x494b5d=_0x55c528,_0x15ec95=_0x32f2d3[_0x494b5d(0xd2)](_0xb25ccb);return{'name':_0xb25ccb,'alias':_0x15ec95['alias'],'type':_0x15ec95[_0x494b5d(0xd6)]};});if(_0x213dcc[_0x55c528(0xdc)]===_0x55c528(0xcc))return[];return[..._0x213dcc[_0x55c528(0x100)][_0x55c528(0xff)](_0xee311b=>{const _0x4eb618=_0x55c528,_0x3f7409=_0x32f2d3['get'](_0xee311b);return{'name':_0xee311b,'alias':_0x3f7409['alias'],'type':_0x3f7409[_0x4eb618(0xd6)]};}),..._0x213dcc['statistics'][_0x55c528(0xff)](_0x58aff8=>({'name':_0x58aff8[_0x55c528(0x104)],'alias':_0x58aff8[_0x55c528(0x104)],'type':_0x58aff8[_0x55c528(0xda)]===_0x55c528(0xcc)?_0x55c528(0xe6):_0x32f2d3['get'](_0x58aff8[_0x55c528(0xfe)])['type']}))];}function projectValue(_0x14f568){const _0xf95031=_0x5acca8;if(_0x14f568===void 0x0)return null;if(_0x14f568 instanceof Date)return _0x14f568['toISOString']();if(_0x14f568===null||typeof _0x14f568===_0xf95031(0xed)||typeof _0x14f568==='boolean')return _0x14f568;if(typeof _0x14f568===_0xf95031(0xdd)&&Number['isFinite'](_0x14f568))return _0x14f568;throw new TypeError('Feature\x20query\x20returned\x20an\x20unsupported\x20attribute\x20value.');}function projectRows(_0x15d751,_0x2fd745,_0x26799b){const _0x60d04d=_0x5acca8;if(!Array[_0x60d04d(0xfc)](_0x15d751))throw new TypeError(_0x60d04d(0xe2));const _0x15a693=_0x15d751[_0x60d04d(0xe7)](0x0,_0x26799b)['map'](_0x34c76f=>{const _0x2fe60a=_0x60d04d;if(typeof _0x34c76f!==_0x2fe60a(0xfb)||_0x34c76f===null||!(_0x2fe60a(0x106)in _0x34c76f)||typeof _0x34c76f['attributes']!=='object'||_0x34c76f['attributes']===null||Array[_0x2fe60a(0xfc)](_0x34c76f[_0x2fe60a(0x106)]))throw new TypeError('Feature\x20query\x20returned\x20invalid\x20attributes.');const _0x46e0b1=_0x34c76f['attributes'];return Object['fromEntries'](_0x2fd745[_0x2fe60a(0xff)](({name:_0x4f8224})=>[_0x4f8224,projectValue(_0x46e0b1[_0x4f8224])]));});return{'rows':_0x15a693,'extra':_0x15d751['length']>_0x26799b};}function createFeatureQueryRuntime(_0x4da561){let _0x3c6754=![],_0x120fe7=0x0;function _0x5e7c6c(_0xa8df16,_0x175638){const _0x134727=_0xbf13;if(_0x3c6754||_0x4da561['isDisposed']()||_0xa8df16!==_0x120fe7)return{'code':'stale-controller','message':MESSAGES[_0x134727(0xdf)]};if(_0x175638?.[_0x134727(0xee)])return{'code':'cancelled','message':MESSAGES['cancelled']};if(!_0x4da561[_0x134727(0xcb)]())return{'code':'map-not-ready','message':MESSAGES['notReady']};return void 0x0;}const _0x4ef8bd=async(_0x504ea6,_0x147570)=>{const _0x12f9bd=_0xbf13,_0x594776=typeof _0x504ea6?.['layerId']===_0x12f9bd(0xed)&&_0x504ea6['layerId']['length']>0x0?_0x504ea6['layerId']:_0x12f9bd(0xd3),_0x3b8afc=ArcGISFeatureQueryRequestSchema[_0x12f9bd(0x101)](_0x504ea6);if(!_0x3b8afc[_0x12f9bd(0xd0)])return queryFailure(_0x594776,'invalid-predicate',MESSAGES['invalidRequest']);const {layerId:_0x2c9df5}=_0x3b8afc[_0x12f9bd(0xf5)],_0x5f3164=_0x120fe7;let _0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.[_0x12f9bd(0xf4)]);if(_0x4bc97a)return queryFailure(_0x2c9df5,_0x4bc97a['code'],_0x4bc97a['message']);const _0x1ea6a6=_0x4da561[_0x12f9bd(0x107)](_0x2c9df5);if(!_0x1ea6a6)return queryFailure(_0x2c9df5,_0x12f9bd(0xc7),unavailableLayerMessage(_0x2c9df5));if(_0x1ea6a6['type']!==_0x12f9bd(0xd4))return queryFailure(_0x2c9df5,_0x12f9bd(0xf7),unsupportedLayerMessage(_0x2c9df5));try{await _0x1ea6a6['load']({'signal':_0x147570?.[_0x12f9bd(0xf4)]});}catch{return _0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.[_0x12f9bd(0xf4)]),queryFailure(_0x2c9df5,_0x4bc97a?.['code']??_0x12f9bd(0xec),_0x4bc97a?.[_0x12f9bd(0xf9)]??MESSAGES[_0x12f9bd(0x109)]);}_0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.['signal']);if(_0x4bc97a)return queryFailure(_0x2c9df5,_0x4bc97a[_0x12f9bd(0xef)],_0x4bc97a['message']);let _0x49cf07;try{_0x49cf07=_0x1ea6a6[_0x12f9bd(0xe8)]['map'](_0xaace9f=>({'name':_0xaace9f[_0x12f9bd(0xe5)],'alias':_0xaace9f['alias']??'','type':_0xaace9f['type'],'timeZone':_0x1ea6a6[_0x12f9bd(0xdb)][_0x12f9bd(0xcd)](_0xaace9f)??null}));}catch{return queryFailure(_0x2c9df5,'query-failed',MESSAGES[_0x12f9bd(0x109)]);}const _0x10b235=new Set(_0x49cf07[_0x12f9bd(0xff)](({name:_0x413647})=>_0x413647));if(requestedFieldNames(_0x3b8afc['data'])['some'](_0x2a6f92=>!_0x10b235[_0x12f9bd(0xde)](_0x2a6f92)))return queryFailure(_0x2c9df5,_0x12f9bd(0xfd),MESSAGES['fieldNotFound']);let _0x29c607;try{_0x29c607=compileFeatureQueryProperties(_0x3b8afc[_0x12f9bd(0xf5)],_0x49cf07);}catch{return queryFailure(_0x2c9df5,_0x12f9bd(0xe3),MESSAGES[_0x12f9bd(0xca)]);}_0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.[_0x12f9bd(0xf4)]);if(_0x4bc97a)return queryFailure(_0x2c9df5,_0x4bc97a[_0x12f9bd(0xef)],_0x4bc97a[_0x12f9bd(0xf9)]);if(_0x3b8afc['data'][_0x12f9bd(0xdc)]==='count'){let _0x3c9724;try{const _0x19a73e={..._0x29c607};Reflect['deleteProperty'](_0x19a73e,_0x12f9bd(0xe9)),_0x3c9724=await _0x1ea6a6[_0x12f9bd(0x108)](_0x19a73e,{'signal':_0x147570?.[_0x12f9bd(0xf4)]});}catch{return _0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.[_0x12f9bd(0xf4)]),queryFailure(_0x2c9df5,_0x4bc97a?.[_0x12f9bd(0xef)]??_0x12f9bd(0xec),_0x4bc97a?.[_0x12f9bd(0xf9)]??MESSAGES[_0x12f9bd(0xeb)]);}_0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.[_0x12f9bd(0xf4)]);if(_0x4bc97a)return queryFailure(_0x2c9df5,_0x4bc97a['code'],_0x4bc97a['message']);if(!Number[_0x12f9bd(0x102)](_0x3c9724)||_0x3c9724<0x0)return queryFailure(_0x2c9df5,_0x12f9bd(0xec),MESSAGES[_0x12f9bd(0xeb)]);return{'ok':!![],'operation':'queryFeatureLayer','layer':{'id':_0x1ea6a6['id'],'title':_0x1ea6a6['title']??''},'mode':_0x12f9bd(0xcc),'columns':[],'rows':[],'count':_0x3c9724,'truncated':![]};}let _0x48da76;try{_0x48da76=await _0x1ea6a6['queryFeatures'](_0x29c607,{'signal':_0x147570?.['signal']});}catch{return _0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.['signal']),queryFailure(_0x2c9df5,_0x4bc97a?.['code']??'query-failed',_0x4bc97a?.['message']??MESSAGES[_0x12f9bd(0xeb)]);}_0x4bc97a=_0x5e7c6c(_0x5f3164,_0x147570?.[_0x12f9bd(0xf4)]);if(_0x4bc97a)return queryFailure(_0x2c9df5,_0x4bc97a['code'],_0x4bc97a['message']);try{const _0x462eb3=resultColumns(_0x3b8afc[_0x12f9bd(0xf5)],_0x49cf07),{rows:_0x39a353,extra:_0x475b38}=projectRows(_0x48da76['features'],_0x462eb3,_0x3b8afc['data']['resultLimit']);return{'ok':!![],'operation':'queryFeatureLayer','layer':{'id':_0x1ea6a6['id'],'title':_0x1ea6a6['title']??''},'mode':_0x3b8afc[_0x12f9bd(0xf5)]['mode'],'columns':_0x462eb3,'rows':_0x39a353,'count':null,'truncated':_0x48da76['exceededTransferLimit']===!![]||_0x475b38};}catch{return queryFailure(_0x2c9df5,_0x12f9bd(0xec),MESSAGES[_0x12f9bd(0xeb)]);}};return{'queryFeatureLayer':_0x4ef8bd,'dispose'(){if(_0x3c6754)return;_0x3c6754=!![],_0x120fe7+=0x1;}};}export{createFeatureQueryRuntime};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x53a893=_0x1a3d;function _0x1a3d(_0x4c3b1a,_0x4fb5e5){_0x4c3b1a=_0x4c3b1a-0x14b;const _0x1a163e=_0x1a16();let _0x1a3d88=_0x1a163e[_0x4c3b1a];return _0x1a3d88;}(function(_0x8966d5,_0x138d7f){const _0x3c9d4b=_0x1a3d,_0x523fbc=_0x8966d5();while(!![]){try{const _0x1fe552=parseInt(_0x3c9d4b(0x158))/0x1*(-parseInt(_0x3c9d4b(0x156))/0x2)+-parseInt(_0x3c9d4b(0x154))/0x3*(-parseInt(_0x3c9d4b(0x155))/0x4)+parseInt(_0x3c9d4b(0x151))/0x5*(-parseInt(_0x3c9d4b(0x15b))/0x6)+parseInt(_0x3c9d4b(0x14d))/0x7*(-parseInt(_0x3c9d4b(0x150))/0x8)+-parseInt(_0x3c9d4b(0x157))/0x9+parseInt(_0x3c9d4b(0x14b))/0xa*(parseInt(_0x3c9d4b(0x14f))/0xb)+parseInt(_0x3c9d4b(0x14e))/0xc;if(_0x1fe552===_0x138d7f)break;else _0x523fbc['push'](_0x523fbc['shift']());}catch(_0x3cd8cc){_0x523fbc['push'](_0x523fbc['shift']());}}}(_0x1a16,0x8be0b));import _0xf55baf from'react';import{createArcGISMapController}from'./createArcGISMapController.js';const loadingState={'status':_0x53a893(0x15a),'controller':null,'error':null};function normalizeError(_0x20eb1b){return _0x20eb1b instanceof Error?_0x20eb1b:new Error(String(_0x20eb1b));}function _0x1a16(){const _0x5f0770=['1976598FHOnvD','38FNctyt','useState','loading','932172auSFSl','error','580PbHUQG','dispose','15463OEnnoh','24194064hxACqR','42086AlFZDN','2008HoedDu','15MQnBpb','ready','current','348VaQUbe','18428eQfEwY','50494WWOxKj'];_0x1a16=function(){return _0x5f0770;};return _0x1a16();}function useArcGISMapControllerWithFactory(_0x375e1a,_0x5d0886){const _0x576613=_0x53a893,[_0x1fbefa,_0x2efeb7]=_0xf55baf[_0x576613(0x159)](loadingState);return _0xf55baf['useEffect'](()=>{const _0x410773=_0x576613,_0x1f626a=_0x375e1a[_0x410773(0x153)];let _0x4ef08b=![],_0x503762=null;return _0x2efeb7(loadingState),_0x1f626a&&void _0x5d0886(_0x1f626a)['then'](_0xcc1381=>{const _0x27e205=_0x410773;if(_0x4ef08b){_0xcc1381['dispose']();return;}_0x503762=_0xcc1381,_0x2efeb7({'status':_0x27e205(0x152),'controller':_0xcc1381['controller'],'error':null});},_0x36c6f2=>{const _0x1abff0=_0x410773;!_0x4ef08b&&_0x2efeb7({'status':_0x1abff0(0x15c),'controller':null,'error':normalizeError(_0x36c6f2)});}),()=>{const _0x5e6c5b=_0x410773;_0x4ef08b=!![],_0x503762?.[_0x5e6c5b(0x14c)]();};},[_0x5d0886,_0x375e1a]),_0x1fbefa;}function useArcGISMapController(_0xa91bfd){return useArcGISMapControllerWithFactory(_0xa91bfd,createArcGISMapController);}export{useArcGISMapController,useArcGISMapControllerWithFactory};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export * from "./api.js";
|
|
|
2
2
|
export { ArcGISMapView, ArcGISMapViewContent } from "./ArcGISMapView.js";
|
|
3
3
|
export * from "./catalog.js";
|
|
4
4
|
export * from "./controller/api.js";
|
|
5
|
+
export * from "./controller/featureFilter.js";
|
|
6
|
+
export * from "./controller/featureQuery.js";
|
|
5
7
|
export { createArcGISMapController, type ArcGISMapControllerHandle } from "./controller/createArcGISMapController.js";
|
|
6
8
|
export { useArcGISMapController, type ArcGISMapControllerStatus, type UseArcGISMapControllerResult } from "./controller/useArcGISMapController.js";
|
|
7
9
|
export * from "./prompt.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x15a9(){var _0x224bca=['1262504ivecPc','530lFowSq','1166772SRQifl','730182WnZjDX','21857fSRKPJ','17428ZerxQL','49ZiTXLg','3kcAWAI','5330iiKYIC','10651293EnCxoc','2921154zWXqOF'];_0x15a9=function(){return _0x224bca;};return _0x15a9();}(function(_0x20e3d5,_0x491e44){var _0x20a917=_0x56e9,_0x516b94=_0x20e3d5();while(!![]){try{var _0x440158=-parseInt(_0x20a917(0xfd))/0x1*(parseInt(_0x20a917(0xf9))/0x2)+parseInt(_0x20a917(0xf5))/0x3+-parseInt(_0x20a917(0xfb))/0x4*(parseInt(_0x20a917(0xf7))/0x5)+-parseInt(_0x20a917(0xf8))/0x6*(-parseInt(_0x20a917(0xfc))/0x7)+-parseInt(_0x20a917(0xf6))/0x8+parseInt(_0x20a917(0xf4))/0x9+parseInt(_0x20a917(0xf3))/0xa*(-parseInt(_0x20a917(0xfa))/0xb);if(_0x440158===_0x491e44)break;else _0x516b94['push'](_0x516b94['shift']());}catch(_0x1f607c){_0x516b94['push'](_0x516b94['shift']());}}}(_0x15a9,0xb5bee));import{ArcGISBasemaps,ArcGISMapViewApi,ArcGISMapViewPropsSchema,defaultArcGISBasemap,defaultArcGISMapControls,normalizeArcGISMapViewProps}from'./api.js';import{ArcGISMapView,ArcGISMapViewContent}from'./ArcGISMapView.js';import{ARCGIS_CATALOG_ID,arcgisComponentApis,arcgisComponents,arcgisPromptDescriptor,arcgisReactCatalog,arcgisRuntimeCatalog}from'./catalog.js';import{ArcGISMapCommandErrorCodes,ArcGISMapCommandResultSchema,ArcGISMapCommandSchema,ArcGISMapOperationOriginSchema,ArcGISMapSnapshotNotificationSchema,ArcGISMapSnapshotSchema}from'./controller/api.js';import{ArcGISClearFeatureFilterRequestSchema,ArcGISClearFeatureFilterResultSchema,ArcGISFeatureFilterErrorCodes,ArcGISFeatureFilterOperatorSchema,ArcGISFeatureFilterOperators,ArcGISFeatureFilterRequestSchema,ArcGISFeatureLayerDescriptionResultSchema,ArcGISFeaturePredicateSchema,ArcGISSetFeatureFilterResultSchema,ArcGISValidateFeatureFilterResultSchema,isArcGISFeatureFilterFieldTypeSupported,isFeaturePredicateValueCountValid}from'./controller/featureFilter.js';import{ArcGISFeatureQueryErrorCodes,ArcGISFeatureQueryRequestSchema,ArcGISFeatureQueryResultSchema,ArcGISFeatureStatisticTypes}from'./controller/featureQuery.js';import{createArcGISMapController}from'./controller/createArcGISMapController.js';import{useArcGISMapController}from'./controller/useArcGISMapController.js';function _0x56e9(_0x5ed28e,_0x21659c){_0x5ed28e=_0x5ed28e-0xf3;var _0x15a91b=_0x15a9();var _0x56e983=_0x15a91b[_0x5ed28e];return _0x56e983;}import{arcGISMapViewDescription,arcgisStyleGuide}from'./prompt.js';export{ARCGIS_CATALOG_ID,ArcGISBasemaps,ArcGISClearFeatureFilterRequestSchema,ArcGISClearFeatureFilterResultSchema,ArcGISFeatureFilterErrorCodes,ArcGISFeatureFilterOperatorSchema,ArcGISFeatureFilterOperators,ArcGISFeatureFilterRequestSchema,ArcGISFeatureLayerDescriptionResultSchema,ArcGISFeaturePredicateSchema,ArcGISFeatureQueryErrorCodes,ArcGISFeatureQueryRequestSchema,ArcGISFeatureQueryResultSchema,ArcGISFeatureStatisticTypes,ArcGISMapCommandErrorCodes,ArcGISMapCommandResultSchema,ArcGISMapCommandSchema,ArcGISMapOperationOriginSchema,ArcGISMapSnapshotNotificationSchema,ArcGISMapSnapshotSchema,ArcGISMapView,ArcGISMapViewApi,ArcGISMapViewContent,ArcGISMapViewPropsSchema,ArcGISSetFeatureFilterResultSchema,ArcGISValidateFeatureFilterResultSchema,arcGISMapViewDescription,arcgisComponentApis,arcgisComponents,arcgisPromptDescriptor,arcgisReactCatalog,arcgisRuntimeCatalog,arcgisStyleGuide,createArcGISMapController,defaultArcGISBasemap,defaultArcGISMapControls,isArcGISFeatureFilterFieldTypeSupported,isFeaturePredicateValueCountValid,normalizeArcGISMapViewProps,useArcGISMapController};
|
package/dist/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x252de9=_0x1cbc;(function(_0x5942bb,_0x456b65){const _0xf27f08=_0x1cbc,_0x2bdfb7=_0x5942bb();while(!![]){try{const _0x55a26e=parseInt(_0xf27f08(0x15f))/0x1*(parseInt(_0xf27f08(0x164))/0x2)+parseInt(_0xf27f08(0x161))/0x3*(-parseInt(_0xf27f08(0x15d))/0x4)+parseInt(_0xf27f08(0x166))/0x5*(-parseInt(_0xf27f08(0x159))/0x6)+parseInt(_0xf27f08(0x162))/0x7*(parseInt(_0xf27f08(0x155))/0x8)+-parseInt(_0xf27f08(0x156))/0x9+parseInt(_0xf27f08(0x160))/0xa*(parseInt(_0xf27f08(0x163))/0xb)+parseInt(_0xf27f08(0x157))/0xc*(parseInt(_0xf27f08(0x15a))/0xd);if(_0x55a26e===_0x456b65)break;else _0x2bdfb7['push'](_0x2bdfb7['shift']());}catch(_0x34d687){_0x2bdfb7['push'](_0x2bdfb7['shift']());}}}(_0x4f37,0xf2aae));const arcGISMapViewDescription=[_0x252de9(0x15b),'Use\x20`source.type:\x20\x22webmap\x22`\x20with\x20`itemId`\x20when\x20the\x20map\x20should\x20show\x20saved\x20ArcGIS\x20layers,\x20symbology,\x20popups,\x20legend\x20metadata,\x20and\x20initial\x20viewpoint.','Use\x20`source.type:\x20\x22basemap\x22`\x20with\x20`center.latitude`,\x20`center.longitude`,\x20optional\x20`zoom`,\x20and\x20optional\x20enum\x20`basemap`\x20for\x20lightweight\x20location\x20context.','Use\x20`basemap:\x20\x22portal/default\x22`\x20when\x20the\x20map\x20should\x20use\x20the\x20application-global\x20portal\x27s\x20configured\x20default\x20basemap.','Do\x20not\x20provide\x20layers,\x20graphics,\x20markers,\x20symbols,\x20renderers,\x20queries,\x20filters,\x20selections,\x20or\x20workspace\x20commands.',_0x252de9(0x15c)]['join']('\x20'),arcgisStyleGuide=['Use\x20ArcGISMapView\x20only\x20when\x20a\x20map\x20is\x20useful\x20to\x20the\x20answer.',_0x252de9(0x15e),_0x252de9(0x158),'Keep\x20title\x20and\x20description\x20short\x20enough\x20for\x20a\x20chat\x20message.'][_0x252de9(0x165)]('\x0a');function _0x4f37(){const _0x5dc284=['4096120Zhwvws','11165634ahGqMC','12GcVkgI','Prefer\x20basemap\x20source\x20only\x20for\x20simple\x20location\x20context.','1302mSbCzy','33861711VAaFNz','ArcGIS\x20map\x20display\x20component\x20for\x20embedding\x20a\x20compact\x20map\x20in\x20a\x20chat\x20message.','Optional\x20`controls`\x20can\x20enable\x20`zoom`,\x20`legend`,\x20`layerList`,\x20and\x20`search`;\x20default\x20behavior\x20is\x20zoom\x20only.','16652qgvFYL','Prefer\x20webmap\x20source\x20for\x20real\x20GIS\x20content.','6709gQgfED','60OFFXKb','642EyboRx','7HohZOM','243650fdaVUo','200sZYXZJ','join','18320JTOlUR'];_0x4f37=function(){return _0x5dc284;};return _0x4f37();}function _0x1cbc(_0x201b87,_0x18fd91){_0x201b87=_0x201b87-0x155;const _0x4f3747=_0x4f37();let _0x1cbca2=_0x4f3747[_0x201b87];return _0x1cbca2;}export{arcGISMapViewDescription,arcgisStyleGuide};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-ui-experience/ui-arcgis",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@arcgis/core": "^5.1.9",
|
|
30
30
|
"@arcgis/map-components": "^5.1.9",
|
|
31
31
|
"zod": "^3.25.76",
|
|
32
|
-
"@agentic-ui-experience/ui-core": "0.0.1-beta.
|
|
33
|
-
"@agentic-ui-experience/ui-
|
|
34
|
-
"@agentic-ui-experience/ui-
|
|
32
|
+
"@agentic-ui-experience/ui-core": "0.0.1-beta.4",
|
|
33
|
+
"@agentic-ui-experience/ui-react": "0.0.1-beta.4",
|
|
34
|
+
"@agentic-ui-experience/ui-runtime": "0.0.1-beta.4"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "^18.0.0 || ^19.0.0",
|