@arcgis/common-components 5.1.0-next.112 → 5.1.0-next.114
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/AETG56T6.js +2 -0
- package/dist/cdn/JBG3NW22.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +7635 -43
- package/dist/components/arcgis-field-info/customElement.js +27 -27
- package/dist/components/arcgis-field-info/utils/basic.d.ts +18 -4
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +18 -4
- package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +15 -4
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +0 -20
- package/dist/loader.js +0 -2
- package/dist/types/lumina.d.ts +0 -12
- package/dist/types/preact.d.ts +0 -14
- package/dist/types/react.d.ts +0 -16
- package/dist/types/stencil.d.ts +0 -12
- package/package.json +3 -3
- package/dist/cdn/3LK46I3I.js +0 -2
- package/dist/cdn/53RIFE4K.js +0 -2
- package/dist/cdn/J7JP7Q3W.js +0 -2
- package/dist/cdn/KI62NSDM.js +0 -2
- package/dist/cdn/VTD2EUL6.js +0 -2
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ar.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bg.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bs.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ca.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.cs.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.da.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.de.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.el.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.en-US.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.en.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.es.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.et.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fi.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.he.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hu.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.id.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.it.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ja.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ko.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lt.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lv.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.nl.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.no.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pl.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-BR.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-PT.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ro.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ru.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sk.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sl.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sv.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.th.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.tr.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.uk.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.vi.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-CN.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-HK.json +0 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-TW.json +0 -1
- package/dist/chunks/spatial-references.js +0 -7598
- package/dist/components/arcgis-spatial-reference-picker/customElement.d.ts +0 -327
- package/dist/components/arcgis-spatial-reference-picker/customElement.js +0 -110
- package/dist/components/arcgis-spatial-reference-picker/index.d.ts +0 -1
- package/dist/components/arcgis-spatial-reference-picker/index.js +0 -3
- package/dist/components/arcgis-spatial-reference-picker-tree/customElement.d.ts +0 -35
- package/dist/components/arcgis-spatial-reference-picker-tree/customElement.js +0 -77
- package/dist/components/arcgis-spatial-reference-picker-tree/index.d.ts +0 -1
- package/dist/components/arcgis-spatial-reference-picker-tree/index.js +0 -3
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
|
-
|
|
5
|
-
/** @internal */
|
|
6
|
-
export abstract class ArcgisSpatialReferencePicker extends LitElement {
|
|
7
|
-
/**
|
|
8
|
-
* Contains the translations for this component.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
protected _messages: {
|
|
13
|
-
"ARC (equal arc-second)": string;
|
|
14
|
-
Africa: string;
|
|
15
|
-
Antarctica: string;
|
|
16
|
-
Argentina: string;
|
|
17
|
-
Asia: string;
|
|
18
|
-
"Asteroid Belt": string;
|
|
19
|
-
"Atlantic Ocean": string;
|
|
20
|
-
Australia: string;
|
|
21
|
-
"Australia and New Zealand": string;
|
|
22
|
-
Austria: string;
|
|
23
|
-
"BLM (US Feet)": string;
|
|
24
|
-
Bangladesh: string;
|
|
25
|
-
"Beijing 1954": string;
|
|
26
|
-
Bhutan: string;
|
|
27
|
-
CGCS2000: string;
|
|
28
|
-
Canada: string;
|
|
29
|
-
Caribbean: string;
|
|
30
|
-
"Caribbean Sea": string;
|
|
31
|
-
"Central America": string;
|
|
32
|
-
"Central and North America": string;
|
|
33
|
-
Colombia: string;
|
|
34
|
-
Continental: string;
|
|
35
|
-
"County Systems": string;
|
|
36
|
-
"Democratic Republic of the Congo": string;
|
|
37
|
-
"EPSG Arctic": string;
|
|
38
|
-
Earth: string;
|
|
39
|
-
"Ellipsoidal-based": string;
|
|
40
|
-
Europe: string;
|
|
41
|
-
Finland: string;
|
|
42
|
-
France: string;
|
|
43
|
-
"GSK 2011": string;
|
|
44
|
-
"Gauss Kruger": string;
|
|
45
|
-
"Geographic Coordinate Systems": string;
|
|
46
|
-
Germany: string;
|
|
47
|
-
"Gravity-related": string;
|
|
48
|
-
"Greenwich-based": string;
|
|
49
|
-
"Highways England": string;
|
|
50
|
-
Illinois: string;
|
|
51
|
-
"Indian Ocean": string;
|
|
52
|
-
"Indian Subcontinent": string;
|
|
53
|
-
Indiana: string;
|
|
54
|
-
Indonesia: string;
|
|
55
|
-
Iowa: string;
|
|
56
|
-
"Ireland and United Kingdom": string;
|
|
57
|
-
Italy: string;
|
|
58
|
-
Japan: string;
|
|
59
|
-
Jupiter: string;
|
|
60
|
-
Kansas: string;
|
|
61
|
-
"Las Vegas": string;
|
|
62
|
-
Libya: string;
|
|
63
|
-
Malaysia: string;
|
|
64
|
-
"Malaysia and Singapore": string;
|
|
65
|
-
Mars: string;
|
|
66
|
-
Mercury: string;
|
|
67
|
-
Meters: string;
|
|
68
|
-
Minnesota: string;
|
|
69
|
-
Montana: string;
|
|
70
|
-
"NAD 1927": string;
|
|
71
|
-
"NAD 1927 (US Feet)": string;
|
|
72
|
-
"NAD 1983": string;
|
|
73
|
-
"NAD 1983 (2011)": string;
|
|
74
|
-
"NAD 1983 (2011) (Intl Feet)": string;
|
|
75
|
-
"NAD 1983 (2011) (Meters)": string;
|
|
76
|
-
"NAD 1983 (2011) (US Feet)": string;
|
|
77
|
-
"NAD 1983 (CORS96) (Intl Feet)": string;
|
|
78
|
-
"NAD 1983 (CORS96) (Meters)": string;
|
|
79
|
-
"NAD 1983 (CORS96) (US Feet)": string;
|
|
80
|
-
"NAD 1983 (Intl Feet)": string;
|
|
81
|
-
"NAD 1983 (Meters)": string;
|
|
82
|
-
"NAD 1983 (PA11) (Meters)": string;
|
|
83
|
-
"NAD 1983 (PA11) (US Feet)": string;
|
|
84
|
-
"NAD 1983 (US Feet)": string;
|
|
85
|
-
"NAD 1983 HARN (Intl Feet)": string;
|
|
86
|
-
"NAD 1983 HARN (Meters)": string;
|
|
87
|
-
"NAD 1983 HARN (US Feet)": string;
|
|
88
|
-
"NAD 1983 NSRS2007 (Intl Feet)": string;
|
|
89
|
-
"NAD 1983 NSRS2007 (Meters)": string;
|
|
90
|
-
"NAD 1983 NSRS2007 (US Feet)": string;
|
|
91
|
-
"National Grids": string;
|
|
92
|
-
Navajo: string;
|
|
93
|
-
Neptune: string;
|
|
94
|
-
"New Beijing": string;
|
|
95
|
-
"New Zealand": string;
|
|
96
|
-
"North America": string;
|
|
97
|
-
"Northern Hemisphere": string;
|
|
98
|
-
Norway: string;
|
|
99
|
-
Oceans: string;
|
|
100
|
-
Oregon: string;
|
|
101
|
-
"Other GCS": string;
|
|
102
|
-
"Pacific Ocean": string;
|
|
103
|
-
Pluto: string;
|
|
104
|
-
Polar: string;
|
|
105
|
-
Portugal: string;
|
|
106
|
-
"Projected Coordinate Systems": string;
|
|
107
|
-
"Pulkovo 1942": string;
|
|
108
|
-
"Pulkovo 1995": string;
|
|
109
|
-
Replaced: string;
|
|
110
|
-
"SAD 1969": string;
|
|
111
|
-
SIRGAS: string;
|
|
112
|
-
"SIRGAS 2000": string;
|
|
113
|
-
Saturn: string;
|
|
114
|
-
"Solar System": string;
|
|
115
|
-
"South Africa": string;
|
|
116
|
-
"South America": string;
|
|
117
|
-
"South Korea": string;
|
|
118
|
-
"Southern Hemisphere": string;
|
|
119
|
-
"Spheroid-based": string;
|
|
120
|
-
"State Plane": string;
|
|
121
|
-
"State Systems": string;
|
|
122
|
-
Sweden: string;
|
|
123
|
-
"Switzerland and Liechtenstein": string;
|
|
124
|
-
Texas: string;
|
|
125
|
-
Tribal: string;
|
|
126
|
-
Turkey: string;
|
|
127
|
-
"US Feet": string;
|
|
128
|
-
"USA and territories": string;
|
|
129
|
-
UTM: string;
|
|
130
|
-
Ukraine: string;
|
|
131
|
-
"Unknown Height Systems": string;
|
|
132
|
-
Uranus: string;
|
|
133
|
-
Venus: string;
|
|
134
|
-
"Vertical Coordinate Systems": string;
|
|
135
|
-
Vietnam: string;
|
|
136
|
-
"WGS 1972": string;
|
|
137
|
-
"WGS 1984": string;
|
|
138
|
-
Wisconsin: string;
|
|
139
|
-
"Wisconsin CRS": string;
|
|
140
|
-
World: string;
|
|
141
|
-
"World (Sphere-based)": string;
|
|
142
|
-
Wyoming: string;
|
|
143
|
-
"Xian 1980": string;
|
|
144
|
-
noMatchesFound: string;
|
|
145
|
-
noResults: string;
|
|
146
|
-
searchPlaceholder: string;
|
|
147
|
-
} & T9nMeta<{
|
|
148
|
-
"ARC (equal arc-second)": string;
|
|
149
|
-
Africa: string;
|
|
150
|
-
Antarctica: string;
|
|
151
|
-
Argentina: string;
|
|
152
|
-
Asia: string;
|
|
153
|
-
"Asteroid Belt": string;
|
|
154
|
-
"Atlantic Ocean": string;
|
|
155
|
-
Australia: string;
|
|
156
|
-
"Australia and New Zealand": string;
|
|
157
|
-
Austria: string;
|
|
158
|
-
"BLM (US Feet)": string;
|
|
159
|
-
Bangladesh: string;
|
|
160
|
-
"Beijing 1954": string;
|
|
161
|
-
Bhutan: string;
|
|
162
|
-
CGCS2000: string;
|
|
163
|
-
Canada: string;
|
|
164
|
-
Caribbean: string;
|
|
165
|
-
"Caribbean Sea": string;
|
|
166
|
-
"Central America": string;
|
|
167
|
-
"Central and North America": string;
|
|
168
|
-
Colombia: string;
|
|
169
|
-
Continental: string;
|
|
170
|
-
"County Systems": string;
|
|
171
|
-
"Democratic Republic of the Congo": string;
|
|
172
|
-
"EPSG Arctic": string;
|
|
173
|
-
Earth: string;
|
|
174
|
-
"Ellipsoidal-based": string;
|
|
175
|
-
Europe: string;
|
|
176
|
-
Finland: string;
|
|
177
|
-
France: string;
|
|
178
|
-
"GSK 2011": string;
|
|
179
|
-
"Gauss Kruger": string;
|
|
180
|
-
"Geographic Coordinate Systems": string;
|
|
181
|
-
Germany: string;
|
|
182
|
-
"Gravity-related": string;
|
|
183
|
-
"Greenwich-based": string;
|
|
184
|
-
"Highways England": string;
|
|
185
|
-
Illinois: string;
|
|
186
|
-
"Indian Ocean": string;
|
|
187
|
-
"Indian Subcontinent": string;
|
|
188
|
-
Indiana: string;
|
|
189
|
-
Indonesia: string;
|
|
190
|
-
Iowa: string;
|
|
191
|
-
"Ireland and United Kingdom": string;
|
|
192
|
-
Italy: string;
|
|
193
|
-
Japan: string;
|
|
194
|
-
Jupiter: string;
|
|
195
|
-
Kansas: string;
|
|
196
|
-
"Las Vegas": string;
|
|
197
|
-
Libya: string;
|
|
198
|
-
Malaysia: string;
|
|
199
|
-
"Malaysia and Singapore": string;
|
|
200
|
-
Mars: string;
|
|
201
|
-
Mercury: string;
|
|
202
|
-
Meters: string;
|
|
203
|
-
Minnesota: string;
|
|
204
|
-
Montana: string;
|
|
205
|
-
"NAD 1927": string;
|
|
206
|
-
"NAD 1927 (US Feet)": string;
|
|
207
|
-
"NAD 1983": string;
|
|
208
|
-
"NAD 1983 (2011)": string;
|
|
209
|
-
"NAD 1983 (2011) (Intl Feet)": string;
|
|
210
|
-
"NAD 1983 (2011) (Meters)": string;
|
|
211
|
-
"NAD 1983 (2011) (US Feet)": string;
|
|
212
|
-
"NAD 1983 (CORS96) (Intl Feet)": string;
|
|
213
|
-
"NAD 1983 (CORS96) (Meters)": string;
|
|
214
|
-
"NAD 1983 (CORS96) (US Feet)": string;
|
|
215
|
-
"NAD 1983 (Intl Feet)": string;
|
|
216
|
-
"NAD 1983 (Meters)": string;
|
|
217
|
-
"NAD 1983 (PA11) (Meters)": string;
|
|
218
|
-
"NAD 1983 (PA11) (US Feet)": string;
|
|
219
|
-
"NAD 1983 (US Feet)": string;
|
|
220
|
-
"NAD 1983 HARN (Intl Feet)": string;
|
|
221
|
-
"NAD 1983 HARN (Meters)": string;
|
|
222
|
-
"NAD 1983 HARN (US Feet)": string;
|
|
223
|
-
"NAD 1983 NSRS2007 (Intl Feet)": string;
|
|
224
|
-
"NAD 1983 NSRS2007 (Meters)": string;
|
|
225
|
-
"NAD 1983 NSRS2007 (US Feet)": string;
|
|
226
|
-
"National Grids": string;
|
|
227
|
-
Navajo: string;
|
|
228
|
-
Neptune: string;
|
|
229
|
-
"New Beijing": string;
|
|
230
|
-
"New Zealand": string;
|
|
231
|
-
"North America": string;
|
|
232
|
-
"Northern Hemisphere": string;
|
|
233
|
-
Norway: string;
|
|
234
|
-
Oceans: string;
|
|
235
|
-
Oregon: string;
|
|
236
|
-
"Other GCS": string;
|
|
237
|
-
"Pacific Ocean": string;
|
|
238
|
-
Pluto: string;
|
|
239
|
-
Polar: string;
|
|
240
|
-
Portugal: string;
|
|
241
|
-
"Projected Coordinate Systems": string;
|
|
242
|
-
"Pulkovo 1942": string;
|
|
243
|
-
"Pulkovo 1995": string;
|
|
244
|
-
Replaced: string;
|
|
245
|
-
"SAD 1969": string;
|
|
246
|
-
SIRGAS: string;
|
|
247
|
-
"SIRGAS 2000": string;
|
|
248
|
-
Saturn: string;
|
|
249
|
-
"Solar System": string;
|
|
250
|
-
"South Africa": string;
|
|
251
|
-
"South America": string;
|
|
252
|
-
"South Korea": string;
|
|
253
|
-
"Southern Hemisphere": string;
|
|
254
|
-
"Spheroid-based": string;
|
|
255
|
-
"State Plane": string;
|
|
256
|
-
"State Systems": string;
|
|
257
|
-
Sweden: string;
|
|
258
|
-
"Switzerland and Liechtenstein": string;
|
|
259
|
-
Texas: string;
|
|
260
|
-
Tribal: string;
|
|
261
|
-
Turkey: string;
|
|
262
|
-
"US Feet": string;
|
|
263
|
-
"USA and territories": string;
|
|
264
|
-
UTM: string;
|
|
265
|
-
Ukraine: string;
|
|
266
|
-
"Unknown Height Systems": string;
|
|
267
|
-
Uranus: string;
|
|
268
|
-
Venus: string;
|
|
269
|
-
"Vertical Coordinate Systems": string;
|
|
270
|
-
Vietnam: string;
|
|
271
|
-
"WGS 1972": string;
|
|
272
|
-
"WGS 1984": string;
|
|
273
|
-
Wisconsin: string;
|
|
274
|
-
"Wisconsin CRS": string;
|
|
275
|
-
World: string;
|
|
276
|
-
"World (Sphere-based)": string;
|
|
277
|
-
Wyoming: string;
|
|
278
|
-
"Xian 1980": string;
|
|
279
|
-
noMatchesFound: string;
|
|
280
|
-
noResults: string;
|
|
281
|
-
searchPlaceholder: string;
|
|
282
|
-
}>;
|
|
283
|
-
/**
|
|
284
|
-
* When true the arcgis-spatial-reference-picker-tree will be filtered to display the default wkid when the component loads.
|
|
285
|
-
* The default wkid will also be shown in the search element when this value is true.
|
|
286
|
-
* Currently MapViewer Analysis UI has the property set to its default value of false, to avoid auto filtering.
|
|
287
|
-
*
|
|
288
|
-
* @default false
|
|
289
|
-
*/
|
|
290
|
-
accessor autoFilterToDefault: boolean;
|
|
291
|
-
/**
|
|
292
|
-
* The wkid that will be used as the default when no user selection has been made.
|
|
293
|
-
* This should be the wkid of the base map or the wkid of the first layer in the map.
|
|
294
|
-
* If no default is provided, it will fall back to WGS 84 (Web Mercator)
|
|
295
|
-
*
|
|
296
|
-
* @default 4326
|
|
297
|
-
*/
|
|
298
|
-
accessor defaultWkid: number;
|
|
299
|
-
/**
|
|
300
|
-
* When true the search input is displayed and users can filter spatial references.
|
|
301
|
-
*
|
|
302
|
-
* @default false
|
|
303
|
-
*/
|
|
304
|
-
accessor filterEnabled: boolean;
|
|
305
|
-
/**
|
|
306
|
-
* Categories to hide from the spatial-reference-picker.
|
|
307
|
-
* The three top-level categories are "Projected Coordinate Systems", "Geographic Coordinate Systems", and "Vertical Coordinate Systems".
|
|
308
|
-
* Each of these categories has sub-categories that can also be hidden, to see the full list of categories, see the `srCategories` that is imported.
|
|
309
|
-
*
|
|
310
|
-
* @example
|
|
311
|
-
* // Hide the "Projected Coordinate Systems" category
|
|
312
|
-
* hideCategories: ["Projected Coordinate Systems"]
|
|
313
|
-
* @example
|
|
314
|
-
* // Hide the "Projected Coordinate Systems" and "Geographic Coordinate Systems" categories
|
|
315
|
-
* hideCategories: ["Projected Coordinate Systems", "Geographic Coordinate Systems"]
|
|
316
|
-
*/
|
|
317
|
-
accessor hideCategories: string[] | undefined;
|
|
318
|
-
/** The current spatial reference selection as a WKID string */
|
|
319
|
-
accessor value: { latestWkid?: number; } | undefined;
|
|
320
|
-
/** @returns the description of the spatial reference */
|
|
321
|
-
getSRDescription(): Promise<string | undefined>;
|
|
322
|
-
/** Emitted when the spatial reference selection changes */
|
|
323
|
-
readonly arcgisChange: import("@arcgis/lumina").TargetedEvent<this, { latestWkid?: number; } | undefined>;
|
|
324
|
-
readonly "@eventTypes": {
|
|
325
|
-
arcgisChange: ArcgisSpatialReferencePicker["arcgisChange"]["detail"];
|
|
326
|
-
};
|
|
327
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as n } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as o, html as a } from "lit";
|
|
4
|
-
import { createRef as c, ref as h } from "lit/directives/ref.js";
|
|
5
|
-
import { LitElement as u, createEvent as f } from "@arcgis/lumina";
|
|
6
|
-
import { debounce as d } from "@arcgis/toolkit/function";
|
|
7
|
-
import { substitute as p } from "@arcgis/core/intl.js";
|
|
8
|
-
import { u as g } from "../../chunks/useT9n.js";
|
|
9
|
-
import { s as m } from "../../chunks/spatial-references.js";
|
|
10
|
-
const v = o`:host{overflow-y:hidden;display:flex;flex-direction:column;--calcite-color-border-input: var(--calcite-color-border-2);height:var(--arcgis-spatial-reference-picker-height, 45vh);min-width:var(--arcgis-spatial-reference-picker-min-width, 20rem);max-width:var(--arcgis-spatial-reference-picker-max-width, 27rem)}.no-matches-found-msg{margin:var(--calcite-space-sm);font-size:var(--calcite-font-size--2)}arcgis-spatial-reference-picker-tree{flex:1}`;
|
|
11
|
-
class S extends u {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.searchText = "", this.searchInput = c(), this.treeElement = c(), this._messages = g({ blocking: !0 }), this.wkidMap = /* @__PURE__ */ new Map(), this.performantFilterSpatialReferences = d((e) => {
|
|
14
|
-
this.updateSearchResults(e);
|
|
15
|
-
}, 250), this.autoFilterToDefault = !1, this.defaultWkid = 4326, this.filterEnabled = !1, this.arcgisChange = f();
|
|
16
|
-
}
|
|
17
|
-
static {
|
|
18
|
-
this.properties = { searchResults: 16, autoFilterToDefault: 5, defaultWkid: 9, value: 0, hideCategories: 0, filterEnabled: 5 };
|
|
19
|
-
}
|
|
20
|
-
static {
|
|
21
|
-
this.styles = v;
|
|
22
|
-
}
|
|
23
|
-
async getSRDescription() {
|
|
24
|
-
return this.value?.latestWkid !== void 0 ? await Promise.resolve(this.getSpatialReferenceDescription(this.value?.latestWkid)) : await Promise.resolve(void 0);
|
|
25
|
-
}
|
|
26
|
-
load() {
|
|
27
|
-
this.value = this.value ?? { latestWkid: this.defaultWkid };
|
|
28
|
-
const e = this.filterSrCategories(m);
|
|
29
|
-
this.visibleSrCategories = this.translateSrCategories(e), this.buildWkidMap(this.visibleSrCategories), this.applyAutoFilterToDefault();
|
|
30
|
-
}
|
|
31
|
-
buildWkidMap(e) {
|
|
32
|
-
const s = /* @__PURE__ */ new Map(), t = this.flattenObject(e);
|
|
33
|
-
Object.keys(t).forEach((i) => {
|
|
34
|
-
s.set(Number(i), t[i]);
|
|
35
|
-
}), this.wkidMap = s;
|
|
36
|
-
}
|
|
37
|
-
flattenObject(e) {
|
|
38
|
-
const s = {};
|
|
39
|
-
return Object.keys(e).forEach((t) => {
|
|
40
|
-
const i = e[t];
|
|
41
|
-
typeof i == "object" ? Object.assign(s, this.flattenObject(i)) : s[t] = i;
|
|
42
|
-
}), s;
|
|
43
|
-
}
|
|
44
|
-
translateSrCategories(e) {
|
|
45
|
-
const s = {};
|
|
46
|
-
return this.recursiveTranslate(e, s), s;
|
|
47
|
-
}
|
|
48
|
-
recursiveTranslate(e, s) {
|
|
49
|
-
Object.keys(e).forEach((t) => {
|
|
50
|
-
const i = this.getTranslatedKey(t);
|
|
51
|
-
typeof e[t] == "object" ? (s[i] = {}, this.recursiveTranslate(e[t], s[i])) : s[i] = e[t];
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
getTranslatedKey(e) {
|
|
55
|
-
return e in this._messages ? this._messages[e] : e;
|
|
56
|
-
}
|
|
57
|
-
filterSrCategories(e) {
|
|
58
|
-
const s = {};
|
|
59
|
-
return Object.keys(e).forEach((t) => {
|
|
60
|
-
this.hideCategories?.includes(t) || (typeof e[t] == "object" ? s[t] = this.filterSrCategories(e[t]) : s[t] = e[t]);
|
|
61
|
-
}), s;
|
|
62
|
-
}
|
|
63
|
-
setSpatialRef(e) {
|
|
64
|
-
this.value = { latestWkid: Number(e) }, this.arcgisChange.emit(this.value);
|
|
65
|
-
}
|
|
66
|
-
getSpatialReferenceDescription(e) {
|
|
67
|
-
return this.wkidMap.get(e);
|
|
68
|
-
}
|
|
69
|
-
filterSpatialReferences(e) {
|
|
70
|
-
const s = e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&"), t = new RegExp(s, "igu"), i = {};
|
|
71
|
-
return this.wkidMap.forEach((r, l) => {
|
|
72
|
-
t.lastIndex = 0, (t.test(r) || t.test(l.toString())) && (i[String(l)] = r);
|
|
73
|
-
}), i;
|
|
74
|
-
}
|
|
75
|
-
handleTreeValueChange(e) {
|
|
76
|
-
e.stopPropagation(), this.setSpatialRef(this.treeElement.value?.value ?? "");
|
|
77
|
-
}
|
|
78
|
-
inputKeyDown(e) {
|
|
79
|
-
e.key === "Enter" && this.selectFirstChild(!0);
|
|
80
|
-
}
|
|
81
|
-
selectFirstChild(e) {
|
|
82
|
-
const s = this.treeElement.value, t = s?.shadowRoot?.querySelector("calcite-tree-item:not([has-children]):not([data-key='placeholder'])") || void 0;
|
|
83
|
-
s !== void 0 && t !== void 0 && (t.selected = !0, this.setSpatialRef(t.dataset.key ?? ""), e && t.focus());
|
|
84
|
-
}
|
|
85
|
-
updateSearchResults(e) {
|
|
86
|
-
this.searchResults = this.filterSpatialReferences(e);
|
|
87
|
-
}
|
|
88
|
-
searchSpatialReferences(e) {
|
|
89
|
-
e.target !== null && this.setSearchText(e.target.value ?? "");
|
|
90
|
-
}
|
|
91
|
-
setSearchText(e) {
|
|
92
|
-
this.searchText = e, this.searchText.length > 1 ? this.performantFilterSpatialReferences(this.searchText) : this.searchResults = void 0;
|
|
93
|
-
}
|
|
94
|
-
applyAutoFilterToDefault() {
|
|
95
|
-
if (!this.autoFilterToDefault || this.defaultWkid === void 0)
|
|
96
|
-
return;
|
|
97
|
-
const e = this.defaultWkid.toString();
|
|
98
|
-
this.searchText = e, this.updateSearchResults(e);
|
|
99
|
-
}
|
|
100
|
-
render() {
|
|
101
|
-
const e = p(this._messages.noMatchesFound, {
|
|
102
|
-
searchTerm: this.searchText ?? ""
|
|
103
|
-
});
|
|
104
|
-
return a`${this.filterEnabled && a`<calcite-input @calciteInputInput=${this.searchSpatialReferences} @keydown=${this.inputKeyDown} .placeholder=${this._messages.searchPlaceholder} scale=s type=search .value=${this.searchText} icon autofocus ${h(this.searchInput)}></calcite-input>` || ""}${this.searchText.length > 1 && this.searchResults && Object.keys(this.searchResults).length === 0 && a`<p class="no-matches-found-msg">${e}</p>` || ""}<arcgis-spatial-reference-picker-tree .data=${this.searchResults !== void 0 && this.searchText.length > 0 ? this.searchResults : this.visibleSrCategories} .value=${this.value && `${this.value?.latestWkid}`} @arcgisChange=${this.handleTreeValueChange} ${h(this.treeElement)}></arcgis-spatial-reference-picker-tree>`;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
n("arcgis-spatial-reference-picker", S);
|
|
108
|
-
export {
|
|
109
|
-
S as ArcgisSpatialReferencePicker
|
|
110
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { NestedObject } from "../../utils/spatial-references.js";
|
|
4
|
-
|
|
5
|
-
/** @internal */
|
|
6
|
-
export abstract class ArcgisSpatialReferencePickerTree extends LitElement {
|
|
7
|
-
/**
|
|
8
|
-
* The data to display in the tree. Supports nested data.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* data = {
|
|
12
|
-
* "parent item": {
|
|
13
|
-
* "child item": "child item value",
|
|
14
|
-
* "sub-parent child item": {
|
|
15
|
-
* "child item of nested parent key": "child item of nested parent value"
|
|
16
|
-
* },
|
|
17
|
-
* "child item 2 key": "child item 2 value"
|
|
18
|
-
* },
|
|
19
|
-
* "item 2": "item 2 value",
|
|
20
|
-
* ...
|
|
21
|
-
* };
|
|
22
|
-
* Keys of parent items are displayed as the item's label.
|
|
23
|
-
* Values of elements without children are displayed as the item's label.
|
|
24
|
-
* In this case, "sub-parent child item" is displayed as the label for that item and
|
|
25
|
-
* "child item of nested parent value" is displayed as the label for it's child.
|
|
26
|
-
*/
|
|
27
|
-
accessor data: NestedObject;
|
|
28
|
-
/** The key of the selected item. (Wkid when used as spatial reference selection) */
|
|
29
|
-
accessor value: string | undefined;
|
|
30
|
-
/** Emitted when the selected value of the tree changes. */
|
|
31
|
-
readonly arcgisChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
32
|
-
readonly "@eventTypes": {
|
|
33
|
-
arcgisChange: ArcgisSpatialReferencePickerTree["arcgisChange"]["detail"];
|
|
34
|
-
};
|
|
35
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as h } from "../../chunks/runtime.js";
|
|
3
|
-
import { keyed as n } from "lit/directives/keyed.js";
|
|
4
|
-
import { LitElement as d, createEvent as l, nothing as p } from "@arcgis/lumina";
|
|
5
|
-
import { css as m, html as a } from "lit";
|
|
6
|
-
const u = m`:host{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth;height:100%;width:100%}`;
|
|
7
|
-
class v extends d {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments), this.treeItemsOpen = /* @__PURE__ */ new Set(), this.handleMutations = (e) => {
|
|
10
|
-
e.forEach((s) => {
|
|
11
|
-
if (s.type === "attributes" && s.attributeName === "expanded") {
|
|
12
|
-
const t = s.target;
|
|
13
|
-
"key" in t.dataset && t.dataset.key !== void 0 && this.treeItemsOpen.has(t.dataset.key) !== t.expanded && this.toggleTreeItem(t.dataset.key);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}, this.renderedTree = [], this.data = {}, this.arcgisChange = l();
|
|
17
|
-
}
|
|
18
|
-
static {
|
|
19
|
-
this.properties = { renderedTree: 16, data: 0, value: 1 };
|
|
20
|
-
}
|
|
21
|
-
static {
|
|
22
|
-
this.styles = u;
|
|
23
|
-
}
|
|
24
|
-
load() {
|
|
25
|
-
this.setupComponent();
|
|
26
|
-
}
|
|
27
|
-
willUpdate(e) {
|
|
28
|
-
e.has("data") && (this.hasUpdated || Object.keys(this.data ?? {}).length > 0) && this.setupComponent();
|
|
29
|
-
}
|
|
30
|
-
loaded() {
|
|
31
|
-
this.manager.onLifecycle(() => {
|
|
32
|
-
this.observer = new MutationObserver(this.handleMutations);
|
|
33
|
-
const e = this.el.shadowRoot ?? this.el;
|
|
34
|
-
return this.observer.observe(e, {
|
|
35
|
-
attributes: !0,
|
|
36
|
-
subtree: !0,
|
|
37
|
-
attributeFilter: ["expanded"]
|
|
38
|
-
}), () => {
|
|
39
|
-
this.observer?.disconnect(), this.observer = void 0;
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
setupComponent() {
|
|
44
|
-
this.treeItemsOpen.clear(), this.buildJSXTree();
|
|
45
|
-
}
|
|
46
|
-
buildJSXTree() {
|
|
47
|
-
const e = (s) => {
|
|
48
|
-
const t = [];
|
|
49
|
-
for (const r of Object.keys(s)) {
|
|
50
|
-
const i = s[r];
|
|
51
|
-
let o;
|
|
52
|
-
typeof i == "object" && (o = this.treeItemsOpen.has(r) ? e(i) : []);
|
|
53
|
-
const c = typeof i == "object" ? r : i;
|
|
54
|
-
t.push(this.createTreeItem(r, c, o));
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
this.renderedTree = e(this.data);
|
|
59
|
-
}
|
|
60
|
-
toggleTreeItem(e) {
|
|
61
|
-
this.treeItemsOpen.has(e) ? this.treeItemsOpen.delete(e) : this.treeItemsOpen.add(e), this.buildJSXTree();
|
|
62
|
-
}
|
|
63
|
-
createTreeItem(e, s, t) {
|
|
64
|
-
return a`<calcite-tree-item data-key=${e ?? p} .selected=${this.value === e} .expanded=${this.treeItemsOpen.has(e)}>${s}${t !== void 0 && n(`${e}-child-tree`, a`<calcite-tree slot=children>${t}</calcite-tree>`) || ""}</calcite-tree-item>`;
|
|
65
|
-
}
|
|
66
|
-
handleTreeSelect(e) {
|
|
67
|
-
const t = e.currentTarget?.selectedItems[0]?.dataset.key;
|
|
68
|
-
t !== void 0 && (this.value = t, this.arcgisChange.emit());
|
|
69
|
-
}
|
|
70
|
-
render() {
|
|
71
|
-
return n("base-tree", a`<calcite-tree scale=s @calciteTreeSelect=${this.handleTreeSelect}>${this.renderedTree}</calcite-tree>`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
h("arcgis-spatial-reference-picker-tree", v);
|
|
75
|
-
export {
|
|
76
|
-
v as ArcgisSpatialReferencePickerTree
|
|
77
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|