@arcgis/coding-components 4.30.0-next.11 → 4.30.0-next.111
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/LICENSE.md +1 -1
- package/README.md +2 -4
- 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-api/t9n/arcade-api.t9n.ca.json +1 -1
- 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/arcade-language/t9n/profile.t9n.ar.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +8 -6
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +7 -5
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +3 -1
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.ca.json +2 -2
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.de.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.he.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.ca.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.it.json +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +2 -2
- 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-25549f14.entry.js +6 -0
- package/dist/arcgis-coding-components/p-4998461e.js +6 -0
- package/dist/arcgis-coding-components/p-4d731512.js +6 -0
- package/dist/arcgis-coding-components/{p-2dc8c1c3.js → p-7d1a3e00.js} +1 -1
- package/dist/arcgis-coding-components/p-7f7b18b5.js +7 -0
- package/dist/arcgis-coding-components/{p-67e523f9.js → p-81b4a62f.js} +2 -2
- package/dist/arcgis-coding-components/p-82cacda2.js +68 -0
- package/dist/arcgis-coding-components/{p-fe7352bb.js → p-8e74e852.js} +3 -3
- package/dist/arcgis-coding-components/{p-b2a8cb09.js → p-91470a4a.js} +2 -2
- package/dist/arcgis-coding-components/{p-b8161e05.js → p-bc983f83.js} +2 -2
- package/dist/arcgis-coding-components/{p-ef12f153.js → p-c9ac7a16.js} +3 -3
- package/dist/arcgis-coding-components/{p-acb10a82.js → p-e1b11b78.js} +2 -2
- package/dist/arcgis-coding-components/{p-f74fe922.js → p-f5841047.js} +2 -2
- package/dist/cjs/app-globals-41c1f370.js +10 -0
- package/dist/cjs/{arcade-defaults-576ac87c.js → arcade-defaults-d6466b5a.js} +729 -289
- package/dist/cjs/{arcade-mode-255ab73e.js → arcade-mode-b9b8cb02.js} +78 -84
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1613 -240
- package/dist/cjs/arcgis-coding-components.cjs.js +14 -12
- package/dist/cjs/{css-ed54e7c5.js → css-445635ef.js} +1 -1
- package/dist/cjs/{cssMode-953d135f.js → cssMode-afed37ca.js} +3 -3
- package/dist/cjs/{html-6885989e.js → html-04f96ede.js} +3 -3
- package/dist/cjs/{htmlMode-036d018f.js → htmlMode-30d3358f.js} +3 -3
- package/dist/cjs/index-202533e4.js +1303 -0
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-8937794f.js → javascript-0f0f9b7b.js} +4 -4
- package/dist/cjs/{jsonMode-679c7610.js → jsonMode-7ffc2346.js} +3 -3
- package/dist/cjs/loader.cjs.js +6 -4
- package/dist/cjs/{tsMode-ab115860.js → tsMode-885b55a1.js} +3 -3
- package/dist/cjs/{typescript-38fcedb8.js → typescript-c042efee.js} +3 -3
- package/dist/components/arcade-api.js +27 -34
- package/dist/components/arcade-contribution.js +10 -10
- package/dist/components/arcade-defaults.js +143 -161
- package/dist/components/arcade-mode.js +46 -52
- package/dist/components/arcade-results.js +51 -61
- package/dist/components/arcade-suggestions.js +27 -34
- package/dist/components/arcade-variables.js +26 -37
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +63 -89
- 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-2CDDVOQU.js +1364 -0
- package/dist/components/code-editor.js +75 -80
- package/dist/components/fields.js +45 -45
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +394 -3
- package/dist/components/markdown.js +13 -27
- package/dist/components/useT9n.js +37 -0
- package/dist/components/utilities.js +3 -3
- package/dist/esm/app-globals-73ff8787.js +8 -0
- package/dist/esm/{arcade-defaults-75889e75.js → arcade-defaults-c6c41c52.js} +712 -275
- package/dist/esm/{arcade-mode-5b34a4b8.js → arcade-mode-3b59a8a3.js} +78 -84
- package/dist/esm/arcgis-arcade-api_6.entry.js +1613 -240
- package/dist/esm/arcgis-coding-components.js +15 -13
- package/dist/esm/{css-97016367.js → css-19fe388b.js} +1 -1
- package/dist/esm/{cssMode-9629ae8c.js → cssMode-18face1c.js} +3 -3
- package/dist/esm/{html-8663047e.js → html-f3314d3b.js} +3 -3
- package/dist/esm/{htmlMode-bebf5737.js → htmlMode-2796244f.js} +3 -3
- package/dist/esm/index-9e18ee96.js +1272 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-b4989490.js → javascript-10ca6f91.js} +4 -4
- package/dist/esm/{jsonMode-b32620ba.js → jsonMode-9f05b287.js} +3 -3
- package/dist/esm/loader.js +7 -5
- package/dist/esm/{tsMode-a6cd5561.js → tsMode-17e9cd75.js} +3 -3
- package/dist/esm/{typescript-4fbf00a5.js → typescript-1416b690.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 -12
- 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/stories/internal/arcade-editor/arcade-editor.stories.d.ts +10 -13
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +15 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +40 -13
- package/dist/types/utils/profile/utils.d.ts +2 -4
- package/package.json +24 -24
- package/dist/arcgis-coding-components/p-2ccd9fd8.entry.js +0 -6
- package/dist/arcgis-coding-components/p-2d2b5e39.js +0 -7
- package/dist/arcgis-coding-components/p-7e1cb194.js +0 -68
- package/dist/arcgis-coding-components/p-9829e511.js +0 -6
- package/dist/cjs/index-2c5ded93.js +0 -1958
- package/dist/esm/index-b24a41ab.js +0 -1927
|
@@ -1,11 +1,11 @@
|
|
|
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.111
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-202533e4.js');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
11
11
|
if (e && e.__esModule) return e;
|
|
@@ -6123,6 +6123,7 @@ const uiMap = new KeyCodeStrMap();
|
|
|
6123
6123
|
const userSettingsUSMap = new KeyCodeStrMap();
|
|
6124
6124
|
const userSettingsGeneralMap = new KeyCodeStrMap();
|
|
6125
6125
|
const EVENT_KEY_CODE_MAP = new Array(230);
|
|
6126
|
+
const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {};
|
|
6126
6127
|
const scanCodeIntToStr = [];
|
|
6127
6128
|
const scanCodeStrToInt = Object.create(null);
|
|
6128
6129
|
const scanCodeLowerCaseStrToInt = Object.create(null);
|
|
@@ -6411,6 +6412,9 @@ for (let i = 0; i <= 132 /* KeyCode.MAX_VALUE */; i++) {
|
|
|
6411
6412
|
if (eventKeyCode) {
|
|
6412
6413
|
EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode;
|
|
6413
6414
|
}
|
|
6415
|
+
if (vkey) {
|
|
6416
|
+
NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode;
|
|
6417
|
+
}
|
|
6414
6418
|
}
|
|
6415
6419
|
// Manually added due to the exclusion above (due to duplication with NumpadEnter)
|
|
6416
6420
|
IMMUTABLE_KEY_CODE_TO_CODE[3 /* KeyCode.Enter */] = 46 /* ScanCode.Enter */;
|
|
@@ -20641,7 +20645,7 @@ class DragAndDropObserver extends Disposable {
|
|
|
20641
20645
|
}
|
|
20642
20646
|
}
|
|
20643
20647
|
const H_REGEX = /(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;
|
|
20644
|
-
function h
|
|
20648
|
+
function h(tag, ...args) {
|
|
20645
20649
|
let attributes;
|
|
20646
20650
|
let children;
|
|
20647
20651
|
if (Array.isArray(args[0])) {
|
|
@@ -21872,6 +21876,7 @@ CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = '\'"`;
|
|
|
21872
21876
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
21873
21877
|
*--------------------------------------------------------------------------------------------*/
|
|
21874
21878
|
const hasBuffer = (typeof Buffer !== 'undefined');
|
|
21879
|
+
new Lazy(() => new Uint8Array(256));
|
|
21875
21880
|
let textDecoder;
|
|
21876
21881
|
class VSBuffer {
|
|
21877
21882
|
/**
|
|
@@ -22782,6 +22787,12 @@ Registry.add(Extensions$7.JSONContribution, jsonContributionRegistry);
|
|
|
22782
22787
|
const Extensions$6 = {
|
|
22783
22788
|
Configuration: 'base.contributions.configuration'
|
|
22784
22789
|
};
|
|
22790
|
+
const allSettings = { properties: {}, patternProperties: {} };
|
|
22791
|
+
const applicationSettings = { properties: {}, patternProperties: {} };
|
|
22792
|
+
const machineSettings = { properties: {}, patternProperties: {} };
|
|
22793
|
+
const machineOverridableSettings = { properties: {}, patternProperties: {} };
|
|
22794
|
+
const windowSettings = { properties: {}, patternProperties: {} };
|
|
22795
|
+
const resourceSettings = { properties: {}, patternProperties: {} };
|
|
22785
22796
|
const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
|
|
22786
22797
|
const contributionRegistry = Registry.as(Extensions$7.JSONContribution);
|
|
22787
22798
|
class ConfigurationRegistry {
|
|
@@ -22954,18 +22965,25 @@ class ConfigurationRegistry {
|
|
|
22954
22965
|
register(configuration);
|
|
22955
22966
|
}
|
|
22956
22967
|
updateSchema(key, property) {
|
|
22968
|
+
allSettings.properties[key] = property;
|
|
22957
22969
|
switch (property.scope) {
|
|
22958
22970
|
case 1 /* ConfigurationScope.APPLICATION */:
|
|
22971
|
+
applicationSettings.properties[key] = property;
|
|
22959
22972
|
break;
|
|
22960
22973
|
case 2 /* ConfigurationScope.MACHINE */:
|
|
22974
|
+
machineSettings.properties[key] = property;
|
|
22961
22975
|
break;
|
|
22962
22976
|
case 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */:
|
|
22977
|
+
machineOverridableSettings.properties[key] = property;
|
|
22963
22978
|
break;
|
|
22964
22979
|
case 3 /* ConfigurationScope.WINDOW */:
|
|
22980
|
+
windowSettings.properties[key] = property;
|
|
22965
22981
|
break;
|
|
22966
22982
|
case 4 /* ConfigurationScope.RESOURCE */:
|
|
22983
|
+
resourceSettings.properties[key] = property;
|
|
22967
22984
|
break;
|
|
22968
22985
|
case 5 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */:
|
|
22986
|
+
resourceSettings.properties[key] = property;
|
|
22969
22987
|
this.resourceLanguageSettingsSchema.properties[key] = property;
|
|
22970
22988
|
break;
|
|
22971
22989
|
}
|
|
@@ -22980,15 +22998,27 @@ class ConfigurationRegistry {
|
|
|
22980
22998
|
$ref: resourceLanguageSettingsSchemaId,
|
|
22981
22999
|
};
|
|
22982
23000
|
this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);
|
|
23001
|
+
allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
23002
|
+
applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
23003
|
+
machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
23004
|
+
machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
23005
|
+
windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
23006
|
+
resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22983
23007
|
}
|
|
22984
23008
|
}
|
|
22985
23009
|
registerOverridePropertyPatternKey() {
|
|
22986
|
-
|
|
23010
|
+
const resourceLanguagePropertiesSchema = {
|
|
22987
23011
|
type: 'object',
|
|
22988
23012
|
description: localize('overrideSettings.defaultDescription', "Configure editor settings to be overridden for a language."),
|
|
22989
23013
|
errorMessage: localize('overrideSettings.errorMessage', "This setting does not support per-language configuration."),
|
|
22990
23014
|
$ref: resourceLanguageSettingsSchemaId,
|
|
22991
|
-
}
|
|
23015
|
+
};
|
|
23016
|
+
allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
23017
|
+
applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
23018
|
+
machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
23019
|
+
machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
23020
|
+
windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
23021
|
+
resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22992
23022
|
this._onDidSchemaChange.fire();
|
|
22993
23023
|
}
|
|
22994
23024
|
updatePropertyDefaultValue(key, property) {
|
|
@@ -60194,6 +60224,34 @@ class ExtUri {
|
|
|
60194
60224
|
* ```
|
|
60195
60225
|
*/
|
|
60196
60226
|
const extUri = new ExtUri(() => false);
|
|
60227
|
+
/**
|
|
60228
|
+
* BIASED utility that _mostly_ ignored the case of urs paths. ONLY use this util if you
|
|
60229
|
+
* understand what you are doing.
|
|
60230
|
+
*
|
|
60231
|
+
* This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
|
|
60232
|
+
*
|
|
60233
|
+
* When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
|
|
60234
|
+
* because those uris come from a "trustworthy source". When creating unknown uris it's always
|
|
60235
|
+
* better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
|
|
60236
|
+
* casing matters.
|
|
60237
|
+
*/
|
|
60238
|
+
new ExtUri(uri => {
|
|
60239
|
+
// A file scheme resource is in the same platform as code, so ignore case for non linux platforms
|
|
60240
|
+
// Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
|
|
60241
|
+
return uri.scheme === Schemas.file ? !isLinux : true;
|
|
60242
|
+
});
|
|
60243
|
+
/**
|
|
60244
|
+
* BIASED utility that always ignores the casing of uris paths. ONLY use this util if you
|
|
60245
|
+
* understand what you are doing.
|
|
60246
|
+
*
|
|
60247
|
+
* This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
|
|
60248
|
+
*
|
|
60249
|
+
* When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
|
|
60250
|
+
* because those uris come from a "trustworthy source". When creating unknown uris it's always
|
|
60251
|
+
* better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
|
|
60252
|
+
* casing matters.
|
|
60253
|
+
*/
|
|
60254
|
+
new ExtUri(_ => true);
|
|
60197
60255
|
const isEqual = extUri.isEqual.bind(extUri);
|
|
60198
60256
|
extUri.isEqualOrParent.bind(extUri);
|
|
60199
60257
|
extUri.getComparisonKey.bind(extUri);
|
|
@@ -105036,6 +105094,20 @@ const intlFileNameCollatorBaseNumeric = new Lazy(() => {
|
|
|
105036
105094
|
collatorIsNumeric: collator.resolvedOptions().numeric
|
|
105037
105095
|
};
|
|
105038
105096
|
});
|
|
105097
|
+
// A collator with numeric sorting enabled.
|
|
105098
|
+
new Lazy(() => {
|
|
105099
|
+
const collator = new Intl.Collator(undefined, { numeric: true });
|
|
105100
|
+
return {
|
|
105101
|
+
collator
|
|
105102
|
+
};
|
|
105103
|
+
});
|
|
105104
|
+
// A collator with numeric sorting enabled, and sensitivity to accents and diacritics but not case.
|
|
105105
|
+
new Lazy(() => {
|
|
105106
|
+
const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'accent' });
|
|
105107
|
+
return {
|
|
105108
|
+
collator
|
|
105109
|
+
};
|
|
105110
|
+
});
|
|
105039
105111
|
/** Compares filenames without distinguishing the name from the extension. Disambiguates by unicode comparison. */
|
|
105040
105112
|
function compareFileNames(one, other, caseSensitive = false) {
|
|
105041
105113
|
const a = one || '';
|
|
@@ -113897,15 +113969,15 @@ class LinesLayout {
|
|
|
113897
113969
|
}
|
|
113898
113970
|
class MovedBlockOverlayWidget extends ViewZoneOverlayWidget {
|
|
113899
113971
|
constructor(_editor, _viewZone, _move, _kind, _diffModel) {
|
|
113900
|
-
const root = h
|
|
113972
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
113901
113973
|
super(_editor, _viewZone, root.root);
|
|
113902
113974
|
this._editor = _editor;
|
|
113903
113975
|
this._move = _move;
|
|
113904
113976
|
this._kind = _kind;
|
|
113905
113977
|
this._diffModel = _diffModel;
|
|
113906
|
-
this._nodes = h
|
|
113907
|
-
h
|
|
113908
|
-
h
|
|
113978
|
+
this._nodes = h('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
|
|
113979
|
+
h('div.text-content@textContent'),
|
|
113980
|
+
h('div.action-bar@actionBar'),
|
|
113909
113981
|
]);
|
|
113910
113982
|
root.root.appendChild(this._nodes.root);
|
|
113911
113983
|
const editorLayout = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114104,7 +114176,7 @@ class RevertButton {
|
|
|
114104
114176
|
this._diffs = _diffs;
|
|
114105
114177
|
this._selection = _selection;
|
|
114106
114178
|
this._id = `revertButton${RevertButton.counter++}`;
|
|
114107
|
-
this._domNode = h
|
|
114179
|
+
this._domNode = h('div.revertButton', {
|
|
114108
114180
|
title: this._selection
|
|
114109
114181
|
? localize('revertSelectedChanges', 'Revert Selected Changes')
|
|
114110
114182
|
: localize('revertChange', 'Revert Change')
|
|
@@ -114577,7 +114649,7 @@ HideUnchangedRegionsFeature = __decorate$1B([
|
|
|
114577
114649
|
], HideUnchangedRegionsFeature);
|
|
114578
114650
|
class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
114579
114651
|
constructor(_editor, _viewZone, _unchangedRegion, _unchangedRegionRange, _hide, _modifiedOutlineSource, _revealModifiedHiddenLine, _options) {
|
|
114580
|
-
const root = h
|
|
114652
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
114581
114653
|
super(_editor, _viewZone, root.root);
|
|
114582
114654
|
this._editor = _editor;
|
|
114583
114655
|
this._unchangedRegion = _unchangedRegion;
|
|
@@ -114586,13 +114658,13 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114586
114658
|
this._modifiedOutlineSource = _modifiedOutlineSource;
|
|
114587
114659
|
this._revealModifiedHiddenLine = _revealModifiedHiddenLine;
|
|
114588
114660
|
this._options = _options;
|
|
114589
|
-
this._nodes = h
|
|
114590
|
-
h
|
|
114591
|
-
h
|
|
114592
|
-
h
|
|
114593
|
-
h
|
|
114661
|
+
this._nodes = h('div.diff-hidden-lines', [
|
|
114662
|
+
h('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
|
|
114663
|
+
h('div.center@content', { style: { display: 'flex' } }, [
|
|
114664
|
+
h('div@first', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: '0' } }, [$$d('a', { title: localize('showUnchangedRegion', 'Show Unchanged Region'), role: 'button', onclick: () => { this._unchangedRegion.showAll(undefined); } }, ...renderLabelWithIcons('$(unfold)'))]),
|
|
114665
|
+
h('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
|
|
114594
114666
|
]),
|
|
114595
|
-
h
|
|
114667
|
+
h('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
|
|
114596
114668
|
]);
|
|
114597
114669
|
root.root.appendChild(this._nodes.root);
|
|
114598
114670
|
const layoutInfo = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114717,7 +114789,7 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114717
114789
|
for (let i = 0; i < items.length; i++) {
|
|
114718
114790
|
const item = items[i];
|
|
114719
114791
|
const icon = SymbolKinds.toIcon(item.kind);
|
|
114720
|
-
const divItem = h
|
|
114792
|
+
const divItem = h('div.breadcrumb-item', {
|
|
114721
114793
|
style: { display: 'flex', alignItems: 'center' },
|
|
114722
114794
|
}, [
|
|
114723
114795
|
renderIcon(icon),
|
|
@@ -116134,7 +116206,7 @@ let OverviewRulerPart = OverviewRulerPart_1 = class OverviewRulerPart extends Di
|
|
|
116134
116206
|
const viewportDomElement = createFastDomNode(document.createElement('div'));
|
|
116135
116207
|
viewportDomElement.setClassName('diffViewport');
|
|
116136
116208
|
viewportDomElement.setPosition('absolute');
|
|
116137
|
-
const diffOverviewRoot = h
|
|
116209
|
+
const diffOverviewRoot = h('div.diffOverview', {
|
|
116138
116210
|
style: { position: 'absolute', top: '0px', width: OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px' }
|
|
116139
116211
|
}).root;
|
|
116140
116212
|
this._register(appendRemoveOnDispose(diffOverviewRoot, viewportDomElement.domNode));
|
|
@@ -116614,11 +116686,11 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
116614
116686
|
this._parentInstantiationService = _parentInstantiationService;
|
|
116615
116687
|
this._audioCueService = _audioCueService;
|
|
116616
116688
|
this._editorProgressService = _editorProgressService;
|
|
116617
|
-
this.elements = h
|
|
116618
|
-
h
|
|
116619
|
-
h
|
|
116620
|
-
h
|
|
116621
|
-
h
|
|
116689
|
+
this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
|
|
116690
|
+
h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
|
|
116691
|
+
h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
|
|
116692
|
+
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
|
|
116693
|
+
h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
|
|
116622
116694
|
]);
|
|
116623
116695
|
this._diffModel = observableValue(this, undefined);
|
|
116624
116696
|
this._shouldDisposeDiffModel = false;
|
|
@@ -117752,8 +117824,8 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117752
117824
|
return { maxScroll: scroll2, width: this._originalWidth.read(reader) };
|
|
117753
117825
|
}
|
|
117754
117826
|
});
|
|
117755
|
-
this._elements = h
|
|
117756
|
-
h
|
|
117827
|
+
this._elements = h('div.multiDiffEntry', [
|
|
117828
|
+
h('div.content', {
|
|
117757
117829
|
style: {
|
|
117758
117830
|
display: 'flex',
|
|
117759
117831
|
flexDirection: 'column',
|
|
@@ -117761,19 +117833,19 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117761
117833
|
overflow: 'hidden',
|
|
117762
117834
|
}
|
|
117763
117835
|
}, [
|
|
117764
|
-
h
|
|
117765
|
-
h
|
|
117766
|
-
h
|
|
117767
|
-
h
|
|
117836
|
+
h('div.header@header', [
|
|
117837
|
+
h('div.collapse-button@collapseButton'),
|
|
117838
|
+
h('div.title.show-file-icons@title', []),
|
|
117839
|
+
h('div.actions@actions'),
|
|
117768
117840
|
]),
|
|
117769
|
-
h
|
|
117841
|
+
h('div.editorParent', {
|
|
117770
117842
|
style: {
|
|
117771
117843
|
flex: '1',
|
|
117772
117844
|
display: 'flex',
|
|
117773
117845
|
flexDirection: 'column',
|
|
117774
117846
|
}
|
|
117775
117847
|
}, [
|
|
117776
|
-
h
|
|
117848
|
+
h('div.editorContainer@editor', { style: { flex: '1' } }),
|
|
117777
117849
|
])
|
|
117778
117850
|
])
|
|
117779
117851
|
]);
|
|
@@ -117974,17 +118046,17 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
|
|
|
117974
118046
|
this._workbenchUIElementFactory = _workbenchUIElementFactory;
|
|
117975
118047
|
this._parentContextKeyService = _parentContextKeyService;
|
|
117976
118048
|
this._parentInstantiationService = _parentInstantiationService;
|
|
117977
|
-
this._elements = h
|
|
118049
|
+
this._elements = h('div', {
|
|
117978
118050
|
style: {
|
|
117979
118051
|
overflowY: 'hidden',
|
|
117980
118052
|
}
|
|
117981
118053
|
}, [
|
|
117982
|
-
h
|
|
118054
|
+
h('div@content', {
|
|
117983
118055
|
style: {
|
|
117984
118056
|
overflow: 'hidden',
|
|
117985
118057
|
}
|
|
117986
118058
|
}),
|
|
117987
|
-
h
|
|
118059
|
+
h('div.monaco-editor@overflowWidgetsDomNode', {}),
|
|
117988
118060
|
]);
|
|
117989
118061
|
this._sizeObserver = this._register(new ObservableElementSizeObserver(this._element, undefined));
|
|
117990
118062
|
this._objectPool = this._register(new ObjectPool((data) => {
|
|
@@ -120544,7 +120616,7 @@ registerLanguage({
|
|
|
120544
120616
|
mimetypes: ["text/css"],
|
|
120545
120617
|
loader: () => {
|
|
120546
120618
|
{
|
|
120547
|
-
return Promise.resolve().then(function () { return require('./css-
|
|
120619
|
+
return Promise.resolve().then(function () { return require('./css-445635ef.js'); });
|
|
120548
120620
|
}
|
|
120549
120621
|
}
|
|
120550
120622
|
});
|
|
@@ -120562,7 +120634,7 @@ registerLanguage({
|
|
|
120562
120634
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120563
120635
|
loader: () => {
|
|
120564
120636
|
{
|
|
120565
|
-
return Promise.resolve().then(function () { return require('./html-
|
|
120637
|
+
return Promise.resolve().then(function () { return require('./html-04f96ede.js'); });
|
|
120566
120638
|
}
|
|
120567
120639
|
}
|
|
120568
120640
|
});
|
|
@@ -120582,7 +120654,7 @@ registerLanguage({
|
|
|
120582
120654
|
mimetypes: ["text/javascript"],
|
|
120583
120655
|
loader: () => {
|
|
120584
120656
|
{
|
|
120585
|
-
return Promise.resolve().then(function () { return require('./javascript-
|
|
120657
|
+
return Promise.resolve().then(function () { return require('./javascript-0f0f9b7b.js'); });
|
|
120586
120658
|
}
|
|
120587
120659
|
}
|
|
120588
120660
|
});
|
|
@@ -120600,7 +120672,7 @@ registerLanguage({
|
|
|
120600
120672
|
mimetypes: ["text/typescript"],
|
|
120601
120673
|
loader: () => {
|
|
120602
120674
|
{
|
|
120603
|
-
return Promise.resolve().then(function () { return require('./typescript-
|
|
120675
|
+
return Promise.resolve().then(function () { return require('./typescript-c042efee.js'); });
|
|
120604
120676
|
}
|
|
120605
120677
|
}
|
|
120606
120678
|
});
|
|
@@ -120721,7 +120793,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120721
120793
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120722
120794
|
function getMode$3() {
|
|
120723
120795
|
{
|
|
120724
|
-
return Promise.resolve().then(function () { return require('./cssMode-
|
|
120796
|
+
return Promise.resolve().then(function () { return require('./cssMode-afed37ca.js'); });
|
|
120725
120797
|
}
|
|
120726
120798
|
}
|
|
120727
120799
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120846,7 +120918,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120846
120918
|
};
|
|
120847
120919
|
function getMode$2() {
|
|
120848
120920
|
{
|
|
120849
|
-
return Promise.resolve().then(function () { return require('./htmlMode-
|
|
120921
|
+
return Promise.resolve().then(function () { return require('./htmlMode-30d3358f.js'); });
|
|
120850
120922
|
}
|
|
120851
120923
|
}
|
|
120852
120924
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120948,7 +121020,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120948
121020
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120949
121021
|
function getMode$1() {
|
|
120950
121022
|
{
|
|
120951
|
-
return Promise.resolve().then(function () { return require('./jsonMode-
|
|
121023
|
+
return Promise.resolve().then(function () { return require('./jsonMode-7ffc2346.js'); });
|
|
120952
121024
|
}
|
|
120953
121025
|
}
|
|
120954
121026
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121217,7 +121289,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121217
121289
|
};
|
|
121218
121290
|
function getMode() {
|
|
121219
121291
|
{
|
|
121220
|
-
return Promise.resolve().then(function () { return require('./tsMode-
|
|
121292
|
+
return Promise.resolve().then(function () { return require('./tsMode-885b55a1.js'); });
|
|
121221
121293
|
}
|
|
121222
121294
|
}
|
|
121223
121295
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -132875,8 +132947,8 @@ let InlineSuggestionHintsContentWidget = InlineSuggestionHintsContentWidget_1 =
|
|
|
132875
132947
|
this.id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget_1.id++}`;
|
|
132876
132948
|
this.allowEditorOverflow = true;
|
|
132877
132949
|
this.suppressMouseDown = false;
|
|
132878
|
-
this.nodes = h
|
|
132879
|
-
h
|
|
132950
|
+
this.nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
|
|
132951
|
+
h('div@toolBar'),
|
|
132880
132952
|
]);
|
|
132881
132953
|
this.previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon));
|
|
132882
132954
|
this.availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false);
|
|
@@ -133012,7 +133084,7 @@ class StatusBarViewItem$1 extends MenuEntryActionViewItem {
|
|
|
133012
133084
|
return super.updateLabel();
|
|
133013
133085
|
}
|
|
133014
133086
|
if (this.label) {
|
|
133015
|
-
const div = h
|
|
133087
|
+
const div = h('div.keybinding').root;
|
|
133016
133088
|
const k = new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions });
|
|
133017
133089
|
k.set(kb);
|
|
133018
133090
|
this.label.textContent = this._action.label;
|
|
@@ -166666,21 +166738,13 @@ registerEditorAction(ToggleHighContrast);
|
|
|
166666
166738
|
|
|
166667
166739
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
166668
166740
|
|
|
166669
|
-
function
|
|
166670
|
-
|
|
166671
|
-
path: basedir,
|
|
166672
|
-
exports: {},
|
|
166673
|
-
require: function (path, base) {
|
|
166674
|
-
return commonjsRequire();
|
|
166675
|
-
}
|
|
166676
|
-
}, fn(module, module.exports), module.exports;
|
|
166741
|
+
function commonjsRequire (path) {
|
|
166742
|
+
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
166677
166743
|
}
|
|
166678
166744
|
|
|
166679
|
-
|
|
166680
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
166681
|
-
}
|
|
166745
|
+
var main = {exports: {}};
|
|
166682
166746
|
|
|
166683
|
-
|
|
166747
|
+
(function (module, exports) {
|
|
166684
166748
|
(function (factory) {
|
|
166685
166749
|
{
|
|
166686
166750
|
var v = factory(commonjsRequire, exports);
|
|
@@ -168945,101 +169009,80 @@ var main = createCommonjsModule(function (module, exports) {
|
|
|
168945
169009
|
Is.typedArray = typedArray;
|
|
168946
169010
|
})(Is || (Is = {}));
|
|
168947
169011
|
});
|
|
168948
|
-
});
|
|
169012
|
+
}(main, main.exports));
|
|
168949
169013
|
|
|
168950
|
-
|
|
169014
|
+
// src/index.ts
|
|
169015
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
168951
169016
|
function isDefaultModule(module) {
|
|
168952
|
-
|
|
168953
|
-
}
|
|
168954
|
-
async function requireModule(modulePath) {
|
|
168955
|
-
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
168956
|
-
resolve(moduleDefault);
|
|
168957
|
-
}));
|
|
169017
|
+
return module.default !== void 0;
|
|
168958
169018
|
}
|
|
168959
169019
|
async function importLayersFeatureLayer() {
|
|
168960
|
-
|
|
168961
|
-
|
|
168962
|
-
|
|
168963
|
-
|
|
168964
|
-
|
|
169020
|
+
if (isAMD) {
|
|
169021
|
+
return await window.$arcgis.import("esri/layers/FeatureLayer");
|
|
169022
|
+
}
|
|
169023
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/layers/FeatureLayer.js')); });
|
|
169024
|
+
return isDefaultModule(module) ? module.default : module;
|
|
169025
|
+
}
|
|
169026
|
+
async function newLayersFeatureLayer(properties) {
|
|
169027
|
+
const ModConstructor = await importLayersFeatureLayer();
|
|
169028
|
+
return new ModConstructor(properties);
|
|
168965
169029
|
}
|
|
168966
169030
|
async function importPortalPortalItem() {
|
|
168967
|
-
|
|
168968
|
-
|
|
168969
|
-
|
|
168970
|
-
|
|
168971
|
-
|
|
169031
|
+
if (isAMD) {
|
|
169032
|
+
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
169033
|
+
}
|
|
169034
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/portal/PortalItem.js')); });
|
|
169035
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168972
169036
|
}
|
|
168973
169037
|
async function newPortalPortalItem(properties) {
|
|
168974
|
-
|
|
168975
|
-
|
|
169038
|
+
const ModConstructor = await importPortalPortalItem();
|
|
169039
|
+
return new ModConstructor(properties);
|
|
168976
169040
|
}
|
|
168977
169041
|
async function importWebMap() {
|
|
168978
|
-
|
|
168979
|
-
|
|
168980
|
-
|
|
168981
|
-
|
|
168982
|
-
|
|
169042
|
+
if (isAMD) {
|
|
169043
|
+
return await window.$arcgis.import("esri/WebMap");
|
|
169044
|
+
}
|
|
169045
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebMap.js')); });
|
|
169046
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168983
169047
|
}
|
|
168984
169048
|
async function newWebMap(properties) {
|
|
168985
|
-
|
|
168986
|
-
|
|
169049
|
+
const ModConstructor = await importWebMap();
|
|
169050
|
+
return new ModConstructor(properties);
|
|
168987
169051
|
}
|
|
168988
169052
|
async function importWebScene() {
|
|
168989
|
-
|
|
168990
|
-
|
|
168991
|
-
|
|
168992
|
-
|
|
168993
|
-
|
|
169053
|
+
if (isAMD) {
|
|
169054
|
+
return await window.$arcgis.import("esri/WebScene");
|
|
169055
|
+
}
|
|
169056
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebScene.js')); });
|
|
169057
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168994
169058
|
}
|
|
168995
169059
|
async function newWebScene(properties) {
|
|
168996
|
-
|
|
168997
|
-
|
|
169060
|
+
const ModConstructor = await importWebScene();
|
|
169061
|
+
return new ModConstructor(properties);
|
|
168998
169062
|
}
|
|
168999
169063
|
async function importArcade() {
|
|
169000
|
-
|
|
169001
|
-
|
|
169002
|
-
|
|
169003
|
-
|
|
169004
|
-
|
|
169064
|
+
if (isAMD) {
|
|
169065
|
+
return await window.$arcgis.import("esri/arcade");
|
|
169066
|
+
}
|
|
169067
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/arcade.js')); });
|
|
169068
|
+
return isDefaultModule(module) ? module.default : module;
|
|
169005
169069
|
}
|
|
169006
169070
|
async function importRequest() {
|
|
169007
|
-
|
|
169008
|
-
|
|
169009
|
-
|
|
169010
|
-
|
|
169011
|
-
|
|
169071
|
+
if (isAMD) {
|
|
169072
|
+
return await window.$arcgis.import("esri/request");
|
|
169073
|
+
}
|
|
169074
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/request.js')); });
|
|
169075
|
+
return isDefaultModule(module) ? module.default : module;
|
|
169012
169076
|
}
|
|
169013
169077
|
|
|
169014
|
-
//#region core adapter fix
|
|
169015
|
-
async function newFeatureLayer(definition) {
|
|
169016
|
-
const FeatureLayer = await importLayersFeatureLayer();
|
|
169017
|
-
// Fix title for the layer. Instead of defaulting to the map viewer style.
|
|
169018
|
-
return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
|
|
169019
|
-
}
|
|
169020
|
-
//#endregion
|
|
169021
169078
|
//#region Type Guards
|
|
169022
|
-
function
|
|
169023
|
-
return (!!item &&
|
|
169024
|
-
typeof item === "object" &&
|
|
169025
|
-
"declaredClass" in item &&
|
|
169026
|
-
typeof item.declaredClass === "string" &&
|
|
169027
|
-
item.declaredClass.startsWith("esri.layers."));
|
|
169028
|
-
}
|
|
169029
|
-
function isFeatureSetInstance(item) {
|
|
169030
|
-
return (!!item &&
|
|
169031
|
-
typeof item === "object" &&
|
|
169032
|
-
"declaredClass" in item &&
|
|
169033
|
-
typeof item.declaredClass === "string" &&
|
|
169034
|
-
item.declaredClass === "esri.rest.support.FeatureSet");
|
|
169035
|
-
}
|
|
169036
|
-
function isQueryableLayerInstance(item) {
|
|
169079
|
+
function isFeatureLayerLikeInstance(item) {
|
|
169037
169080
|
return (!!item &&
|
|
169038
169081
|
typeof item === "object" &&
|
|
169039
169082
|
"declaredClass" in item &&
|
|
169040
169083
|
typeof item.declaredClass === "string" &&
|
|
169041
169084
|
item.declaredClass.startsWith("esri.layers.") &&
|
|
169042
|
-
|
|
169085
|
+
isFieldsDefinition(item) &&
|
|
169043
169086
|
"queryFeatures" in item &&
|
|
169044
169087
|
typeof item.queryFeatures === "function");
|
|
169045
169088
|
}
|
|
@@ -169082,10 +169125,13 @@ function isFeatureLayerItemDefinition(item) {
|
|
|
169082
169125
|
return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
|
|
169083
169126
|
}
|
|
169084
169127
|
function isFieldsDefinition(item) {
|
|
169085
|
-
return
|
|
169128
|
+
return !!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields);
|
|
169086
169129
|
}
|
|
169087
169130
|
function isUrlDefinition(item) {
|
|
169088
|
-
return
|
|
169131
|
+
return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
|
|
169132
|
+
}
|
|
169133
|
+
function isSupportedServiceUrlDefinition(item) {
|
|
169134
|
+
return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
|
|
169089
169135
|
}
|
|
169090
169136
|
function isSubtypeInstance(item) {
|
|
169091
169137
|
return (!!item &&
|
|
@@ -169155,11 +169201,11 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
169155
169201
|
return null;
|
|
169156
169202
|
}
|
|
169157
169203
|
let source = null;
|
|
169158
|
-
if (
|
|
169204
|
+
if (isFieldsDefinition(definition)) {
|
|
169159
169205
|
source = definition;
|
|
169160
169206
|
}
|
|
169161
169207
|
else {
|
|
169162
|
-
source = await
|
|
169208
|
+
source = await newLayersFeatureLayer(definition);
|
|
169163
169209
|
}
|
|
169164
169210
|
if (isLoadableSource(source)) {
|
|
169165
169211
|
await source.load();
|
|
@@ -169170,32 +169216,428 @@ async function serviceMetaData(url) {
|
|
|
169170
169216
|
url += "/layers";
|
|
169171
169217
|
const request = await importRequest();
|
|
169172
169218
|
const response = await request(url, { responseType: "json", query: { f: "json" } });
|
|
169173
|
-
const data = {
|
|
169174
|
-
layers: response.data?.layers ?? [],
|
|
169175
|
-
tables: response.data?.tables ?? []
|
|
169176
|
-
};
|
|
169177
169219
|
const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
|
|
169178
|
-
const layers =
|
|
169179
|
-
const tables =
|
|
169220
|
+
const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
|
|
169221
|
+
const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
|
|
169180
169222
|
return { layers, tables };
|
|
169181
169223
|
}
|
|
169182
|
-
function
|
|
169224
|
+
function getSupportedLayerInfos(layers, queryCapability) {
|
|
169225
|
+
if (!layers) {
|
|
169226
|
+
return [];
|
|
169227
|
+
}
|
|
169183
169228
|
return layers.filter((layer) => {
|
|
169184
|
-
|
|
169185
|
-
|
|
169229
|
+
switch (layer.type) {
|
|
169230
|
+
case "Feature Layer":
|
|
169231
|
+
case "Oriented Imagery Layer":
|
|
169232
|
+
case "Catalog Layer":
|
|
169233
|
+
case "Table": {
|
|
169234
|
+
const capabilities = layer.capabilities
|
|
169235
|
+
? layer.capabilities
|
|
169236
|
+
.toLowerCase()
|
|
169237
|
+
.split(",")
|
|
169238
|
+
.map((value) => value.trim())
|
|
169239
|
+
: [];
|
|
169240
|
+
return capabilities.includes(queryCapability);
|
|
169241
|
+
}
|
|
169242
|
+
default:
|
|
169243
|
+
return false;
|
|
169186
169244
|
}
|
|
169187
|
-
const capabilities = layer.capabilities
|
|
169188
|
-
? layer.capabilities
|
|
169189
|
-
.toLowerCase()
|
|
169190
|
-
.split(",")
|
|
169191
|
-
.map((value) => value.trim())
|
|
169192
|
-
: [];
|
|
169193
|
-
return capabilities.includes(queryCapability);
|
|
169194
169245
|
});
|
|
169195
169246
|
}
|
|
169196
169247
|
//#endregion
|
|
169197
169248
|
|
|
169198
|
-
|
|
169249
|
+
// src/array-utils.ts
|
|
169250
|
+
|
|
169251
|
+
// src/deferred.ts
|
|
169252
|
+
var Deferred = class {
|
|
169253
|
+
/**
|
|
169254
|
+
* Resolves the promise.
|
|
169255
|
+
* @param value The value to resolve the promise with.
|
|
169256
|
+
*/
|
|
169257
|
+
resolve(_value) {
|
|
169258
|
+
}
|
|
169259
|
+
/**
|
|
169260
|
+
* Rejects the promise.
|
|
169261
|
+
*/
|
|
169262
|
+
reject(_error) {
|
|
169263
|
+
}
|
|
169264
|
+
/**
|
|
169265
|
+
* Creates a new deferred promise.
|
|
169266
|
+
*/
|
|
169267
|
+
constructor() {
|
|
169268
|
+
this.promise = new Promise((resolve, reject) => {
|
|
169269
|
+
this.resolve = resolve;
|
|
169270
|
+
this.reject = reject;
|
|
169271
|
+
});
|
|
169272
|
+
}
|
|
169273
|
+
};
|
|
169274
|
+
|
|
169275
|
+
// src/dom.ts
|
|
169276
|
+
function inTargetElement(element, targetElement) {
|
|
169277
|
+
let currentElement = element;
|
|
169278
|
+
while (currentElement) {
|
|
169279
|
+
if (currentElement === targetElement) {
|
|
169280
|
+
return true;
|
|
169281
|
+
}
|
|
169282
|
+
if (!currentElement.parentNode) {
|
|
169283
|
+
return false;
|
|
169284
|
+
}
|
|
169285
|
+
if (currentElement.parentNode instanceof ShadowRoot) {
|
|
169286
|
+
currentElement = currentElement.parentNode.host;
|
|
169287
|
+
} else {
|
|
169288
|
+
currentElement = currentElement.parentNode;
|
|
169289
|
+
}
|
|
169290
|
+
}
|
|
169291
|
+
return false;
|
|
169292
|
+
}
|
|
169293
|
+
function observeAncestorsMutation(element, attributeFilter, callback) {
|
|
169294
|
+
const { subscribe } = observe(attributeFilter);
|
|
169295
|
+
return subscribe((mutations) => {
|
|
169296
|
+
const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
|
|
169297
|
+
if (matched) {
|
|
169298
|
+
callback();
|
|
169299
|
+
}
|
|
169300
|
+
});
|
|
169301
|
+
}
|
|
169302
|
+
var observers = {};
|
|
169303
|
+
function observe(attributeFilter) {
|
|
169304
|
+
const attributes = attributeFilter.join(",");
|
|
169305
|
+
const previousObserver = observers[attributes];
|
|
169306
|
+
if (previousObserver !== void 0) {
|
|
169307
|
+
return previousObserver;
|
|
169308
|
+
}
|
|
169309
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
169310
|
+
const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
|
|
169311
|
+
mutationObserver.observe(document.documentElement, {
|
|
169312
|
+
attributes: true,
|
|
169313
|
+
attributeFilter,
|
|
169314
|
+
subtree: true
|
|
169315
|
+
});
|
|
169316
|
+
const observer = {
|
|
169317
|
+
subscribe(callback) {
|
|
169318
|
+
subscribers.add(callback);
|
|
169319
|
+
return {
|
|
169320
|
+
remove: () => {
|
|
169321
|
+
subscribers.delete(callback);
|
|
169322
|
+
if (subscribers.size === 0) {
|
|
169323
|
+
mutationObserver.disconnect();
|
|
169324
|
+
observers[attributes] = void 0;
|
|
169325
|
+
}
|
|
169326
|
+
}
|
|
169327
|
+
};
|
|
169328
|
+
}
|
|
169329
|
+
};
|
|
169330
|
+
observers[attributes] = observer;
|
|
169331
|
+
return observer;
|
|
169332
|
+
}
|
|
169333
|
+
function closestElement(base, selector) {
|
|
169334
|
+
let currentElement = base;
|
|
169335
|
+
while (currentElement) {
|
|
169336
|
+
const element = currentElement.closest(selector);
|
|
169337
|
+
if (element) {
|
|
169338
|
+
return element;
|
|
169339
|
+
}
|
|
169340
|
+
const rootElement = currentElement.getRootNode();
|
|
169341
|
+
if (rootElement === document) {
|
|
169342
|
+
return null;
|
|
169343
|
+
}
|
|
169344
|
+
currentElement = rootElement.host;
|
|
169345
|
+
}
|
|
169346
|
+
return null;
|
|
169347
|
+
}
|
|
169348
|
+
function getElementTheme(base) {
|
|
169349
|
+
const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
|
|
169350
|
+
return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
|
|
169351
|
+
}
|
|
169352
|
+
function getElementAttribute(el, prop, fallbackValue) {
|
|
169353
|
+
const closest = closestElement(el, `[${prop}]`);
|
|
169354
|
+
return closest?.getAttribute(prop) ?? fallbackValue;
|
|
169355
|
+
}
|
|
169356
|
+
function isElement(ref) {
|
|
169357
|
+
return ref.nodeType === Node.ELEMENT_NODE;
|
|
169358
|
+
}
|
|
169359
|
+
function isHTMLWithSetFocus(ref) {
|
|
169360
|
+
return "setFocus" in ref && typeof ref.setFocus === "function";
|
|
169361
|
+
}
|
|
169362
|
+
function setFocus(ref, selector = "") {
|
|
169363
|
+
if (!isElement(ref)) {
|
|
169364
|
+
return false;
|
|
169365
|
+
}
|
|
169366
|
+
if (ref.matches(selector)) {
|
|
169367
|
+
if (isHTMLWithSetFocus(ref)) {
|
|
169368
|
+
setTimeout(() => ref.setFocus(), 0);
|
|
169369
|
+
}
|
|
169370
|
+
return true;
|
|
169371
|
+
}
|
|
169372
|
+
for (const child of ref.children) {
|
|
169373
|
+
if (setFocus(child, selector)) {
|
|
169374
|
+
return true;
|
|
169375
|
+
}
|
|
169376
|
+
}
|
|
169377
|
+
const shadowRoot = ref.shadowRoot;
|
|
169378
|
+
if (shadowRoot) {
|
|
169379
|
+
for (const child of shadowRoot.children) {
|
|
169380
|
+
if (setFocus(child, selector)) {
|
|
169381
|
+
return true;
|
|
169382
|
+
}
|
|
169383
|
+
}
|
|
169384
|
+
}
|
|
169385
|
+
return false;
|
|
169386
|
+
}
|
|
169387
|
+
function setFocusOnElement(ref, selector) {
|
|
169388
|
+
if (!ref?.shadowRoot) {
|
|
169389
|
+
return;
|
|
169390
|
+
}
|
|
169391
|
+
if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
|
|
169392
|
+
setFocus(ref, selector);
|
|
169393
|
+
return;
|
|
169394
|
+
}
|
|
169395
|
+
const mutationObserver = new MutationObserver(() => {
|
|
169396
|
+
mutationObserver.disconnect();
|
|
169397
|
+
setFocus(ref, selector);
|
|
169398
|
+
});
|
|
169399
|
+
mutationObserver.observe(ref, {
|
|
169400
|
+
attributes: true,
|
|
169401
|
+
attributeFilter: ["hydrated", "calcite-hydrated"]
|
|
169402
|
+
});
|
|
169403
|
+
}
|
|
169404
|
+
|
|
169405
|
+
// src/errors.ts
|
|
169406
|
+
function safeCall(callback, thisContext, ...rest) {
|
|
169407
|
+
try {
|
|
169408
|
+
return callback?.call(thisContext, ...rest);
|
|
169409
|
+
} catch (error) {
|
|
169410
|
+
console.error(error, callback);
|
|
169411
|
+
}
|
|
169412
|
+
return void 0;
|
|
169413
|
+
}
|
|
169414
|
+
async function safeAsyncCall(callback, thisContext, ...rest) {
|
|
169415
|
+
try {
|
|
169416
|
+
const result = callback?.call(thisContext, ...rest);
|
|
169417
|
+
return result instanceof Promise ? await result : result;
|
|
169418
|
+
} catch (error) {
|
|
169419
|
+
console.error(error, callback);
|
|
169420
|
+
}
|
|
169421
|
+
return void 0;
|
|
169422
|
+
}
|
|
169423
|
+
|
|
169424
|
+
// src/guid.ts
|
|
169425
|
+
function gen(count) {
|
|
169426
|
+
let out = "";
|
|
169427
|
+
for (let i = 0; i < count; i++) {
|
|
169428
|
+
out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
169429
|
+
}
|
|
169430
|
+
return out;
|
|
169431
|
+
}
|
|
169432
|
+
function generateGuid() {
|
|
169433
|
+
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
169434
|
+
}
|
|
169435
|
+
var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
|
|
169436
|
+
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
169437
|
+
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
169438
|
+
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
169439
|
+
|
|
169440
|
+
// src/intl.ts
|
|
169441
|
+
var supportedLocales = /* @__PURE__ */ new Set([
|
|
169442
|
+
"ar",
|
|
169443
|
+
"bg",
|
|
169444
|
+
"bs",
|
|
169445
|
+
"ca",
|
|
169446
|
+
"cs",
|
|
169447
|
+
"da",
|
|
169448
|
+
"de",
|
|
169449
|
+
"el",
|
|
169450
|
+
"en",
|
|
169451
|
+
"es",
|
|
169452
|
+
"et",
|
|
169453
|
+
"fi",
|
|
169454
|
+
"fr",
|
|
169455
|
+
"he",
|
|
169456
|
+
"hr",
|
|
169457
|
+
"hu",
|
|
169458
|
+
"id",
|
|
169459
|
+
"it",
|
|
169460
|
+
"ja",
|
|
169461
|
+
"ko",
|
|
169462
|
+
"lt",
|
|
169463
|
+
"lv",
|
|
169464
|
+
"nl",
|
|
169465
|
+
"nb",
|
|
169466
|
+
"pl",
|
|
169467
|
+
"pt-BR",
|
|
169468
|
+
"pt-PT",
|
|
169469
|
+
"ro",
|
|
169470
|
+
"ru",
|
|
169471
|
+
"sk",
|
|
169472
|
+
"sl",
|
|
169473
|
+
"sr",
|
|
169474
|
+
"sv",
|
|
169475
|
+
"th",
|
|
169476
|
+
"tr",
|
|
169477
|
+
"uk",
|
|
169478
|
+
"vi",
|
|
169479
|
+
"zh-CN",
|
|
169480
|
+
"zh-HK",
|
|
169481
|
+
"zh-TW"
|
|
169482
|
+
]);
|
|
169483
|
+
var defaultLocale = "en";
|
|
169484
|
+
async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
|
|
169485
|
+
const path = `${assetsPath}/${prefix}`;
|
|
169486
|
+
const filePath = `${path}${locale}.json`;
|
|
169487
|
+
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
169488
|
+
return await t9nStringsCache[filePath];
|
|
169489
|
+
}
|
|
169490
|
+
var t9nStringsCache = {};
|
|
169491
|
+
async function fetchBundle(locale, path) {
|
|
169492
|
+
const filePath = `${path}${locale}.json`;
|
|
169493
|
+
try {
|
|
169494
|
+
const response = await fetch(filePath);
|
|
169495
|
+
if (response.ok) {
|
|
169496
|
+
return await response.json();
|
|
169497
|
+
}
|
|
169498
|
+
} catch (error) {
|
|
169499
|
+
console.error(error);
|
|
169500
|
+
return fallbackBundle;
|
|
169501
|
+
}
|
|
169502
|
+
if (locale === defaultLocale) {
|
|
169503
|
+
return fallbackBundle;
|
|
169504
|
+
}
|
|
169505
|
+
return await fetchBundle(defaultLocale, path);
|
|
169506
|
+
}
|
|
169507
|
+
var fallbackBundle = new Proxy(
|
|
169508
|
+
{},
|
|
169509
|
+
{
|
|
169510
|
+
get: (_target, property) => camelToHuman(property.toString())
|
|
169511
|
+
}
|
|
169512
|
+
);
|
|
169513
|
+
function getElementLocales(element) {
|
|
169514
|
+
const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
|
|
169515
|
+
if (supportedLocales.has(lang)) {
|
|
169516
|
+
return { lang, t9nLocale: lang };
|
|
169517
|
+
}
|
|
169518
|
+
const rootCode = lang.slice(0, 2);
|
|
169519
|
+
return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
|
|
169520
|
+
}
|
|
169521
|
+
function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
|
|
169522
|
+
let result = void 0;
|
|
169523
|
+
const callback = () => void updateComponentLocateState(element, assetsPath, assetName).then((newResult) => {
|
|
169524
|
+
if (result?.lang !== newResult.lang || result.t9nLocale !== newResult.t9nLocale || result.t9nStrings !== newResult.t9nStrings) {
|
|
169525
|
+
onUpdated(newResult);
|
|
169526
|
+
}
|
|
169527
|
+
result = newResult;
|
|
169528
|
+
}).catch(console.error);
|
|
169529
|
+
callback();
|
|
169530
|
+
return observeAncestorsMutation(element, ["lang"], callback);
|
|
169531
|
+
}
|
|
169532
|
+
async function updateComponentLocateState(element, assetsPath, assetName = element.tagName.toLowerCase().replace("arcgis-", "")) {
|
|
169533
|
+
const { lang, t9nLocale } = getElementLocales(element);
|
|
169534
|
+
const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
|
|
169535
|
+
const prefix = `${assetName}.t9n.`;
|
|
169536
|
+
const t9nStrings = await fetchT9NStringsBundle(t9nLocale, t9nAssetsPath, prefix);
|
|
169537
|
+
return { lang, t9nLocale, t9nStrings };
|
|
169538
|
+
}
|
|
169539
|
+
|
|
169540
|
+
// src/strings.ts
|
|
169541
|
+
var doubleQuote = '"';
|
|
169542
|
+
var singleQuote = "'";
|
|
169543
|
+
function repeatString(value, n) {
|
|
169544
|
+
return new Array(n + 1).join(value);
|
|
169545
|
+
}
|
|
169546
|
+
function quoteString(value) {
|
|
169547
|
+
let quote = doubleQuote;
|
|
169548
|
+
let alternateQuote = singleQuote;
|
|
169549
|
+
const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
|
|
169550
|
+
if (avoidEscape) {
|
|
169551
|
+
alternateQuote = doubleQuote;
|
|
169552
|
+
quote = singleQuote;
|
|
169553
|
+
}
|
|
169554
|
+
const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
|
|
169555
|
+
value = value.replace(
|
|
169556
|
+
alternateEscape,
|
|
169557
|
+
(_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
|
|
169558
|
+
// We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
|
|
169559
|
+
boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
|
|
169560
|
+
)
|
|
169561
|
+
);
|
|
169562
|
+
const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
|
|
169563
|
+
value = value.replace(
|
|
169564
|
+
quoteEscape,
|
|
169565
|
+
(_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
|
|
169566
|
+
);
|
|
169567
|
+
return quote + value + quote;
|
|
169568
|
+
}
|
|
169569
|
+
function createFilterExpression(filterWord) {
|
|
169570
|
+
const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
|
|
169571
|
+
return new RegExp(sanitizedWord, "i");
|
|
169572
|
+
}
|
|
169573
|
+
function setValuesInString(message, values = {}) {
|
|
169574
|
+
return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
|
|
169575
|
+
}
|
|
169576
|
+
function addLTRMark(value) {
|
|
169577
|
+
return `\u200E${value ?? ""}\u200E`;
|
|
169578
|
+
}
|
|
169579
|
+
|
|
169580
|
+
// src/timeouts.ts
|
|
169581
|
+
function devToolsAwareTimeout(callback, timeout) {
|
|
169582
|
+
const interval = timeout > longTimeoutThreshold ? longTimeoutInterval : timeout / shortTimeoutIntervals;
|
|
169583
|
+
let elapsed = 0;
|
|
169584
|
+
const reference = setInterval(() => {
|
|
169585
|
+
elapsed += interval;
|
|
169586
|
+
if (elapsed >= timeout) {
|
|
169587
|
+
clearInterval(reference);
|
|
169588
|
+
callback();
|
|
169589
|
+
}
|
|
169590
|
+
}, interval);
|
|
169591
|
+
return reference;
|
|
169592
|
+
}
|
|
169593
|
+
var longTimeoutThreshold = 4e3;
|
|
169594
|
+
var longTimeoutInterval = 2e3;
|
|
169595
|
+
var shortTimeoutIntervals = 4;
|
|
169596
|
+
|
|
169597
|
+
// src/type-guards.ts
|
|
169598
|
+
function isNotNull(item) {
|
|
169599
|
+
return item !== null;
|
|
169600
|
+
}
|
|
169601
|
+
function isNotUndefined(item) {
|
|
169602
|
+
return item !== void 0;
|
|
169603
|
+
}
|
|
169604
|
+
|
|
169605
|
+
// src/ui.ts
|
|
169606
|
+
function debounce(func, waitFor = 100) {
|
|
169607
|
+
let timeout;
|
|
169608
|
+
return (...args) => {
|
|
169609
|
+
const later = () => {
|
|
169610
|
+
clearTimeout(timeout);
|
|
169611
|
+
func(...args);
|
|
169612
|
+
};
|
|
169613
|
+
clearTimeout(timeout);
|
|
169614
|
+
timeout = setTimeout(later, waitFor);
|
|
169615
|
+
};
|
|
169616
|
+
}
|
|
169617
|
+
|
|
169618
|
+
// src/url.ts
|
|
169619
|
+
function hasSameOrigin(url1, url2, ignoreProtocol = false) {
|
|
169620
|
+
if (!url1 || !url2) {
|
|
169621
|
+
return false;
|
|
169622
|
+
}
|
|
169623
|
+
const url1Obj = new URL(url1);
|
|
169624
|
+
const url2Obj = new URL(url2);
|
|
169625
|
+
if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
|
|
169626
|
+
return false;
|
|
169627
|
+
}
|
|
169628
|
+
if (url1Obj.host == null || url2Obj.host == null) {
|
|
169629
|
+
return false;
|
|
169630
|
+
}
|
|
169631
|
+
return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
|
|
169632
|
+
}
|
|
169633
|
+
function isURL(url) {
|
|
169634
|
+
try {
|
|
169635
|
+
new URL(url);
|
|
169636
|
+
return true;
|
|
169637
|
+
} catch (e) {
|
|
169638
|
+
return false;
|
|
169639
|
+
}
|
|
169640
|
+
}
|
|
169199
169641
|
|
|
169200
169642
|
/**
|
|
169201
169643
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -169208,7 +169650,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
169208
169650
|
if (!_keys.length) {
|
|
169209
169651
|
return [];
|
|
169210
169652
|
}
|
|
169211
|
-
const filterExpression =
|
|
169653
|
+
const filterExpression = createFilterExpression(filterWord);
|
|
169212
169654
|
return collection.filter((item) => {
|
|
169213
169655
|
if (beforeFilteringFn) {
|
|
169214
169656
|
const res = beforeFilteringFn(item);
|
|
@@ -169318,7 +169760,7 @@ function fieldAlias(field) {
|
|
|
169318
169760
|
//#endregion
|
|
169319
169761
|
//#region Support functions
|
|
169320
169762
|
async function getRelatedFeatureLayer(layer, relationship) {
|
|
169321
|
-
const relatedFeatureLayer = await
|
|
169763
|
+
const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
|
|
169322
169764
|
await relatedFeatureLayer.load();
|
|
169323
169765
|
return relatedFeatureLayer;
|
|
169324
169766
|
}
|
|
@@ -169382,7 +169824,7 @@ function getMapPortalItem(map) {
|
|
|
169382
169824
|
}
|
|
169383
169825
|
//#endregion
|
|
169384
169826
|
//#region Editor Profile to Language Service Profile functions
|
|
169385
|
-
async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
|
|
169827
|
+
async function variablesToLSVariable(editorVariables, kind = main.exports.CompletionItemKind.Variable) {
|
|
169386
169828
|
return await Promise.all(editorVariables.map(async (editorVariable) => {
|
|
169387
169829
|
switch (editorVariable.type) {
|
|
169388
169830
|
case "dictionary":
|
|
@@ -169405,11 +169847,11 @@ function variableToLSVariable(editorVariable, kind) {
|
|
|
169405
169847
|
label: name,
|
|
169406
169848
|
detail: name,
|
|
169407
169849
|
insertText: name,
|
|
169408
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169409
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169850
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169851
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169410
169852
|
kind,
|
|
169411
|
-
documentation: { kind: "markdown", value: description }
|
|
169412
|
-
}
|
|
169853
|
+
documentation: { kind: "markdown", value: description },
|
|
169854
|
+
},
|
|
169413
169855
|
};
|
|
169414
169856
|
}
|
|
169415
169857
|
async function featureToLSFeature(editorFeature, kind) {
|
|
@@ -169421,16 +169863,16 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169421
169863
|
label: name,
|
|
169422
169864
|
detail: name,
|
|
169423
169865
|
insertText: name,
|
|
169424
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169425
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169426
|
-
kind
|
|
169866
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169867
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169868
|
+
kind,
|
|
169427
169869
|
};
|
|
169428
169870
|
const result = {
|
|
169429
169871
|
name,
|
|
169430
169872
|
description,
|
|
169431
169873
|
type: "dictionary",
|
|
169432
169874
|
properties: [],
|
|
169433
|
-
completion: resultCompletion
|
|
169875
|
+
completion: resultCompletion,
|
|
169434
169876
|
};
|
|
169435
169877
|
// No source definition, then it will be a feature without any known fields
|
|
169436
169878
|
if (!source) {
|
|
@@ -169465,11 +169907,11 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169465
169907
|
label: field.name,
|
|
169466
169908
|
detail: description,
|
|
169467
169909
|
insertText,
|
|
169468
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169469
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169470
|
-
kind: main.CompletionItemKind.Field,
|
|
169471
|
-
documentation: { kind: "markdown", value: fieldCompletionDescription }
|
|
169472
|
-
}
|
|
169910
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169911
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169912
|
+
kind: main.exports.CompletionItemKind.Field,
|
|
169913
|
+
documentation: { kind: "markdown", value: fieldCompletionDescription },
|
|
169914
|
+
},
|
|
169473
169915
|
});
|
|
169474
169916
|
if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
|
|
169475
169917
|
return;
|
|
@@ -169487,11 +169929,11 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169487
169929
|
label: field.alias,
|
|
169488
169930
|
detail: field.name,
|
|
169489
169931
|
insertText,
|
|
169490
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169491
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169492
|
-
kind: main.CompletionItemKind.Field,
|
|
169493
|
-
documentation: { kind: "markdown", value: aliasCompletionDescription }
|
|
169494
|
-
}
|
|
169932
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169933
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169934
|
+
kind: main.exports.CompletionItemKind.Field,
|
|
169935
|
+
documentation: { kind: "markdown", value: aliasCompletionDescription },
|
|
169936
|
+
},
|
|
169495
169937
|
});
|
|
169496
169938
|
});
|
|
169497
169939
|
result.properties = [...fieldProfileValues, ...aliasProfileValues];
|
|
@@ -169516,16 +169958,16 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
|
|
|
169516
169958
|
name,
|
|
169517
169959
|
description,
|
|
169518
169960
|
type: "dictionary",
|
|
169519
|
-
properties: await variablesToLSVariable(variables, main.CompletionItemKind.Field),
|
|
169961
|
+
properties: await variablesToLSVariable(variables, main.exports.CompletionItemKind.Field),
|
|
169520
169962
|
completion: {
|
|
169521
169963
|
label: name,
|
|
169522
169964
|
detail: name,
|
|
169523
169965
|
insertText: name,
|
|
169524
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169525
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169966
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169967
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169526
169968
|
kind,
|
|
169527
|
-
documentation: { kind: "markdown", value: completionDescription }
|
|
169528
|
-
}
|
|
169969
|
+
documentation: { kind: "markdown", value: completionDescription },
|
|
169970
|
+
},
|
|
169529
169971
|
};
|
|
169530
169972
|
}
|
|
169531
169973
|
/**
|
|
@@ -169552,9 +169994,9 @@ class ProfileItemBase {
|
|
|
169552
169994
|
// If the component is under RTL, the string is messed up.
|
|
169553
169995
|
// It is converted from $feature to feature$, This is not acceptable since the label
|
|
169554
169996
|
// represents a variable name. We are adding in front of the $ sign a right to left mark.
|
|
169555
|
-
return
|
|
169997
|
+
return addLTRMark(this._label);
|
|
169556
169998
|
}
|
|
169557
|
-
return
|
|
169999
|
+
return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
|
|
169558
170000
|
}
|
|
169559
170001
|
/**
|
|
169560
170002
|
* Returns the description string.
|
|
@@ -169566,7 +170008,7 @@ class ProfileItemBase {
|
|
|
169566
170008
|
if (typeof this.description === "string") {
|
|
169567
170009
|
return this.description;
|
|
169568
170010
|
}
|
|
169569
|
-
return
|
|
170011
|
+
return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
|
|
169570
170012
|
}
|
|
169571
170013
|
/**
|
|
169572
170014
|
* Returns true if the item pass the filter test
|
|
@@ -169743,28 +170185,28 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169743
170185
|
return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
|
|
169744
170186
|
case "featureSet":
|
|
169745
170187
|
return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
|
|
169746
|
-
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
|
|
170188
|
+
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
|
|
169747
170189
|
]);
|
|
169748
170190
|
case "featureSetCollection":
|
|
169749
170191
|
return new FeatureSetCollectionVariable(this, {
|
|
169750
170192
|
profile: this._profile,
|
|
169751
170193
|
declaration,
|
|
169752
170194
|
label: snippet,
|
|
169753
|
-
snippet
|
|
170195
|
+
snippet,
|
|
169754
170196
|
});
|
|
169755
170197
|
case "dictionary":
|
|
169756
170198
|
return new DictionaryVariable(this, {
|
|
169757
170199
|
profile: this._profile,
|
|
169758
170200
|
declaration,
|
|
169759
170201
|
label: snippet,
|
|
169760
|
-
snippet
|
|
170202
|
+
snippet,
|
|
169761
170203
|
});
|
|
169762
170204
|
case "array":
|
|
169763
170205
|
return new ArrayVariable({
|
|
169764
170206
|
profile: this._profile,
|
|
169765
170207
|
declaration,
|
|
169766
170208
|
label: snippet,
|
|
169767
|
-
snippet
|
|
170209
|
+
snippet,
|
|
169768
170210
|
});
|
|
169769
170211
|
default:
|
|
169770
170212
|
console.error("Editor profile: Invalid profile variable", declaration);
|
|
@@ -169776,7 +170218,7 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169776
170218
|
type: this.type,
|
|
169777
170219
|
name: "",
|
|
169778
170220
|
...this.declaration,
|
|
169779
|
-
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170221
|
+
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
169780
170222
|
};
|
|
169781
170223
|
}
|
|
169782
170224
|
}
|
|
@@ -169807,7 +170249,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169807
170249
|
return this._profile?.intlStrings.layer ?? "layer";
|
|
169808
170250
|
}
|
|
169809
170251
|
async loadSource() {
|
|
169810
|
-
if (
|
|
170252
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
169811
170253
|
return await this._loadPromise;
|
|
169812
170254
|
}
|
|
169813
170255
|
this._loadPromise = this._loadSource();
|
|
@@ -169842,7 +170284,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169842
170284
|
description: fieldAlias(field),
|
|
169843
170285
|
snippet: valueSnippet,
|
|
169844
170286
|
icon: fieldTypeToIconName(field),
|
|
169845
|
-
filterDescription: true
|
|
170287
|
+
filterDescription: true,
|
|
169846
170288
|
});
|
|
169847
170289
|
}
|
|
169848
170290
|
_getDomainDictionary(field) {
|
|
@@ -169881,6 +170323,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169881
170323
|
// Sepcial case for the subtype field
|
|
169882
170324
|
if (field.name === this._source.subtypeField) {
|
|
169883
170325
|
const domainDictionary = this._createDomainDictionary(field);
|
|
170326
|
+
domainDictionary.icon = "subtype";
|
|
169884
170327
|
domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
|
|
169885
170328
|
return domainDictionary;
|
|
169886
170329
|
}
|
|
@@ -169935,7 +170378,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169935
170378
|
return null;
|
|
169936
170379
|
}
|
|
169937
170380
|
const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
|
|
169938
|
-
code: "domainvalues"
|
|
170381
|
+
code: "domainvalues",
|
|
169939
170382
|
});
|
|
169940
170383
|
const domainDictionary = this._createDomainDictionary(field);
|
|
169941
170384
|
domainDictionary.variables.push(domainValuesGroup);
|
|
@@ -169953,7 +170396,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169953
170396
|
profile: this._profile,
|
|
169954
170397
|
label: `${label}`,
|
|
169955
170398
|
description: t.name,
|
|
169956
|
-
snippet: `"${label}"
|
|
170399
|
+
snippet: `"${label}"`,
|
|
169957
170400
|
});
|
|
169958
170401
|
}) ?? [];
|
|
169959
170402
|
return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
|
|
@@ -169964,7 +170407,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169964
170407
|
label: `${v.code}`,
|
|
169965
170408
|
description: v.name,
|
|
169966
170409
|
snippet: `"${v.code}"`,
|
|
169967
|
-
filterDescription: true
|
|
170410
|
+
filterDescription: true,
|
|
169968
170411
|
}));
|
|
169969
170412
|
return new GroupOfVariables(this._profile, label, values);
|
|
169970
170413
|
}
|
|
@@ -169990,8 +170433,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169990
170433
|
code: "domainvaluesfortypeformat",
|
|
169991
170434
|
formatValues: {
|
|
169992
170435
|
fieldName: alias,
|
|
169993
|
-
typeName: type.name
|
|
169994
|
-
}
|
|
170436
|
+
typeName: type.name,
|
|
170437
|
+
},
|
|
169995
170438
|
});
|
|
169996
170439
|
const id = isSubtypeInstance(type) ? type.code : type.id;
|
|
169997
170440
|
const label = `${id}`;
|
|
@@ -170001,7 +170444,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170001
170444
|
label,
|
|
170002
170445
|
snippet,
|
|
170003
170446
|
description: type.name,
|
|
170004
|
-
declaration: { name: alias }
|
|
170447
|
+
declaration: { name: alias },
|
|
170005
170448
|
});
|
|
170006
170449
|
subtypeDictionary.variables = [domainValuesGroup];
|
|
170007
170450
|
variables.push(subtypeDictionary);
|
|
@@ -170023,7 +170466,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170023
170466
|
description: alias,
|
|
170024
170467
|
snippet: valueSnippet,
|
|
170025
170468
|
icon: "form-dropdown",
|
|
170026
|
-
declaration: { name: field.name }
|
|
170469
|
+
declaration: { name: field.name },
|
|
170027
170470
|
});
|
|
170028
170471
|
// Add the header group
|
|
170029
170472
|
const headerGroup = new GroupOfVariables(this._profile, alias, [
|
|
@@ -170031,8 +170474,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170031
170474
|
profile: this._profile,
|
|
170032
170475
|
label: valueSnippet,
|
|
170033
170476
|
description: "",
|
|
170034
|
-
snippet: valueSnippet
|
|
170035
|
-
})
|
|
170477
|
+
snippet: valueSnippet,
|
|
170478
|
+
}),
|
|
170036
170479
|
]);
|
|
170037
170480
|
domainDictionary.variables = [headerGroup];
|
|
170038
170481
|
// Add the SubtypeName or DomainName snippet if available
|
|
@@ -170042,7 +170485,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170042
170485
|
profile: this._profile,
|
|
170043
170486
|
label: subtypeOrDomainNameSnippet,
|
|
170044
170487
|
description: "",
|
|
170045
|
-
snippet: subtypeOrDomainNameSnippet
|
|
170488
|
+
snippet: subtypeOrDomainNameSnippet,
|
|
170046
170489
|
}));
|
|
170047
170490
|
}
|
|
170048
170491
|
return domainDictionary;
|
|
@@ -170059,7 +170502,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170059
170502
|
const relationshipsGroup = new GroupOfVariables(this._profile, { code: "relationships" });
|
|
170060
170503
|
const relationshipItems = await Promise.all(source.relationships.map(async (relationship) => {
|
|
170061
170504
|
const relatedLayer = await getRelatedFeatureLayer(source, relationship);
|
|
170062
|
-
if (!
|
|
170505
|
+
if (!isFeatureLayerLikeInstance(relatedLayer)) {
|
|
170063
170506
|
return null;
|
|
170064
170507
|
}
|
|
170065
170508
|
if (relationship.relatedTableId === this.relationshipsProperties?.sourceTableId) {
|
|
@@ -170072,10 +170515,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170072
170515
|
declaration: { definition: relatedLayer },
|
|
170073
170516
|
label: relatedLayer.title,
|
|
170074
170517
|
description: "",
|
|
170075
|
-
nonInteractive: true
|
|
170518
|
+
nonInteractive: true,
|
|
170076
170519
|
}, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
|
|
170077
170520
|
}));
|
|
170078
|
-
relationshipsGroup.variables = relationshipItems.filter(
|
|
170521
|
+
relationshipsGroup.variables = relationshipItems.filter(isNotNull);
|
|
170079
170522
|
if (!relationshipsGroup.variables.length) {
|
|
170080
170523
|
return null;
|
|
170081
170524
|
}
|
|
@@ -170088,8 +170531,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170088
170531
|
this.type = "feature";
|
|
170089
170532
|
}
|
|
170090
170533
|
get title() {
|
|
170091
|
-
if (
|
|
170092
|
-
return this._source.title;
|
|
170534
|
+
if (isTitleCapableSource(this._source)) {
|
|
170535
|
+
return this._source.title ?? "";
|
|
170093
170536
|
}
|
|
170094
170537
|
return { code: "feature" };
|
|
170095
170538
|
}
|
|
@@ -170103,14 +170546,14 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170103
170546
|
throw new Error("Invalid definition");
|
|
170104
170547
|
}
|
|
170105
170548
|
// The title group and snippet
|
|
170106
|
-
const title =
|
|
170549
|
+
const title = isTitleCapableSource(this._source) ? this._source.title ?? "" : "";
|
|
170107
170550
|
this.variables.push(new GroupOfVariables(this._profile, title, [
|
|
170108
170551
|
new ValueVariable({
|
|
170109
170552
|
profile: this._profile,
|
|
170110
170553
|
label: this.snippet,
|
|
170111
170554
|
description: "",
|
|
170112
|
-
snippet: this.snippet
|
|
170113
|
-
})
|
|
170555
|
+
snippet: this.snippet,
|
|
170556
|
+
}),
|
|
170114
170557
|
]));
|
|
170115
170558
|
// The collection of feature attribute values
|
|
170116
170559
|
const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
|
|
@@ -170125,7 +170568,7 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170125
170568
|
description: "Geometry",
|
|
170126
170569
|
snippet,
|
|
170127
170570
|
icon: "shapes",
|
|
170128
|
-
filterDescription: true
|
|
170571
|
+
filterDescription: true,
|
|
170129
170572
|
});
|
|
170130
170573
|
valuesGroup.variables.push(geometryProperty);
|
|
170131
170574
|
}
|
|
@@ -170138,8 +170581,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170138
170581
|
this.variables.push(relationshipsGroup);
|
|
170139
170582
|
}
|
|
170140
170583
|
}
|
|
170141
|
-
catch (
|
|
170142
|
-
console.error("
|
|
170584
|
+
catch (error) {
|
|
170585
|
+
console.error("Error with definition", error, this._definition);
|
|
170143
170586
|
this._source = null;
|
|
170144
170587
|
}
|
|
170145
170588
|
finally {
|
|
@@ -170161,8 +170604,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170161
170604
|
this.type = "featureSet";
|
|
170162
170605
|
}
|
|
170163
170606
|
get title() {
|
|
170164
|
-
if (
|
|
170165
|
-
return this._source.title;
|
|
170607
|
+
if (isTitleCapableSource(this._source)) {
|
|
170608
|
+
return this._source.title ?? "";
|
|
170166
170609
|
}
|
|
170167
170610
|
return { code: "featureset" };
|
|
170168
170611
|
}
|
|
@@ -170189,8 +170632,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170189
170632
|
this.variables.push(relationshipsGroup);
|
|
170190
170633
|
}
|
|
170191
170634
|
}
|
|
170192
|
-
catch (
|
|
170193
|
-
console.error("
|
|
170635
|
+
catch (error) {
|
|
170636
|
+
console.error("Error with definition", error, this._definition);
|
|
170194
170637
|
this._source = null;
|
|
170195
170638
|
}
|
|
170196
170639
|
finally {
|
|
@@ -170239,7 +170682,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170239
170682
|
return this._profile?.intlStrings.map ?? "map";
|
|
170240
170683
|
}
|
|
170241
170684
|
async loadSource() {
|
|
170242
|
-
if (
|
|
170685
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
170243
170686
|
return await this._loadPromise;
|
|
170244
170687
|
}
|
|
170245
170688
|
this._loadPromise = this._loadSource();
|
|
@@ -170260,24 +170703,24 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170260
170703
|
: {
|
|
170261
170704
|
code: "webmapformat",
|
|
170262
170705
|
formatValues: {
|
|
170263
|
-
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
|
|
170264
|
-
}
|
|
170706
|
+
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
|
|
170707
|
+
},
|
|
170265
170708
|
};
|
|
170266
170709
|
const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
|
|
170267
170710
|
new ValueVariable({
|
|
170268
170711
|
profile: this._profile,
|
|
170269
170712
|
label: this.snippet,
|
|
170270
170713
|
description: "",
|
|
170271
|
-
snippet: this.snippet
|
|
170272
|
-
})
|
|
170714
|
+
snippet: this.snippet,
|
|
170715
|
+
}),
|
|
170273
170716
|
]);
|
|
170274
170717
|
// Creates the groups for the layer and tables
|
|
170275
170718
|
const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
|
|
170276
170719
|
const tablesGroup = new GroupOfVariables(this._profile, { code: "tables" }, this._featureSetCollections.tables);
|
|
170277
170720
|
this.variables.push(headerGroup, layersGroup, tablesGroup);
|
|
170278
170721
|
}
|
|
170279
|
-
catch (
|
|
170280
|
-
console.error("
|
|
170722
|
+
catch (error) {
|
|
170723
|
+
console.error("Error with definition", error, this._definition);
|
|
170281
170724
|
this._featureSetCollections = null;
|
|
170282
170725
|
}
|
|
170283
170726
|
finally {
|
|
@@ -170292,7 +170735,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170292
170735
|
if (isMapInstance(this._definition)) {
|
|
170293
170736
|
return await this._featureSetCollectionFromMap(this._definition);
|
|
170294
170737
|
}
|
|
170295
|
-
if (
|
|
170738
|
+
if (isUrlDefinition(this._definition)) {
|
|
170296
170739
|
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170297
170740
|
}
|
|
170298
170741
|
if (isPortalItemDefinition(this._definition)) {
|
|
@@ -170300,10 +170743,6 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170300
170743
|
// or Feature Service
|
|
170301
170744
|
return await this._featureSetCollectionFromPortalItem(this._definition.portalItem);
|
|
170302
170745
|
}
|
|
170303
|
-
if (isUrlDefinition(this._definition)) {
|
|
170304
|
-
// Assume that the url is pointing to a feature server
|
|
170305
|
-
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170306
|
-
}
|
|
170307
170746
|
return null;
|
|
170308
170747
|
}
|
|
170309
170748
|
async _featureSetCollectionFromMap(map) {
|
|
@@ -170316,7 +170755,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170316
170755
|
return {
|
|
170317
170756
|
layers: this._convertWebMapLayersToVariables(map.layers),
|
|
170318
170757
|
tables: this._convertWebMapLayersToVariables(map.tables, true),
|
|
170319
|
-
source: map
|
|
170758
|
+
source: map,
|
|
170320
170759
|
};
|
|
170321
170760
|
}
|
|
170322
170761
|
async _featureSetCollectionFromPortalItem(definition) {
|
|
@@ -170347,12 +170786,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170347
170786
|
}
|
|
170348
170787
|
const metadata = await serviceMetaData(processedUrl);
|
|
170349
170788
|
const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
|
|
170350
|
-
const featureLayer = await
|
|
170789
|
+
const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170351
170790
|
await featureLayer.load();
|
|
170352
170791
|
return this._createFeatureSetVariable(featureLayer);
|
|
170353
170792
|
}));
|
|
170354
170793
|
const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
|
|
170355
|
-
const table = await
|
|
170794
|
+
const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170356
170795
|
await table.load();
|
|
170357
170796
|
return this._createFeatureSetVariable(table);
|
|
170358
170797
|
}));
|
|
@@ -170365,7 +170804,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170365
170804
|
.toArray()
|
|
170366
170805
|
.reverse()
|
|
170367
170806
|
.forEach((layer) => {
|
|
170368
|
-
if (
|
|
170807
|
+
if (isFeatureLayerLikeInstance(layer)) {
|
|
170369
170808
|
layerVariables.push(this._createFeatureSetVariable(layer, true));
|
|
170370
170809
|
return;
|
|
170371
170810
|
}
|
|
@@ -170378,29 +170817,31 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170378
170817
|
});
|
|
170379
170818
|
return layerVariables;
|
|
170380
170819
|
}
|
|
170381
|
-
_createFeatureSetVariable(
|
|
170820
|
+
_createFeatureSetVariable(featureLayerLike, isFromWebMap = false) {
|
|
170382
170821
|
return new FeatureSetVariable(this, {
|
|
170383
170822
|
profile: this._profile,
|
|
170384
|
-
declaration: { name:
|
|
170385
|
-
label:
|
|
170823
|
+
declaration: { name: featureLayerLike.title, definition: featureLayerLike },
|
|
170824
|
+
label: isFromWebMap
|
|
170825
|
+
? featureLayerLike.title
|
|
170826
|
+
: featureLayerLike.sourceJSON.name ?? featureLayerLike.title,
|
|
170386
170827
|
description: "",
|
|
170387
|
-
nonInteractive: true
|
|
170388
|
-
}, this._makeFeatureSetSnippets(
|
|
170828
|
+
nonInteractive: true,
|
|
170829
|
+
}, this._makeFeatureSetSnippets(featureLayerLike, isFromWebMap));
|
|
170389
170830
|
}
|
|
170390
|
-
_makeFeatureSetSnippets(
|
|
170831
|
+
_makeFeatureSetSnippets(featureLayerLike, isFromWebMap = false) {
|
|
170391
170832
|
if (!this._profile?.supportFeatureSetFunctions) {
|
|
170392
170833
|
return [];
|
|
170393
170834
|
}
|
|
170394
170835
|
if (isFromWebMap) {
|
|
170395
|
-
const snippetById = `FeatureSetById(${this.snippet}, "${
|
|
170396
|
-
const snippetByName = `FeatureSetByName(${this.snippet}, "${
|
|
170836
|
+
const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.id}")`;
|
|
170837
|
+
const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayerLike.title}")`;
|
|
170397
170838
|
return [
|
|
170398
170839
|
new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
|
|
170399
|
-
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
|
|
170840
|
+
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
|
|
170400
170841
|
];
|
|
170401
170842
|
}
|
|
170402
170843
|
else {
|
|
170403
|
-
const snippetById = `FeatureSetById(${this.snippet}, "${
|
|
170844
|
+
const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.layerId}")`;
|
|
170404
170845
|
return [new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById })];
|
|
170405
170846
|
}
|
|
170406
170847
|
}
|
|
@@ -170421,7 +170862,7 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170421
170862
|
// Delay the load of the variable declarations so we have a `this`
|
|
170422
170863
|
super(undefined, {
|
|
170423
170864
|
profile: null,
|
|
170424
|
-
declaration: { properties: [] }
|
|
170865
|
+
declaration: { properties: [] },
|
|
170425
170866
|
});
|
|
170426
170867
|
this.definition = definition;
|
|
170427
170868
|
this.intlStrings = intlStrings;
|
|
@@ -170453,28 +170894,20 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170453
170894
|
toEditorProfileDefinition() {
|
|
170454
170895
|
return {
|
|
170455
170896
|
...this.definition,
|
|
170456
|
-
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170897
|
+
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
170457
170898
|
};
|
|
170458
170899
|
}
|
|
170459
170900
|
}
|
|
170460
170901
|
//#endregion
|
|
170461
170902
|
|
|
170462
170903
|
function isFeatureDefinition(item) {
|
|
170463
|
-
return (
|
|
170464
|
-
isFeatureSetInstance(item) ||
|
|
170465
|
-
isUrlDefinition(item) ||
|
|
170466
|
-
isFieldsDefinition(item) ||
|
|
170467
|
-
isFeatureLayerItemDefinition(item));
|
|
170904
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170468
170905
|
}
|
|
170469
170906
|
function isFeatureSetDefinition(item) {
|
|
170470
|
-
return (
|
|
170471
|
-
isFeatureSetInstance(item) ||
|
|
170472
|
-
isUrlDefinition(item) ||
|
|
170473
|
-
isFieldsDefinition(item) ||
|
|
170474
|
-
isFeatureLayerItemDefinition(item));
|
|
170907
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170475
170908
|
}
|
|
170476
170909
|
function isFeatureSetCollectionDefinition(item) {
|
|
170477
|
-
return isPortalItemDefinition(item) || isMapInstance(item) ||
|
|
170910
|
+
return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
|
|
170478
170911
|
}
|
|
170479
170912
|
/**
|
|
170480
170913
|
* Get a PredefinedProfile for a locale. If not already loaded then fetch it.
|
|
@@ -170486,7 +170919,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
|
|
|
170486
170919
|
if (profiles) {
|
|
170487
170920
|
return profiles;
|
|
170488
170921
|
}
|
|
170489
|
-
if (!
|
|
170922
|
+
if (!supportedLocales.has(locale)) {
|
|
170490
170923
|
return await getSdkPredefinedProfiles("en");
|
|
170491
170924
|
}
|
|
170492
170925
|
try {
|
|
@@ -170524,7 +170957,7 @@ function isExtendedPredefinedProfileDefinition(item) {
|
|
|
170524
170957
|
return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
|
|
170525
170958
|
}
|
|
170526
170959
|
function convertApiVariables(variables) {
|
|
170527
|
-
return variables
|
|
170960
|
+
return variables?.map(convertApiVariable);
|
|
170528
170961
|
}
|
|
170529
170962
|
function convertApiVariable(variable) {
|
|
170530
170963
|
switch (variable.type) {
|
|
@@ -170532,13 +170965,13 @@ function convertApiVariable(variable) {
|
|
|
170532
170965
|
return {
|
|
170533
170966
|
...variable,
|
|
170534
170967
|
type: variable.type,
|
|
170535
|
-
properties: convertApiVariables(variable.properties)
|
|
170968
|
+
properties: convertApiVariables(variable.properties),
|
|
170536
170969
|
};
|
|
170537
170970
|
case "array": {
|
|
170538
170971
|
return {
|
|
170539
170972
|
...variable,
|
|
170540
170973
|
type: variable.type,
|
|
170541
|
-
elementType: { type: "number", name: "number" }
|
|
170974
|
+
elementType: { type: "number", name: "number" },
|
|
170542
170975
|
};
|
|
170543
170976
|
}
|
|
170544
170977
|
default:
|
|
@@ -170556,43 +170989,47 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170556
170989
|
const editorProfile = {
|
|
170557
170990
|
bundles: [...sdkPredefinedProfile.bundles],
|
|
170558
170991
|
variables: [],
|
|
170559
|
-
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
|
|
170992
|
+
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
|
|
170560
170993
|
};
|
|
170561
170994
|
// Merge the SDK variables' definitions/properties with the predefined profile definitions.
|
|
170562
|
-
sdkPredefinedProfile.variables.forEach((
|
|
170995
|
+
sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
|
|
170563
170996
|
// Don't include disabled variables
|
|
170564
|
-
if (predefinedProfile.disabledVariables?.includes(
|
|
170997
|
+
if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
|
|
170565
170998
|
return;
|
|
170566
170999
|
}
|
|
170567
|
-
// Try to get a definition from the predefined profile.
|
|
170568
|
-
const definition = predefinedProfile.definitions[
|
|
171000
|
+
// Try to get a definition from the predefined profile, for the variable that needs one.
|
|
171001
|
+
const definition = predefinedProfile.definitions[predefinedVariable.name];
|
|
170569
171002
|
// Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
|
|
170570
171003
|
// despite the type checking from the switch statement.
|
|
170571
|
-
switch (
|
|
170572
|
-
case "dictionary":
|
|
171004
|
+
switch (predefinedVariable.type) {
|
|
171005
|
+
case "dictionary": {
|
|
170573
171006
|
// For dictionary, we support properties overrride
|
|
170574
171007
|
return editorProfile.variables.push(convertApiVariable({
|
|
170575
|
-
...
|
|
170576
|
-
type:
|
|
170577
|
-
properties: Array.isArray(definition) ? [...definition] :
|
|
171008
|
+
...predefinedVariable,
|
|
171009
|
+
type: predefinedVariable.type,
|
|
171010
|
+
properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
|
|
170578
171011
|
}));
|
|
171012
|
+
}
|
|
170579
171013
|
case "feature":
|
|
170580
|
-
|
|
170581
|
-
|
|
171014
|
+
// If the definition is not valid, then we don't include it.
|
|
171015
|
+
if (!isFeatureDefinition(definition)) {
|
|
171016
|
+
return;
|
|
170582
171017
|
}
|
|
170583
|
-
return editorProfile.variables.push({ ...
|
|
171018
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170584
171019
|
case "featureSet":
|
|
170585
|
-
|
|
170586
|
-
|
|
171020
|
+
// If the definition is not valid, then we don't include it.
|
|
171021
|
+
if (!isFeatureSetDefinition(definition)) {
|
|
171022
|
+
return;
|
|
170587
171023
|
}
|
|
170588
|
-
return editorProfile.variables.push({ ...
|
|
171024
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170589
171025
|
case "featureSetCollection":
|
|
170590
|
-
|
|
170591
|
-
|
|
171026
|
+
// If the definition is not valid, then we don't include it.
|
|
171027
|
+
if (!isFeatureSetCollectionDefinition(definition)) {
|
|
171028
|
+
return;
|
|
170592
171029
|
}
|
|
170593
|
-
return editorProfile.variables.push({ ...
|
|
171030
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170594
171031
|
default:
|
|
170595
|
-
return editorProfile.variables.push(convertApiVariable(
|
|
171032
|
+
return editorProfile.variables.push(convertApiVariable(predefinedVariable));
|
|
170596
171033
|
}
|
|
170597
171034
|
});
|
|
170598
171035
|
if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
|
|
@@ -170603,7 +171040,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170603
171040
|
|
|
170604
171041
|
const arcadeLanguageId = "arcade";
|
|
170605
171042
|
const defaultContext = {
|
|
170606
|
-
locale: "en"
|
|
171043
|
+
locale: "en",
|
|
170607
171044
|
};
|
|
170608
171045
|
class ArcadeLanguageServiceDefaults {
|
|
170609
171046
|
constructor() {
|
|
@@ -170657,7 +171094,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170657
171094
|
if (isPredefinedProfile(definition)) {
|
|
170658
171095
|
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
170659
171096
|
}
|
|
170660
|
-
const intlStrings = await
|
|
171097
|
+
const intlStrings = await fetchT9NStringsBundle(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
170661
171098
|
if (!intlStrings) {
|
|
170662
171099
|
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
170663
171100
|
}
|
|
@@ -170669,7 +171106,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170669
171106
|
this.updateApiContextForModel(modelId, {
|
|
170670
171107
|
locale: apiContext.locale,
|
|
170671
171108
|
profile: apiProfile,
|
|
170672
|
-
snippets: apiContext.snippets
|
|
171109
|
+
snippets: apiContext.snippets,
|
|
170673
171110
|
});
|
|
170674
171111
|
}
|
|
170675
171112
|
/**
|
|
@@ -170736,41 +171173,44 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170736
171173
|
}
|
|
170737
171174
|
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
170738
171175
|
const arcade = {
|
|
170739
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
|
|
171176
|
+
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
170740
171177
|
};
|
|
170741
171178
|
|
|
170742
|
-
exports.
|
|
170743
|
-
exports.D = D;
|
|
171179
|
+
exports.Deferred = Deferred;
|
|
170744
171180
|
exports.Emitter = Emitter;
|
|
170745
|
-
exports.G = G;
|
|
170746
171181
|
exports.IStandaloneThemeService = IStandaloneThemeService;
|
|
170747
|
-
exports.K = K;
|
|
170748
171182
|
exports.KeyCode = KeyCode;
|
|
170749
171183
|
exports.KeyMod = KeyMod;
|
|
170750
171184
|
exports.MarkerSeverity = MarkerSeverity;
|
|
170751
171185
|
exports.Range = Range;
|
|
170752
|
-
exports.U = U;
|
|
170753
171186
|
exports.Uri = Uri;
|
|
170754
|
-
exports.
|
|
170755
|
-
exports.Z = Z;
|
|
171187
|
+
exports.addLTRMark = addLTRMark;
|
|
170756
171188
|
exports.arcade = arcade;
|
|
170757
171189
|
exports.arcadeDefaults = arcadeDefaults;
|
|
171190
|
+
exports.camelToKebab = camelToKebab;
|
|
170758
171191
|
exports.commonjsGlobal = commonjsGlobal;
|
|
170759
|
-
exports.
|
|
171192
|
+
exports.createFilterExpression = createFilterExpression;
|
|
171193
|
+
exports.debounce = debounce;
|
|
171194
|
+
exports.devToolsAwareTimeout = devToolsAwareTimeout;
|
|
170760
171195
|
exports.editor = editor;
|
|
170761
171196
|
exports.filterCollection = filterCollection;
|
|
171197
|
+
exports.generateGuid = generateGuid;
|
|
170762
171198
|
exports.generateTokensCSSForColorMap = generateTokensCSSForColorMap;
|
|
170763
|
-
exports.
|
|
170764
|
-
exports.
|
|
171199
|
+
exports.getElementLocales = getElementLocales;
|
|
171200
|
+
exports.getElementTheme = getElementTheme;
|
|
171201
|
+
exports.hasSameOrigin = hasSameOrigin;
|
|
170765
171202
|
exports.importArcade = importArcade;
|
|
170766
171203
|
exports.importRequest = importRequest;
|
|
170767
|
-
exports.
|
|
171204
|
+
exports.isURL = isURL;
|
|
170768
171205
|
exports.languages = languages;
|
|
170769
171206
|
exports.main = main;
|
|
170770
171207
|
exports.monaco_editor_core_star = monaco_editor_core_star;
|
|
170771
|
-
exports.
|
|
170772
|
-
exports.
|
|
170773
|
-
exports.
|
|
171208
|
+
exports.observeAncestorsMutation = observeAncestorsMutation;
|
|
171209
|
+
exports.quoteString = quoteString;
|
|
171210
|
+
exports.safeAsyncCall = safeAsyncCall;
|
|
171211
|
+
exports.safeCall = safeCall;
|
|
171212
|
+
exports.setFocusOnElement = setFocusOnElement;
|
|
171213
|
+
exports.setValuesInString = setValuesInString;
|
|
171214
|
+
exports.startLocaleObserver = startLocaleObserver;
|
|
170774
171215
|
exports.supportedFields = supportedFields;
|
|
170775
171216
|
exports.typescriptDefaults = typescriptDefaults;
|
|
170776
|
-
exports.x = x;
|