@arcgis/coding-components 4.30.0-next.10 → 4.30.0-next.102
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-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 +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +2 -0
- 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 +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +2 -0
- 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 +2 -0
- 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 +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +2 -0
- 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 +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +2 -0
- 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-4d5f58aa.js → p-0e27884f.js} +2 -2
- package/dist/arcgis-coding-components/{p-b12b2a1b.js → p-231efbff.js} +2 -2
- package/dist/arcgis-coding-components/p-47e96d81.js +6 -0
- package/dist/arcgis-coding-components/{p-655e7a9e.js → p-5ba3777a.js} +2 -2
- package/dist/arcgis-coding-components/p-631bbbfb.js +6 -0
- package/dist/arcgis-coding-components/p-6539bce3.entry.js +6 -0
- package/dist/arcgis-coding-components/p-73947f7a.js +7 -0
- package/dist/arcgis-coding-components/{p-8ee18d5c.js → p-84b8c9be.js} +2 -2
- package/dist/arcgis-coding-components/{p-2dcffe0e.js → p-af5781fa.js} +2 -2
- package/dist/arcgis-coding-components/p-dc127e91.js +68 -0
- package/dist/arcgis-coding-components/{p-b4339ec6.js → p-dd7c0171.js} +3 -3
- package/dist/arcgis-coding-components/{p-87f8241f.js → p-de337f9b.js} +3 -3
- package/dist/arcgis-coding-components/{p-cb0f0e5f.js → p-ec38da7b.js} +1 -1
- package/dist/cjs/app-globals-a39a1193.js +10 -0
- package/dist/cjs/{arcade-defaults-38ad9b42.js → arcade-defaults-e23b311c.js} +729 -289
- package/dist/cjs/{arcade-mode-9581409d.js → arcade-mode-580faadf.js} +78 -84
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1611 -239
- package/dist/cjs/arcgis-coding-components.cjs.js +14 -12
- package/dist/cjs/{css-2fde7503.js → css-6d9d8b18.js} +1 -1
- package/dist/cjs/{cssMode-9815a287.js → cssMode-58ba7a48.js} +3 -3
- package/dist/cjs/{html-6caa7fc2.js → html-6babf2d9.js} +3 -3
- package/dist/cjs/{htmlMode-8d4e7d24.js → htmlMode-d3fcee1c.js} +3 -3
- package/dist/cjs/index-70d2e15c.js +1303 -0
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-15b22f67.js → javascript-68e357b7.js} +4 -4
- package/dist/cjs/{jsonMode-f21a8faa.js → jsonMode-17b6405b.js} +3 -3
- package/dist/cjs/loader.cjs.js +6 -4
- package/dist/cjs/{tsMode-a4452f18.js → tsMode-12306781.js} +3 -3
- package/dist/cjs/{typescript-77d49ecd.js → typescript-33e4c6bd.js} +3 -3
- package/dist/components/arcade-api.js +25 -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 +49 -61
- package/dist/components/arcade-suggestions.js +25 -34
- package/dist/components/arcade-variables.js +24 -37
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +61 -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-IHYYRFLQ.js +1363 -0
- package/dist/components/code-editor.js +72 -79
- 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-ad037f01.js +8 -0
- package/dist/esm/{arcade-defaults-978d373f.js → arcade-defaults-c440ab96.js} +712 -275
- package/dist/esm/{arcade-mode-8a50067b.js → arcade-mode-f87480eb.js} +78 -84
- package/dist/esm/arcgis-arcade-api_6.entry.js +1611 -239
- package/dist/esm/arcgis-coding-components.js +15 -13
- package/dist/esm/{css-adc1375f.js → css-3d022d97.js} +1 -1
- package/dist/esm/{cssMode-a292eee6.js → cssMode-cd620116.js} +3 -3
- package/dist/esm/{html-24d2d562.js → html-e2b7755a.js} +3 -3
- package/dist/esm/{htmlMode-f9eed34e.js → htmlMode-c60c352c.js} +3 -3
- package/dist/esm/index-9f13e665.js +1272 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-40f3fb5c.js → javascript-6edf9a3c.js} +4 -4
- package/dist/esm/{jsonMode-70770104.js → jsonMode-3d2d17ee.js} +3 -3
- package/dist/esm/loader.js +7 -5
- package/dist/esm/{tsMode-f797a97b.js → tsMode-7010932a.js} +3 -3
- package/dist/esm/{typescript-83c789e7.js → typescript-0a9a4b7a.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/stencil.config.d.ts +3 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +34 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +15 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +19 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +6 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +40 -13
- package/dist/types/utils/profile/utils.d.ts +2 -4
- package/package.json +24 -24
- package/dist/arcgis-coding-components/p-2db6d470.js +0 -7
- package/dist/arcgis-coding-components/p-5d7c80cf.entry.js +0 -6
- package/dist/arcgis-coding-components/p-63894999.js +0 -68
- package/dist/arcgis-coding-components/p-f39c5bc0.js +0 -6
- package/dist/cjs/index-c33ea685.js +0 -1958
- package/dist/esm/index-7dec16fc.js +0 -1927
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { g as getAssetPath } from './index-9f13e665.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns the last element of an array.
|
|
@@ -6101,6 +6101,7 @@ const uiMap = new KeyCodeStrMap();
|
|
|
6101
6101
|
const userSettingsUSMap = new KeyCodeStrMap();
|
|
6102
6102
|
const userSettingsGeneralMap = new KeyCodeStrMap();
|
|
6103
6103
|
const EVENT_KEY_CODE_MAP = new Array(230);
|
|
6104
|
+
const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {};
|
|
6104
6105
|
const scanCodeIntToStr = [];
|
|
6105
6106
|
const scanCodeStrToInt = Object.create(null);
|
|
6106
6107
|
const scanCodeLowerCaseStrToInt = Object.create(null);
|
|
@@ -6389,6 +6390,9 @@ for (let i = 0; i <= 132 /* KeyCode.MAX_VALUE */; i++) {
|
|
|
6389
6390
|
if (eventKeyCode) {
|
|
6390
6391
|
EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode;
|
|
6391
6392
|
}
|
|
6393
|
+
if (vkey) {
|
|
6394
|
+
NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode;
|
|
6395
|
+
}
|
|
6392
6396
|
}
|
|
6393
6397
|
// Manually added due to the exclusion above (due to duplication with NumpadEnter)
|
|
6394
6398
|
IMMUTABLE_KEY_CODE_TO_CODE[3 /* KeyCode.Enter */] = 46 /* ScanCode.Enter */;
|
|
@@ -20619,7 +20623,7 @@ class DragAndDropObserver extends Disposable {
|
|
|
20619
20623
|
}
|
|
20620
20624
|
}
|
|
20621
20625
|
const H_REGEX = /(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;
|
|
20622
|
-
function h
|
|
20626
|
+
function h(tag, ...args) {
|
|
20623
20627
|
let attributes;
|
|
20624
20628
|
let children;
|
|
20625
20629
|
if (Array.isArray(args[0])) {
|
|
@@ -21850,6 +21854,7 @@ CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = '\'"`;
|
|
|
21850
21854
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
21851
21855
|
*--------------------------------------------------------------------------------------------*/
|
|
21852
21856
|
const hasBuffer = (typeof Buffer !== 'undefined');
|
|
21857
|
+
new Lazy(() => new Uint8Array(256));
|
|
21853
21858
|
let textDecoder;
|
|
21854
21859
|
class VSBuffer {
|
|
21855
21860
|
/**
|
|
@@ -22760,6 +22765,12 @@ Registry.add(Extensions$7.JSONContribution, jsonContributionRegistry);
|
|
|
22760
22765
|
const Extensions$6 = {
|
|
22761
22766
|
Configuration: 'base.contributions.configuration'
|
|
22762
22767
|
};
|
|
22768
|
+
const allSettings = { properties: {}, patternProperties: {} };
|
|
22769
|
+
const applicationSettings = { properties: {}, patternProperties: {} };
|
|
22770
|
+
const machineSettings = { properties: {}, patternProperties: {} };
|
|
22771
|
+
const machineOverridableSettings = { properties: {}, patternProperties: {} };
|
|
22772
|
+
const windowSettings = { properties: {}, patternProperties: {} };
|
|
22773
|
+
const resourceSettings = { properties: {}, patternProperties: {} };
|
|
22763
22774
|
const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
|
|
22764
22775
|
const contributionRegistry = Registry.as(Extensions$7.JSONContribution);
|
|
22765
22776
|
class ConfigurationRegistry {
|
|
@@ -22932,18 +22943,25 @@ class ConfigurationRegistry {
|
|
|
22932
22943
|
register(configuration);
|
|
22933
22944
|
}
|
|
22934
22945
|
updateSchema(key, property) {
|
|
22946
|
+
allSettings.properties[key] = property;
|
|
22935
22947
|
switch (property.scope) {
|
|
22936
22948
|
case 1 /* ConfigurationScope.APPLICATION */:
|
|
22949
|
+
applicationSettings.properties[key] = property;
|
|
22937
22950
|
break;
|
|
22938
22951
|
case 2 /* ConfigurationScope.MACHINE */:
|
|
22952
|
+
machineSettings.properties[key] = property;
|
|
22939
22953
|
break;
|
|
22940
22954
|
case 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */:
|
|
22955
|
+
machineOverridableSettings.properties[key] = property;
|
|
22941
22956
|
break;
|
|
22942
22957
|
case 3 /* ConfigurationScope.WINDOW */:
|
|
22958
|
+
windowSettings.properties[key] = property;
|
|
22943
22959
|
break;
|
|
22944
22960
|
case 4 /* ConfigurationScope.RESOURCE */:
|
|
22961
|
+
resourceSettings.properties[key] = property;
|
|
22945
22962
|
break;
|
|
22946
22963
|
case 5 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */:
|
|
22964
|
+
resourceSettings.properties[key] = property;
|
|
22947
22965
|
this.resourceLanguageSettingsSchema.properties[key] = property;
|
|
22948
22966
|
break;
|
|
22949
22967
|
}
|
|
@@ -22958,15 +22976,27 @@ class ConfigurationRegistry {
|
|
|
22958
22976
|
$ref: resourceLanguageSettingsSchemaId,
|
|
22959
22977
|
};
|
|
22960
22978
|
this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);
|
|
22979
|
+
allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22980
|
+
applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22981
|
+
machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22982
|
+
machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22983
|
+
windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22984
|
+
resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
|
|
22961
22985
|
}
|
|
22962
22986
|
}
|
|
22963
22987
|
registerOverridePropertyPatternKey() {
|
|
22964
|
-
|
|
22988
|
+
const resourceLanguagePropertiesSchema = {
|
|
22965
22989
|
type: 'object',
|
|
22966
22990
|
description: localize('overrideSettings.defaultDescription', "Configure editor settings to be overridden for a language."),
|
|
22967
22991
|
errorMessage: localize('overrideSettings.errorMessage', "This setting does not support per-language configuration."),
|
|
22968
22992
|
$ref: resourceLanguageSettingsSchemaId,
|
|
22969
|
-
}
|
|
22993
|
+
};
|
|
22994
|
+
allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22995
|
+
applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22996
|
+
machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22997
|
+
machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22998
|
+
windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22999
|
+
resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
|
|
22970
23000
|
this._onDidSchemaChange.fire();
|
|
22971
23001
|
}
|
|
22972
23002
|
updatePropertyDefaultValue(key, property) {
|
|
@@ -60172,6 +60202,34 @@ class ExtUri {
|
|
|
60172
60202
|
* ```
|
|
60173
60203
|
*/
|
|
60174
60204
|
const extUri = new ExtUri(() => false);
|
|
60205
|
+
/**
|
|
60206
|
+
* BIASED utility that _mostly_ ignored the case of urs paths. ONLY use this util if you
|
|
60207
|
+
* understand what you are doing.
|
|
60208
|
+
*
|
|
60209
|
+
* This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
|
|
60210
|
+
*
|
|
60211
|
+
* When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
|
|
60212
|
+
* because those uris come from a "trustworthy source". When creating unknown uris it's always
|
|
60213
|
+
* better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
|
|
60214
|
+
* casing matters.
|
|
60215
|
+
*/
|
|
60216
|
+
new ExtUri(uri => {
|
|
60217
|
+
// A file scheme resource is in the same platform as code, so ignore case for non linux platforms
|
|
60218
|
+
// Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
|
|
60219
|
+
return uri.scheme === Schemas.file ? !isLinux : true;
|
|
60220
|
+
});
|
|
60221
|
+
/**
|
|
60222
|
+
* BIASED utility that always ignores the casing of uris paths. ONLY use this util if you
|
|
60223
|
+
* understand what you are doing.
|
|
60224
|
+
*
|
|
60225
|
+
* This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
|
|
60226
|
+
*
|
|
60227
|
+
* When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
|
|
60228
|
+
* because those uris come from a "trustworthy source". When creating unknown uris it's always
|
|
60229
|
+
* better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
|
|
60230
|
+
* casing matters.
|
|
60231
|
+
*/
|
|
60232
|
+
new ExtUri(_ => true);
|
|
60175
60233
|
const isEqual = extUri.isEqual.bind(extUri);
|
|
60176
60234
|
extUri.isEqualOrParent.bind(extUri);
|
|
60177
60235
|
extUri.getComparisonKey.bind(extUri);
|
|
@@ -105014,6 +105072,20 @@ const intlFileNameCollatorBaseNumeric = new Lazy(() => {
|
|
|
105014
105072
|
collatorIsNumeric: collator.resolvedOptions().numeric
|
|
105015
105073
|
};
|
|
105016
105074
|
});
|
|
105075
|
+
// A collator with numeric sorting enabled.
|
|
105076
|
+
new Lazy(() => {
|
|
105077
|
+
const collator = new Intl.Collator(undefined, { numeric: true });
|
|
105078
|
+
return {
|
|
105079
|
+
collator
|
|
105080
|
+
};
|
|
105081
|
+
});
|
|
105082
|
+
// A collator with numeric sorting enabled, and sensitivity to accents and diacritics but not case.
|
|
105083
|
+
new Lazy(() => {
|
|
105084
|
+
const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'accent' });
|
|
105085
|
+
return {
|
|
105086
|
+
collator
|
|
105087
|
+
};
|
|
105088
|
+
});
|
|
105017
105089
|
/** Compares filenames without distinguishing the name from the extension. Disambiguates by unicode comparison. */
|
|
105018
105090
|
function compareFileNames(one, other, caseSensitive = false) {
|
|
105019
105091
|
const a = one || '';
|
|
@@ -113875,15 +113947,15 @@ class LinesLayout {
|
|
|
113875
113947
|
}
|
|
113876
113948
|
class MovedBlockOverlayWidget extends ViewZoneOverlayWidget {
|
|
113877
113949
|
constructor(_editor, _viewZone, _move, _kind, _diffModel) {
|
|
113878
|
-
const root = h
|
|
113950
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
113879
113951
|
super(_editor, _viewZone, root.root);
|
|
113880
113952
|
this._editor = _editor;
|
|
113881
113953
|
this._move = _move;
|
|
113882
113954
|
this._kind = _kind;
|
|
113883
113955
|
this._diffModel = _diffModel;
|
|
113884
|
-
this._nodes = h
|
|
113885
|
-
h
|
|
113886
|
-
h
|
|
113956
|
+
this._nodes = h('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
|
|
113957
|
+
h('div.text-content@textContent'),
|
|
113958
|
+
h('div.action-bar@actionBar'),
|
|
113887
113959
|
]);
|
|
113888
113960
|
root.root.appendChild(this._nodes.root);
|
|
113889
113961
|
const editorLayout = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114082,7 +114154,7 @@ class RevertButton {
|
|
|
114082
114154
|
this._diffs = _diffs;
|
|
114083
114155
|
this._selection = _selection;
|
|
114084
114156
|
this._id = `revertButton${RevertButton.counter++}`;
|
|
114085
|
-
this._domNode = h
|
|
114157
|
+
this._domNode = h('div.revertButton', {
|
|
114086
114158
|
title: this._selection
|
|
114087
114159
|
? localize('revertSelectedChanges', 'Revert Selected Changes')
|
|
114088
114160
|
: localize('revertChange', 'Revert Change')
|
|
@@ -114555,7 +114627,7 @@ HideUnchangedRegionsFeature = __decorate$1B([
|
|
|
114555
114627
|
], HideUnchangedRegionsFeature);
|
|
114556
114628
|
class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
114557
114629
|
constructor(_editor, _viewZone, _unchangedRegion, _unchangedRegionRange, _hide, _modifiedOutlineSource, _revealModifiedHiddenLine, _options) {
|
|
114558
|
-
const root = h
|
|
114630
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
114559
114631
|
super(_editor, _viewZone, root.root);
|
|
114560
114632
|
this._editor = _editor;
|
|
114561
114633
|
this._unchangedRegion = _unchangedRegion;
|
|
@@ -114564,13 +114636,13 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114564
114636
|
this._modifiedOutlineSource = _modifiedOutlineSource;
|
|
114565
114637
|
this._revealModifiedHiddenLine = _revealModifiedHiddenLine;
|
|
114566
114638
|
this._options = _options;
|
|
114567
|
-
this._nodes = h
|
|
114568
|
-
h
|
|
114569
|
-
h
|
|
114570
|
-
h
|
|
114571
|
-
h
|
|
114639
|
+
this._nodes = h('div.diff-hidden-lines', [
|
|
114640
|
+
h('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
|
|
114641
|
+
h('div.center@content', { style: { display: 'flex' } }, [
|
|
114642
|
+
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)'))]),
|
|
114643
|
+
h('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
|
|
114572
114644
|
]),
|
|
114573
|
-
h
|
|
114645
|
+
h('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
|
|
114574
114646
|
]);
|
|
114575
114647
|
root.root.appendChild(this._nodes.root);
|
|
114576
114648
|
const layoutInfo = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114695,7 +114767,7 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114695
114767
|
for (let i = 0; i < items.length; i++) {
|
|
114696
114768
|
const item = items[i];
|
|
114697
114769
|
const icon = SymbolKinds.toIcon(item.kind);
|
|
114698
|
-
const divItem = h
|
|
114770
|
+
const divItem = h('div.breadcrumb-item', {
|
|
114699
114771
|
style: { display: 'flex', alignItems: 'center' },
|
|
114700
114772
|
}, [
|
|
114701
114773
|
renderIcon(icon),
|
|
@@ -116112,7 +116184,7 @@ let OverviewRulerPart = OverviewRulerPart_1 = class OverviewRulerPart extends Di
|
|
|
116112
116184
|
const viewportDomElement = createFastDomNode(document.createElement('div'));
|
|
116113
116185
|
viewportDomElement.setClassName('diffViewport');
|
|
116114
116186
|
viewportDomElement.setPosition('absolute');
|
|
116115
|
-
const diffOverviewRoot = h
|
|
116187
|
+
const diffOverviewRoot = h('div.diffOverview', {
|
|
116116
116188
|
style: { position: 'absolute', top: '0px', width: OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px' }
|
|
116117
116189
|
}).root;
|
|
116118
116190
|
this._register(appendRemoveOnDispose(diffOverviewRoot, viewportDomElement.domNode));
|
|
@@ -116592,11 +116664,11 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
116592
116664
|
this._parentInstantiationService = _parentInstantiationService;
|
|
116593
116665
|
this._audioCueService = _audioCueService;
|
|
116594
116666
|
this._editorProgressService = _editorProgressService;
|
|
116595
|
-
this.elements = h
|
|
116596
|
-
h
|
|
116597
|
-
h
|
|
116598
|
-
h
|
|
116599
|
-
h
|
|
116667
|
+
this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
|
|
116668
|
+
h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
|
|
116669
|
+
h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
|
|
116670
|
+
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
|
|
116671
|
+
h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
|
|
116600
116672
|
]);
|
|
116601
116673
|
this._diffModel = observableValue(this, undefined);
|
|
116602
116674
|
this._shouldDisposeDiffModel = false;
|
|
@@ -117730,8 +117802,8 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117730
117802
|
return { maxScroll: scroll2, width: this._originalWidth.read(reader) };
|
|
117731
117803
|
}
|
|
117732
117804
|
});
|
|
117733
|
-
this._elements = h
|
|
117734
|
-
h
|
|
117805
|
+
this._elements = h('div.multiDiffEntry', [
|
|
117806
|
+
h('div.content', {
|
|
117735
117807
|
style: {
|
|
117736
117808
|
display: 'flex',
|
|
117737
117809
|
flexDirection: 'column',
|
|
@@ -117739,19 +117811,19 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117739
117811
|
overflow: 'hidden',
|
|
117740
117812
|
}
|
|
117741
117813
|
}, [
|
|
117742
|
-
h
|
|
117743
|
-
h
|
|
117744
|
-
h
|
|
117745
|
-
h
|
|
117814
|
+
h('div.header@header', [
|
|
117815
|
+
h('div.collapse-button@collapseButton'),
|
|
117816
|
+
h('div.title.show-file-icons@title', []),
|
|
117817
|
+
h('div.actions@actions'),
|
|
117746
117818
|
]),
|
|
117747
|
-
h
|
|
117819
|
+
h('div.editorParent', {
|
|
117748
117820
|
style: {
|
|
117749
117821
|
flex: '1',
|
|
117750
117822
|
display: 'flex',
|
|
117751
117823
|
flexDirection: 'column',
|
|
117752
117824
|
}
|
|
117753
117825
|
}, [
|
|
117754
|
-
h
|
|
117826
|
+
h('div.editorContainer@editor', { style: { flex: '1' } }),
|
|
117755
117827
|
])
|
|
117756
117828
|
])
|
|
117757
117829
|
]);
|
|
@@ -117952,17 +118024,17 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
|
|
|
117952
118024
|
this._workbenchUIElementFactory = _workbenchUIElementFactory;
|
|
117953
118025
|
this._parentContextKeyService = _parentContextKeyService;
|
|
117954
118026
|
this._parentInstantiationService = _parentInstantiationService;
|
|
117955
|
-
this._elements = h
|
|
118027
|
+
this._elements = h('div', {
|
|
117956
118028
|
style: {
|
|
117957
118029
|
overflowY: 'hidden',
|
|
117958
118030
|
}
|
|
117959
118031
|
}, [
|
|
117960
|
-
h
|
|
118032
|
+
h('div@content', {
|
|
117961
118033
|
style: {
|
|
117962
118034
|
overflow: 'hidden',
|
|
117963
118035
|
}
|
|
117964
118036
|
}),
|
|
117965
|
-
h
|
|
118037
|
+
h('div.monaco-editor@overflowWidgetsDomNode', {}),
|
|
117966
118038
|
]);
|
|
117967
118039
|
this._sizeObserver = this._register(new ObservableElementSizeObserver(this._element, undefined));
|
|
117968
118040
|
this._objectPool = this._register(new ObjectPool((data) => {
|
|
@@ -120522,7 +120594,7 @@ registerLanguage({
|
|
|
120522
120594
|
mimetypes: ["text/css"],
|
|
120523
120595
|
loader: () => {
|
|
120524
120596
|
{
|
|
120525
|
-
return import('./css-
|
|
120597
|
+
return import('./css-3d022d97.js');
|
|
120526
120598
|
}
|
|
120527
120599
|
}
|
|
120528
120600
|
});
|
|
@@ -120540,7 +120612,7 @@ registerLanguage({
|
|
|
120540
120612
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120541
120613
|
loader: () => {
|
|
120542
120614
|
{
|
|
120543
|
-
return import('./html-
|
|
120615
|
+
return import('./html-e2b7755a.js');
|
|
120544
120616
|
}
|
|
120545
120617
|
}
|
|
120546
120618
|
});
|
|
@@ -120560,7 +120632,7 @@ registerLanguage({
|
|
|
120560
120632
|
mimetypes: ["text/javascript"],
|
|
120561
120633
|
loader: () => {
|
|
120562
120634
|
{
|
|
120563
|
-
return import('./javascript-
|
|
120635
|
+
return import('./javascript-6edf9a3c.js');
|
|
120564
120636
|
}
|
|
120565
120637
|
}
|
|
120566
120638
|
});
|
|
@@ -120578,7 +120650,7 @@ registerLanguage({
|
|
|
120578
120650
|
mimetypes: ["text/typescript"],
|
|
120579
120651
|
loader: () => {
|
|
120580
120652
|
{
|
|
120581
|
-
return import('./typescript-
|
|
120653
|
+
return import('./typescript-0a9a4b7a.js');
|
|
120582
120654
|
}
|
|
120583
120655
|
}
|
|
120584
120656
|
});
|
|
@@ -120699,7 +120771,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120699
120771
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120700
120772
|
function getMode$3() {
|
|
120701
120773
|
{
|
|
120702
|
-
return import('./cssMode-
|
|
120774
|
+
return import('./cssMode-cd620116.js');
|
|
120703
120775
|
}
|
|
120704
120776
|
}
|
|
120705
120777
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120824,7 +120896,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120824
120896
|
};
|
|
120825
120897
|
function getMode$2() {
|
|
120826
120898
|
{
|
|
120827
|
-
return import('./htmlMode-
|
|
120899
|
+
return import('./htmlMode-c60c352c.js');
|
|
120828
120900
|
}
|
|
120829
120901
|
}
|
|
120830
120902
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120926,7 +120998,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120926
120998
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120927
120999
|
function getMode$1() {
|
|
120928
121000
|
{
|
|
120929
|
-
return import('./jsonMode-
|
|
121001
|
+
return import('./jsonMode-3d2d17ee.js');
|
|
120930
121002
|
}
|
|
120931
121003
|
}
|
|
120932
121004
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121195,7 +121267,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121195
121267
|
};
|
|
121196
121268
|
function getMode() {
|
|
121197
121269
|
{
|
|
121198
|
-
return import('./tsMode-
|
|
121270
|
+
return import('./tsMode-7010932a.js');
|
|
121199
121271
|
}
|
|
121200
121272
|
}
|
|
121201
121273
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -132853,8 +132925,8 @@ let InlineSuggestionHintsContentWidget = InlineSuggestionHintsContentWidget_1 =
|
|
|
132853
132925
|
this.id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget_1.id++}`;
|
|
132854
132926
|
this.allowEditorOverflow = true;
|
|
132855
132927
|
this.suppressMouseDown = false;
|
|
132856
|
-
this.nodes = h
|
|
132857
|
-
h
|
|
132928
|
+
this.nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
|
|
132929
|
+
h('div@toolBar'),
|
|
132858
132930
|
]);
|
|
132859
132931
|
this.previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon));
|
|
132860
132932
|
this.availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false);
|
|
@@ -132990,7 +133062,7 @@ class StatusBarViewItem$1 extends MenuEntryActionViewItem {
|
|
|
132990
133062
|
return super.updateLabel();
|
|
132991
133063
|
}
|
|
132992
133064
|
if (this.label) {
|
|
132993
|
-
const div = h
|
|
133065
|
+
const div = h('div.keybinding').root;
|
|
132994
133066
|
const k = new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions });
|
|
132995
133067
|
k.set(kb);
|
|
132996
133068
|
this.label.textContent = this._action.label;
|
|
@@ -166644,21 +166716,13 @@ registerEditorAction(ToggleHighContrast);
|
|
|
166644
166716
|
|
|
166645
166717
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
166646
166718
|
|
|
166647
|
-
function
|
|
166648
|
-
|
|
166649
|
-
path: basedir,
|
|
166650
|
-
exports: {},
|
|
166651
|
-
require: function (path, base) {
|
|
166652
|
-
return commonjsRequire();
|
|
166653
|
-
}
|
|
166654
|
-
}, fn(module, module.exports), module.exports;
|
|
166719
|
+
function commonjsRequire (path) {
|
|
166720
|
+
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.');
|
|
166655
166721
|
}
|
|
166656
166722
|
|
|
166657
|
-
|
|
166658
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
166659
|
-
}
|
|
166723
|
+
var main = {exports: {}};
|
|
166660
166724
|
|
|
166661
|
-
|
|
166725
|
+
(function (module, exports) {
|
|
166662
166726
|
(function (factory) {
|
|
166663
166727
|
{
|
|
166664
166728
|
var v = factory(commonjsRequire, exports);
|
|
@@ -168923,101 +168987,80 @@ var main = createCommonjsModule(function (module, exports) {
|
|
|
168923
168987
|
Is.typedArray = typedArray;
|
|
168924
168988
|
})(Is || (Is = {}));
|
|
168925
168989
|
});
|
|
168926
|
-
});
|
|
168990
|
+
}(main, main.exports));
|
|
168927
168991
|
|
|
168928
|
-
|
|
168992
|
+
// src/index.ts
|
|
168993
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
168929
168994
|
function isDefaultModule(module) {
|
|
168930
|
-
|
|
168931
|
-
}
|
|
168932
|
-
async function requireModule(modulePath) {
|
|
168933
|
-
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
168934
|
-
resolve(moduleDefault);
|
|
168935
|
-
}));
|
|
168995
|
+
return module.default !== void 0;
|
|
168936
168996
|
}
|
|
168937
168997
|
async function importLayersFeatureLayer() {
|
|
168938
|
-
|
|
168939
|
-
|
|
168940
|
-
|
|
168941
|
-
|
|
168942
|
-
|
|
168998
|
+
if (isAMD) {
|
|
168999
|
+
return await window.$arcgis.import("esri/layers/FeatureLayer");
|
|
169000
|
+
}
|
|
169001
|
+
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
169002
|
+
return isDefaultModule(module) ? module.default : module;
|
|
169003
|
+
}
|
|
169004
|
+
async function newLayersFeatureLayer(properties) {
|
|
169005
|
+
const ModConstructor = await importLayersFeatureLayer();
|
|
169006
|
+
return new ModConstructor(properties);
|
|
168943
169007
|
}
|
|
168944
169008
|
async function importPortalPortalItem() {
|
|
168945
|
-
|
|
168946
|
-
|
|
168947
|
-
|
|
168948
|
-
|
|
168949
|
-
|
|
169009
|
+
if (isAMD) {
|
|
169010
|
+
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
169011
|
+
}
|
|
169012
|
+
const module = await import('@arcgis/core/portal/PortalItem.js');
|
|
169013
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168950
169014
|
}
|
|
168951
169015
|
async function newPortalPortalItem(properties) {
|
|
168952
|
-
|
|
168953
|
-
|
|
169016
|
+
const ModConstructor = await importPortalPortalItem();
|
|
169017
|
+
return new ModConstructor(properties);
|
|
168954
169018
|
}
|
|
168955
169019
|
async function importWebMap() {
|
|
168956
|
-
|
|
168957
|
-
|
|
168958
|
-
|
|
168959
|
-
|
|
168960
|
-
|
|
169020
|
+
if (isAMD) {
|
|
169021
|
+
return await window.$arcgis.import("esri/WebMap");
|
|
169022
|
+
}
|
|
169023
|
+
const module = await import('@arcgis/core/WebMap.js');
|
|
169024
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168961
169025
|
}
|
|
168962
169026
|
async function newWebMap(properties) {
|
|
168963
|
-
|
|
168964
|
-
|
|
169027
|
+
const ModConstructor = await importWebMap();
|
|
169028
|
+
return new ModConstructor(properties);
|
|
168965
169029
|
}
|
|
168966
169030
|
async function importWebScene() {
|
|
168967
|
-
|
|
168968
|
-
|
|
168969
|
-
|
|
168970
|
-
|
|
168971
|
-
|
|
169031
|
+
if (isAMD) {
|
|
169032
|
+
return await window.$arcgis.import("esri/WebScene");
|
|
169033
|
+
}
|
|
169034
|
+
const module = await import('@arcgis/core/WebScene.js');
|
|
169035
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168972
169036
|
}
|
|
168973
169037
|
async function newWebScene(properties) {
|
|
168974
|
-
|
|
168975
|
-
|
|
169038
|
+
const ModConstructor = await importWebScene();
|
|
169039
|
+
return new ModConstructor(properties);
|
|
168976
169040
|
}
|
|
168977
169041
|
async function importArcade() {
|
|
168978
|
-
|
|
168979
|
-
|
|
168980
|
-
|
|
168981
|
-
|
|
168982
|
-
|
|
169042
|
+
if (isAMD) {
|
|
169043
|
+
return await window.$arcgis.import("esri/arcade");
|
|
169044
|
+
}
|
|
169045
|
+
const module = await import('@arcgis/core/arcade.js');
|
|
169046
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168983
169047
|
}
|
|
168984
169048
|
async function importRequest() {
|
|
168985
|
-
|
|
168986
|
-
|
|
168987
|
-
|
|
168988
|
-
|
|
168989
|
-
|
|
169049
|
+
if (isAMD) {
|
|
169050
|
+
return await window.$arcgis.import("esri/request");
|
|
169051
|
+
}
|
|
169052
|
+
const module = await import('@arcgis/core/request.js');
|
|
169053
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168990
169054
|
}
|
|
168991
169055
|
|
|
168992
|
-
//#region core adapter fix
|
|
168993
|
-
async function newFeatureLayer(definition) {
|
|
168994
|
-
const FeatureLayer = await importLayersFeatureLayer();
|
|
168995
|
-
// Fix title for the layer. Instead of defaulting to the map viewer style.
|
|
168996
|
-
return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
|
|
168997
|
-
}
|
|
168998
|
-
//#endregion
|
|
168999
169056
|
//#region Type Guards
|
|
169000
|
-
function
|
|
169001
|
-
return (!!item &&
|
|
169002
|
-
typeof item === "object" &&
|
|
169003
|
-
"declaredClass" in item &&
|
|
169004
|
-
typeof item.declaredClass === "string" &&
|
|
169005
|
-
item.declaredClass.startsWith("esri.layers."));
|
|
169006
|
-
}
|
|
169007
|
-
function isFeatureSetInstance(item) {
|
|
169008
|
-
return (!!item &&
|
|
169009
|
-
typeof item === "object" &&
|
|
169010
|
-
"declaredClass" in item &&
|
|
169011
|
-
typeof item.declaredClass === "string" &&
|
|
169012
|
-
item.declaredClass === "esri.rest.support.FeatureSet");
|
|
169013
|
-
}
|
|
169014
|
-
function isQueryableLayerInstance(item) {
|
|
169057
|
+
function isFeatureLayerLikeInstance(item) {
|
|
169015
169058
|
return (!!item &&
|
|
169016
169059
|
typeof item === "object" &&
|
|
169017
169060
|
"declaredClass" in item &&
|
|
169018
169061
|
typeof item.declaredClass === "string" &&
|
|
169019
169062
|
item.declaredClass.startsWith("esri.layers.") &&
|
|
169020
|
-
|
|
169063
|
+
isFieldsDefinition(item) &&
|
|
169021
169064
|
"queryFeatures" in item &&
|
|
169022
169065
|
typeof item.queryFeatures === "function");
|
|
169023
169066
|
}
|
|
@@ -169060,10 +169103,13 @@ function isFeatureLayerItemDefinition(item) {
|
|
|
169060
169103
|
return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
|
|
169061
169104
|
}
|
|
169062
169105
|
function isFieldsDefinition(item) {
|
|
169063
|
-
return
|
|
169106
|
+
return !!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields);
|
|
169064
169107
|
}
|
|
169065
169108
|
function isUrlDefinition(item) {
|
|
169066
|
-
return
|
|
169109
|
+
return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
|
|
169110
|
+
}
|
|
169111
|
+
function isSupportedServiceUrlDefinition(item) {
|
|
169112
|
+
return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
|
|
169067
169113
|
}
|
|
169068
169114
|
function isSubtypeInstance(item) {
|
|
169069
169115
|
return (!!item &&
|
|
@@ -169133,11 +169179,11 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
169133
169179
|
return null;
|
|
169134
169180
|
}
|
|
169135
169181
|
let source = null;
|
|
169136
|
-
if (
|
|
169182
|
+
if (isFieldsDefinition(definition)) {
|
|
169137
169183
|
source = definition;
|
|
169138
169184
|
}
|
|
169139
169185
|
else {
|
|
169140
|
-
source = await
|
|
169186
|
+
source = await newLayersFeatureLayer(definition);
|
|
169141
169187
|
}
|
|
169142
169188
|
if (isLoadableSource(source)) {
|
|
169143
169189
|
await source.load();
|
|
@@ -169148,32 +169194,428 @@ async function serviceMetaData(url) {
|
|
|
169148
169194
|
url += "/layers";
|
|
169149
169195
|
const request = await importRequest();
|
|
169150
169196
|
const response = await request(url, { responseType: "json", query: { f: "json" } });
|
|
169151
|
-
const data = {
|
|
169152
|
-
layers: response.data?.layers ?? [],
|
|
169153
|
-
tables: response.data?.tables ?? []
|
|
169154
|
-
};
|
|
169155
169197
|
const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
|
|
169156
|
-
const layers =
|
|
169157
|
-
const tables =
|
|
169198
|
+
const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
|
|
169199
|
+
const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
|
|
169158
169200
|
return { layers, tables };
|
|
169159
169201
|
}
|
|
169160
|
-
function
|
|
169202
|
+
function getSupportedLayerInfos(layers, queryCapability) {
|
|
169203
|
+
if (!layers) {
|
|
169204
|
+
return [];
|
|
169205
|
+
}
|
|
169161
169206
|
return layers.filter((layer) => {
|
|
169162
|
-
|
|
169163
|
-
|
|
169207
|
+
switch (layer.type) {
|
|
169208
|
+
case "Feature Layer":
|
|
169209
|
+
case "Oriented Imagery Layer":
|
|
169210
|
+
case "Catalog Layer":
|
|
169211
|
+
case "Table": {
|
|
169212
|
+
const capabilities = layer.capabilities
|
|
169213
|
+
? layer.capabilities
|
|
169214
|
+
.toLowerCase()
|
|
169215
|
+
.split(",")
|
|
169216
|
+
.map((value) => value.trim())
|
|
169217
|
+
: [];
|
|
169218
|
+
return capabilities.includes(queryCapability);
|
|
169219
|
+
}
|
|
169220
|
+
default:
|
|
169221
|
+
return false;
|
|
169164
169222
|
}
|
|
169165
|
-
const capabilities = layer.capabilities
|
|
169166
|
-
? layer.capabilities
|
|
169167
|
-
.toLowerCase()
|
|
169168
|
-
.split(",")
|
|
169169
|
-
.map((value) => value.trim())
|
|
169170
|
-
: [];
|
|
169171
|
-
return capabilities.includes(queryCapability);
|
|
169172
169223
|
});
|
|
169173
169224
|
}
|
|
169174
169225
|
//#endregion
|
|
169175
169226
|
|
|
169176
|
-
|
|
169227
|
+
// src/array-utils.ts
|
|
169228
|
+
|
|
169229
|
+
// src/deferred.ts
|
|
169230
|
+
var Deferred = class {
|
|
169231
|
+
/**
|
|
169232
|
+
* Resolves the promise.
|
|
169233
|
+
* @param value The value to resolve the promise with.
|
|
169234
|
+
*/
|
|
169235
|
+
resolve(_value) {
|
|
169236
|
+
}
|
|
169237
|
+
/**
|
|
169238
|
+
* Rejects the promise.
|
|
169239
|
+
*/
|
|
169240
|
+
reject(_error) {
|
|
169241
|
+
}
|
|
169242
|
+
/**
|
|
169243
|
+
* Creates a new deferred promise.
|
|
169244
|
+
*/
|
|
169245
|
+
constructor() {
|
|
169246
|
+
this.promise = new Promise((resolve, reject) => {
|
|
169247
|
+
this.resolve = resolve;
|
|
169248
|
+
this.reject = reject;
|
|
169249
|
+
});
|
|
169250
|
+
}
|
|
169251
|
+
};
|
|
169252
|
+
|
|
169253
|
+
// src/dom.ts
|
|
169254
|
+
function inTargetElement(element, targetElement) {
|
|
169255
|
+
let currentElement = element;
|
|
169256
|
+
while (currentElement) {
|
|
169257
|
+
if (currentElement === targetElement) {
|
|
169258
|
+
return true;
|
|
169259
|
+
}
|
|
169260
|
+
if (!currentElement.parentNode) {
|
|
169261
|
+
return false;
|
|
169262
|
+
}
|
|
169263
|
+
if (currentElement.parentNode instanceof ShadowRoot) {
|
|
169264
|
+
currentElement = currentElement.parentNode.host;
|
|
169265
|
+
} else {
|
|
169266
|
+
currentElement = currentElement.parentNode;
|
|
169267
|
+
}
|
|
169268
|
+
}
|
|
169269
|
+
return false;
|
|
169270
|
+
}
|
|
169271
|
+
function observeAncestorsMutation(element, attributeFilter, callback) {
|
|
169272
|
+
const { subscribe } = observe(attributeFilter);
|
|
169273
|
+
return subscribe((mutations) => {
|
|
169274
|
+
const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
|
|
169275
|
+
if (matched) {
|
|
169276
|
+
callback();
|
|
169277
|
+
}
|
|
169278
|
+
});
|
|
169279
|
+
}
|
|
169280
|
+
var observers = {};
|
|
169281
|
+
function observe(attributeFilter) {
|
|
169282
|
+
const attributes = attributeFilter.join(",");
|
|
169283
|
+
const previousObserver = observers[attributes];
|
|
169284
|
+
if (previousObserver !== void 0) {
|
|
169285
|
+
return previousObserver;
|
|
169286
|
+
}
|
|
169287
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
169288
|
+
const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
|
|
169289
|
+
mutationObserver.observe(document.documentElement, {
|
|
169290
|
+
attributes: true,
|
|
169291
|
+
attributeFilter,
|
|
169292
|
+
subtree: true
|
|
169293
|
+
});
|
|
169294
|
+
const observer = {
|
|
169295
|
+
subscribe(callback) {
|
|
169296
|
+
subscribers.add(callback);
|
|
169297
|
+
return {
|
|
169298
|
+
remove: () => {
|
|
169299
|
+
subscribers.delete(callback);
|
|
169300
|
+
if (subscribers.size === 0) {
|
|
169301
|
+
mutationObserver.disconnect();
|
|
169302
|
+
observers[attributes] = void 0;
|
|
169303
|
+
}
|
|
169304
|
+
}
|
|
169305
|
+
};
|
|
169306
|
+
}
|
|
169307
|
+
};
|
|
169308
|
+
observers[attributes] = observer;
|
|
169309
|
+
return observer;
|
|
169310
|
+
}
|
|
169311
|
+
function closestElement(base, selector) {
|
|
169312
|
+
let currentElement = base;
|
|
169313
|
+
while (currentElement) {
|
|
169314
|
+
const element = currentElement.closest(selector);
|
|
169315
|
+
if (element) {
|
|
169316
|
+
return element;
|
|
169317
|
+
}
|
|
169318
|
+
const rootElement = currentElement.getRootNode();
|
|
169319
|
+
if (rootElement === document) {
|
|
169320
|
+
return null;
|
|
169321
|
+
}
|
|
169322
|
+
currentElement = rootElement.host;
|
|
169323
|
+
}
|
|
169324
|
+
return null;
|
|
169325
|
+
}
|
|
169326
|
+
function getElementTheme(base) {
|
|
169327
|
+
const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
|
|
169328
|
+
return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
|
|
169329
|
+
}
|
|
169330
|
+
function getElementAttribute(el, prop, fallbackValue) {
|
|
169331
|
+
const closest = closestElement(el, `[${prop}]`);
|
|
169332
|
+
return closest?.getAttribute(prop) ?? fallbackValue;
|
|
169333
|
+
}
|
|
169334
|
+
function isElement(ref) {
|
|
169335
|
+
return ref.nodeType === Node.ELEMENT_NODE;
|
|
169336
|
+
}
|
|
169337
|
+
function isHTMLWithSetFocus(ref) {
|
|
169338
|
+
return "setFocus" in ref && typeof ref.setFocus === "function";
|
|
169339
|
+
}
|
|
169340
|
+
function setFocus(ref, selector = "") {
|
|
169341
|
+
if (!isElement(ref)) {
|
|
169342
|
+
return false;
|
|
169343
|
+
}
|
|
169344
|
+
if (ref.matches(selector)) {
|
|
169345
|
+
if (isHTMLWithSetFocus(ref)) {
|
|
169346
|
+
setTimeout(() => ref.setFocus(), 0);
|
|
169347
|
+
}
|
|
169348
|
+
return true;
|
|
169349
|
+
}
|
|
169350
|
+
for (const child of ref.children) {
|
|
169351
|
+
if (setFocus(child, selector)) {
|
|
169352
|
+
return true;
|
|
169353
|
+
}
|
|
169354
|
+
}
|
|
169355
|
+
const shadowRoot = ref.shadowRoot;
|
|
169356
|
+
if (shadowRoot) {
|
|
169357
|
+
for (const child of shadowRoot.children) {
|
|
169358
|
+
if (setFocus(child, selector)) {
|
|
169359
|
+
return true;
|
|
169360
|
+
}
|
|
169361
|
+
}
|
|
169362
|
+
}
|
|
169363
|
+
return false;
|
|
169364
|
+
}
|
|
169365
|
+
function setFocusOnElement(ref, selector) {
|
|
169366
|
+
if (!ref?.shadowRoot) {
|
|
169367
|
+
return;
|
|
169368
|
+
}
|
|
169369
|
+
if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
|
|
169370
|
+
setFocus(ref, selector);
|
|
169371
|
+
return;
|
|
169372
|
+
}
|
|
169373
|
+
const mutationObserver = new MutationObserver(() => {
|
|
169374
|
+
mutationObserver.disconnect();
|
|
169375
|
+
setFocus(ref, selector);
|
|
169376
|
+
});
|
|
169377
|
+
mutationObserver.observe(ref, {
|
|
169378
|
+
attributes: true,
|
|
169379
|
+
attributeFilter: ["hydrated", "calcite-hydrated"]
|
|
169380
|
+
});
|
|
169381
|
+
}
|
|
169382
|
+
|
|
169383
|
+
// src/errors.ts
|
|
169384
|
+
function safeCall(callback, thisContext, ...rest) {
|
|
169385
|
+
try {
|
|
169386
|
+
return callback?.call(thisContext, ...rest);
|
|
169387
|
+
} catch (error) {
|
|
169388
|
+
console.error(error, callback);
|
|
169389
|
+
}
|
|
169390
|
+
return void 0;
|
|
169391
|
+
}
|
|
169392
|
+
async function safeAsyncCall(callback, thisContext, ...rest) {
|
|
169393
|
+
try {
|
|
169394
|
+
const result = callback?.call(thisContext, ...rest);
|
|
169395
|
+
return result instanceof Promise ? await result : result;
|
|
169396
|
+
} catch (error) {
|
|
169397
|
+
console.error(error, callback);
|
|
169398
|
+
}
|
|
169399
|
+
return void 0;
|
|
169400
|
+
}
|
|
169401
|
+
|
|
169402
|
+
// src/guid.ts
|
|
169403
|
+
function gen(count) {
|
|
169404
|
+
let out = "";
|
|
169405
|
+
for (let i = 0; i < count; i++) {
|
|
169406
|
+
out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
169407
|
+
}
|
|
169408
|
+
return out;
|
|
169409
|
+
}
|
|
169410
|
+
function generateGuid() {
|
|
169411
|
+
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
169412
|
+
}
|
|
169413
|
+
var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
|
|
169414
|
+
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
169415
|
+
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
169416
|
+
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
169417
|
+
|
|
169418
|
+
// src/intl.ts
|
|
169419
|
+
var supportedLocales = /* @__PURE__ */ new Set([
|
|
169420
|
+
"ar",
|
|
169421
|
+
"bg",
|
|
169422
|
+
"bs",
|
|
169423
|
+
"ca",
|
|
169424
|
+
"cs",
|
|
169425
|
+
"da",
|
|
169426
|
+
"de",
|
|
169427
|
+
"el",
|
|
169428
|
+
"en",
|
|
169429
|
+
"es",
|
|
169430
|
+
"et",
|
|
169431
|
+
"fi",
|
|
169432
|
+
"fr",
|
|
169433
|
+
"he",
|
|
169434
|
+
"hr",
|
|
169435
|
+
"hu",
|
|
169436
|
+
"id",
|
|
169437
|
+
"it",
|
|
169438
|
+
"ja",
|
|
169439
|
+
"ko",
|
|
169440
|
+
"lt",
|
|
169441
|
+
"lv",
|
|
169442
|
+
"nl",
|
|
169443
|
+
"nb",
|
|
169444
|
+
"pl",
|
|
169445
|
+
"pt-BR",
|
|
169446
|
+
"pt-PT",
|
|
169447
|
+
"ro",
|
|
169448
|
+
"ru",
|
|
169449
|
+
"sk",
|
|
169450
|
+
"sl",
|
|
169451
|
+
"sr",
|
|
169452
|
+
"sv",
|
|
169453
|
+
"th",
|
|
169454
|
+
"tr",
|
|
169455
|
+
"uk",
|
|
169456
|
+
"vi",
|
|
169457
|
+
"zh-CN",
|
|
169458
|
+
"zh-HK",
|
|
169459
|
+
"zh-TW"
|
|
169460
|
+
]);
|
|
169461
|
+
var defaultLocale = "en";
|
|
169462
|
+
async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
|
|
169463
|
+
const path = `${assetsPath}/${prefix}`;
|
|
169464
|
+
const filePath = `${path}${locale}.json`;
|
|
169465
|
+
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
169466
|
+
return await t9nStringsCache[filePath];
|
|
169467
|
+
}
|
|
169468
|
+
var t9nStringsCache = {};
|
|
169469
|
+
async function fetchBundle(locale, path) {
|
|
169470
|
+
const filePath = `${path}${locale}.json`;
|
|
169471
|
+
try {
|
|
169472
|
+
const response = await fetch(filePath);
|
|
169473
|
+
if (response.ok) {
|
|
169474
|
+
return await response.json();
|
|
169475
|
+
}
|
|
169476
|
+
} catch (error) {
|
|
169477
|
+
console.error(error);
|
|
169478
|
+
return fallbackBundle;
|
|
169479
|
+
}
|
|
169480
|
+
if (locale === defaultLocale) {
|
|
169481
|
+
return fallbackBundle;
|
|
169482
|
+
}
|
|
169483
|
+
return await fetchBundle(defaultLocale, path);
|
|
169484
|
+
}
|
|
169485
|
+
var fallbackBundle = new Proxy(
|
|
169486
|
+
{},
|
|
169487
|
+
{
|
|
169488
|
+
get: (_target, property) => camelToHuman(property.toString())
|
|
169489
|
+
}
|
|
169490
|
+
);
|
|
169491
|
+
function getElementLocales(element) {
|
|
169492
|
+
const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
|
|
169493
|
+
if (supportedLocales.has(lang)) {
|
|
169494
|
+
return { lang, t9nLocale: lang };
|
|
169495
|
+
}
|
|
169496
|
+
const rootCode = lang.slice(0, 2);
|
|
169497
|
+
return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
|
|
169498
|
+
}
|
|
169499
|
+
function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
|
|
169500
|
+
let result = void 0;
|
|
169501
|
+
const callback = () => void updateComponentLocateState(element, assetsPath, assetName).then((newResult) => {
|
|
169502
|
+
if (result?.lang !== newResult.lang || result.t9nLocale !== newResult.t9nLocale || result.t9nStrings !== newResult.t9nStrings) {
|
|
169503
|
+
onUpdated(newResult);
|
|
169504
|
+
}
|
|
169505
|
+
result = newResult;
|
|
169506
|
+
}).catch(console.error);
|
|
169507
|
+
callback();
|
|
169508
|
+
return observeAncestorsMutation(element, ["lang"], callback);
|
|
169509
|
+
}
|
|
169510
|
+
async function updateComponentLocateState(element, assetsPath, assetName = element.tagName.toLowerCase().replace("arcgis-", "")) {
|
|
169511
|
+
const { lang, t9nLocale } = getElementLocales(element);
|
|
169512
|
+
const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
|
|
169513
|
+
const prefix = `${assetName}.t9n.`;
|
|
169514
|
+
const t9nStrings = await fetchT9NStringsBundle(t9nLocale, t9nAssetsPath, prefix);
|
|
169515
|
+
return { lang, t9nLocale, t9nStrings };
|
|
169516
|
+
}
|
|
169517
|
+
|
|
169518
|
+
// src/strings.ts
|
|
169519
|
+
var doubleQuote = '"';
|
|
169520
|
+
var singleQuote = "'";
|
|
169521
|
+
function repeatString(value, n) {
|
|
169522
|
+
return new Array(n + 1).join(value);
|
|
169523
|
+
}
|
|
169524
|
+
function quoteString(value) {
|
|
169525
|
+
let quote = doubleQuote;
|
|
169526
|
+
let alternateQuote = singleQuote;
|
|
169527
|
+
const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
|
|
169528
|
+
if (avoidEscape) {
|
|
169529
|
+
alternateQuote = doubleQuote;
|
|
169530
|
+
quote = singleQuote;
|
|
169531
|
+
}
|
|
169532
|
+
const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
|
|
169533
|
+
value = value.replace(
|
|
169534
|
+
alternateEscape,
|
|
169535
|
+
(_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
|
|
169536
|
+
// We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
|
|
169537
|
+
boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
|
|
169538
|
+
)
|
|
169539
|
+
);
|
|
169540
|
+
const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
|
|
169541
|
+
value = value.replace(
|
|
169542
|
+
quoteEscape,
|
|
169543
|
+
(_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
|
|
169544
|
+
);
|
|
169545
|
+
return quote + value + quote;
|
|
169546
|
+
}
|
|
169547
|
+
function createFilterExpression(filterWord) {
|
|
169548
|
+
const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
|
|
169549
|
+
return new RegExp(sanitizedWord, "i");
|
|
169550
|
+
}
|
|
169551
|
+
function setValuesInString(message, values = {}) {
|
|
169552
|
+
return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
|
|
169553
|
+
}
|
|
169554
|
+
function addLTRMark(value) {
|
|
169555
|
+
return `\u200E${value ?? ""}\u200E`;
|
|
169556
|
+
}
|
|
169557
|
+
|
|
169558
|
+
// src/timeouts.ts
|
|
169559
|
+
function devToolsAwareTimeout(callback, timeout) {
|
|
169560
|
+
const interval = timeout > longTimeoutThreshold ? longTimeoutInterval : timeout / shortTimeoutIntervals;
|
|
169561
|
+
let elapsed = 0;
|
|
169562
|
+
const reference = setInterval(() => {
|
|
169563
|
+
elapsed += interval;
|
|
169564
|
+
if (elapsed >= timeout) {
|
|
169565
|
+
clearInterval(reference);
|
|
169566
|
+
callback();
|
|
169567
|
+
}
|
|
169568
|
+
}, interval);
|
|
169569
|
+
return reference;
|
|
169570
|
+
}
|
|
169571
|
+
var longTimeoutThreshold = 4e3;
|
|
169572
|
+
var longTimeoutInterval = 2e3;
|
|
169573
|
+
var shortTimeoutIntervals = 4;
|
|
169574
|
+
|
|
169575
|
+
// src/type-guards.ts
|
|
169576
|
+
function isNotNull(item) {
|
|
169577
|
+
return item !== null;
|
|
169578
|
+
}
|
|
169579
|
+
function isNotUndefined(item) {
|
|
169580
|
+
return item !== void 0;
|
|
169581
|
+
}
|
|
169582
|
+
|
|
169583
|
+
// src/ui.ts
|
|
169584
|
+
function debounce(func, waitFor = 100) {
|
|
169585
|
+
let timeout;
|
|
169586
|
+
return (...args) => {
|
|
169587
|
+
const later = () => {
|
|
169588
|
+
clearTimeout(timeout);
|
|
169589
|
+
func(...args);
|
|
169590
|
+
};
|
|
169591
|
+
clearTimeout(timeout);
|
|
169592
|
+
timeout = setTimeout(later, waitFor);
|
|
169593
|
+
};
|
|
169594
|
+
}
|
|
169595
|
+
|
|
169596
|
+
// src/url.ts
|
|
169597
|
+
function hasSameOrigin(url1, url2, ignoreProtocol = false) {
|
|
169598
|
+
if (!url1 || !url2) {
|
|
169599
|
+
return false;
|
|
169600
|
+
}
|
|
169601
|
+
const url1Obj = new URL(url1);
|
|
169602
|
+
const url2Obj = new URL(url2);
|
|
169603
|
+
if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
|
|
169604
|
+
return false;
|
|
169605
|
+
}
|
|
169606
|
+
if (url1Obj.host == null || url2Obj.host == null) {
|
|
169607
|
+
return false;
|
|
169608
|
+
}
|
|
169609
|
+
return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
|
|
169610
|
+
}
|
|
169611
|
+
function isURL(url) {
|
|
169612
|
+
try {
|
|
169613
|
+
new URL(url);
|
|
169614
|
+
return true;
|
|
169615
|
+
} catch (e) {
|
|
169616
|
+
return false;
|
|
169617
|
+
}
|
|
169618
|
+
}
|
|
169177
169619
|
|
|
169178
169620
|
/**
|
|
169179
169621
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -169186,7 +169628,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
169186
169628
|
if (!_keys.length) {
|
|
169187
169629
|
return [];
|
|
169188
169630
|
}
|
|
169189
|
-
const filterExpression =
|
|
169631
|
+
const filterExpression = createFilterExpression(filterWord);
|
|
169190
169632
|
return collection.filter((item) => {
|
|
169191
169633
|
if (beforeFilteringFn) {
|
|
169192
169634
|
const res = beforeFilteringFn(item);
|
|
@@ -169296,7 +169738,7 @@ function fieldAlias(field) {
|
|
|
169296
169738
|
//#endregion
|
|
169297
169739
|
//#region Support functions
|
|
169298
169740
|
async function getRelatedFeatureLayer(layer, relationship) {
|
|
169299
|
-
const relatedFeatureLayer = await
|
|
169741
|
+
const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
|
|
169300
169742
|
await relatedFeatureLayer.load();
|
|
169301
169743
|
return relatedFeatureLayer;
|
|
169302
169744
|
}
|
|
@@ -169360,7 +169802,7 @@ function getMapPortalItem(map) {
|
|
|
169360
169802
|
}
|
|
169361
169803
|
//#endregion
|
|
169362
169804
|
//#region Editor Profile to Language Service Profile functions
|
|
169363
|
-
async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
|
|
169805
|
+
async function variablesToLSVariable(editorVariables, kind = main.exports.CompletionItemKind.Variable) {
|
|
169364
169806
|
return await Promise.all(editorVariables.map(async (editorVariable) => {
|
|
169365
169807
|
switch (editorVariable.type) {
|
|
169366
169808
|
case "dictionary":
|
|
@@ -169383,11 +169825,11 @@ function variableToLSVariable(editorVariable, kind) {
|
|
|
169383
169825
|
label: name,
|
|
169384
169826
|
detail: name,
|
|
169385
169827
|
insertText: name,
|
|
169386
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169387
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169828
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169829
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169388
169830
|
kind,
|
|
169389
|
-
documentation: { kind: "markdown", value: description }
|
|
169390
|
-
}
|
|
169831
|
+
documentation: { kind: "markdown", value: description },
|
|
169832
|
+
},
|
|
169391
169833
|
};
|
|
169392
169834
|
}
|
|
169393
169835
|
async function featureToLSFeature(editorFeature, kind) {
|
|
@@ -169399,16 +169841,16 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169399
169841
|
label: name,
|
|
169400
169842
|
detail: name,
|
|
169401
169843
|
insertText: name,
|
|
169402
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169403
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169404
|
-
kind
|
|
169844
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169845
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169846
|
+
kind,
|
|
169405
169847
|
};
|
|
169406
169848
|
const result = {
|
|
169407
169849
|
name,
|
|
169408
169850
|
description,
|
|
169409
169851
|
type: "dictionary",
|
|
169410
169852
|
properties: [],
|
|
169411
|
-
completion: resultCompletion
|
|
169853
|
+
completion: resultCompletion,
|
|
169412
169854
|
};
|
|
169413
169855
|
// No source definition, then it will be a feature without any known fields
|
|
169414
169856
|
if (!source) {
|
|
@@ -169443,11 +169885,11 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169443
169885
|
label: field.name,
|
|
169444
169886
|
detail: description,
|
|
169445
169887
|
insertText,
|
|
169446
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169447
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169448
|
-
kind: main.CompletionItemKind.Field,
|
|
169449
|
-
documentation: { kind: "markdown", value: fieldCompletionDescription }
|
|
169450
|
-
}
|
|
169888
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169889
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169890
|
+
kind: main.exports.CompletionItemKind.Field,
|
|
169891
|
+
documentation: { kind: "markdown", value: fieldCompletionDescription },
|
|
169892
|
+
},
|
|
169451
169893
|
});
|
|
169452
169894
|
if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
|
|
169453
169895
|
return;
|
|
@@ -169465,11 +169907,11 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169465
169907
|
label: field.alias,
|
|
169466
169908
|
detail: field.name,
|
|
169467
169909
|
insertText,
|
|
169468
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169469
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169470
|
-
kind: main.CompletionItemKind.Field,
|
|
169471
|
-
documentation: { kind: "markdown", value: aliasCompletionDescription }
|
|
169472
|
-
}
|
|
169910
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169911
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169912
|
+
kind: main.exports.CompletionItemKind.Field,
|
|
169913
|
+
documentation: { kind: "markdown", value: aliasCompletionDescription },
|
|
169914
|
+
},
|
|
169473
169915
|
});
|
|
169474
169916
|
});
|
|
169475
169917
|
result.properties = [...fieldProfileValues, ...aliasProfileValues];
|
|
@@ -169494,16 +169936,16 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
|
|
|
169494
169936
|
name,
|
|
169495
169937
|
description,
|
|
169496
169938
|
type: "dictionary",
|
|
169497
|
-
properties: await variablesToLSVariable(variables, main.CompletionItemKind.Field),
|
|
169939
|
+
properties: await variablesToLSVariable(variables, main.exports.CompletionItemKind.Field),
|
|
169498
169940
|
completion: {
|
|
169499
169941
|
label: name,
|
|
169500
169942
|
detail: name,
|
|
169501
169943
|
insertText: name,
|
|
169502
|
-
insertTextMode: main.InsertTextMode.asIs,
|
|
169503
|
-
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169944
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
169945
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
169504
169946
|
kind,
|
|
169505
|
-
documentation: { kind: "markdown", value: completionDescription }
|
|
169506
|
-
}
|
|
169947
|
+
documentation: { kind: "markdown", value: completionDescription },
|
|
169948
|
+
},
|
|
169507
169949
|
};
|
|
169508
169950
|
}
|
|
169509
169951
|
/**
|
|
@@ -169530,9 +169972,9 @@ class ProfileItemBase {
|
|
|
169530
169972
|
// If the component is under RTL, the string is messed up.
|
|
169531
169973
|
// It is converted from $feature to feature$, This is not acceptable since the label
|
|
169532
169974
|
// represents a variable name. We are adding in front of the $ sign a right to left mark.
|
|
169533
|
-
return
|
|
169975
|
+
return addLTRMark(this._label);
|
|
169534
169976
|
}
|
|
169535
|
-
return
|
|
169977
|
+
return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
|
|
169536
169978
|
}
|
|
169537
169979
|
/**
|
|
169538
169980
|
* Returns the description string.
|
|
@@ -169544,7 +169986,7 @@ class ProfileItemBase {
|
|
|
169544
169986
|
if (typeof this.description === "string") {
|
|
169545
169987
|
return this.description;
|
|
169546
169988
|
}
|
|
169547
|
-
return
|
|
169989
|
+
return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
|
|
169548
169990
|
}
|
|
169549
169991
|
/**
|
|
169550
169992
|
* Returns true if the item pass the filter test
|
|
@@ -169721,28 +170163,28 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169721
170163
|
return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
|
|
169722
170164
|
case "featureSet":
|
|
169723
170165
|
return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
|
|
169724
|
-
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
|
|
170166
|
+
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
|
|
169725
170167
|
]);
|
|
169726
170168
|
case "featureSetCollection":
|
|
169727
170169
|
return new FeatureSetCollectionVariable(this, {
|
|
169728
170170
|
profile: this._profile,
|
|
169729
170171
|
declaration,
|
|
169730
170172
|
label: snippet,
|
|
169731
|
-
snippet
|
|
170173
|
+
snippet,
|
|
169732
170174
|
});
|
|
169733
170175
|
case "dictionary":
|
|
169734
170176
|
return new DictionaryVariable(this, {
|
|
169735
170177
|
profile: this._profile,
|
|
169736
170178
|
declaration,
|
|
169737
170179
|
label: snippet,
|
|
169738
|
-
snippet
|
|
170180
|
+
snippet,
|
|
169739
170181
|
});
|
|
169740
170182
|
case "array":
|
|
169741
170183
|
return new ArrayVariable({
|
|
169742
170184
|
profile: this._profile,
|
|
169743
170185
|
declaration,
|
|
169744
170186
|
label: snippet,
|
|
169745
|
-
snippet
|
|
170187
|
+
snippet,
|
|
169746
170188
|
});
|
|
169747
170189
|
default:
|
|
169748
170190
|
console.error("Editor profile: Invalid profile variable", declaration);
|
|
@@ -169754,7 +170196,7 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169754
170196
|
type: this.type,
|
|
169755
170197
|
name: "",
|
|
169756
170198
|
...this.declaration,
|
|
169757
|
-
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170199
|
+
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
169758
170200
|
};
|
|
169759
170201
|
}
|
|
169760
170202
|
}
|
|
@@ -169785,7 +170227,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169785
170227
|
return this._profile?.intlStrings.layer ?? "layer";
|
|
169786
170228
|
}
|
|
169787
170229
|
async loadSource() {
|
|
169788
|
-
if (
|
|
170230
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
169789
170231
|
return await this._loadPromise;
|
|
169790
170232
|
}
|
|
169791
170233
|
this._loadPromise = this._loadSource();
|
|
@@ -169820,7 +170262,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169820
170262
|
description: fieldAlias(field),
|
|
169821
170263
|
snippet: valueSnippet,
|
|
169822
170264
|
icon: fieldTypeToIconName(field),
|
|
169823
|
-
filterDescription: true
|
|
170265
|
+
filterDescription: true,
|
|
169824
170266
|
});
|
|
169825
170267
|
}
|
|
169826
170268
|
_getDomainDictionary(field) {
|
|
@@ -169859,6 +170301,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169859
170301
|
// Sepcial case for the subtype field
|
|
169860
170302
|
if (field.name === this._source.subtypeField) {
|
|
169861
170303
|
const domainDictionary = this._createDomainDictionary(field);
|
|
170304
|
+
domainDictionary.icon = "subtype";
|
|
169862
170305
|
domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
|
|
169863
170306
|
return domainDictionary;
|
|
169864
170307
|
}
|
|
@@ -169913,7 +170356,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169913
170356
|
return null;
|
|
169914
170357
|
}
|
|
169915
170358
|
const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
|
|
169916
|
-
code: "domainvalues"
|
|
170359
|
+
code: "domainvalues",
|
|
169917
170360
|
});
|
|
169918
170361
|
const domainDictionary = this._createDomainDictionary(field);
|
|
169919
170362
|
domainDictionary.variables.push(domainValuesGroup);
|
|
@@ -169931,7 +170374,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169931
170374
|
profile: this._profile,
|
|
169932
170375
|
label: `${label}`,
|
|
169933
170376
|
description: t.name,
|
|
169934
|
-
snippet: `"${label}"
|
|
170377
|
+
snippet: `"${label}"`,
|
|
169935
170378
|
});
|
|
169936
170379
|
}) ?? [];
|
|
169937
170380
|
return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
|
|
@@ -169942,7 +170385,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169942
170385
|
label: `${v.code}`,
|
|
169943
170386
|
description: v.name,
|
|
169944
170387
|
snippet: `"${v.code}"`,
|
|
169945
|
-
filterDescription: true
|
|
170388
|
+
filterDescription: true,
|
|
169946
170389
|
}));
|
|
169947
170390
|
return new GroupOfVariables(this._profile, label, values);
|
|
169948
170391
|
}
|
|
@@ -169968,8 +170411,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169968
170411
|
code: "domainvaluesfortypeformat",
|
|
169969
170412
|
formatValues: {
|
|
169970
170413
|
fieldName: alias,
|
|
169971
|
-
typeName: type.name
|
|
169972
|
-
}
|
|
170414
|
+
typeName: type.name,
|
|
170415
|
+
},
|
|
169973
170416
|
});
|
|
169974
170417
|
const id = isSubtypeInstance(type) ? type.code : type.id;
|
|
169975
170418
|
const label = `${id}`;
|
|
@@ -169979,7 +170422,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169979
170422
|
label,
|
|
169980
170423
|
snippet,
|
|
169981
170424
|
description: type.name,
|
|
169982
|
-
declaration: { name: alias }
|
|
170425
|
+
declaration: { name: alias },
|
|
169983
170426
|
});
|
|
169984
170427
|
subtypeDictionary.variables = [domainValuesGroup];
|
|
169985
170428
|
variables.push(subtypeDictionary);
|
|
@@ -170001,7 +170444,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170001
170444
|
description: alias,
|
|
170002
170445
|
snippet: valueSnippet,
|
|
170003
170446
|
icon: "form-dropdown",
|
|
170004
|
-
declaration: { name: field.name }
|
|
170447
|
+
declaration: { name: field.name },
|
|
170005
170448
|
});
|
|
170006
170449
|
// Add the header group
|
|
170007
170450
|
const headerGroup = new GroupOfVariables(this._profile, alias, [
|
|
@@ -170009,8 +170452,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170009
170452
|
profile: this._profile,
|
|
170010
170453
|
label: valueSnippet,
|
|
170011
170454
|
description: "",
|
|
170012
|
-
snippet: valueSnippet
|
|
170013
|
-
})
|
|
170455
|
+
snippet: valueSnippet,
|
|
170456
|
+
}),
|
|
170014
170457
|
]);
|
|
170015
170458
|
domainDictionary.variables = [headerGroup];
|
|
170016
170459
|
// Add the SubtypeName or DomainName snippet if available
|
|
@@ -170020,7 +170463,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170020
170463
|
profile: this._profile,
|
|
170021
170464
|
label: subtypeOrDomainNameSnippet,
|
|
170022
170465
|
description: "",
|
|
170023
|
-
snippet: subtypeOrDomainNameSnippet
|
|
170466
|
+
snippet: subtypeOrDomainNameSnippet,
|
|
170024
170467
|
}));
|
|
170025
170468
|
}
|
|
170026
170469
|
return domainDictionary;
|
|
@@ -170037,7 +170480,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170037
170480
|
const relationshipsGroup = new GroupOfVariables(this._profile, { code: "relationships" });
|
|
170038
170481
|
const relationshipItems = await Promise.all(source.relationships.map(async (relationship) => {
|
|
170039
170482
|
const relatedLayer = await getRelatedFeatureLayer(source, relationship);
|
|
170040
|
-
if (!
|
|
170483
|
+
if (!isFeatureLayerLikeInstance(relatedLayer)) {
|
|
170041
170484
|
return null;
|
|
170042
170485
|
}
|
|
170043
170486
|
if (relationship.relatedTableId === this.relationshipsProperties?.sourceTableId) {
|
|
@@ -170050,10 +170493,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170050
170493
|
declaration: { definition: relatedLayer },
|
|
170051
170494
|
label: relatedLayer.title,
|
|
170052
170495
|
description: "",
|
|
170053
|
-
nonInteractive: true
|
|
170496
|
+
nonInteractive: true,
|
|
170054
170497
|
}, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
|
|
170055
170498
|
}));
|
|
170056
|
-
relationshipsGroup.variables = relationshipItems.filter(
|
|
170499
|
+
relationshipsGroup.variables = relationshipItems.filter(isNotNull);
|
|
170057
170500
|
if (!relationshipsGroup.variables.length) {
|
|
170058
170501
|
return null;
|
|
170059
170502
|
}
|
|
@@ -170066,8 +170509,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170066
170509
|
this.type = "feature";
|
|
170067
170510
|
}
|
|
170068
170511
|
get title() {
|
|
170069
|
-
if (
|
|
170070
|
-
return this._source.title;
|
|
170512
|
+
if (isTitleCapableSource(this._source)) {
|
|
170513
|
+
return this._source.title ?? "";
|
|
170071
170514
|
}
|
|
170072
170515
|
return { code: "feature" };
|
|
170073
170516
|
}
|
|
@@ -170081,14 +170524,14 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170081
170524
|
throw new Error("Invalid definition");
|
|
170082
170525
|
}
|
|
170083
170526
|
// The title group and snippet
|
|
170084
|
-
const title =
|
|
170527
|
+
const title = isTitleCapableSource(this._source) ? this._source.title ?? "" : "";
|
|
170085
170528
|
this.variables.push(new GroupOfVariables(this._profile, title, [
|
|
170086
170529
|
new ValueVariable({
|
|
170087
170530
|
profile: this._profile,
|
|
170088
170531
|
label: this.snippet,
|
|
170089
170532
|
description: "",
|
|
170090
|
-
snippet: this.snippet
|
|
170091
|
-
})
|
|
170533
|
+
snippet: this.snippet,
|
|
170534
|
+
}),
|
|
170092
170535
|
]));
|
|
170093
170536
|
// The collection of feature attribute values
|
|
170094
170537
|
const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
|
|
@@ -170103,7 +170546,7 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170103
170546
|
description: "Geometry",
|
|
170104
170547
|
snippet,
|
|
170105
170548
|
icon: "shapes",
|
|
170106
|
-
filterDescription: true
|
|
170549
|
+
filterDescription: true,
|
|
170107
170550
|
});
|
|
170108
170551
|
valuesGroup.variables.push(geometryProperty);
|
|
170109
170552
|
}
|
|
@@ -170116,8 +170559,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170116
170559
|
this.variables.push(relationshipsGroup);
|
|
170117
170560
|
}
|
|
170118
170561
|
}
|
|
170119
|
-
catch (
|
|
170120
|
-
console.error("
|
|
170562
|
+
catch (error) {
|
|
170563
|
+
console.error("Error with definition", error, this._definition);
|
|
170121
170564
|
this._source = null;
|
|
170122
170565
|
}
|
|
170123
170566
|
finally {
|
|
@@ -170139,8 +170582,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170139
170582
|
this.type = "featureSet";
|
|
170140
170583
|
}
|
|
170141
170584
|
get title() {
|
|
170142
|
-
if (
|
|
170143
|
-
return this._source.title;
|
|
170585
|
+
if (isTitleCapableSource(this._source)) {
|
|
170586
|
+
return this._source.title ?? "";
|
|
170144
170587
|
}
|
|
170145
170588
|
return { code: "featureset" };
|
|
170146
170589
|
}
|
|
@@ -170167,8 +170610,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170167
170610
|
this.variables.push(relationshipsGroup);
|
|
170168
170611
|
}
|
|
170169
170612
|
}
|
|
170170
|
-
catch (
|
|
170171
|
-
console.error("
|
|
170613
|
+
catch (error) {
|
|
170614
|
+
console.error("Error with definition", error, this._definition);
|
|
170172
170615
|
this._source = null;
|
|
170173
170616
|
}
|
|
170174
170617
|
finally {
|
|
@@ -170217,7 +170660,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170217
170660
|
return this._profile?.intlStrings.map ?? "map";
|
|
170218
170661
|
}
|
|
170219
170662
|
async loadSource() {
|
|
170220
|
-
if (
|
|
170663
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
170221
170664
|
return await this._loadPromise;
|
|
170222
170665
|
}
|
|
170223
170666
|
this._loadPromise = this._loadSource();
|
|
@@ -170238,24 +170681,24 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170238
170681
|
: {
|
|
170239
170682
|
code: "webmapformat",
|
|
170240
170683
|
formatValues: {
|
|
170241
|
-
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
|
|
170242
|
-
}
|
|
170684
|
+
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
|
|
170685
|
+
},
|
|
170243
170686
|
};
|
|
170244
170687
|
const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
|
|
170245
170688
|
new ValueVariable({
|
|
170246
170689
|
profile: this._profile,
|
|
170247
170690
|
label: this.snippet,
|
|
170248
170691
|
description: "",
|
|
170249
|
-
snippet: this.snippet
|
|
170250
|
-
})
|
|
170692
|
+
snippet: this.snippet,
|
|
170693
|
+
}),
|
|
170251
170694
|
]);
|
|
170252
170695
|
// Creates the groups for the layer and tables
|
|
170253
170696
|
const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
|
|
170254
170697
|
const tablesGroup = new GroupOfVariables(this._profile, { code: "tables" }, this._featureSetCollections.tables);
|
|
170255
170698
|
this.variables.push(headerGroup, layersGroup, tablesGroup);
|
|
170256
170699
|
}
|
|
170257
|
-
catch (
|
|
170258
|
-
console.error("
|
|
170700
|
+
catch (error) {
|
|
170701
|
+
console.error("Error with definition", error, this._definition);
|
|
170259
170702
|
this._featureSetCollections = null;
|
|
170260
170703
|
}
|
|
170261
170704
|
finally {
|
|
@@ -170270,7 +170713,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170270
170713
|
if (isMapInstance(this._definition)) {
|
|
170271
170714
|
return await this._featureSetCollectionFromMap(this._definition);
|
|
170272
170715
|
}
|
|
170273
|
-
if (
|
|
170716
|
+
if (isUrlDefinition(this._definition)) {
|
|
170274
170717
|
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170275
170718
|
}
|
|
170276
170719
|
if (isPortalItemDefinition(this._definition)) {
|
|
@@ -170278,10 +170721,6 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170278
170721
|
// or Feature Service
|
|
170279
170722
|
return await this._featureSetCollectionFromPortalItem(this._definition.portalItem);
|
|
170280
170723
|
}
|
|
170281
|
-
if (isUrlDefinition(this._definition)) {
|
|
170282
|
-
// Assume that the url is pointing to a feature server
|
|
170283
|
-
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170284
|
-
}
|
|
170285
170724
|
return null;
|
|
170286
170725
|
}
|
|
170287
170726
|
async _featureSetCollectionFromMap(map) {
|
|
@@ -170294,7 +170733,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170294
170733
|
return {
|
|
170295
170734
|
layers: this._convertWebMapLayersToVariables(map.layers),
|
|
170296
170735
|
tables: this._convertWebMapLayersToVariables(map.tables, true),
|
|
170297
|
-
source: map
|
|
170736
|
+
source: map,
|
|
170298
170737
|
};
|
|
170299
170738
|
}
|
|
170300
170739
|
async _featureSetCollectionFromPortalItem(definition) {
|
|
@@ -170325,12 +170764,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170325
170764
|
}
|
|
170326
170765
|
const metadata = await serviceMetaData(processedUrl);
|
|
170327
170766
|
const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
|
|
170328
|
-
const featureLayer = await
|
|
170767
|
+
const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170329
170768
|
await featureLayer.load();
|
|
170330
170769
|
return this._createFeatureSetVariable(featureLayer);
|
|
170331
170770
|
}));
|
|
170332
170771
|
const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
|
|
170333
|
-
const table = await
|
|
170772
|
+
const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170334
170773
|
await table.load();
|
|
170335
170774
|
return this._createFeatureSetVariable(table);
|
|
170336
170775
|
}));
|
|
@@ -170343,7 +170782,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170343
170782
|
.toArray()
|
|
170344
170783
|
.reverse()
|
|
170345
170784
|
.forEach((layer) => {
|
|
170346
|
-
if (
|
|
170785
|
+
if (isFeatureLayerLikeInstance(layer)) {
|
|
170347
170786
|
layerVariables.push(this._createFeatureSetVariable(layer, true));
|
|
170348
170787
|
return;
|
|
170349
170788
|
}
|
|
@@ -170356,29 +170795,31 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170356
170795
|
});
|
|
170357
170796
|
return layerVariables;
|
|
170358
170797
|
}
|
|
170359
|
-
_createFeatureSetVariable(
|
|
170798
|
+
_createFeatureSetVariable(featureLayerLike, isFromWebMap = false) {
|
|
170360
170799
|
return new FeatureSetVariable(this, {
|
|
170361
170800
|
profile: this._profile,
|
|
170362
|
-
declaration: { name:
|
|
170363
|
-
label:
|
|
170801
|
+
declaration: { name: featureLayerLike.title, definition: featureLayerLike },
|
|
170802
|
+
label: isFromWebMap
|
|
170803
|
+
? featureLayerLike.title
|
|
170804
|
+
: featureLayerLike.sourceJSON.name ?? featureLayerLike.title,
|
|
170364
170805
|
description: "",
|
|
170365
|
-
nonInteractive: true
|
|
170366
|
-
}, this._makeFeatureSetSnippets(
|
|
170806
|
+
nonInteractive: true,
|
|
170807
|
+
}, this._makeFeatureSetSnippets(featureLayerLike, isFromWebMap));
|
|
170367
170808
|
}
|
|
170368
|
-
_makeFeatureSetSnippets(
|
|
170809
|
+
_makeFeatureSetSnippets(featureLayerLike, isFromWebMap = false) {
|
|
170369
170810
|
if (!this._profile?.supportFeatureSetFunctions) {
|
|
170370
170811
|
return [];
|
|
170371
170812
|
}
|
|
170372
170813
|
if (isFromWebMap) {
|
|
170373
|
-
const snippetById = `FeatureSetById(${this.snippet}, "${
|
|
170374
|
-
const snippetByName = `FeatureSetByName(${this.snippet}, "${
|
|
170814
|
+
const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.id}")`;
|
|
170815
|
+
const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayerLike.title}")`;
|
|
170375
170816
|
return [
|
|
170376
170817
|
new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
|
|
170377
|
-
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
|
|
170818
|
+
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
|
|
170378
170819
|
];
|
|
170379
170820
|
}
|
|
170380
170821
|
else {
|
|
170381
|
-
const snippetById = `FeatureSetById(${this.snippet}, "${
|
|
170822
|
+
const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.layerId}")`;
|
|
170382
170823
|
return [new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById })];
|
|
170383
170824
|
}
|
|
170384
170825
|
}
|
|
@@ -170399,7 +170840,7 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170399
170840
|
// Delay the load of the variable declarations so we have a `this`
|
|
170400
170841
|
super(undefined, {
|
|
170401
170842
|
profile: null,
|
|
170402
|
-
declaration: { properties: [] }
|
|
170843
|
+
declaration: { properties: [] },
|
|
170403
170844
|
});
|
|
170404
170845
|
this.definition = definition;
|
|
170405
170846
|
this.intlStrings = intlStrings;
|
|
@@ -170431,28 +170872,20 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170431
170872
|
toEditorProfileDefinition() {
|
|
170432
170873
|
return {
|
|
170433
170874
|
...this.definition,
|
|
170434
|
-
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170875
|
+
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
170435
170876
|
};
|
|
170436
170877
|
}
|
|
170437
170878
|
}
|
|
170438
170879
|
//#endregion
|
|
170439
170880
|
|
|
170440
170881
|
function isFeatureDefinition(item) {
|
|
170441
|
-
return (
|
|
170442
|
-
isFeatureSetInstance(item) ||
|
|
170443
|
-
isUrlDefinition(item) ||
|
|
170444
|
-
isFieldsDefinition(item) ||
|
|
170445
|
-
isFeatureLayerItemDefinition(item));
|
|
170882
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170446
170883
|
}
|
|
170447
170884
|
function isFeatureSetDefinition(item) {
|
|
170448
|
-
return (
|
|
170449
|
-
isFeatureSetInstance(item) ||
|
|
170450
|
-
isUrlDefinition(item) ||
|
|
170451
|
-
isFieldsDefinition(item) ||
|
|
170452
|
-
isFeatureLayerItemDefinition(item));
|
|
170885
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170453
170886
|
}
|
|
170454
170887
|
function isFeatureSetCollectionDefinition(item) {
|
|
170455
|
-
return isPortalItemDefinition(item) || isMapInstance(item) ||
|
|
170888
|
+
return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
|
|
170456
170889
|
}
|
|
170457
170890
|
/**
|
|
170458
170891
|
* Get a PredefinedProfile for a locale. If not already loaded then fetch it.
|
|
@@ -170464,7 +170897,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
|
|
|
170464
170897
|
if (profiles) {
|
|
170465
170898
|
return profiles;
|
|
170466
170899
|
}
|
|
170467
|
-
if (!
|
|
170900
|
+
if (!supportedLocales.has(locale)) {
|
|
170468
170901
|
return await getSdkPredefinedProfiles("en");
|
|
170469
170902
|
}
|
|
170470
170903
|
try {
|
|
@@ -170502,7 +170935,7 @@ function isExtendedPredefinedProfileDefinition(item) {
|
|
|
170502
170935
|
return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
|
|
170503
170936
|
}
|
|
170504
170937
|
function convertApiVariables(variables) {
|
|
170505
|
-
return variables
|
|
170938
|
+
return variables?.map(convertApiVariable);
|
|
170506
170939
|
}
|
|
170507
170940
|
function convertApiVariable(variable) {
|
|
170508
170941
|
switch (variable.type) {
|
|
@@ -170510,13 +170943,13 @@ function convertApiVariable(variable) {
|
|
|
170510
170943
|
return {
|
|
170511
170944
|
...variable,
|
|
170512
170945
|
type: variable.type,
|
|
170513
|
-
properties: convertApiVariables(variable.properties)
|
|
170946
|
+
properties: convertApiVariables(variable.properties),
|
|
170514
170947
|
};
|
|
170515
170948
|
case "array": {
|
|
170516
170949
|
return {
|
|
170517
170950
|
...variable,
|
|
170518
170951
|
type: variable.type,
|
|
170519
|
-
elementType: { type: "number", name: "number" }
|
|
170952
|
+
elementType: { type: "number", name: "number" },
|
|
170520
170953
|
};
|
|
170521
170954
|
}
|
|
170522
170955
|
default:
|
|
@@ -170534,43 +170967,47 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170534
170967
|
const editorProfile = {
|
|
170535
170968
|
bundles: [...sdkPredefinedProfile.bundles],
|
|
170536
170969
|
variables: [],
|
|
170537
|
-
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
|
|
170970
|
+
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
|
|
170538
170971
|
};
|
|
170539
170972
|
// Merge the SDK variables' definitions/properties with the predefined profile definitions.
|
|
170540
|
-
sdkPredefinedProfile.variables.forEach((
|
|
170973
|
+
sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
|
|
170541
170974
|
// Don't include disabled variables
|
|
170542
|
-
if (predefinedProfile.disabledVariables?.includes(
|
|
170975
|
+
if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
|
|
170543
170976
|
return;
|
|
170544
170977
|
}
|
|
170545
|
-
// Try to get a definition from the predefined profile.
|
|
170546
|
-
const definition = predefinedProfile.definitions[
|
|
170978
|
+
// Try to get a definition from the predefined profile, for the variable that needs one.
|
|
170979
|
+
const definition = predefinedProfile.definitions[predefinedVariable.name];
|
|
170547
170980
|
// Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
|
|
170548
170981
|
// despite the type checking from the switch statement.
|
|
170549
|
-
switch (
|
|
170550
|
-
case "dictionary":
|
|
170982
|
+
switch (predefinedVariable.type) {
|
|
170983
|
+
case "dictionary": {
|
|
170551
170984
|
// For dictionary, we support properties overrride
|
|
170552
170985
|
return editorProfile.variables.push(convertApiVariable({
|
|
170553
|
-
...
|
|
170554
|
-
type:
|
|
170555
|
-
properties: Array.isArray(definition) ? [...definition] :
|
|
170986
|
+
...predefinedVariable,
|
|
170987
|
+
type: predefinedVariable.type,
|
|
170988
|
+
properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
|
|
170556
170989
|
}));
|
|
170990
|
+
}
|
|
170557
170991
|
case "feature":
|
|
170558
|
-
|
|
170559
|
-
|
|
170992
|
+
// If the definition is not valid, then we don't include it.
|
|
170993
|
+
if (!isFeatureDefinition(definition)) {
|
|
170994
|
+
return;
|
|
170560
170995
|
}
|
|
170561
|
-
return editorProfile.variables.push({ ...
|
|
170996
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170562
170997
|
case "featureSet":
|
|
170563
|
-
|
|
170564
|
-
|
|
170998
|
+
// If the definition is not valid, then we don't include it.
|
|
170999
|
+
if (!isFeatureSetDefinition(definition)) {
|
|
171000
|
+
return;
|
|
170565
171001
|
}
|
|
170566
|
-
return editorProfile.variables.push({ ...
|
|
171002
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170567
171003
|
case "featureSetCollection":
|
|
170568
|
-
|
|
170569
|
-
|
|
171004
|
+
// If the definition is not valid, then we don't include it.
|
|
171005
|
+
if (!isFeatureSetCollectionDefinition(definition)) {
|
|
171006
|
+
return;
|
|
170570
171007
|
}
|
|
170571
|
-
return editorProfile.variables.push({ ...
|
|
171008
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170572
171009
|
default:
|
|
170573
|
-
return editorProfile.variables.push(convertApiVariable(
|
|
171010
|
+
return editorProfile.variables.push(convertApiVariable(predefinedVariable));
|
|
170574
171011
|
}
|
|
170575
171012
|
});
|
|
170576
171013
|
if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
|
|
@@ -170581,7 +171018,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170581
171018
|
|
|
170582
171019
|
const arcadeLanguageId = "arcade";
|
|
170583
171020
|
const defaultContext = {
|
|
170584
|
-
locale: "en"
|
|
171021
|
+
locale: "en",
|
|
170585
171022
|
};
|
|
170586
171023
|
class ArcadeLanguageServiceDefaults {
|
|
170587
171024
|
constructor() {
|
|
@@ -170635,7 +171072,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170635
171072
|
if (isPredefinedProfile(definition)) {
|
|
170636
171073
|
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
170637
171074
|
}
|
|
170638
|
-
const intlStrings = await
|
|
171075
|
+
const intlStrings = await fetchT9NStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
170639
171076
|
if (!intlStrings) {
|
|
170640
171077
|
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
170641
171078
|
}
|
|
@@ -170647,7 +171084,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170647
171084
|
this.updateApiContextForModel(modelId, {
|
|
170648
171085
|
locale: apiContext.locale,
|
|
170649
171086
|
profile: apiProfile,
|
|
170650
|
-
snippets: apiContext.snippets
|
|
171087
|
+
snippets: apiContext.snippets,
|
|
170651
171088
|
});
|
|
170652
171089
|
}
|
|
170653
171090
|
/**
|
|
@@ -170714,7 +171151,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170714
171151
|
}
|
|
170715
171152
|
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
170716
171153
|
const arcade = {
|
|
170717
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
|
|
171154
|
+
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
170718
171155
|
};
|
|
170719
171156
|
|
|
170720
|
-
export { B, D,
|
|
171157
|
+
export { KeyMod as A, monaco_editor_core_star as B, typescriptDefaults as C, Deferred as D, main as E, debounce as F, Emitter as G, IStandaloneThemeService as I, KeyCode as K, MarkerSeverity as M, Range as R, StandaloneServices as S, Uri as U, arcade as a, camelToKebab as b, commonjsGlobal as c, safeAsyncCall as d, editor as e, devToolsAwareTimeout as f, generateTokensCSSForColorMap as g, startLocaleObserver as h, getElementLocales as i, isURL as j, hasSameOrigin as k, importRequest as l, languages as m, arcadeDefaults as n, setFocusOnElement as o, filterCollection as p, addLTRMark as q, importArcade as r, safeCall as s, generateGuid as t, getElementTheme as u, setValuesInString as v, quoteString as w, supportedFields as x, createFilterExpression as y, observeAncestorsMutation as z };
|