@esri/solutions-components 0.3.5 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +26 -8
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
- package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-card.cjs.entry.js +1 -1
- package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +41 -7
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +48 -0
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +10 -4
- package/dist/collection/components/public-notification/public-notification.css +12 -12
- package/dist/collection/components/public-notification/public-notification.js +50 -4
- package/dist/collection/components/refine-selection/refine-selection.js +4 -2
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
- package/dist/collection/demos/new-public-notification.html +7 -6
- package/dist/collection/utils/interfaces.js +1 -1
- package/dist/collection/utils/interfaces.ts +7 -2
- package/dist/components/buffer-tools2.js +10 -0
- package/dist/components/interfaces3.js +1 -1
- package/dist/components/map-draw-tools2.js +10 -4
- package/dist/components/public-notification.js +40 -6
- package/dist/components/refine-selection-tools2.js +4 -2
- package/dist/components/refine-selection2.js +4 -2
- package/dist/esm/buffer-tools_6.entry.js +26 -8
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-input-message_5.entry.js +6 -4
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
- package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-card.entry.js +1 -1
- package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
- package/dist/esm/public-notification.entry.js +41 -7
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +7 -6
- package/dist/solutions-components/p-05e64bd1.js +498 -2
- package/dist/solutions-components/p-08a95b33.entry.js +138 -0
- package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
- package/dist/solutions-components/p-0ef91144.entry.js +913 -0
- package/dist/solutions-components/p-0f523243.entry.js +1916 -0
- package/dist/solutions-components/p-11b9510e.entry.js +173 -0
- package/dist/solutions-components/p-1b875d94.entry.js +58 -0
- package/dist/solutions-components/p-1c567f3a.js +23 -16
- package/dist/solutions-components/p-1c883db9.entry.js +43 -0
- package/dist/solutions-components/p-1f225056.js +322 -0
- package/dist/solutions-components/p-1f499e67.entry.js +72 -0
- package/dist/solutions-components/p-20d3d758.entry.js +881 -0
- package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
- package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
- package/dist/solutions-components/p-2447798c.entry.js +155 -0
- package/dist/solutions-components/p-2525e691.entry.js +432 -0
- package/dist/solutions-components/p-2561f5b5.js +4092 -0
- package/dist/solutions-components/p-29f887c0.entry.js +234 -0
- package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
- package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
- package/dist/solutions-components/p-2e9ed892.js +46 -1
- package/dist/solutions-components/p-316f56db.js +219 -2
- package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
- package/dist/solutions-components/p-356f8b54.entry.js +138 -0
- package/dist/solutions-components/p-359c58de.entry.js +172 -0
- package/dist/solutions-components/p-37336c0d.entry.js +116 -0
- package/dist/solutions-components/p-374a5031.js +105 -2
- package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
- package/dist/solutions-components/p-3b010ce1.js +17 -1
- package/dist/solutions-components/p-4307dacd.js +194 -1
- package/dist/solutions-components/p-44da2507.js +405 -14
- package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
- package/dist/solutions-components/p-4894bbeb.js +53 -2
- package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
- package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
- package/dist/solutions-components/p-4e32bf8c.js +482 -1
- package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
- package/dist/solutions-components/p-508317b3.js +13 -2
- package/dist/solutions-components/p-54697d58.entry.js +198 -0
- package/dist/solutions-components/p-55c79103.entry.js +311 -0
- package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
- package/dist/solutions-components/p-59b48fde.entry.js +443 -0
- package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
- package/dist/solutions-components/p-621d0534.entry.js +123 -0
- package/dist/solutions-components/p-63f6e8f1.js +14 -1
- package/dist/solutions-components/p-66aeec57.entry.js +61 -0
- package/dist/solutions-components/p-69834f46.entry.js +618 -0
- package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
- package/dist/solutions-components/p-6e0da576.js +13 -1
- package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
- package/dist/solutions-components/p-6fe17794.js +9 -1
- package/dist/solutions-components/p-7024cb16.entry.js +72 -0
- package/dist/solutions-components/p-70535506.entry.js +226 -0
- package/dist/solutions-components/p-708a63a8.js +12 -1
- package/dist/solutions-components/p-729708a3.js +14 -1
- package/dist/solutions-components/p-73e23995.js +6 -1
- package/dist/solutions-components/p-74b29d75.entry.js +231 -0
- package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
- package/dist/solutions-components/p-77182c3a.js +3015 -1
- package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
- package/dist/solutions-components/p-79709c19.js +60 -3
- package/dist/solutions-components/p-7a46ef97.js +181 -2
- package/dist/solutions-components/p-7be159e6.entry.js +175 -0
- package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
- package/dist/solutions-components/p-7daea1df.js +41 -1
- package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
- package/dist/solutions-components/p-7fb45059.entry.js +43 -0
- package/dist/solutions-components/p-815533de.js +306 -3
- package/dist/solutions-components/p-816622ca.entry.js +248 -0
- package/dist/solutions-components/p-83166522.js +205 -2
- package/dist/solutions-components/p-83bd1991.entry.js +36 -0
- package/dist/solutions-components/p-856464d7.entry.js +572 -0
- package/dist/solutions-components/p-8c349bad.entry.js +347 -0
- package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
- package/dist/solutions-components/p-904c185a.entry.js +228 -0
- package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
- package/dist/solutions-components/p-9371145a.entry.js +477 -0
- package/dist/solutions-components/p-93d3119d.js +1948 -1
- package/dist/solutions-components/p-95ec8062.entry.js +173 -0
- package/dist/solutions-components/p-991ee695.js +109 -1
- package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
- package/dist/solutions-components/p-9a9955db.js +41 -1
- package/dist/solutions-components/p-9c1ebc90.js +35 -16
- package/dist/solutions-components/p-9eba5c66.js +399 -3
- package/dist/solutions-components/p-a033a507.entry.js +252 -0
- package/dist/solutions-components/p-a3773415.entry.js +1132 -0
- package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
- package/dist/solutions-components/p-a5b1ab03.js +33 -3
- package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
- package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
- package/dist/solutions-components/p-a8005026.entry.js +565 -0
- package/dist/solutions-components/p-a80b3880.js +14 -1
- package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
- package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
- package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
- package/dist/solutions-components/p-ae1fd76b.js +11 -1
- package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
- package/dist/solutions-components/p-b359dc78.js +41 -1
- package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
- package/dist/solutions-components/p-b75cc407.entry.js +145 -0
- package/dist/solutions-components/p-b911cb75.entry.js +71 -0
- package/dist/solutions-components/p-b965e177.entry.js +335 -0
- package/dist/solutions-components/p-b978636e.js +14 -1
- package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
- package/dist/solutions-components/p-bd67334c.js +122 -2
- package/dist/solutions-components/p-bde20dba.entry.js +212 -0
- package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
- package/dist/solutions-components/p-c023e6a1.js +2028 -2
- package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
- package/dist/solutions-components/p-c579ed60.entry.js +447 -0
- package/dist/solutions-components/p-c92bc231.js +101 -2
- package/dist/solutions-components/p-cc815aca.js +839 -16
- package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
- package/dist/solutions-components/p-cdc46c0c.js +1751 -2
- package/dist/solutions-components/p-d12e6992.entry.js +118 -0
- package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
- package/dist/solutions-components/p-d48a24e6.js +754 -2
- package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
- package/dist/solutions-components/p-dbc9a5a8.js +80 -0
- package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
- package/dist/solutions-components/p-de39206f.entry.js +113 -0
- package/dist/solutions-components/p-de5416e8.js +28 -1
- package/dist/solutions-components/p-df420d54.entry.js +213 -0
- package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
- package/dist/solutions-components/p-e4845fec.entry.js +152 -0
- package/dist/solutions-components/p-e611d8c8.js +28 -1
- package/dist/solutions-components/p-e947d3b0.js +5 -1
- package/dist/solutions-components/p-ea534300.js +41 -2
- package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
- package/dist/solutions-components/p-ed36c637.entry.js +85 -0
- package/dist/solutions-components/p-f0add71c.js +74 -0
- package/dist/solutions-components/p-f42e014b.js +171 -2
- package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
- package/dist/solutions-components/p-fc884dd6.js +28 -16
- package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
- package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
- package/dist/solutions-components/solutions-components.esm.js +20 -1
- package/dist/solutions-components/utils/interfaces.ts +7 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +9 -1
- package/dist/types/components/public-notification/public-notification.d.ts +26 -0
- package/dist/types/components.d.ts +9 -1
- package/dist/types/preact.d.ts +3 -1
- package/dist/types/utils/interfaces.d.ts +4 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-021432b8.entry.js +0 -12
- package/dist/solutions-components/p-03440b1e.entry.js +0 -11
- package/dist/solutions-components/p-0512635b.entry.js +0 -6
- package/dist/solutions-components/p-086ef115.entry.js +0 -29
- package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
- package/dist/solutions-components/p-0c088725.entry.js +0 -6
- package/dist/solutions-components/p-0f820c08.entry.js +0 -6
- package/dist/solutions-components/p-164780a0.entry.js +0 -6
- package/dist/solutions-components/p-179a68a0.entry.js +0 -6
- package/dist/solutions-components/p-184b5005.entry.js +0 -11
- package/dist/solutions-components/p-1d082fee.entry.js +0 -11
- package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
- package/dist/solutions-components/p-20a58e62.entry.js +0 -17
- package/dist/solutions-components/p-20b2458c.entry.js +0 -11
- package/dist/solutions-components/p-245d47c1.entry.js +0 -6
- package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
- package/dist/solutions-components/p-2cc72806.entry.js +0 -23
- package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
- package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
- package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
- package/dist/solutions-components/p-3109d940.entry.js +0 -6
- package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
- package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
- package/dist/solutions-components/p-3fa9b3c8.js +0 -36
- package/dist/solutions-components/p-40c41709.entry.js +0 -6
- package/dist/solutions-components/p-40e963c7.entry.js +0 -11
- package/dist/solutions-components/p-40f480da.entry.js +0 -11
- package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
- package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
- package/dist/solutions-components/p-506e4d78.entry.js +0 -6
- package/dist/solutions-components/p-576fdcab.entry.js +0 -6
- package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
- package/dist/solutions-components/p-65e177f1.entry.js +0 -6
- package/dist/solutions-components/p-67d710c2.entry.js +0 -6
- package/dist/solutions-components/p-7268b445.entry.js +0 -11
- package/dist/solutions-components/p-75ea4667.entry.js +0 -6
- package/dist/solutions-components/p-778c0a36.entry.js +0 -17
- package/dist/solutions-components/p-7a22509b.entry.js +0 -12
- package/dist/solutions-components/p-7bff51db.entry.js +0 -6
- package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
- package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
- package/dist/solutions-components/p-8060fb94.entry.js +0 -6
- package/dist/solutions-components/p-80a1b305.entry.js +0 -6
- package/dist/solutions-components/p-81eae877.entry.js +0 -12
- package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
- package/dist/solutions-components/p-877dd0dc.entry.js +0 -18
- package/dist/solutions-components/p-9106950a.entry.js +0 -11
- package/dist/solutions-components/p-979804a4.entry.js +0 -11
- package/dist/solutions-components/p-9862baa8.entry.js +0 -11
- package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
- package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
- package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
- package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
- package/dist/solutions-components/p-a33c044e.entry.js +0 -6
- package/dist/solutions-components/p-a516c658.entry.js +0 -6
- package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
- package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
- package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
- package/dist/solutions-components/p-ad469b92.entry.js +0 -11
- package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
- package/dist/solutions-components/p-addc1156.entry.js +0 -11
- package/dist/solutions-components/p-ae846934.entry.js +0 -11
- package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
- package/dist/solutions-components/p-b4e476b7.js +0 -257
- package/dist/solutions-components/p-b668daf8.js +0 -21
- package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
- package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
- package/dist/solutions-components/p-bd4d0773.entry.js +0 -6
- package/dist/solutions-components/p-be41429f.js +0 -21
- package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
- package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
- package/dist/solutions-components/p-c4afae53.entry.js +0 -12
- package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
- package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
- package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
- package/dist/solutions-components/p-d09a168c.entry.js +0 -6
- package/dist/solutions-components/p-d377f913.entry.js +0 -11
- package/dist/solutions-components/p-d4cefead.entry.js +0 -37
- package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
- package/dist/solutions-components/p-d8968487.entry.js +0 -11
- package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
- package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
- package/dist/solutions-components/p-ec27e493.entry.js +0 -11
- package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
- package/dist/solutions-components/p-ef21e195.entry.js +0 -23
- package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
- package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
- package/dist/solutions-components/p-f847291f.entry.js +0 -6
- package/dist/solutions-components/p-f90fd262.entry.js +0 -11
- package/dist/solutions-components/p-fc973005.entry.js +0 -6
- package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -3,4 +3,197 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{d as
|
6
|
+
import { d as getRenderingRef, f as forceUpdate } from './p-c023e6a1.js';
|
7
|
+
|
8
|
+
const appendToMap = (map, propName, value) => {
|
9
|
+
const items = map.get(propName);
|
10
|
+
if (!items) {
|
11
|
+
map.set(propName, [value]);
|
12
|
+
}
|
13
|
+
else if (!items.includes(value)) {
|
14
|
+
items.push(value);
|
15
|
+
}
|
16
|
+
};
|
17
|
+
const debounce = (fn, ms) => {
|
18
|
+
let timeoutId;
|
19
|
+
return (...args) => {
|
20
|
+
if (timeoutId) {
|
21
|
+
clearTimeout(timeoutId);
|
22
|
+
}
|
23
|
+
timeoutId = setTimeout(() => {
|
24
|
+
timeoutId = 0;
|
25
|
+
fn(...args);
|
26
|
+
}, ms);
|
27
|
+
};
|
28
|
+
};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Check if a possible element isConnected.
|
32
|
+
* The property might not be there, so we check for it.
|
33
|
+
*
|
34
|
+
* We want it to return true if isConnected is not a property,
|
35
|
+
* otherwise we would remove these elements and would not update.
|
36
|
+
*
|
37
|
+
* Better leak in Edge than to be useless.
|
38
|
+
*/
|
39
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
40
|
+
const cleanupElements = debounce((map) => {
|
41
|
+
for (let key of map.keys()) {
|
42
|
+
map.set(key, map.get(key).filter(isConnected));
|
43
|
+
}
|
44
|
+
}, 2000);
|
45
|
+
const stencilSubscription = () => {
|
46
|
+
if (typeof getRenderingRef !== 'function') {
|
47
|
+
// If we are not in a stencil project, we do nothing.
|
48
|
+
// This function is not really exported by @stencil/core.
|
49
|
+
return {};
|
50
|
+
}
|
51
|
+
const elmsToUpdate = new Map();
|
52
|
+
return {
|
53
|
+
dispose: () => elmsToUpdate.clear(),
|
54
|
+
get: (propName) => {
|
55
|
+
const elm = getRenderingRef();
|
56
|
+
if (elm) {
|
57
|
+
appendToMap(elmsToUpdate, propName, elm);
|
58
|
+
}
|
59
|
+
},
|
60
|
+
set: (propName) => {
|
61
|
+
const elements = elmsToUpdate.get(propName);
|
62
|
+
if (elements) {
|
63
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
64
|
+
}
|
65
|
+
cleanupElements(elmsToUpdate);
|
66
|
+
},
|
67
|
+
reset: () => {
|
68
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
69
|
+
cleanupElements(elmsToUpdate);
|
70
|
+
},
|
71
|
+
};
|
72
|
+
};
|
73
|
+
|
74
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
75
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
76
|
+
const unwrappedState = unwrap(defaultState);
|
77
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
78
|
+
const handlers = {
|
79
|
+
dispose: [],
|
80
|
+
get: [],
|
81
|
+
set: [],
|
82
|
+
reset: [],
|
83
|
+
};
|
84
|
+
const reset = () => {
|
85
|
+
var _a;
|
86
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
87
|
+
// otherwise, the state won't be properly reset
|
88
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
89
|
+
handlers.reset.forEach((cb) => cb());
|
90
|
+
};
|
91
|
+
const dispose = () => {
|
92
|
+
// Call first dispose as resetting the state would
|
93
|
+
// cause less updates ;)
|
94
|
+
handlers.dispose.forEach((cb) => cb());
|
95
|
+
reset();
|
96
|
+
};
|
97
|
+
const get = (propName) => {
|
98
|
+
handlers.get.forEach((cb) => cb(propName));
|
99
|
+
return states.get(propName);
|
100
|
+
};
|
101
|
+
const set = (propName, value) => {
|
102
|
+
const oldValue = states.get(propName);
|
103
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
104
|
+
states.set(propName, value);
|
105
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
106
|
+
}
|
107
|
+
};
|
108
|
+
const state = (typeof Proxy === 'undefined'
|
109
|
+
? {}
|
110
|
+
: new Proxy(unwrappedState, {
|
111
|
+
get(_, propName) {
|
112
|
+
return get(propName);
|
113
|
+
},
|
114
|
+
ownKeys(_) {
|
115
|
+
return Array.from(states.keys());
|
116
|
+
},
|
117
|
+
getOwnPropertyDescriptor() {
|
118
|
+
return {
|
119
|
+
enumerable: true,
|
120
|
+
configurable: true,
|
121
|
+
};
|
122
|
+
},
|
123
|
+
has(_, propName) {
|
124
|
+
return states.has(propName);
|
125
|
+
},
|
126
|
+
set(_, propName, value) {
|
127
|
+
set(propName, value);
|
128
|
+
return true;
|
129
|
+
},
|
130
|
+
}));
|
131
|
+
const on = (eventName, callback) => {
|
132
|
+
handlers[eventName].push(callback);
|
133
|
+
return () => {
|
134
|
+
removeFromArray(handlers[eventName], callback);
|
135
|
+
};
|
136
|
+
};
|
137
|
+
const onChange = (propName, cb) => {
|
138
|
+
const unSet = on('set', (key, newValue) => {
|
139
|
+
if (key === propName) {
|
140
|
+
cb(newValue);
|
141
|
+
}
|
142
|
+
});
|
143
|
+
// We need to unwrap the defaultState because it might be a function.
|
144
|
+
// Otherwise we might not be sending the right reset value.
|
145
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
146
|
+
return () => {
|
147
|
+
unSet();
|
148
|
+
unReset();
|
149
|
+
};
|
150
|
+
};
|
151
|
+
const use = (...subscriptions) => {
|
152
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
153
|
+
if (subscription.set) {
|
154
|
+
unsubs.push(on('set', subscription.set));
|
155
|
+
}
|
156
|
+
if (subscription.get) {
|
157
|
+
unsubs.push(on('get', subscription.get));
|
158
|
+
}
|
159
|
+
if (subscription.reset) {
|
160
|
+
unsubs.push(on('reset', subscription.reset));
|
161
|
+
}
|
162
|
+
if (subscription.dispose) {
|
163
|
+
unsubs.push(on('dispose', subscription.dispose));
|
164
|
+
}
|
165
|
+
return unsubs;
|
166
|
+
}, []);
|
167
|
+
return () => unsubs.forEach((unsub) => unsub());
|
168
|
+
};
|
169
|
+
const forceUpdate = (key) => {
|
170
|
+
const oldValue = states.get(key);
|
171
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
172
|
+
};
|
173
|
+
return {
|
174
|
+
state,
|
175
|
+
get,
|
176
|
+
set,
|
177
|
+
on,
|
178
|
+
onChange,
|
179
|
+
use,
|
180
|
+
dispose,
|
181
|
+
reset,
|
182
|
+
forceUpdate,
|
183
|
+
};
|
184
|
+
};
|
185
|
+
const removeFromArray = (array, item) => {
|
186
|
+
const index = array.indexOf(item);
|
187
|
+
if (index >= 0) {
|
188
|
+
array[index] = array[array.length - 1];
|
189
|
+
array.length--;
|
190
|
+
}
|
191
|
+
};
|
192
|
+
|
193
|
+
const createStore = (defaultState, shouldUpdate) => {
|
194
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
195
|
+
map.use(stencilSubscription());
|
196
|
+
return map;
|
197
|
+
};
|
198
|
+
|
199
|
+
export { createStore as c };
|
@@ -3,19 +3,410 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{c as
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
import { c as createCommonjsModule, a as commonjsGlobal } from './p-3b010ce1.js';
|
7
|
+
import { a as getAssetPath } from './p-c023e6a1.js';
|
8
|
+
|
9
|
+
var esriLoader = createCommonjsModule(function (module, exports) {
|
10
|
+
(function (global, factory) {
|
11
|
+
factory(exports) ;
|
12
|
+
}(commonjsGlobal, (function (exports) {
|
13
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
14
|
+
* Apache-2.0 */
|
15
|
+
var isBrowser = typeof window !== 'undefined';
|
16
|
+
// allow consuming libraries to provide their own Promise implementations
|
17
|
+
var utils = {
|
18
|
+
Promise: isBrowser ? window['Promise'] : undefined
|
19
|
+
};
|
20
|
+
|
21
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
22
|
+
* Apache-2.0 */
|
23
|
+
var DEFAULT_VERSION = '4.22';
|
24
|
+
var NEXT = 'next';
|
25
|
+
function parseVersion(version) {
|
26
|
+
if (version.toLowerCase() === NEXT) {
|
27
|
+
return NEXT;
|
28
|
+
}
|
29
|
+
var match = version && version.match(/^(\d)\.(\d+)/);
|
30
|
+
return match && {
|
31
|
+
major: parseInt(match[1], 10),
|
32
|
+
minor: parseInt(match[2], 10)
|
33
|
+
};
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* Get the CDN url for a given version
|
13
37
|
*
|
14
|
-
*
|
38
|
+
* @param version Ex: '4.22' or '3.39'. Defaults to the latest 4.x version.
|
39
|
+
*/
|
40
|
+
function getCdnUrl(version) {
|
41
|
+
if (version === void 0) { version = DEFAULT_VERSION; }
|
42
|
+
return "https://js.arcgis.com/" + version + "/";
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* Get the CDN url for a the CSS for a given version and/or theme
|
15
46
|
*
|
16
|
-
*
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
47
|
+
* @param version Ex: '4.22', '3.39', or 'next'. Defaults to the latest 4.x version.
|
48
|
+
*/
|
49
|
+
function getCdnCssUrl(version) {
|
50
|
+
if (version === void 0) { version = DEFAULT_VERSION; }
|
51
|
+
var baseUrl = getCdnUrl(version);
|
52
|
+
var parsedVersion = parseVersion(version);
|
53
|
+
if (parsedVersion !== NEXT && parsedVersion.major === 3) {
|
54
|
+
// NOTE: at 3.11 the CSS moved from the /js folder to the root
|
55
|
+
var path = parsedVersion.minor <= 10 ? 'js/' : '';
|
56
|
+
return "" + baseUrl + path + "esri/css/esri.css";
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
// assume 4.x
|
60
|
+
return baseUrl + "esri/themes/light/main.css";
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
65
|
+
* Apache-2.0 */
|
66
|
+
function createStylesheetLink(href) {
|
67
|
+
var link = document.createElement('link');
|
68
|
+
link.rel = 'stylesheet';
|
69
|
+
link.href = href;
|
70
|
+
return link;
|
71
|
+
}
|
72
|
+
function insertLink(link, before) {
|
73
|
+
if (before) {
|
74
|
+
// the link should be inserted before a specific node
|
75
|
+
var beforeNode = document.querySelector(before);
|
76
|
+
beforeNode.parentNode.insertBefore(link, beforeNode);
|
77
|
+
}
|
78
|
+
else {
|
79
|
+
// append the link to then end of the head tag
|
80
|
+
document.head.appendChild(link);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
// check if the css url has been injected or added manually
|
84
|
+
function getCss(url) {
|
85
|
+
return document.querySelector("link[href*=\"" + url + "\"]");
|
86
|
+
}
|
87
|
+
function getCssUrl(urlOrVersion) {
|
88
|
+
return !urlOrVersion || parseVersion(urlOrVersion)
|
89
|
+
// if it's a valid version string return the CDN URL
|
90
|
+
? getCdnCssUrl(urlOrVersion)
|
91
|
+
// otherwise assume it's a URL and return that
|
92
|
+
: urlOrVersion;
|
93
|
+
}
|
94
|
+
// lazy load the CSS needed for the ArcGIS API
|
95
|
+
function loadCss(urlOrVersion, before) {
|
96
|
+
var url = getCssUrl(urlOrVersion);
|
97
|
+
var link = getCss(url);
|
98
|
+
if (!link) {
|
99
|
+
// create & load the css link
|
100
|
+
link = createStylesheetLink(url);
|
101
|
+
insertLink(link, before);
|
102
|
+
}
|
103
|
+
return link;
|
104
|
+
}
|
105
|
+
|
106
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
107
|
+
* Apache-2.0 */
|
108
|
+
var defaultOptions = {};
|
109
|
+
function createScript(url) {
|
110
|
+
var script = document.createElement('script');
|
111
|
+
script.type = 'text/javascript';
|
112
|
+
script.src = url;
|
113
|
+
script.setAttribute('data-esri-loader', 'loading');
|
114
|
+
return script;
|
115
|
+
}
|
116
|
+
// add a one-time load handler to script
|
117
|
+
// and optionally add a one time error handler as well
|
118
|
+
function handleScriptLoad(script, callback, errback) {
|
119
|
+
var onScriptError;
|
120
|
+
if (errback) {
|
121
|
+
// set up an error handler as well
|
122
|
+
onScriptError = handleScriptError(script, errback);
|
123
|
+
}
|
124
|
+
var onScriptLoad = function () {
|
125
|
+
// pass the script to the callback
|
126
|
+
callback(script);
|
127
|
+
// remove this event listener
|
128
|
+
script.removeEventListener('load', onScriptLoad, false);
|
129
|
+
if (onScriptError) {
|
130
|
+
// remove the error listener as well
|
131
|
+
script.removeEventListener('error', onScriptError, false);
|
132
|
+
}
|
133
|
+
};
|
134
|
+
script.addEventListener('load', onScriptLoad, false);
|
135
|
+
}
|
136
|
+
// add a one-time error handler to the script
|
137
|
+
function handleScriptError(script, callback) {
|
138
|
+
var onScriptError = function (e) {
|
139
|
+
// reject the promise and remove this event listener
|
140
|
+
callback(e.error || new Error("There was an error attempting to load " + script.src));
|
141
|
+
// remove this event listener
|
142
|
+
script.removeEventListener('error', onScriptError, false);
|
143
|
+
};
|
144
|
+
script.addEventListener('error', onScriptError, false);
|
145
|
+
return onScriptError;
|
146
|
+
}
|
147
|
+
// allow the user to configure default script options rather than passing options to `loadModules` each time
|
148
|
+
function setDefaultOptions(options) {
|
149
|
+
if (options === void 0) { options = {}; }
|
150
|
+
defaultOptions = options;
|
151
|
+
}
|
152
|
+
// get the script injected by this library
|
153
|
+
function getScript() {
|
154
|
+
return document.querySelector('script[data-esri-loader]');
|
155
|
+
}
|
156
|
+
// has ArcGIS API been loaded on the page yet?
|
157
|
+
function isLoaded() {
|
158
|
+
var globalRequire = window['require'];
|
159
|
+
// .on() ensures that it's Dojo's AMD loader
|
160
|
+
return globalRequire && globalRequire.on;
|
161
|
+
}
|
162
|
+
// load the ArcGIS API on the page
|
163
|
+
function loadScript(options) {
|
164
|
+
if (options === void 0) { options = {}; }
|
165
|
+
// we would have liked to use spread like { ...defaultOptions, ...options }
|
166
|
+
// but TS would inject a polyfill that would require use to configure rollup w content: 'window'
|
167
|
+
// if we have another occasion to use spread, let's do that and replace this for...in
|
168
|
+
var opts = {};
|
169
|
+
[defaultOptions, options].forEach(function (obj) {
|
170
|
+
for (var prop in obj) {
|
171
|
+
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
172
|
+
opts[prop] = obj[prop];
|
173
|
+
}
|
174
|
+
}
|
175
|
+
});
|
176
|
+
// URL to load
|
177
|
+
var version = opts.version;
|
178
|
+
var url = opts.url || getCdnUrl(version);
|
179
|
+
return new utils.Promise(function (resolve, reject) {
|
180
|
+
var script = getScript();
|
181
|
+
if (script) {
|
182
|
+
// the API is already loaded or in the process of loading...
|
183
|
+
// NOTE: have to test against scr attribute value, not script.src
|
184
|
+
// b/c the latter will return the full url for relative paths
|
185
|
+
var src = script.getAttribute('src');
|
186
|
+
if (src !== url) {
|
187
|
+
// potentially trying to load a different version of the API
|
188
|
+
reject(new Error("The ArcGIS API for JavaScript is already loaded (" + src + ")."));
|
189
|
+
}
|
190
|
+
else {
|
191
|
+
if (isLoaded()) {
|
192
|
+
// the script has already successfully loaded
|
193
|
+
resolve(script);
|
194
|
+
}
|
195
|
+
else {
|
196
|
+
// wait for the script to load and then resolve
|
197
|
+
handleScriptLoad(script, resolve, reject);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
201
|
+
else {
|
202
|
+
if (isLoaded()) {
|
203
|
+
// the API has been loaded by some other means
|
204
|
+
// potentially trying to load a different version of the API
|
205
|
+
reject(new Error("The ArcGIS API for JavaScript is already loaded."));
|
206
|
+
}
|
207
|
+
else {
|
208
|
+
// this is the first time attempting to load the API
|
209
|
+
var css = opts.css;
|
210
|
+
if (css) {
|
211
|
+
var useVersion = css === true;
|
212
|
+
// load the css before loading the script
|
213
|
+
loadCss(useVersion ? version : css, opts.insertCssBefore);
|
214
|
+
}
|
215
|
+
// create a script object whose source points to the API
|
216
|
+
script = createScript(url);
|
217
|
+
// _currentUrl = url;
|
218
|
+
// once the script is loaded...
|
219
|
+
handleScriptLoad(script, function () {
|
220
|
+
// update the status of the script
|
221
|
+
script.setAttribute('data-esri-loader', 'loaded');
|
222
|
+
// return the script
|
223
|
+
resolve(script);
|
224
|
+
}, reject);
|
225
|
+
// load the script
|
226
|
+
document.body.appendChild(script);
|
227
|
+
}
|
228
|
+
}
|
229
|
+
});
|
230
|
+
}
|
231
|
+
|
232
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
233
|
+
* Apache-2.0 */
|
234
|
+
// wrap Dojo's require() in a promise
|
235
|
+
function requireModules(modules) {
|
236
|
+
return new utils.Promise(function (resolve, reject) {
|
237
|
+
// If something goes wrong loading the esri/dojo scripts, reject with the error.
|
238
|
+
var errorHandler = window['require'].on('error', reject);
|
239
|
+
window['require'](modules, function () {
|
240
|
+
var args = [];
|
241
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
242
|
+
args[_i] = arguments[_i];
|
243
|
+
}
|
244
|
+
// remove error handler
|
245
|
+
errorHandler.remove();
|
246
|
+
// Resolve with the parameters from dojo require as an array.
|
247
|
+
resolve(args);
|
248
|
+
});
|
249
|
+
});
|
250
|
+
}
|
251
|
+
// returns a promise that resolves with an array of the required modules
|
252
|
+
// also will attempt to lazy load the ArcGIS API if it has not already been loaded
|
253
|
+
function loadModules(modules, loadScriptOptions) {
|
254
|
+
if (loadScriptOptions === void 0) { loadScriptOptions = {}; }
|
255
|
+
if (!isLoaded()) {
|
256
|
+
// script is not yet loaded, is it in the process of loading?
|
257
|
+
var script = getScript();
|
258
|
+
var src = script && script.getAttribute('src');
|
259
|
+
if (!loadScriptOptions.url && src) {
|
260
|
+
// script is still loading and user did not specify a URL
|
261
|
+
// in this case we want to default to the URL that's being loaded
|
262
|
+
// instead of defaulting to the latest 4.x URL
|
263
|
+
loadScriptOptions.url = src;
|
264
|
+
}
|
265
|
+
// attempt to load the script then load the modules
|
266
|
+
return loadScript(loadScriptOptions).then(function () { return requireModules(modules); });
|
267
|
+
}
|
268
|
+
else {
|
269
|
+
// script is already loaded, just load the modules
|
270
|
+
return requireModules(modules);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
/*
|
275
|
+
Copyright (c) 2017 Esri
|
276
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
277
|
+
you may not use this file except in compliance with the License.
|
278
|
+
You may obtain a copy of the License at
|
279
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
280
|
+
Unless required by applicable law or agreed to in writing, software
|
281
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
282
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
283
|
+
See the License for the specific language governing permissions and
|
284
|
+
limitations under the License.
|
285
|
+
*/
|
286
|
+
// re-export the functions that are part of the public API
|
287
|
+
|
288
|
+
exports.utils = utils;
|
289
|
+
exports.loadModules = loadModules;
|
290
|
+
exports.getScript = getScript;
|
291
|
+
exports.isLoaded = isLoaded;
|
292
|
+
exports.loadScript = loadScript;
|
293
|
+
exports.setDefaultOptions = setDefaultOptions;
|
294
|
+
exports.loadCss = loadCss;
|
295
|
+
|
296
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
297
|
+
|
298
|
+
})));
|
299
|
+
//# sourceMappingURL=esri-loader.js.map
|
300
|
+
});
|
301
|
+
|
302
|
+
/*
|
303
|
+
* Copyright (c) 2022 Esri
|
304
|
+
* All rights reserved.
|
305
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
306
|
+
* you may not use this file except in compliance with the License.
|
307
|
+
* You may obtain a copy of the License at
|
308
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
309
|
+
* Unless required by applicable law or agreed to in writing, software
|
310
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
311
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
312
|
+
* See the License for the specific language governing permissions and
|
313
|
+
* limitations under the License.
|
314
|
+
*/
|
315
|
+
const languageMap = new Map([
|
316
|
+
["ar", "ar"],
|
317
|
+
["bg", "bg"],
|
318
|
+
["bs", "bs"],
|
319
|
+
["ca", "ca"],
|
320
|
+
["cs", "cs"],
|
321
|
+
["da", "da"],
|
322
|
+
["de", "de"],
|
323
|
+
["el", "el"],
|
324
|
+
["en", "en"],
|
325
|
+
["es", "es"],
|
326
|
+
["et", "et"],
|
327
|
+
["fi", "fi"],
|
328
|
+
["fr", "fr"],
|
329
|
+
["he", "he"],
|
330
|
+
["hr", "hr"],
|
331
|
+
["hu", "hu"],
|
332
|
+
["id", "id"],
|
333
|
+
["it", "it"],
|
334
|
+
["ja", "ja"],
|
335
|
+
["ko", "ko"],
|
336
|
+
["lt", "lt"],
|
337
|
+
["lv", "lv"],
|
338
|
+
["nb", "nb"],
|
339
|
+
["nl", "nl"],
|
340
|
+
["pl", "pl"],
|
341
|
+
["pt-br", "pt-BR"],
|
342
|
+
["pt-pt", "pt-PT"],
|
343
|
+
["ro", "ro"],
|
344
|
+
["ru", "ru"],
|
345
|
+
["sk", "sk"],
|
346
|
+
["sl", "sl"],
|
347
|
+
["sr", "sr"],
|
348
|
+
["sv", "sv"],
|
349
|
+
["th", "th"],
|
350
|
+
["tr", "tr"],
|
351
|
+
["uk", "uk"],
|
352
|
+
["vi", "vi"],
|
353
|
+
["zh-cn", "zh-CN"],
|
354
|
+
["zh-hk", "zh-HK"],
|
355
|
+
["zh-tw", "zh-TW"],
|
356
|
+
]);
|
357
|
+
|
358
|
+
/** @license
|
359
|
+
* Copyright 2022 Esri
|
360
|
+
*
|
361
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
362
|
+
* you may not use this file except in compliance with the License.
|
363
|
+
* You may obtain a copy of the License at
|
364
|
+
*
|
365
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
366
|
+
*
|
367
|
+
* Unless required by applicable law or agreed to in writing, software
|
368
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
369
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
370
|
+
* See the License for the specific language governing permissions and
|
371
|
+
* limitations under the License.
|
372
|
+
*/
|
373
|
+
function getComponentClosestLanguage(element) {
|
374
|
+
var _a, _b, _c;
|
375
|
+
const closestElement = (_a = (element.closest("[lang]"))) !== null && _a !== void 0 ? _a : (_c = (_b = element.shadowRoot) === null || _b === void 0 ? void 0 : _b.ownerDocument) === null || _c === void 0 ? void 0 : _c.documentElement;
|
376
|
+
// language set by the calling application or browser. defaults to english.
|
377
|
+
const lang = ((closestElement === null || closestElement === void 0 ? void 0 : closestElement.lang) || (navigator === null || navigator === void 0 ? void 0 : navigator.language) || "en").toLowerCase();
|
378
|
+
if (languageMap.has(lang)) {
|
379
|
+
return languageMap.get(lang);
|
380
|
+
}
|
381
|
+
else {
|
382
|
+
// "ru-RU" maps to "ru" use case
|
383
|
+
return languageMap.has(lang.slice(0, 2)) ? languageMap.get(lang.slice(0, 2)) : "en";
|
384
|
+
}
|
385
|
+
}
|
386
|
+
function fetchLocaleStringsForComponent(componentName, locale) {
|
387
|
+
return new Promise((resolve, reject) => {
|
388
|
+
fetch(getAssetPath(`../assets/t9n/${componentName}/resources_${locale}.json`)).then(result => {
|
389
|
+
if (result.ok) {
|
390
|
+
resolve(result.json());
|
391
|
+
}
|
392
|
+
else {
|
393
|
+
reject();
|
394
|
+
}
|
395
|
+
}, () => reject());
|
396
|
+
});
|
397
|
+
}
|
398
|
+
async function getLocaleComponentStrings(element) {
|
399
|
+
const componentName = element.tagName.toLowerCase();
|
400
|
+
const componentLanguage = getComponentClosestLanguage(element);
|
401
|
+
let strings;
|
402
|
+
try {
|
403
|
+
strings = await fetchLocaleStringsForComponent(componentName, componentLanguage);
|
404
|
+
}
|
405
|
+
catch (e) {
|
406
|
+
console.warn(`no locale for ${componentName} (${componentLanguage}) loading default locale en.`);
|
407
|
+
strings = await fetchLocaleStringsForComponent(componentName, "en");
|
408
|
+
}
|
409
|
+
return [strings, componentLanguage];
|
410
|
+
}
|
411
|
+
|
412
|
+
export { esriLoader as e, getLocaleComponentStrings as g };
|