@arcgis/coding-components 4.30.0-next.5 → 4.30.0-next.51
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/arcgis-coding-components/arcgis-coding-components.css +1 -1
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-7d7f1240.js → p-0896b7eb.js} +2 -2
- package/dist/arcgis-coding-components/{p-0f11c91b.js → p-16c63687.js} +2 -2
- package/dist/arcgis-coding-components/{p-2e3aede1.js → p-29f6bd55.js} +2 -2
- package/dist/arcgis-coding-components/{p-32911b21.js → p-395caf21.js} +2 -2
- package/dist/arcgis-coding-components/{p-06d44cef.js → p-3a4276bd.js} +2 -2
- package/dist/arcgis-coding-components/p-3b2a6597.js +7 -0
- package/dist/arcgis-coding-components/{p-a4e27a58.js → p-5ed2705f.js} +1 -1
- package/dist/arcgis-coding-components/p-7bf08296.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-cebf794f.js → p-e2da838b.js} +2 -2
- package/dist/arcgis-coding-components/{p-551af1f6.js → p-eab7d60f.js} +2 -2
- package/dist/arcgis-coding-components/{p-fd3fa4a0.js → p-f3a9afad.js} +2 -2
- package/dist/arcgis-coding-components/p-f7aa3581.js +68 -0
- package/dist/cjs/{arcade-defaults-204e7ccd.js → arcade-defaults-1aa69c71.js} +483 -173
- package/dist/cjs/{arcade-mode-4100f9e4.js → arcade-mode-33f3df24.js} +45 -51
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1702 -283
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-bfbeba2f.js → css-3d26f81a.js} +1 -1
- package/dist/cjs/{cssMode-76b5efe0.js → cssMode-26a24d10.js} +3 -3
- package/dist/cjs/{html-5cb5408f.js → html-de12b315.js} +3 -3
- package/dist/cjs/{htmlMode-22c5689f.js → htmlMode-a867aaf5.js} +3 -3
- package/dist/cjs/{index-a37bcea1.js → index-e81383ee.js} +40 -4
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-ec61b6c4.js → javascript-13d997cc.js} +4 -4
- package/dist/cjs/{jsonMode-ceded417.js → jsonMode-9cde30d6.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-d4f8e205.js → tsMode-dae6c019.js} +3 -3
- package/dist/cjs/{typescript-0d60800f.js → typescript-c592bb67.js} +3 -3
- package/dist/components/arcade-api.js +21 -32
- package/dist/components/arcade-contribution.js +71 -12
- package/dist/components/arcade-defaults.js +78 -73
- package/dist/components/arcade-mode.js +44 -50
- package/dist/components/arcade-results.js +47 -60
- package/dist/components/arcade-suggestions.js +23 -33
- package/dist/components/arcade-variables.js +22 -36
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +59 -147
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/chunk-27DTPISK.js +1438 -0
- package/dist/components/code-editor.js +71 -75
- package/dist/components/fields.js +40 -44
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +314 -3
- package/dist/components/markdown.js +9 -11
- package/dist/components/useT9n.js +11 -0
- package/dist/components/utilities.js +3 -3
- package/dist/esm/{arcade-defaults-a8eba8cf.js → arcade-defaults-37d4f4e4.js} +472 -160
- package/dist/esm/{arcade-mode-b8fed895.js → arcade-mode-1eac12c1.js} +45 -51
- package/dist/esm/arcgis-arcade-api_6.entry.js +1702 -283
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-d802bf2b.js → css-e65205b4.js} +1 -1
- package/dist/esm/{cssMode-e68d14c9.js → cssMode-f3feaf44.js} +3 -3
- package/dist/esm/{html-b1eb86e6.js → html-8bada477.js} +3 -3
- package/dist/esm/{htmlMode-1211bc87.js → htmlMode-dd32ef0c.js} +3 -3
- package/dist/esm/{index-916b1135.js → index-7e8027d3.js} +40 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-f1cc1f09.js → javascript-437946ea.js} +4 -4
- package/dist/esm/{jsonMode-85d9cded.js → jsonMode-548d5b0e.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-61fedc4b.js → tsMode-302da5fd.js} +3 -3
- package/dist/esm/{typescript-49d6ec3c.js → typescript-838d7751.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +18 -11
- package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +7 -8
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
- package/dist/types/components/code-editor/code-editor.d.ts +23 -13
- package/dist/types/components.d.ts +57 -35
- package/dist/types/controllers/useT9n.d.ts +1 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +34 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +19 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +6 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +1 -1
- package/package.json +20 -19
- package/dist/arcgis-coding-components/p-a331eda4.entry.js +0 -6
- package/dist/arcgis-coding-components/p-d0f4a5d4.js +0 -68
- package/dist/arcgis-coding-components/p-e311f720.js +0 -7
|
@@ -1,70 +1,66 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.51
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
// src/index.ts
|
|
7
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
7
8
|
function isDefaultModule(module) {
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
async function requireModule(modulePath) {
|
|
11
|
-
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
12
|
-
resolve(moduleDefault);
|
|
13
|
-
}));
|
|
9
|
+
return module.default !== void 0;
|
|
14
10
|
}
|
|
15
11
|
async function importLayersFeatureLayer() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
if (isAMD) {
|
|
13
|
+
return await window.$arcgis.import("esri/layers/FeatureLayer");
|
|
14
|
+
}
|
|
15
|
+
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
16
|
+
return isDefaultModule(module) ? module.default : module;
|
|
21
17
|
}
|
|
22
18
|
async function importPortalPortalItem() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
if (isAMD) {
|
|
20
|
+
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
21
|
+
}
|
|
22
|
+
const module = await import('@arcgis/core/portal/PortalItem.js');
|
|
23
|
+
return isDefaultModule(module) ? module.default : module;
|
|
28
24
|
}
|
|
29
25
|
async function newPortalPortalItem(properties) {
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const ModConstructor = await importPortalPortalItem();
|
|
27
|
+
return new ModConstructor(properties);
|
|
32
28
|
}
|
|
33
29
|
async function importWebMap() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
if (isAMD) {
|
|
31
|
+
return await window.$arcgis.import("esri/WebMap");
|
|
32
|
+
}
|
|
33
|
+
const module = await import('@arcgis/core/WebMap.js');
|
|
34
|
+
return isDefaultModule(module) ? module.default : module;
|
|
39
35
|
}
|
|
40
36
|
async function newWebMap(properties) {
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const ModConstructor = await importWebMap();
|
|
38
|
+
return new ModConstructor(properties);
|
|
43
39
|
}
|
|
44
40
|
async function importWebScene() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
if (isAMD) {
|
|
42
|
+
return await window.$arcgis.import("esri/WebScene");
|
|
43
|
+
}
|
|
44
|
+
const module = await import('@arcgis/core/WebScene.js');
|
|
45
|
+
return isDefaultModule(module) ? module.default : module;
|
|
50
46
|
}
|
|
51
47
|
async function newWebScene(properties) {
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
const ModConstructor = await importWebScene();
|
|
49
|
+
return new ModConstructor(properties);
|
|
54
50
|
}
|
|
55
51
|
async function importArcade() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
if (isAMD) {
|
|
53
|
+
return await window.$arcgis.import("esri/arcade");
|
|
54
|
+
}
|
|
55
|
+
const module = await import('@arcgis/core/arcade.js');
|
|
56
|
+
return isDefaultModule(module) ? module.default : module;
|
|
61
57
|
}
|
|
62
58
|
async function importRequest() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
if (isAMD) {
|
|
60
|
+
return await window.$arcgis.import("esri/request");
|
|
61
|
+
}
|
|
62
|
+
const module = await import('@arcgis/core/request.js');
|
|
63
|
+
return isDefaultModule(module) ? module.default : module;
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
/**
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.51
|
|
5
5
|
*/
|
|
6
6
|
export { setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -1,8 +1,319 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.51
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
// src/array-utils.ts
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/deferred.ts
|
|
9
|
+
var Deferred = class {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new deferred promise.
|
|
12
|
+
*/
|
|
13
|
+
constructor() {
|
|
14
|
+
this.resolve = () => void 0;
|
|
15
|
+
this.reject = () => void 0;
|
|
16
|
+
this.promise = new Promise((resolve, reject) => {
|
|
17
|
+
this.resolve = resolve;
|
|
18
|
+
this.reject = reject;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// src/dom.ts
|
|
24
|
+
function inTargetElement(element, targetElement) {
|
|
25
|
+
let currentElement = element;
|
|
26
|
+
while (currentElement) {
|
|
27
|
+
if (currentElement === targetElement) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
if (!currentElement.parentNode) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
if (currentElement.parentNode instanceof ShadowRoot) {
|
|
34
|
+
currentElement = currentElement.parentNode.host;
|
|
35
|
+
} else {
|
|
36
|
+
currentElement = currentElement.parentNode;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function observeAncestorsMutation(element, attributeFilter, callback) {
|
|
42
|
+
const { subscribe } = observe(attributeFilter);
|
|
43
|
+
return subscribe((mutations) => {
|
|
44
|
+
const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
|
|
45
|
+
if (matched)
|
|
46
|
+
callback();
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
var observers = {};
|
|
50
|
+
function observe(attributeFilter) {
|
|
51
|
+
const attributes = attributeFilter.join(",");
|
|
52
|
+
const previousObserver = observers[attributes];
|
|
53
|
+
if (previousObserver !== void 0)
|
|
54
|
+
return previousObserver;
|
|
55
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
56
|
+
const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
|
|
57
|
+
mutationObserver.observe(document.documentElement, {
|
|
58
|
+
attributes: true,
|
|
59
|
+
attributeFilter,
|
|
60
|
+
subtree: true
|
|
61
|
+
});
|
|
62
|
+
const observer = {
|
|
63
|
+
subscribe(callback) {
|
|
64
|
+
subscribers.add(callback);
|
|
65
|
+
return {
|
|
66
|
+
remove: () => {
|
|
67
|
+
subscribers.delete(callback);
|
|
68
|
+
if (subscribers.size === 0) {
|
|
69
|
+
mutationObserver.disconnect();
|
|
70
|
+
observers[attributes] = void 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
observers[attributes] = observer;
|
|
77
|
+
return observer;
|
|
78
|
+
}
|
|
79
|
+
function closestElement(base, selector) {
|
|
80
|
+
let currentElement = base;
|
|
81
|
+
while (currentElement) {
|
|
82
|
+
const element = currentElement.closest(selector);
|
|
83
|
+
if (element) {
|
|
84
|
+
return element;
|
|
85
|
+
}
|
|
86
|
+
const rootElement = currentElement.getRootNode();
|
|
87
|
+
if (rootElement === document) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
currentElement = rootElement.host;
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function getElementTheme(base) {
|
|
95
|
+
const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
|
|
96
|
+
return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
|
|
97
|
+
}
|
|
98
|
+
function isElement(ref) {
|
|
99
|
+
return ref.nodeType === Node.ELEMENT_NODE;
|
|
100
|
+
}
|
|
101
|
+
function isHTMLWithSetFocus(ref) {
|
|
102
|
+
return "setFocus" in ref && typeof ref.setFocus === "function";
|
|
103
|
+
}
|
|
104
|
+
function setFocus(ref, selector = "") {
|
|
105
|
+
if (!isElement(ref)) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
if (ref.matches(selector)) {
|
|
109
|
+
if (isHTMLWithSetFocus(ref)) {
|
|
110
|
+
setTimeout(() => ref.setFocus(), 0);
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
for (const child of ref.children) {
|
|
115
|
+
if (setFocus(child, selector)) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const shadowRoot = ref.shadowRoot;
|
|
120
|
+
if (shadowRoot) {
|
|
121
|
+
for (const child of shadowRoot.children) {
|
|
122
|
+
if (setFocus(child, selector)) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
function setFocusOnElement(ref, selector) {
|
|
130
|
+
if (!ref?.shadowRoot) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
|
|
134
|
+
setFocus(ref, selector);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const mutationObserver = new MutationObserver(() => {
|
|
138
|
+
mutationObserver.disconnect();
|
|
139
|
+
setFocus(ref, selector);
|
|
140
|
+
});
|
|
141
|
+
mutationObserver.observe(ref, {
|
|
142
|
+
attributes: true,
|
|
143
|
+
attributeFilter: ["hydrated", "calcite-hydrated"]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/guid.ts
|
|
148
|
+
function gen(count) {
|
|
149
|
+
let out = "";
|
|
150
|
+
for (let i = 0; i < count; i++) {
|
|
151
|
+
out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
155
|
+
function generateGuid() {
|
|
156
|
+
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
157
|
+
}
|
|
158
|
+
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
159
|
+
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
160
|
+
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
161
|
+
|
|
162
|
+
// src/intl.ts
|
|
163
|
+
var supportedLocales = /* @__PURE__ */ new Set([
|
|
164
|
+
"ar",
|
|
165
|
+
"bg",
|
|
166
|
+
"bs",
|
|
167
|
+
"ca",
|
|
168
|
+
"cs",
|
|
169
|
+
"da",
|
|
170
|
+
"de",
|
|
171
|
+
"el",
|
|
172
|
+
"en",
|
|
173
|
+
"es",
|
|
174
|
+
"et",
|
|
175
|
+
"fi",
|
|
176
|
+
"fr",
|
|
177
|
+
"he",
|
|
178
|
+
"hr",
|
|
179
|
+
"hu",
|
|
180
|
+
"id",
|
|
181
|
+
"it",
|
|
182
|
+
"ja",
|
|
183
|
+
"ko",
|
|
184
|
+
"lt",
|
|
185
|
+
"lv",
|
|
186
|
+
"nl",
|
|
187
|
+
"nb",
|
|
188
|
+
"pl",
|
|
189
|
+
"pt-BR",
|
|
190
|
+
"pt-PT",
|
|
191
|
+
"ro",
|
|
192
|
+
"ru",
|
|
193
|
+
"sk",
|
|
194
|
+
"sl",
|
|
195
|
+
"sr",
|
|
196
|
+
"sv",
|
|
197
|
+
"th",
|
|
198
|
+
"tr",
|
|
199
|
+
"uk",
|
|
200
|
+
"vi",
|
|
201
|
+
"zh-CN",
|
|
202
|
+
"zh-HK",
|
|
203
|
+
"zh-TW"
|
|
204
|
+
]);
|
|
205
|
+
var defaultLocale = "en";
|
|
206
|
+
async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
|
|
207
|
+
const path = `${assetsPath}/${prefix}`;
|
|
208
|
+
const filePath = `${path}${locale}.json`;
|
|
209
|
+
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
210
|
+
return await t9nStringsCache[filePath];
|
|
211
|
+
}
|
|
212
|
+
var t9nStringsCache = {};
|
|
213
|
+
async function fetchBundle(locale, path) {
|
|
214
|
+
const filePath = `${path}${locale}.json`;
|
|
215
|
+
try {
|
|
216
|
+
const response = await fetch(filePath);
|
|
217
|
+
if (response.ok)
|
|
218
|
+
return await response.json();
|
|
219
|
+
} catch (error) {
|
|
220
|
+
console.error(error);
|
|
221
|
+
return fallbackBundle;
|
|
222
|
+
}
|
|
223
|
+
if (locale === defaultLocale)
|
|
224
|
+
return fallbackBundle;
|
|
225
|
+
return await fetchBundle(defaultLocale, path);
|
|
226
|
+
}
|
|
227
|
+
var fallbackBundle = new Proxy(
|
|
228
|
+
{},
|
|
229
|
+
{
|
|
230
|
+
get: (_target, property) => camelToHuman(property.toString())
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
// src/strings.ts
|
|
235
|
+
var doubleQuote = '"';
|
|
236
|
+
var singleQuote = "'";
|
|
237
|
+
function repeatString(value, n) {
|
|
238
|
+
return new Array(n + 1).join(value);
|
|
239
|
+
}
|
|
240
|
+
function quoteString(value) {
|
|
241
|
+
let quote = doubleQuote;
|
|
242
|
+
let alternateQuote = singleQuote;
|
|
243
|
+
const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
|
|
244
|
+
if (avoidEscape) {
|
|
245
|
+
alternateQuote = doubleQuote;
|
|
246
|
+
quote = singleQuote;
|
|
247
|
+
}
|
|
248
|
+
const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
|
|
249
|
+
value = value.replace(
|
|
250
|
+
alternateEscape,
|
|
251
|
+
(_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
|
|
252
|
+
// We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
|
|
253
|
+
boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
|
|
254
|
+
)
|
|
255
|
+
);
|
|
256
|
+
const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
|
|
257
|
+
value = value.replace(
|
|
258
|
+
quoteEscape,
|
|
259
|
+
(_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
|
|
260
|
+
);
|
|
261
|
+
return quote + value + quote;
|
|
262
|
+
}
|
|
263
|
+
function createFilterExpression(filterWord) {
|
|
264
|
+
const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
|
|
265
|
+
return new RegExp(sanitizedWord, "i");
|
|
266
|
+
}
|
|
267
|
+
function setValuesInString(message, values = {}) {
|
|
268
|
+
return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
|
|
269
|
+
}
|
|
270
|
+
function addLTRMark(value) {
|
|
271
|
+
return `\u200E${value ?? ""}\u200E`;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// src/type-guards.ts
|
|
275
|
+
function isNotNull(item) {
|
|
276
|
+
return item !== null;
|
|
277
|
+
}
|
|
278
|
+
function isNotUndefined(item) {
|
|
279
|
+
return item !== void 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// src/ui.ts
|
|
283
|
+
function debounce(func, waitFor = 100) {
|
|
284
|
+
let timeout;
|
|
285
|
+
return (...args) => {
|
|
286
|
+
const later = () => {
|
|
287
|
+
clearTimeout(timeout);
|
|
288
|
+
func(...args);
|
|
289
|
+
};
|
|
290
|
+
clearTimeout(timeout);
|
|
291
|
+
timeout = setTimeout(later, waitFor);
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// src/url.ts
|
|
296
|
+
function hasSameOrigin(url1, url2, ignoreProtocol = false) {
|
|
297
|
+
if (!url1 || !url2) {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
const url1Obj = new URL(url1);
|
|
301
|
+
const url2Obj = new URL(url2);
|
|
302
|
+
if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
|
|
303
|
+
return false;
|
|
304
|
+
}
|
|
305
|
+
if (url1Obj.host == null || url2Obj.host == null) {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
|
|
309
|
+
}
|
|
310
|
+
function isURL(url) {
|
|
311
|
+
try {
|
|
312
|
+
new URL(url);
|
|
313
|
+
return true;
|
|
314
|
+
} catch (e) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { Deferred as D, isNotUndefined as a, addLTRMark as b, supportedLocales as c, createFilterExpression as d, setFocusOnElement as e, fetchT9NStringsBundle as f, isURL as g, hasSameOrigin as h, isNotNull as i, generateGuid as j, getElementTheme as k, debounce as l, observeAncestorsMutation as o, quoteString as q, setValuesInString as s };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.51
|
|
5
5
|
*/
|
|
6
6
|
import { editor } from 'monaco-editor';
|
|
7
7
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
@@ -2935,24 +2935,22 @@ var marked_umd = createCommonjsModule(function (module, exports) {
|
|
|
2935
2935
|
// Set up the marked library to use GitHub Flavored Markdown and to use the custom renderer for links.
|
|
2936
2936
|
marked_umd.marked.use({
|
|
2937
2937
|
gfm: true,
|
|
2938
|
+
breaks: true,
|
|
2939
|
+
async: false,
|
|
2938
2940
|
renderer: {
|
|
2939
2941
|
link(href, title, text) {
|
|
2940
2942
|
return `<calcite-link href="${href}" title="${title ?? text}" target="Arcade Help">${text}</calcite-link>`;
|
|
2941
|
-
}
|
|
2942
|
-
}
|
|
2943
|
+
},
|
|
2944
|
+
},
|
|
2943
2945
|
});
|
|
2944
2946
|
/**
|
|
2945
2947
|
* Converts a markdown string to HTML using the marked library.
|
|
2946
2948
|
*/
|
|
2947
2949
|
function convertMarkdownString(value) {
|
|
2948
|
-
value
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
headerIds: false,
|
|
2953
|
-
mangle: false
|
|
2954
|
-
});
|
|
2955
|
-
return result;
|
|
2950
|
+
if (value === null || value === undefined) {
|
|
2951
|
+
return "";
|
|
2952
|
+
}
|
|
2953
|
+
return marked_umd.marked.parse(typeof value === "string" ? value : value.value);
|
|
2956
2954
|
}
|
|
2957
2955
|
|
|
2958
2956
|
export { colorizedAllCodeElements as a, colorizeCodeElement as b, convertMarkdownString as c, generateColorizeStyles as g, onColorizeThemeChanged as o };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
+
* v4.30.0-next.51
|
|
5
|
+
*/
|
|
6
|
+
import { m as makeT9nController } from './chunk-27DTPISK.js';
|
|
7
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
8
|
+
|
|
9
|
+
const useT9n = makeT9nController(getAssetPath);
|
|
10
|
+
|
|
11
|
+
export { useT9n as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.51
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { d as createFilterExpression } from './index2.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -16,7 +16,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
16
16
|
if (!_keys.length) {
|
|
17
17
|
return [];
|
|
18
18
|
}
|
|
19
|
-
const filterExpression =
|
|
19
|
+
const filterExpression = createFilterExpression(filterWord);
|
|
20
20
|
return collection.filter((item) => {
|
|
21
21
|
if (beforeFilteringFn) {
|
|
22
22
|
const res = beforeFilteringFn(item);
|