@arcgis/coding-components 4.30.0-next.6 → 4.30.0-next.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
- package/dist/arcgis-coding-components/assets/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-5adc9cfb.js → p-318fb418.js} +2 -2
- package/dist/arcgis-coding-components/{p-9d1d979c.js → p-38edc354.js} +1 -1
- package/dist/arcgis-coding-components/p-3b6e229e.entry.js +6 -0
- package/dist/arcgis-coding-components/p-4823505e.js +68 -0
- package/dist/arcgis-coding-components/{p-90fb100f.js → p-705469d1.js} +2 -2
- package/dist/arcgis-coding-components/{p-d196feb5.js → p-92bd8457.js} +2 -2
- package/dist/arcgis-coding-components/p-981cd353.js +7 -0
- package/dist/arcgis-coding-components/{p-7ca4aa88.js → p-c0ae53b1.js} +3 -3
- package/dist/arcgis-coding-components/{p-5d6fc1e7.js → p-c51ea67a.js} +2 -2
- package/dist/arcgis-coding-components/{p-ef4155a9.js → p-cd56cf49.js} +3 -3
- package/dist/arcgis-coding-components/{p-b9722015.js → p-cfc6adab.js} +2 -2
- package/dist/arcgis-coding-components/{p-eb917f3a.js → p-f661a8d3.js} +2 -2
- package/dist/cjs/{arcade-defaults-70b8df41.js → arcade-defaults-5c1c0ecb.js} +587 -233
- package/dist/cjs/{arcade-mode-414c66f4.js → arcade-mode-6fa9d9f6.js} +45 -51
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1558 -289
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-0300126d.js → css-0dd4f61e.js} +1 -1
- package/dist/cjs/{cssMode-639e66e0.js → cssMode-b840c8b5.js} +3 -3
- package/dist/cjs/{html-e3fdf204.js → html-009b9fcc.js} +3 -3
- package/dist/cjs/{htmlMode-10f18c9b.js → htmlMode-7acf57eb.js} +3 -3
- package/dist/cjs/{index-adc344c5.js → index-1e515ac1.js} +40 -4
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-aa185858.js → javascript-e87b1198.js} +4 -4
- package/dist/cjs/{jsonMode-f518f7ed.js → jsonMode-3be3c50a.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-26a73467.js → tsMode-c2c38c3a.js} +3 -3
- package/dist/cjs/{typescript-15f88a16.js → typescript-ebffaab1.js} +3 -3
- package/dist/components/arcade-api.js +21 -32
- package/dist/components/arcade-contribution.js +71 -12
- package/dist/components/arcade-defaults.js +119 -133
- package/dist/components/arcade-mode.js +44 -50
- package/dist/components/arcade-results.js +47 -60
- package/dist/components/arcade-suggestions.js +23 -33
- package/dist/components/arcade-variables.js +22 -36
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +60 -150
- 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-A2KF2X73.js +1273 -0
- package/dist/components/code-editor.js +70 -78
- package/dist/components/fields.js +40 -44
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +372 -3
- package/dist/components/markdown.js +9 -11
- package/dist/components/useT9n.js +35 -0
- package/dist/components/utilities.js +3 -3
- package/dist/esm/{arcade-defaults-87f41324.js → arcade-defaults-ac123ced.js} +571 -220
- package/dist/esm/{arcade-mode-391974e7.js → arcade-mode-957a60b5.js} +45 -51
- package/dist/esm/arcgis-arcade-api_6.entry.js +1558 -289
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-2e473dc7.js → css-9f99ae66.js} +1 -1
- package/dist/esm/{cssMode-17d87e3a.js → cssMode-b89fc46f.js} +3 -3
- package/dist/esm/{html-8b3066e6.js → html-645adbbc.js} +3 -3
- package/dist/esm/{htmlMode-ad2b857d.js → htmlMode-fc416dae.js} +3 -3
- package/dist/esm/{index-e85ba44c.js → index-d4c5ac07.js} +40 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-00a0be9d.js → javascript-830b5438.js} +4 -4
- package/dist/esm/{jsonMode-b6f2e0b4.js → jsonMode-aed4f2cc.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-84b08f5b.js → tsMode-4b3dff8e.js} +3 -3
- package/dist/esm/{typescript-f47937d0.js → typescript-1ea81da5.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 +27 -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 +11 -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 +15 -13
- package/dist/types/utils/profile/utils.d.ts +1 -2
- package/package.json +21 -20
- package/dist/arcgis-coding-components/p-1fc82a07.js +0 -68
- package/dist/arcgis-coding-components/p-1feca957.js +0 -7
- package/dist/arcgis-coding-components/p-27cce129.entry.js +0 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.62
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-1e515ac1.js');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
11
11
|
if (e && e.__esModule) return e;
|
|
@@ -20641,7 +20641,7 @@ class DragAndDropObserver extends Disposable {
|
|
|
20641
20641
|
}
|
|
20642
20642
|
}
|
|
20643
20643
|
const H_REGEX = /(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;
|
|
20644
|
-
function h
|
|
20644
|
+
function h(tag, ...args) {
|
|
20645
20645
|
let attributes;
|
|
20646
20646
|
let children;
|
|
20647
20647
|
if (Array.isArray(args[0])) {
|
|
@@ -113897,15 +113897,15 @@ class LinesLayout {
|
|
|
113897
113897
|
}
|
|
113898
113898
|
class MovedBlockOverlayWidget extends ViewZoneOverlayWidget {
|
|
113899
113899
|
constructor(_editor, _viewZone, _move, _kind, _diffModel) {
|
|
113900
|
-
const root = h
|
|
113900
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
113901
113901
|
super(_editor, _viewZone, root.root);
|
|
113902
113902
|
this._editor = _editor;
|
|
113903
113903
|
this._move = _move;
|
|
113904
113904
|
this._kind = _kind;
|
|
113905
113905
|
this._diffModel = _diffModel;
|
|
113906
|
-
this._nodes = h
|
|
113907
|
-
h
|
|
113908
|
-
h
|
|
113906
|
+
this._nodes = h('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
|
|
113907
|
+
h('div.text-content@textContent'),
|
|
113908
|
+
h('div.action-bar@actionBar'),
|
|
113909
113909
|
]);
|
|
113910
113910
|
root.root.appendChild(this._nodes.root);
|
|
113911
113911
|
const editorLayout = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114104,7 +114104,7 @@ class RevertButton {
|
|
|
114104
114104
|
this._diffs = _diffs;
|
|
114105
114105
|
this._selection = _selection;
|
|
114106
114106
|
this._id = `revertButton${RevertButton.counter++}`;
|
|
114107
|
-
this._domNode = h
|
|
114107
|
+
this._domNode = h('div.revertButton', {
|
|
114108
114108
|
title: this._selection
|
|
114109
114109
|
? localize('revertSelectedChanges', 'Revert Selected Changes')
|
|
114110
114110
|
: localize('revertChange', 'Revert Change')
|
|
@@ -114577,7 +114577,7 @@ HideUnchangedRegionsFeature = __decorate$1B([
|
|
|
114577
114577
|
], HideUnchangedRegionsFeature);
|
|
114578
114578
|
class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
114579
114579
|
constructor(_editor, _viewZone, _unchangedRegion, _unchangedRegionRange, _hide, _modifiedOutlineSource, _revealModifiedHiddenLine, _options) {
|
|
114580
|
-
const root = h
|
|
114580
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
114581
114581
|
super(_editor, _viewZone, root.root);
|
|
114582
114582
|
this._editor = _editor;
|
|
114583
114583
|
this._unchangedRegion = _unchangedRegion;
|
|
@@ -114586,13 +114586,13 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114586
114586
|
this._modifiedOutlineSource = _modifiedOutlineSource;
|
|
114587
114587
|
this._revealModifiedHiddenLine = _revealModifiedHiddenLine;
|
|
114588
114588
|
this._options = _options;
|
|
114589
|
-
this._nodes = h
|
|
114590
|
-
h
|
|
114591
|
-
h
|
|
114592
|
-
h
|
|
114593
|
-
h
|
|
114589
|
+
this._nodes = h('div.diff-hidden-lines', [
|
|
114590
|
+
h('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
|
|
114591
|
+
h('div.center@content', { style: { display: 'flex' } }, [
|
|
114592
|
+
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)'))]),
|
|
114593
|
+
h('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
|
|
114594
114594
|
]),
|
|
114595
|
-
h
|
|
114595
|
+
h('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
|
|
114596
114596
|
]);
|
|
114597
114597
|
root.root.appendChild(this._nodes.root);
|
|
114598
114598
|
const layoutInfo = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114717,7 +114717,7 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114717
114717
|
for (let i = 0; i < items.length; i++) {
|
|
114718
114718
|
const item = items[i];
|
|
114719
114719
|
const icon = SymbolKinds.toIcon(item.kind);
|
|
114720
|
-
const divItem = h
|
|
114720
|
+
const divItem = h('div.breadcrumb-item', {
|
|
114721
114721
|
style: { display: 'flex', alignItems: 'center' },
|
|
114722
114722
|
}, [
|
|
114723
114723
|
renderIcon(icon),
|
|
@@ -116134,7 +116134,7 @@ let OverviewRulerPart = OverviewRulerPart_1 = class OverviewRulerPart extends Di
|
|
|
116134
116134
|
const viewportDomElement = createFastDomNode(document.createElement('div'));
|
|
116135
116135
|
viewportDomElement.setClassName('diffViewport');
|
|
116136
116136
|
viewportDomElement.setPosition('absolute');
|
|
116137
|
-
const diffOverviewRoot = h
|
|
116137
|
+
const diffOverviewRoot = h('div.diffOverview', {
|
|
116138
116138
|
style: { position: 'absolute', top: '0px', width: OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px' }
|
|
116139
116139
|
}).root;
|
|
116140
116140
|
this._register(appendRemoveOnDispose(diffOverviewRoot, viewportDomElement.domNode));
|
|
@@ -116614,11 +116614,11 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
116614
116614
|
this._parentInstantiationService = _parentInstantiationService;
|
|
116615
116615
|
this._audioCueService = _audioCueService;
|
|
116616
116616
|
this._editorProgressService = _editorProgressService;
|
|
116617
|
-
this.elements = h
|
|
116618
|
-
h
|
|
116619
|
-
h
|
|
116620
|
-
h
|
|
116621
|
-
h
|
|
116617
|
+
this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
|
|
116618
|
+
h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
|
|
116619
|
+
h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
|
|
116620
|
+
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
|
|
116621
|
+
h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
|
|
116622
116622
|
]);
|
|
116623
116623
|
this._diffModel = observableValue(this, undefined);
|
|
116624
116624
|
this._shouldDisposeDiffModel = false;
|
|
@@ -117752,8 +117752,8 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117752
117752
|
return { maxScroll: scroll2, width: this._originalWidth.read(reader) };
|
|
117753
117753
|
}
|
|
117754
117754
|
});
|
|
117755
|
-
this._elements = h
|
|
117756
|
-
h
|
|
117755
|
+
this._elements = h('div.multiDiffEntry', [
|
|
117756
|
+
h('div.content', {
|
|
117757
117757
|
style: {
|
|
117758
117758
|
display: 'flex',
|
|
117759
117759
|
flexDirection: 'column',
|
|
@@ -117761,19 +117761,19 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117761
117761
|
overflow: 'hidden',
|
|
117762
117762
|
}
|
|
117763
117763
|
}, [
|
|
117764
|
-
h
|
|
117765
|
-
h
|
|
117766
|
-
h
|
|
117767
|
-
h
|
|
117764
|
+
h('div.header@header', [
|
|
117765
|
+
h('div.collapse-button@collapseButton'),
|
|
117766
|
+
h('div.title.show-file-icons@title', []),
|
|
117767
|
+
h('div.actions@actions'),
|
|
117768
117768
|
]),
|
|
117769
|
-
h
|
|
117769
|
+
h('div.editorParent', {
|
|
117770
117770
|
style: {
|
|
117771
117771
|
flex: '1',
|
|
117772
117772
|
display: 'flex',
|
|
117773
117773
|
flexDirection: 'column',
|
|
117774
117774
|
}
|
|
117775
117775
|
}, [
|
|
117776
|
-
h
|
|
117776
|
+
h('div.editorContainer@editor', { style: { flex: '1' } }),
|
|
117777
117777
|
])
|
|
117778
117778
|
])
|
|
117779
117779
|
]);
|
|
@@ -117974,17 +117974,17 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
|
|
|
117974
117974
|
this._workbenchUIElementFactory = _workbenchUIElementFactory;
|
|
117975
117975
|
this._parentContextKeyService = _parentContextKeyService;
|
|
117976
117976
|
this._parentInstantiationService = _parentInstantiationService;
|
|
117977
|
-
this._elements = h
|
|
117977
|
+
this._elements = h('div', {
|
|
117978
117978
|
style: {
|
|
117979
117979
|
overflowY: 'hidden',
|
|
117980
117980
|
}
|
|
117981
117981
|
}, [
|
|
117982
|
-
h
|
|
117982
|
+
h('div@content', {
|
|
117983
117983
|
style: {
|
|
117984
117984
|
overflow: 'hidden',
|
|
117985
117985
|
}
|
|
117986
117986
|
}),
|
|
117987
|
-
h
|
|
117987
|
+
h('div.monaco-editor@overflowWidgetsDomNode', {}),
|
|
117988
117988
|
]);
|
|
117989
117989
|
this._sizeObserver = this._register(new ObservableElementSizeObserver(this._element, undefined));
|
|
117990
117990
|
this._objectPool = this._register(new ObjectPool((data) => {
|
|
@@ -120544,7 +120544,7 @@ registerLanguage({
|
|
|
120544
120544
|
mimetypes: ["text/css"],
|
|
120545
120545
|
loader: () => {
|
|
120546
120546
|
{
|
|
120547
|
-
return Promise.resolve().then(function () { return require('./css-
|
|
120547
|
+
return Promise.resolve().then(function () { return require('./css-0dd4f61e.js'); });
|
|
120548
120548
|
}
|
|
120549
120549
|
}
|
|
120550
120550
|
});
|
|
@@ -120562,7 +120562,7 @@ registerLanguage({
|
|
|
120562
120562
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120563
120563
|
loader: () => {
|
|
120564
120564
|
{
|
|
120565
|
-
return Promise.resolve().then(function () { return require('./html-
|
|
120565
|
+
return Promise.resolve().then(function () { return require('./html-009b9fcc.js'); });
|
|
120566
120566
|
}
|
|
120567
120567
|
}
|
|
120568
120568
|
});
|
|
@@ -120582,7 +120582,7 @@ registerLanguage({
|
|
|
120582
120582
|
mimetypes: ["text/javascript"],
|
|
120583
120583
|
loader: () => {
|
|
120584
120584
|
{
|
|
120585
|
-
return Promise.resolve().then(function () { return require('./javascript-
|
|
120585
|
+
return Promise.resolve().then(function () { return require('./javascript-e87b1198.js'); });
|
|
120586
120586
|
}
|
|
120587
120587
|
}
|
|
120588
120588
|
});
|
|
@@ -120600,7 +120600,7 @@ registerLanguage({
|
|
|
120600
120600
|
mimetypes: ["text/typescript"],
|
|
120601
120601
|
loader: () => {
|
|
120602
120602
|
{
|
|
120603
|
-
return Promise.resolve().then(function () { return require('./typescript-
|
|
120603
|
+
return Promise.resolve().then(function () { return require('./typescript-ebffaab1.js'); });
|
|
120604
120604
|
}
|
|
120605
120605
|
}
|
|
120606
120606
|
});
|
|
@@ -120721,7 +120721,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120721
120721
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120722
120722
|
function getMode$3() {
|
|
120723
120723
|
{
|
|
120724
|
-
return Promise.resolve().then(function () { return require('./cssMode-
|
|
120724
|
+
return Promise.resolve().then(function () { return require('./cssMode-b840c8b5.js'); });
|
|
120725
120725
|
}
|
|
120726
120726
|
}
|
|
120727
120727
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120846,7 +120846,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120846
120846
|
};
|
|
120847
120847
|
function getMode$2() {
|
|
120848
120848
|
{
|
|
120849
|
-
return Promise.resolve().then(function () { return require('./htmlMode-
|
|
120849
|
+
return Promise.resolve().then(function () { return require('./htmlMode-7acf57eb.js'); });
|
|
120850
120850
|
}
|
|
120851
120851
|
}
|
|
120852
120852
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120948,7 +120948,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120948
120948
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120949
120949
|
function getMode$1() {
|
|
120950
120950
|
{
|
|
120951
|
-
return Promise.resolve().then(function () { return require('./jsonMode-
|
|
120951
|
+
return Promise.resolve().then(function () { return require('./jsonMode-3be3c50a.js'); });
|
|
120952
120952
|
}
|
|
120953
120953
|
}
|
|
120954
120954
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121217,7 +121217,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121217
121217
|
};
|
|
121218
121218
|
function getMode() {
|
|
121219
121219
|
{
|
|
121220
|
-
return Promise.resolve().then(function () { return require('./tsMode-
|
|
121220
|
+
return Promise.resolve().then(function () { return require('./tsMode-c2c38c3a.js'); });
|
|
121221
121221
|
}
|
|
121222
121222
|
}
|
|
121223
121223
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -132875,8 +132875,8 @@ let InlineSuggestionHintsContentWidget = InlineSuggestionHintsContentWidget_1 =
|
|
|
132875
132875
|
this.id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget_1.id++}`;
|
|
132876
132876
|
this.allowEditorOverflow = true;
|
|
132877
132877
|
this.suppressMouseDown = false;
|
|
132878
|
-
this.nodes = h
|
|
132879
|
-
h
|
|
132878
|
+
this.nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
|
|
132879
|
+
h('div@toolBar'),
|
|
132880
132880
|
]);
|
|
132881
132881
|
this.previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon));
|
|
132882
132882
|
this.availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false);
|
|
@@ -133012,7 +133012,7 @@ class StatusBarViewItem$1 extends MenuEntryActionViewItem {
|
|
|
133012
133012
|
return super.updateLabel();
|
|
133013
133013
|
}
|
|
133014
133014
|
if (this.label) {
|
|
133015
|
-
const div = h
|
|
133015
|
+
const div = h('div.keybinding').root;
|
|
133016
133016
|
const k = new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions });
|
|
133017
133017
|
k.set(kb);
|
|
133018
133018
|
this.label.textContent = this._action.label;
|
|
@@ -168947,68 +168947,64 @@ var main = createCommonjsModule(function (module, exports) {
|
|
|
168947
168947
|
});
|
|
168948
168948
|
});
|
|
168949
168949
|
|
|
168950
|
-
|
|
168950
|
+
// src/index.ts
|
|
168951
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
168951
168952
|
function isDefaultModule(module) {
|
|
168952
|
-
|
|
168953
|
-
}
|
|
168954
|
-
async function requireModule(modulePath) {
|
|
168955
|
-
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
168956
|
-
resolve(moduleDefault);
|
|
168957
|
-
}));
|
|
168953
|
+
return module.default !== void 0;
|
|
168958
168954
|
}
|
|
168959
168955
|
async function importLayersFeatureLayer() {
|
|
168960
|
-
|
|
168961
|
-
|
|
168962
|
-
|
|
168963
|
-
|
|
168964
|
-
|
|
168956
|
+
if (isAMD) {
|
|
168957
|
+
return await window.$arcgis.import("esri/layers/FeatureLayer");
|
|
168958
|
+
}
|
|
168959
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/layers/FeatureLayer.js')); });
|
|
168960
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168965
168961
|
}
|
|
168966
168962
|
async function importPortalPortalItem() {
|
|
168967
|
-
|
|
168968
|
-
|
|
168969
|
-
|
|
168970
|
-
|
|
168971
|
-
|
|
168963
|
+
if (isAMD) {
|
|
168964
|
+
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
168965
|
+
}
|
|
168966
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/portal/PortalItem.js')); });
|
|
168967
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168972
168968
|
}
|
|
168973
168969
|
async function newPortalPortalItem(properties) {
|
|
168974
|
-
|
|
168975
|
-
|
|
168970
|
+
const ModConstructor = await importPortalPortalItem();
|
|
168971
|
+
return new ModConstructor(properties);
|
|
168976
168972
|
}
|
|
168977
168973
|
async function importWebMap() {
|
|
168978
|
-
|
|
168979
|
-
|
|
168980
|
-
|
|
168981
|
-
|
|
168982
|
-
|
|
168974
|
+
if (isAMD) {
|
|
168975
|
+
return await window.$arcgis.import("esri/WebMap");
|
|
168976
|
+
}
|
|
168977
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebMap.js')); });
|
|
168978
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168983
168979
|
}
|
|
168984
168980
|
async function newWebMap(properties) {
|
|
168985
|
-
|
|
168986
|
-
|
|
168981
|
+
const ModConstructor = await importWebMap();
|
|
168982
|
+
return new ModConstructor(properties);
|
|
168987
168983
|
}
|
|
168988
168984
|
async function importWebScene() {
|
|
168989
|
-
|
|
168990
|
-
|
|
168991
|
-
|
|
168992
|
-
|
|
168993
|
-
|
|
168985
|
+
if (isAMD) {
|
|
168986
|
+
return await window.$arcgis.import("esri/WebScene");
|
|
168987
|
+
}
|
|
168988
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebScene.js')); });
|
|
168989
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168994
168990
|
}
|
|
168995
168991
|
async function newWebScene(properties) {
|
|
168996
|
-
|
|
168997
|
-
|
|
168992
|
+
const ModConstructor = await importWebScene();
|
|
168993
|
+
return new ModConstructor(properties);
|
|
168998
168994
|
}
|
|
168999
168995
|
async function importArcade() {
|
|
169000
|
-
|
|
169001
|
-
|
|
169002
|
-
|
|
169003
|
-
|
|
169004
|
-
|
|
168996
|
+
if (isAMD) {
|
|
168997
|
+
return await window.$arcgis.import("esri/arcade");
|
|
168998
|
+
}
|
|
168999
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/arcade.js')); });
|
|
169000
|
+
return isDefaultModule(module) ? module.default : module;
|
|
169005
169001
|
}
|
|
169006
169002
|
async function importRequest() {
|
|
169007
|
-
|
|
169008
|
-
|
|
169009
|
-
|
|
169010
|
-
|
|
169011
|
-
|
|
169003
|
+
if (isAMD) {
|
|
169004
|
+
return await window.$arcgis.import("esri/request");
|
|
169005
|
+
}
|
|
169006
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/request.js')); });
|
|
169007
|
+
return isDefaultModule(module) ? module.default : module;
|
|
169012
169008
|
}
|
|
169013
169009
|
|
|
169014
169010
|
//#region core adapter fix
|
|
@@ -169019,20 +169015,6 @@ async function newFeatureLayer(definition) {
|
|
|
169019
169015
|
}
|
|
169020
169016
|
//#endregion
|
|
169021
169017
|
//#region Type Guards
|
|
169022
|
-
function isSupportedLayerInstance(item) {
|
|
169023
|
-
return (!!item &&
|
|
169024
|
-
typeof item === "object" &&
|
|
169025
|
-
"declaredClass" in item &&
|
|
169026
|
-
typeof item.declaredClass === "string" &&
|
|
169027
|
-
item.declaredClass.startsWith("esri.layers."));
|
|
169028
|
-
}
|
|
169029
|
-
function isFeatureSetInstance(item) {
|
|
169030
|
-
return (!!item &&
|
|
169031
|
-
typeof item === "object" &&
|
|
169032
|
-
"declaredClass" in item &&
|
|
169033
|
-
typeof item.declaredClass === "string" &&
|
|
169034
|
-
item.declaredClass === "esri.rest.support.FeatureSet");
|
|
169035
|
-
}
|
|
169036
169018
|
function isQueryableLayerInstance(item) {
|
|
169037
169019
|
return (!!item &&
|
|
169038
169020
|
typeof item === "object" &&
|
|
@@ -169082,10 +169064,13 @@ function isFeatureLayerItemDefinition(item) {
|
|
|
169082
169064
|
return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
|
|
169083
169065
|
}
|
|
169084
169066
|
function isFieldsDefinition(item) {
|
|
169085
|
-
return
|
|
169067
|
+
return !!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields);
|
|
169086
169068
|
}
|
|
169087
169069
|
function isUrlDefinition(item) {
|
|
169088
|
-
return
|
|
169070
|
+
return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
|
|
169071
|
+
}
|
|
169072
|
+
function isSupportedServiceUrlDefinition(item) {
|
|
169073
|
+
return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
|
|
169089
169074
|
}
|
|
169090
169075
|
function isSubtypeInstance(item) {
|
|
169091
169076
|
return (!!item &&
|
|
@@ -169155,7 +169140,7 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
169155
169140
|
return null;
|
|
169156
169141
|
}
|
|
169157
169142
|
let source = null;
|
|
169158
|
-
if (
|
|
169143
|
+
if (isFieldsDefinition(definition)) {
|
|
169159
169144
|
source = definition;
|
|
169160
169145
|
}
|
|
169161
169146
|
else {
|
|
@@ -169172,30 +169157,404 @@ async function serviceMetaData(url) {
|
|
|
169172
169157
|
const response = await request(url, { responseType: "json", query: { f: "json" } });
|
|
169173
169158
|
const data = {
|
|
169174
169159
|
layers: response.data?.layers ?? [],
|
|
169175
|
-
tables: response.data?.tables ?? []
|
|
169160
|
+
tables: response.data?.tables ?? [],
|
|
169176
169161
|
};
|
|
169177
169162
|
const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
|
|
169178
|
-
const layers =
|
|
169179
|
-
const tables =
|
|
169163
|
+
const layers = getSupportedLayerInfos(data.layers, queryCapability);
|
|
169164
|
+
const tables = getSupportedLayerInfos(data.tables, queryCapability);
|
|
169180
169165
|
return { layers, tables };
|
|
169181
169166
|
}
|
|
169182
|
-
function
|
|
169167
|
+
function getSupportedLayerInfos(layers, queryCapability) {
|
|
169183
169168
|
return layers.filter((layer) => {
|
|
169184
|
-
|
|
169185
|
-
|
|
169169
|
+
switch (layer.type) {
|
|
169170
|
+
case "Feature Layer":
|
|
169171
|
+
case "Oriented Imagery Layer":
|
|
169172
|
+
case "Table": {
|
|
169173
|
+
const capabilities = layer.capabilities
|
|
169174
|
+
? layer.capabilities
|
|
169175
|
+
.toLowerCase()
|
|
169176
|
+
.split(",")
|
|
169177
|
+
.map((value) => value.trim())
|
|
169178
|
+
: [];
|
|
169179
|
+
return capabilities.includes(queryCapability);
|
|
169180
|
+
}
|
|
169181
|
+
default:
|
|
169182
|
+
return false;
|
|
169186
169183
|
}
|
|
169187
|
-
const capabilities = layer.capabilities
|
|
169188
|
-
? layer.capabilities
|
|
169189
|
-
.toLowerCase()
|
|
169190
|
-
.split(",")
|
|
169191
|
-
.map((value) => value.trim())
|
|
169192
|
-
: [];
|
|
169193
|
-
return capabilities.includes(queryCapability);
|
|
169194
169184
|
});
|
|
169195
169185
|
}
|
|
169196
169186
|
//#endregion
|
|
169197
169187
|
|
|
169198
|
-
|
|
169188
|
+
// src/array-utils.ts
|
|
169189
|
+
|
|
169190
|
+
// src/deferred.ts
|
|
169191
|
+
var Deferred = class {
|
|
169192
|
+
/**
|
|
169193
|
+
* Resolves the promise.
|
|
169194
|
+
* @param value The value to resolve the promise with.
|
|
169195
|
+
*/
|
|
169196
|
+
resolve(_value) {
|
|
169197
|
+
}
|
|
169198
|
+
/**
|
|
169199
|
+
* Rejects the promise.
|
|
169200
|
+
*/
|
|
169201
|
+
reject(_error) {
|
|
169202
|
+
}
|
|
169203
|
+
/**
|
|
169204
|
+
* Creates a new deferred promise.
|
|
169205
|
+
*/
|
|
169206
|
+
constructor() {
|
|
169207
|
+
this.promise = new Promise((resolve, reject) => {
|
|
169208
|
+
this.resolve = resolve;
|
|
169209
|
+
this.reject = reject;
|
|
169210
|
+
});
|
|
169211
|
+
}
|
|
169212
|
+
};
|
|
169213
|
+
|
|
169214
|
+
// src/dom.ts
|
|
169215
|
+
function inTargetElement(element, targetElement) {
|
|
169216
|
+
let currentElement = element;
|
|
169217
|
+
while (currentElement) {
|
|
169218
|
+
if (currentElement === targetElement) {
|
|
169219
|
+
return true;
|
|
169220
|
+
}
|
|
169221
|
+
if (!currentElement.parentNode) {
|
|
169222
|
+
return false;
|
|
169223
|
+
}
|
|
169224
|
+
if (currentElement.parentNode instanceof ShadowRoot) {
|
|
169225
|
+
currentElement = currentElement.parentNode.host;
|
|
169226
|
+
} else {
|
|
169227
|
+
currentElement = currentElement.parentNode;
|
|
169228
|
+
}
|
|
169229
|
+
}
|
|
169230
|
+
return false;
|
|
169231
|
+
}
|
|
169232
|
+
function observeAncestorsMutation(element, attributeFilter, callback) {
|
|
169233
|
+
const { subscribe } = observe(attributeFilter);
|
|
169234
|
+
return subscribe((mutations) => {
|
|
169235
|
+
const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
|
|
169236
|
+
if (matched)
|
|
169237
|
+
callback();
|
|
169238
|
+
});
|
|
169239
|
+
}
|
|
169240
|
+
var observers = {};
|
|
169241
|
+
function observe(attributeFilter) {
|
|
169242
|
+
const attributes = attributeFilter.join(",");
|
|
169243
|
+
const previousObserver = observers[attributes];
|
|
169244
|
+
if (previousObserver !== void 0)
|
|
169245
|
+
return previousObserver;
|
|
169246
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
169247
|
+
const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
|
|
169248
|
+
mutationObserver.observe(document.documentElement, {
|
|
169249
|
+
attributes: true,
|
|
169250
|
+
attributeFilter,
|
|
169251
|
+
subtree: true
|
|
169252
|
+
});
|
|
169253
|
+
const observer = {
|
|
169254
|
+
subscribe(callback) {
|
|
169255
|
+
subscribers.add(callback);
|
|
169256
|
+
return {
|
|
169257
|
+
remove: () => {
|
|
169258
|
+
subscribers.delete(callback);
|
|
169259
|
+
if (subscribers.size === 0) {
|
|
169260
|
+
mutationObserver.disconnect();
|
|
169261
|
+
observers[attributes] = void 0;
|
|
169262
|
+
}
|
|
169263
|
+
}
|
|
169264
|
+
};
|
|
169265
|
+
}
|
|
169266
|
+
};
|
|
169267
|
+
observers[attributes] = observer;
|
|
169268
|
+
return observer;
|
|
169269
|
+
}
|
|
169270
|
+
function closestElement(base, selector) {
|
|
169271
|
+
let currentElement = base;
|
|
169272
|
+
while (currentElement) {
|
|
169273
|
+
const element = currentElement.closest(selector);
|
|
169274
|
+
if (element) {
|
|
169275
|
+
return element;
|
|
169276
|
+
}
|
|
169277
|
+
const rootElement = currentElement.getRootNode();
|
|
169278
|
+
if (rootElement === document) {
|
|
169279
|
+
return null;
|
|
169280
|
+
}
|
|
169281
|
+
currentElement = rootElement.host;
|
|
169282
|
+
}
|
|
169283
|
+
return null;
|
|
169284
|
+
}
|
|
169285
|
+
function getElementTheme(base) {
|
|
169286
|
+
const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
|
|
169287
|
+
return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
|
|
169288
|
+
}
|
|
169289
|
+
function getElementAttribute(el, prop, fallbackValue) {
|
|
169290
|
+
const closest = closestElement(el, `[${prop}]`);
|
|
169291
|
+
return closest?.getAttribute(prop) ?? fallbackValue;
|
|
169292
|
+
}
|
|
169293
|
+
function isElement(ref) {
|
|
169294
|
+
return ref.nodeType === Node.ELEMENT_NODE;
|
|
169295
|
+
}
|
|
169296
|
+
function isHTMLWithSetFocus(ref) {
|
|
169297
|
+
return "setFocus" in ref && typeof ref.setFocus === "function";
|
|
169298
|
+
}
|
|
169299
|
+
function setFocus(ref, selector = "") {
|
|
169300
|
+
if (!isElement(ref)) {
|
|
169301
|
+
return false;
|
|
169302
|
+
}
|
|
169303
|
+
if (ref.matches(selector)) {
|
|
169304
|
+
if (isHTMLWithSetFocus(ref)) {
|
|
169305
|
+
setTimeout(() => ref.setFocus(), 0);
|
|
169306
|
+
}
|
|
169307
|
+
return true;
|
|
169308
|
+
}
|
|
169309
|
+
for (const child of ref.children) {
|
|
169310
|
+
if (setFocus(child, selector)) {
|
|
169311
|
+
return true;
|
|
169312
|
+
}
|
|
169313
|
+
}
|
|
169314
|
+
const shadowRoot = ref.shadowRoot;
|
|
169315
|
+
if (shadowRoot) {
|
|
169316
|
+
for (const child of shadowRoot.children) {
|
|
169317
|
+
if (setFocus(child, selector)) {
|
|
169318
|
+
return true;
|
|
169319
|
+
}
|
|
169320
|
+
}
|
|
169321
|
+
}
|
|
169322
|
+
return false;
|
|
169323
|
+
}
|
|
169324
|
+
function setFocusOnElement(ref, selector) {
|
|
169325
|
+
if (!ref?.shadowRoot) {
|
|
169326
|
+
return;
|
|
169327
|
+
}
|
|
169328
|
+
if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
|
|
169329
|
+
setFocus(ref, selector);
|
|
169330
|
+
return;
|
|
169331
|
+
}
|
|
169332
|
+
const mutationObserver = new MutationObserver(() => {
|
|
169333
|
+
mutationObserver.disconnect();
|
|
169334
|
+
setFocus(ref, selector);
|
|
169335
|
+
});
|
|
169336
|
+
mutationObserver.observe(ref, {
|
|
169337
|
+
attributes: true,
|
|
169338
|
+
attributeFilter: ["hydrated", "calcite-hydrated"]
|
|
169339
|
+
});
|
|
169340
|
+
}
|
|
169341
|
+
|
|
169342
|
+
// src/errors.ts
|
|
169343
|
+
function safeCall(callback, thisContext, ...rest) {
|
|
169344
|
+
try {
|
|
169345
|
+
return callback?.call(thisContext, ...rest);
|
|
169346
|
+
} catch (error) {
|
|
169347
|
+
console.error(error, callback);
|
|
169348
|
+
}
|
|
169349
|
+
return void 0;
|
|
169350
|
+
}
|
|
169351
|
+
async function safeAsyncCall(callback, thisContext, ...rest) {
|
|
169352
|
+
try {
|
|
169353
|
+
const result = callback?.call(thisContext, ...rest);
|
|
169354
|
+
return result instanceof Promise ? await result : result;
|
|
169355
|
+
} catch (error) {
|
|
169356
|
+
console.error(error, callback);
|
|
169357
|
+
}
|
|
169358
|
+
return void 0;
|
|
169359
|
+
}
|
|
169360
|
+
|
|
169361
|
+
// src/guid.ts
|
|
169362
|
+
function gen(count) {
|
|
169363
|
+
let out = "";
|
|
169364
|
+
for (let i = 0; i < count; i++) {
|
|
169365
|
+
out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
169366
|
+
}
|
|
169367
|
+
return out;
|
|
169368
|
+
}
|
|
169369
|
+
function generateGuid() {
|
|
169370
|
+
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
169371
|
+
}
|
|
169372
|
+
var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
|
|
169373
|
+
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
169374
|
+
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
169375
|
+
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
169376
|
+
|
|
169377
|
+
// src/intl.ts
|
|
169378
|
+
var supportedLocales = /* @__PURE__ */ new Set([
|
|
169379
|
+
"ar",
|
|
169380
|
+
"bg",
|
|
169381
|
+
"bs",
|
|
169382
|
+
"ca",
|
|
169383
|
+
"cs",
|
|
169384
|
+
"da",
|
|
169385
|
+
"de",
|
|
169386
|
+
"el",
|
|
169387
|
+
"en",
|
|
169388
|
+
"es",
|
|
169389
|
+
"et",
|
|
169390
|
+
"fi",
|
|
169391
|
+
"fr",
|
|
169392
|
+
"he",
|
|
169393
|
+
"hr",
|
|
169394
|
+
"hu",
|
|
169395
|
+
"id",
|
|
169396
|
+
"it",
|
|
169397
|
+
"ja",
|
|
169398
|
+
"ko",
|
|
169399
|
+
"lt",
|
|
169400
|
+
"lv",
|
|
169401
|
+
"nl",
|
|
169402
|
+
"nb",
|
|
169403
|
+
"pl",
|
|
169404
|
+
"pt-BR",
|
|
169405
|
+
"pt-PT",
|
|
169406
|
+
"ro",
|
|
169407
|
+
"ru",
|
|
169408
|
+
"sk",
|
|
169409
|
+
"sl",
|
|
169410
|
+
"sr",
|
|
169411
|
+
"sv",
|
|
169412
|
+
"th",
|
|
169413
|
+
"tr",
|
|
169414
|
+
"uk",
|
|
169415
|
+
"vi",
|
|
169416
|
+
"zh-CN",
|
|
169417
|
+
"zh-HK",
|
|
169418
|
+
"zh-TW"
|
|
169419
|
+
]);
|
|
169420
|
+
var defaultLocale = "en";
|
|
169421
|
+
async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
|
|
169422
|
+
const path = `${assetsPath}/${prefix}`;
|
|
169423
|
+
const filePath = `${path}${locale}.json`;
|
|
169424
|
+
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
169425
|
+
return await t9nStringsCache[filePath];
|
|
169426
|
+
}
|
|
169427
|
+
var t9nStringsCache = {};
|
|
169428
|
+
async function fetchBundle(locale, path) {
|
|
169429
|
+
const filePath = `${path}${locale}.json`;
|
|
169430
|
+
try {
|
|
169431
|
+
const response = await fetch(filePath);
|
|
169432
|
+
if (response.ok)
|
|
169433
|
+
return await response.json();
|
|
169434
|
+
} catch (error) {
|
|
169435
|
+
console.error(error);
|
|
169436
|
+
return fallbackBundle;
|
|
169437
|
+
}
|
|
169438
|
+
if (locale === defaultLocale)
|
|
169439
|
+
return fallbackBundle;
|
|
169440
|
+
return await fetchBundle(defaultLocale, path);
|
|
169441
|
+
}
|
|
169442
|
+
var fallbackBundle = new Proxy(
|
|
169443
|
+
{},
|
|
169444
|
+
{
|
|
169445
|
+
get: (_target, property) => camelToHuman(property.toString())
|
|
169446
|
+
}
|
|
169447
|
+
);
|
|
169448
|
+
function getElementLocales(element) {
|
|
169449
|
+
const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
|
|
169450
|
+
if (supportedLocales.has(lang)) {
|
|
169451
|
+
return { lang, t9nLocale: lang };
|
|
169452
|
+
}
|
|
169453
|
+
const rootCode = lang.slice(0, 2);
|
|
169454
|
+
return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
|
|
169455
|
+
}
|
|
169456
|
+
function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
|
|
169457
|
+
let result = void 0;
|
|
169458
|
+
const callback = () => void updateComponentLocateState(element, assetsPath, assetName).then((newResult) => {
|
|
169459
|
+
if (result?.lang !== newResult.lang || result.t9nLocale !== newResult.t9nLocale || result.t9nStrings !== newResult.t9nStrings)
|
|
169460
|
+
onUpdated(newResult);
|
|
169461
|
+
result = newResult;
|
|
169462
|
+
}).catch(console.error);
|
|
169463
|
+
callback();
|
|
169464
|
+
return observeAncestorsMutation(element, ["lang"], callback);
|
|
169465
|
+
}
|
|
169466
|
+
async function updateComponentLocateState(element, assetsPath, assetName = element.tagName.toLowerCase().replace("arcgis-", "")) {
|
|
169467
|
+
const { lang, t9nLocale } = getElementLocales(element);
|
|
169468
|
+
const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
|
|
169469
|
+
const prefix = `${assetName}.t9n.`;
|
|
169470
|
+
const t9nStrings = await fetchT9NStringsBundle(t9nLocale, t9nAssetsPath, prefix);
|
|
169471
|
+
return { lang, t9nLocale, t9nStrings };
|
|
169472
|
+
}
|
|
169473
|
+
|
|
169474
|
+
// src/strings.ts
|
|
169475
|
+
var doubleQuote = '"';
|
|
169476
|
+
var singleQuote = "'";
|
|
169477
|
+
function repeatString(value, n) {
|
|
169478
|
+
return new Array(n + 1).join(value);
|
|
169479
|
+
}
|
|
169480
|
+
function quoteString(value) {
|
|
169481
|
+
let quote = doubleQuote;
|
|
169482
|
+
let alternateQuote = singleQuote;
|
|
169483
|
+
const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
|
|
169484
|
+
if (avoidEscape) {
|
|
169485
|
+
alternateQuote = doubleQuote;
|
|
169486
|
+
quote = singleQuote;
|
|
169487
|
+
}
|
|
169488
|
+
const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
|
|
169489
|
+
value = value.replace(
|
|
169490
|
+
alternateEscape,
|
|
169491
|
+
(_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
|
|
169492
|
+
// We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
|
|
169493
|
+
boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
|
|
169494
|
+
)
|
|
169495
|
+
);
|
|
169496
|
+
const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
|
|
169497
|
+
value = value.replace(
|
|
169498
|
+
quoteEscape,
|
|
169499
|
+
(_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
|
|
169500
|
+
);
|
|
169501
|
+
return quote + value + quote;
|
|
169502
|
+
}
|
|
169503
|
+
function createFilterExpression(filterWord) {
|
|
169504
|
+
const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
|
|
169505
|
+
return new RegExp(sanitizedWord, "i");
|
|
169506
|
+
}
|
|
169507
|
+
function setValuesInString(message, values = {}) {
|
|
169508
|
+
return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
|
|
169509
|
+
}
|
|
169510
|
+
function addLTRMark(value) {
|
|
169511
|
+
return `\u200E${value ?? ""}\u200E`;
|
|
169512
|
+
}
|
|
169513
|
+
|
|
169514
|
+
// src/type-guards.ts
|
|
169515
|
+
function isNotNull(item) {
|
|
169516
|
+
return item !== null;
|
|
169517
|
+
}
|
|
169518
|
+
function isNotUndefined(item) {
|
|
169519
|
+
return item !== void 0;
|
|
169520
|
+
}
|
|
169521
|
+
|
|
169522
|
+
// src/ui.ts
|
|
169523
|
+
function debounce(func, waitFor = 100) {
|
|
169524
|
+
let timeout;
|
|
169525
|
+
return (...args) => {
|
|
169526
|
+
const later = () => {
|
|
169527
|
+
clearTimeout(timeout);
|
|
169528
|
+
func(...args);
|
|
169529
|
+
};
|
|
169530
|
+
clearTimeout(timeout);
|
|
169531
|
+
timeout = setTimeout(later, waitFor);
|
|
169532
|
+
};
|
|
169533
|
+
}
|
|
169534
|
+
|
|
169535
|
+
// src/url.ts
|
|
169536
|
+
function hasSameOrigin(url1, url2, ignoreProtocol = false) {
|
|
169537
|
+
if (!url1 || !url2) {
|
|
169538
|
+
return false;
|
|
169539
|
+
}
|
|
169540
|
+
const url1Obj = new URL(url1);
|
|
169541
|
+
const url2Obj = new URL(url2);
|
|
169542
|
+
if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
|
|
169543
|
+
return false;
|
|
169544
|
+
}
|
|
169545
|
+
if (url1Obj.host == null || url2Obj.host == null) {
|
|
169546
|
+
return false;
|
|
169547
|
+
}
|
|
169548
|
+
return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
|
|
169549
|
+
}
|
|
169550
|
+
function isURL(url) {
|
|
169551
|
+
try {
|
|
169552
|
+
new URL(url);
|
|
169553
|
+
return true;
|
|
169554
|
+
} catch (e) {
|
|
169555
|
+
return false;
|
|
169556
|
+
}
|
|
169557
|
+
}
|
|
169199
169558
|
|
|
169200
169559
|
/**
|
|
169201
169560
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -169208,7 +169567,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
169208
169567
|
if (!_keys.length) {
|
|
169209
169568
|
return [];
|
|
169210
169569
|
}
|
|
169211
|
-
const filterExpression =
|
|
169570
|
+
const filterExpression = createFilterExpression(filterWord);
|
|
169212
169571
|
return collection.filter((item) => {
|
|
169213
169572
|
if (beforeFilteringFn) {
|
|
169214
169573
|
const res = beforeFilteringFn(item);
|
|
@@ -169408,8 +169767,8 @@ function variableToLSVariable(editorVariable, kind) {
|
|
|
169408
169767
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169409
169768
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169410
169769
|
kind,
|
|
169411
|
-
documentation: { kind: "markdown", value: description }
|
|
169412
|
-
}
|
|
169770
|
+
documentation: { kind: "markdown", value: description },
|
|
169771
|
+
},
|
|
169413
169772
|
};
|
|
169414
169773
|
}
|
|
169415
169774
|
async function featureToLSFeature(editorFeature, kind) {
|
|
@@ -169423,14 +169782,14 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169423
169782
|
insertText: name,
|
|
169424
169783
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169425
169784
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169426
|
-
kind
|
|
169785
|
+
kind,
|
|
169427
169786
|
};
|
|
169428
169787
|
const result = {
|
|
169429
169788
|
name,
|
|
169430
169789
|
description,
|
|
169431
169790
|
type: "dictionary",
|
|
169432
169791
|
properties: [],
|
|
169433
|
-
completion: resultCompletion
|
|
169792
|
+
completion: resultCompletion,
|
|
169434
169793
|
};
|
|
169435
169794
|
// No source definition, then it will be a feature without any known fields
|
|
169436
169795
|
if (!source) {
|
|
@@ -169468,8 +169827,8 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169468
169827
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169469
169828
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169470
169829
|
kind: main.CompletionItemKind.Field,
|
|
169471
|
-
documentation: { kind: "markdown", value: fieldCompletionDescription }
|
|
169472
|
-
}
|
|
169830
|
+
documentation: { kind: "markdown", value: fieldCompletionDescription },
|
|
169831
|
+
},
|
|
169473
169832
|
});
|
|
169474
169833
|
if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
|
|
169475
169834
|
return;
|
|
@@ -169490,8 +169849,8 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169490
169849
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169491
169850
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169492
169851
|
kind: main.CompletionItemKind.Field,
|
|
169493
|
-
documentation: { kind: "markdown", value: aliasCompletionDescription }
|
|
169494
|
-
}
|
|
169852
|
+
documentation: { kind: "markdown", value: aliasCompletionDescription },
|
|
169853
|
+
},
|
|
169495
169854
|
});
|
|
169496
169855
|
});
|
|
169497
169856
|
result.properties = [...fieldProfileValues, ...aliasProfileValues];
|
|
@@ -169524,8 +169883,8 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
|
|
|
169524
169883
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169525
169884
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169526
169885
|
kind,
|
|
169527
|
-
documentation: { kind: "markdown", value: completionDescription }
|
|
169528
|
-
}
|
|
169886
|
+
documentation: { kind: "markdown", value: completionDescription },
|
|
169887
|
+
},
|
|
169529
169888
|
};
|
|
169530
169889
|
}
|
|
169531
169890
|
/**
|
|
@@ -169552,9 +169911,9 @@ class ProfileItemBase {
|
|
|
169552
169911
|
// If the component is under RTL, the string is messed up.
|
|
169553
169912
|
// It is converted from $feature to feature$, This is not acceptable since the label
|
|
169554
169913
|
// represents a variable name. We are adding in front of the $ sign a right to left mark.
|
|
169555
|
-
return
|
|
169914
|
+
return addLTRMark(this._label);
|
|
169556
169915
|
}
|
|
169557
|
-
return
|
|
169916
|
+
return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
|
|
169558
169917
|
}
|
|
169559
169918
|
/**
|
|
169560
169919
|
* Returns the description string.
|
|
@@ -169566,7 +169925,7 @@ class ProfileItemBase {
|
|
|
169566
169925
|
if (typeof this.description === "string") {
|
|
169567
169926
|
return this.description;
|
|
169568
169927
|
}
|
|
169569
|
-
return
|
|
169928
|
+
return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
|
|
169570
169929
|
}
|
|
169571
169930
|
/**
|
|
169572
169931
|
* Returns true if the item pass the filter test
|
|
@@ -169743,28 +170102,28 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169743
170102
|
return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
|
|
169744
170103
|
case "featureSet":
|
|
169745
170104
|
return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
|
|
169746
|
-
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
|
|
170105
|
+
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
|
|
169747
170106
|
]);
|
|
169748
170107
|
case "featureSetCollection":
|
|
169749
170108
|
return new FeatureSetCollectionVariable(this, {
|
|
169750
170109
|
profile: this._profile,
|
|
169751
170110
|
declaration,
|
|
169752
170111
|
label: snippet,
|
|
169753
|
-
snippet
|
|
170112
|
+
snippet,
|
|
169754
170113
|
});
|
|
169755
170114
|
case "dictionary":
|
|
169756
170115
|
return new DictionaryVariable(this, {
|
|
169757
170116
|
profile: this._profile,
|
|
169758
170117
|
declaration,
|
|
169759
170118
|
label: snippet,
|
|
169760
|
-
snippet
|
|
170119
|
+
snippet,
|
|
169761
170120
|
});
|
|
169762
170121
|
case "array":
|
|
169763
170122
|
return new ArrayVariable({
|
|
169764
170123
|
profile: this._profile,
|
|
169765
170124
|
declaration,
|
|
169766
170125
|
label: snippet,
|
|
169767
|
-
snippet
|
|
170126
|
+
snippet,
|
|
169768
170127
|
});
|
|
169769
170128
|
default:
|
|
169770
170129
|
console.error("Editor profile: Invalid profile variable", declaration);
|
|
@@ -169776,7 +170135,7 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169776
170135
|
type: this.type,
|
|
169777
170136
|
name: "",
|
|
169778
170137
|
...this.declaration,
|
|
169779
|
-
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170138
|
+
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
169780
170139
|
};
|
|
169781
170140
|
}
|
|
169782
170141
|
}
|
|
@@ -169807,7 +170166,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169807
170166
|
return this._profile?.intlStrings.layer ?? "layer";
|
|
169808
170167
|
}
|
|
169809
170168
|
async loadSource() {
|
|
169810
|
-
if (
|
|
170169
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
169811
170170
|
return await this._loadPromise;
|
|
169812
170171
|
}
|
|
169813
170172
|
this._loadPromise = this._loadSource();
|
|
@@ -169842,7 +170201,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169842
170201
|
description: fieldAlias(field),
|
|
169843
170202
|
snippet: valueSnippet,
|
|
169844
170203
|
icon: fieldTypeToIconName(field),
|
|
169845
|
-
filterDescription: true
|
|
170204
|
+
filterDescription: true,
|
|
169846
170205
|
});
|
|
169847
170206
|
}
|
|
169848
170207
|
_getDomainDictionary(field) {
|
|
@@ -169935,7 +170294,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169935
170294
|
return null;
|
|
169936
170295
|
}
|
|
169937
170296
|
const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
|
|
169938
|
-
code: "domainvalues"
|
|
170297
|
+
code: "domainvalues",
|
|
169939
170298
|
});
|
|
169940
170299
|
const domainDictionary = this._createDomainDictionary(field);
|
|
169941
170300
|
domainDictionary.variables.push(domainValuesGroup);
|
|
@@ -169953,7 +170312,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169953
170312
|
profile: this._profile,
|
|
169954
170313
|
label: `${label}`,
|
|
169955
170314
|
description: t.name,
|
|
169956
|
-
snippet: `"${label}"
|
|
170315
|
+
snippet: `"${label}"`,
|
|
169957
170316
|
});
|
|
169958
170317
|
}) ?? [];
|
|
169959
170318
|
return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
|
|
@@ -169964,7 +170323,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169964
170323
|
label: `${v.code}`,
|
|
169965
170324
|
description: v.name,
|
|
169966
170325
|
snippet: `"${v.code}"`,
|
|
169967
|
-
filterDescription: true
|
|
170326
|
+
filterDescription: true,
|
|
169968
170327
|
}));
|
|
169969
170328
|
return new GroupOfVariables(this._profile, label, values);
|
|
169970
170329
|
}
|
|
@@ -169990,8 +170349,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169990
170349
|
code: "domainvaluesfortypeformat",
|
|
169991
170350
|
formatValues: {
|
|
169992
170351
|
fieldName: alias,
|
|
169993
|
-
typeName: type.name
|
|
169994
|
-
}
|
|
170352
|
+
typeName: type.name,
|
|
170353
|
+
},
|
|
169995
170354
|
});
|
|
169996
170355
|
const id = isSubtypeInstance(type) ? type.code : type.id;
|
|
169997
170356
|
const label = `${id}`;
|
|
@@ -170001,7 +170360,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170001
170360
|
label,
|
|
170002
170361
|
snippet,
|
|
170003
170362
|
description: type.name,
|
|
170004
|
-
declaration: { name: alias }
|
|
170363
|
+
declaration: { name: alias },
|
|
170005
170364
|
});
|
|
170006
170365
|
subtypeDictionary.variables = [domainValuesGroup];
|
|
170007
170366
|
variables.push(subtypeDictionary);
|
|
@@ -170023,7 +170382,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170023
170382
|
description: alias,
|
|
170024
170383
|
snippet: valueSnippet,
|
|
170025
170384
|
icon: "form-dropdown",
|
|
170026
|
-
declaration: { name: field.name }
|
|
170385
|
+
declaration: { name: field.name },
|
|
170027
170386
|
});
|
|
170028
170387
|
// Add the header group
|
|
170029
170388
|
const headerGroup = new GroupOfVariables(this._profile, alias, [
|
|
@@ -170031,8 +170390,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170031
170390
|
profile: this._profile,
|
|
170032
170391
|
label: valueSnippet,
|
|
170033
170392
|
description: "",
|
|
170034
|
-
snippet: valueSnippet
|
|
170035
|
-
})
|
|
170393
|
+
snippet: valueSnippet,
|
|
170394
|
+
}),
|
|
170036
170395
|
]);
|
|
170037
170396
|
domainDictionary.variables = [headerGroup];
|
|
170038
170397
|
// Add the SubtypeName or DomainName snippet if available
|
|
@@ -170042,7 +170401,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170042
170401
|
profile: this._profile,
|
|
170043
170402
|
label: subtypeOrDomainNameSnippet,
|
|
170044
170403
|
description: "",
|
|
170045
|
-
snippet: subtypeOrDomainNameSnippet
|
|
170404
|
+
snippet: subtypeOrDomainNameSnippet,
|
|
170046
170405
|
}));
|
|
170047
170406
|
}
|
|
170048
170407
|
return domainDictionary;
|
|
@@ -170072,10 +170431,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170072
170431
|
declaration: { definition: relatedLayer },
|
|
170073
170432
|
label: relatedLayer.title,
|
|
170074
170433
|
description: "",
|
|
170075
|
-
nonInteractive: true
|
|
170434
|
+
nonInteractive: true,
|
|
170076
170435
|
}, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
|
|
170077
170436
|
}));
|
|
170078
|
-
relationshipsGroup.variables = relationshipItems.filter(
|
|
170437
|
+
relationshipsGroup.variables = relationshipItems.filter(isNotNull);
|
|
170079
170438
|
if (!relationshipsGroup.variables.length) {
|
|
170080
170439
|
return null;
|
|
170081
170440
|
}
|
|
@@ -170088,8 +170447,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170088
170447
|
this.type = "feature";
|
|
170089
170448
|
}
|
|
170090
170449
|
get title() {
|
|
170091
|
-
if (
|
|
170092
|
-
return this._source.title;
|
|
170450
|
+
if (isTitleCapableSource(this._source)) {
|
|
170451
|
+
return this._source.title ?? "";
|
|
170093
170452
|
}
|
|
170094
170453
|
return { code: "feature" };
|
|
170095
170454
|
}
|
|
@@ -170103,14 +170462,14 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170103
170462
|
throw new Error("Invalid definition");
|
|
170104
170463
|
}
|
|
170105
170464
|
// The title group and snippet
|
|
170106
|
-
const title =
|
|
170465
|
+
const title = isTitleCapableSource(this._source) ? this._source.title ?? "" : "";
|
|
170107
170466
|
this.variables.push(new GroupOfVariables(this._profile, title, [
|
|
170108
170467
|
new ValueVariable({
|
|
170109
170468
|
profile: this._profile,
|
|
170110
170469
|
label: this.snippet,
|
|
170111
170470
|
description: "",
|
|
170112
|
-
snippet: this.snippet
|
|
170113
|
-
})
|
|
170471
|
+
snippet: this.snippet,
|
|
170472
|
+
}),
|
|
170114
170473
|
]));
|
|
170115
170474
|
// The collection of feature attribute values
|
|
170116
170475
|
const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
|
|
@@ -170125,7 +170484,7 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170125
170484
|
description: "Geometry",
|
|
170126
170485
|
snippet,
|
|
170127
170486
|
icon: "shapes",
|
|
170128
|
-
filterDescription: true
|
|
170487
|
+
filterDescription: true,
|
|
170129
170488
|
});
|
|
170130
170489
|
valuesGroup.variables.push(geometryProperty);
|
|
170131
170490
|
}
|
|
@@ -170138,8 +170497,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170138
170497
|
this.variables.push(relationshipsGroup);
|
|
170139
170498
|
}
|
|
170140
170499
|
}
|
|
170141
|
-
catch (
|
|
170142
|
-
console.error("
|
|
170500
|
+
catch (error) {
|
|
170501
|
+
console.error("Error with definition", error, this._definition);
|
|
170143
170502
|
this._source = null;
|
|
170144
170503
|
}
|
|
170145
170504
|
finally {
|
|
@@ -170161,8 +170520,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170161
170520
|
this.type = "featureSet";
|
|
170162
170521
|
}
|
|
170163
170522
|
get title() {
|
|
170164
|
-
if (
|
|
170165
|
-
return this._source.title;
|
|
170523
|
+
if (isTitleCapableSource(this._source)) {
|
|
170524
|
+
return this._source.title ?? "";
|
|
170166
170525
|
}
|
|
170167
170526
|
return { code: "featureset" };
|
|
170168
170527
|
}
|
|
@@ -170189,8 +170548,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170189
170548
|
this.variables.push(relationshipsGroup);
|
|
170190
170549
|
}
|
|
170191
170550
|
}
|
|
170192
|
-
catch (
|
|
170193
|
-
console.error("
|
|
170551
|
+
catch (error) {
|
|
170552
|
+
console.error("Error with definition", error, this._definition);
|
|
170194
170553
|
this._source = null;
|
|
170195
170554
|
}
|
|
170196
170555
|
finally {
|
|
@@ -170239,7 +170598,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170239
170598
|
return this._profile?.intlStrings.map ?? "map";
|
|
170240
170599
|
}
|
|
170241
170600
|
async loadSource() {
|
|
170242
|
-
if (
|
|
170601
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
170243
170602
|
return await this._loadPromise;
|
|
170244
170603
|
}
|
|
170245
170604
|
this._loadPromise = this._loadSource();
|
|
@@ -170260,24 +170619,24 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170260
170619
|
: {
|
|
170261
170620
|
code: "webmapformat",
|
|
170262
170621
|
formatValues: {
|
|
170263
|
-
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
|
|
170264
|
-
}
|
|
170622
|
+
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
|
|
170623
|
+
},
|
|
170265
170624
|
};
|
|
170266
170625
|
const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
|
|
170267
170626
|
new ValueVariable({
|
|
170268
170627
|
profile: this._profile,
|
|
170269
170628
|
label: this.snippet,
|
|
170270
170629
|
description: "",
|
|
170271
|
-
snippet: this.snippet
|
|
170272
|
-
})
|
|
170630
|
+
snippet: this.snippet,
|
|
170631
|
+
}),
|
|
170273
170632
|
]);
|
|
170274
170633
|
// Creates the groups for the layer and tables
|
|
170275
170634
|
const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
|
|
170276
170635
|
const tablesGroup = new GroupOfVariables(this._profile, { code: "tables" }, this._featureSetCollections.tables);
|
|
170277
170636
|
this.variables.push(headerGroup, layersGroup, tablesGroup);
|
|
170278
170637
|
}
|
|
170279
|
-
catch (
|
|
170280
|
-
console.error("
|
|
170638
|
+
catch (error) {
|
|
170639
|
+
console.error("Error with definition", error, this._definition);
|
|
170281
170640
|
this._featureSetCollections = null;
|
|
170282
170641
|
}
|
|
170283
170642
|
finally {
|
|
@@ -170292,7 +170651,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170292
170651
|
if (isMapInstance(this._definition)) {
|
|
170293
170652
|
return await this._featureSetCollectionFromMap(this._definition);
|
|
170294
170653
|
}
|
|
170295
|
-
if (
|
|
170654
|
+
if (isUrlDefinition(this._definition)) {
|
|
170296
170655
|
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170297
170656
|
}
|
|
170298
170657
|
if (isPortalItemDefinition(this._definition)) {
|
|
@@ -170300,10 +170659,6 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170300
170659
|
// or Feature Service
|
|
170301
170660
|
return await this._featureSetCollectionFromPortalItem(this._definition.portalItem);
|
|
170302
170661
|
}
|
|
170303
|
-
if (isUrlDefinition(this._definition)) {
|
|
170304
|
-
// Assume that the url is pointing to a feature server
|
|
170305
|
-
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170306
|
-
}
|
|
170307
170662
|
return null;
|
|
170308
170663
|
}
|
|
170309
170664
|
async _featureSetCollectionFromMap(map) {
|
|
@@ -170316,7 +170671,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170316
170671
|
return {
|
|
170317
170672
|
layers: this._convertWebMapLayersToVariables(map.layers),
|
|
170318
170673
|
tables: this._convertWebMapLayersToVariables(map.tables, true),
|
|
170319
|
-
source: map
|
|
170674
|
+
source: map,
|
|
170320
170675
|
};
|
|
170321
170676
|
}
|
|
170322
170677
|
async _featureSetCollectionFromPortalItem(definition) {
|
|
@@ -170384,7 +170739,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170384
170739
|
declaration: { name: featureLayer.title, definition: featureLayer },
|
|
170385
170740
|
label: featureLayer.title,
|
|
170386
170741
|
description: "",
|
|
170387
|
-
nonInteractive: true
|
|
170742
|
+
nonInteractive: true,
|
|
170388
170743
|
}, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
|
|
170389
170744
|
}
|
|
170390
170745
|
_makeFeatureSetSnippets(featureLayer, isFromWebMap = false) {
|
|
@@ -170396,7 +170751,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170396
170751
|
const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayer.title}")`;
|
|
170397
170752
|
return [
|
|
170398
170753
|
new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
|
|
170399
|
-
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
|
|
170754
|
+
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
|
|
170400
170755
|
];
|
|
170401
170756
|
}
|
|
170402
170757
|
else {
|
|
@@ -170421,7 +170776,7 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170421
170776
|
// Delay the load of the variable declarations so we have a `this`
|
|
170422
170777
|
super(undefined, {
|
|
170423
170778
|
profile: null,
|
|
170424
|
-
declaration: { properties: [] }
|
|
170779
|
+
declaration: { properties: [] },
|
|
170425
170780
|
});
|
|
170426
170781
|
this.definition = definition;
|
|
170427
170782
|
this.intlStrings = intlStrings;
|
|
@@ -170453,28 +170808,20 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170453
170808
|
toEditorProfileDefinition() {
|
|
170454
170809
|
return {
|
|
170455
170810
|
...this.definition,
|
|
170456
|
-
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170811
|
+
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
170457
170812
|
};
|
|
170458
170813
|
}
|
|
170459
170814
|
}
|
|
170460
170815
|
//#endregion
|
|
170461
170816
|
|
|
170462
170817
|
function isFeatureDefinition(item) {
|
|
170463
|
-
return (
|
|
170464
|
-
isFeatureSetInstance(item) ||
|
|
170465
|
-
isUrlDefinition(item) ||
|
|
170466
|
-
isFieldsDefinition(item) ||
|
|
170467
|
-
isFeatureLayerItemDefinition(item));
|
|
170818
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170468
170819
|
}
|
|
170469
170820
|
function isFeatureSetDefinition(item) {
|
|
170470
|
-
return (
|
|
170471
|
-
isFeatureSetInstance(item) ||
|
|
170472
|
-
isUrlDefinition(item) ||
|
|
170473
|
-
isFieldsDefinition(item) ||
|
|
170474
|
-
isFeatureLayerItemDefinition(item));
|
|
170821
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170475
170822
|
}
|
|
170476
170823
|
function isFeatureSetCollectionDefinition(item) {
|
|
170477
|
-
return isPortalItemDefinition(item) || isMapInstance(item) ||
|
|
170824
|
+
return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
|
|
170478
170825
|
}
|
|
170479
170826
|
/**
|
|
170480
170827
|
* Get a PredefinedProfile for a locale. If not already loaded then fetch it.
|
|
@@ -170486,7 +170833,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
|
|
|
170486
170833
|
if (profiles) {
|
|
170487
170834
|
return profiles;
|
|
170488
170835
|
}
|
|
170489
|
-
if (!
|
|
170836
|
+
if (!supportedLocales.has(locale)) {
|
|
170490
170837
|
return await getSdkPredefinedProfiles("en");
|
|
170491
170838
|
}
|
|
170492
170839
|
try {
|
|
@@ -170524,7 +170871,7 @@ function isExtendedPredefinedProfileDefinition(item) {
|
|
|
170524
170871
|
return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
|
|
170525
170872
|
}
|
|
170526
170873
|
function convertApiVariables(variables) {
|
|
170527
|
-
return variables
|
|
170874
|
+
return variables?.map(convertApiVariable);
|
|
170528
170875
|
}
|
|
170529
170876
|
function convertApiVariable(variable) {
|
|
170530
170877
|
switch (variable.type) {
|
|
@@ -170532,13 +170879,13 @@ function convertApiVariable(variable) {
|
|
|
170532
170879
|
return {
|
|
170533
170880
|
...variable,
|
|
170534
170881
|
type: variable.type,
|
|
170535
|
-
properties: convertApiVariables(variable.properties)
|
|
170882
|
+
properties: convertApiVariables(variable.properties),
|
|
170536
170883
|
};
|
|
170537
170884
|
case "array": {
|
|
170538
170885
|
return {
|
|
170539
170886
|
...variable,
|
|
170540
170887
|
type: variable.type,
|
|
170541
|
-
elementType: { type: "number", name: "number" }
|
|
170888
|
+
elementType: { type: "number", name: "number" },
|
|
170542
170889
|
};
|
|
170543
170890
|
}
|
|
170544
170891
|
default:
|
|
@@ -170556,43 +170903,47 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170556
170903
|
const editorProfile = {
|
|
170557
170904
|
bundles: [...sdkPredefinedProfile.bundles],
|
|
170558
170905
|
variables: [],
|
|
170559
|
-
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
|
|
170906
|
+
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
|
|
170560
170907
|
};
|
|
170561
170908
|
// Merge the SDK variables' definitions/properties with the predefined profile definitions.
|
|
170562
|
-
sdkPredefinedProfile.variables.forEach((
|
|
170909
|
+
sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
|
|
170563
170910
|
// Don't include disabled variables
|
|
170564
|
-
if (predefinedProfile.disabledVariables?.includes(
|
|
170911
|
+
if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
|
|
170565
170912
|
return;
|
|
170566
170913
|
}
|
|
170567
|
-
// Try to get a definition from the predefined profile.
|
|
170568
|
-
const definition = predefinedProfile.definitions[
|
|
170914
|
+
// Try to get a definition from the predefined profile, for the variable that needs one.
|
|
170915
|
+
const definition = predefinedProfile.definitions[predefinedVariable.name];
|
|
170569
170916
|
// Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
|
|
170570
170917
|
// despite the type checking from the switch statement.
|
|
170571
|
-
switch (
|
|
170572
|
-
case "dictionary":
|
|
170918
|
+
switch (predefinedVariable.type) {
|
|
170919
|
+
case "dictionary": {
|
|
170573
170920
|
// For dictionary, we support properties overrride
|
|
170574
170921
|
return editorProfile.variables.push(convertApiVariable({
|
|
170575
|
-
...
|
|
170576
|
-
type:
|
|
170577
|
-
properties: Array.isArray(definition) ? [...definition] :
|
|
170922
|
+
...predefinedVariable,
|
|
170923
|
+
type: predefinedVariable.type,
|
|
170924
|
+
properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
|
|
170578
170925
|
}));
|
|
170926
|
+
}
|
|
170579
170927
|
case "feature":
|
|
170580
|
-
|
|
170581
|
-
|
|
170928
|
+
// If the definition is not valid, then we don't include it.
|
|
170929
|
+
if (!isFeatureDefinition(definition)) {
|
|
170930
|
+
return;
|
|
170582
170931
|
}
|
|
170583
|
-
return editorProfile.variables.push({ ...
|
|
170932
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170584
170933
|
case "featureSet":
|
|
170585
|
-
|
|
170586
|
-
|
|
170934
|
+
// If the definition is not valid, then we don't include it.
|
|
170935
|
+
if (!isFeatureSetDefinition(definition)) {
|
|
170936
|
+
return;
|
|
170587
170937
|
}
|
|
170588
|
-
return editorProfile.variables.push({ ...
|
|
170938
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170589
170939
|
case "featureSetCollection":
|
|
170590
|
-
|
|
170591
|
-
|
|
170940
|
+
// If the definition is not valid, then we don't include it.
|
|
170941
|
+
if (!isFeatureSetCollectionDefinition(definition)) {
|
|
170942
|
+
return;
|
|
170592
170943
|
}
|
|
170593
|
-
return editorProfile.variables.push({ ...
|
|
170944
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170594
170945
|
default:
|
|
170595
|
-
return editorProfile.variables.push(convertApiVariable(
|
|
170946
|
+
return editorProfile.variables.push(convertApiVariable(predefinedVariable));
|
|
170596
170947
|
}
|
|
170597
170948
|
});
|
|
170598
170949
|
if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
|
|
@@ -170603,7 +170954,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170603
170954
|
|
|
170604
170955
|
const arcadeLanguageId = "arcade";
|
|
170605
170956
|
const defaultContext = {
|
|
170606
|
-
locale: "en"
|
|
170957
|
+
locale: "en",
|
|
170607
170958
|
};
|
|
170608
170959
|
class ArcadeLanguageServiceDefaults {
|
|
170609
170960
|
constructor() {
|
|
@@ -170657,7 +171008,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170657
171008
|
if (isPredefinedProfile(definition)) {
|
|
170658
171009
|
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
170659
171010
|
}
|
|
170660
|
-
const intlStrings = await
|
|
171011
|
+
const intlStrings = await fetchT9NStringsBundle(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
170661
171012
|
if (!intlStrings) {
|
|
170662
171013
|
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
170663
171014
|
}
|
|
@@ -170669,7 +171020,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170669
171020
|
this.updateApiContextForModel(modelId, {
|
|
170670
171021
|
locale: apiContext.locale,
|
|
170671
171022
|
profile: apiProfile,
|
|
170672
|
-
snippets: apiContext.snippets
|
|
171023
|
+
snippets: apiContext.snippets,
|
|
170673
171024
|
});
|
|
170674
171025
|
}
|
|
170675
171026
|
/**
|
|
@@ -170736,41 +171087,44 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170736
171087
|
}
|
|
170737
171088
|
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
170738
171089
|
const arcade = {
|
|
170739
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
|
|
171090
|
+
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
170740
171091
|
};
|
|
170741
171092
|
|
|
170742
|
-
exports.
|
|
170743
|
-
exports.D = D;
|
|
171093
|
+
exports.Deferred = Deferred;
|
|
170744
171094
|
exports.Emitter = Emitter;
|
|
170745
|
-
exports.G = G;
|
|
170746
171095
|
exports.IStandaloneThemeService = IStandaloneThemeService;
|
|
170747
|
-
exports.K = K;
|
|
170748
171096
|
exports.KeyCode = KeyCode;
|
|
170749
171097
|
exports.KeyMod = KeyMod;
|
|
170750
171098
|
exports.MarkerSeverity = MarkerSeverity;
|
|
170751
171099
|
exports.Range = Range;
|
|
170752
|
-
exports.U = U;
|
|
170753
171100
|
exports.Uri = Uri;
|
|
170754
|
-
exports.
|
|
170755
|
-
exports.Z = Z;
|
|
171101
|
+
exports.addLTRMark = addLTRMark;
|
|
170756
171102
|
exports.arcade = arcade;
|
|
170757
171103
|
exports.arcadeDefaults = arcadeDefaults;
|
|
171104
|
+
exports.camelToKebab = camelToKebab;
|
|
170758
171105
|
exports.commonjsGlobal = commonjsGlobal;
|
|
170759
171106
|
exports.createCommonjsModule = createCommonjsModule;
|
|
171107
|
+
exports.createFilterExpression = createFilterExpression;
|
|
171108
|
+
exports.debounce = debounce;
|
|
170760
171109
|
exports.editor = editor;
|
|
170761
171110
|
exports.filterCollection = filterCollection;
|
|
171111
|
+
exports.generateGuid = generateGuid;
|
|
170762
171112
|
exports.generateTokensCSSForColorMap = generateTokensCSSForColorMap;
|
|
170763
|
-
exports.
|
|
170764
|
-
exports.
|
|
171113
|
+
exports.getElementLocales = getElementLocales;
|
|
171114
|
+
exports.getElementTheme = getElementTheme;
|
|
171115
|
+
exports.hasSameOrigin = hasSameOrigin;
|
|
170765
171116
|
exports.importArcade = importArcade;
|
|
170766
171117
|
exports.importRequest = importRequest;
|
|
170767
|
-
exports.
|
|
171118
|
+
exports.isURL = isURL;
|
|
170768
171119
|
exports.languages = languages;
|
|
170769
171120
|
exports.main = main;
|
|
170770
171121
|
exports.monaco_editor_core_star = monaco_editor_core_star;
|
|
170771
|
-
exports.
|
|
170772
|
-
exports.
|
|
170773
|
-
exports.
|
|
171122
|
+
exports.observeAncestorsMutation = observeAncestorsMutation;
|
|
171123
|
+
exports.quoteString = quoteString;
|
|
171124
|
+
exports.safeAsyncCall = safeAsyncCall;
|
|
171125
|
+
exports.safeCall = safeCall;
|
|
171126
|
+
exports.setFocusOnElement = setFocusOnElement;
|
|
171127
|
+
exports.setValuesInString = setValuesInString;
|
|
171128
|
+
exports.startLocaleObserver = startLocaleObserver;
|
|
170774
171129
|
exports.supportedFields = supportedFields;
|
|
170775
171130
|
exports.typescriptDefaults = typescriptDefaults;
|
|
170776
|
-
exports.x = x;
|