@arcgis/coding-components 4.30.0-next.7 → 4.30.0-next.71
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-7d529ae0.js → p-063a025b.js} +3 -3
- package/dist/arcgis-coding-components/{p-1b2a100f.js → p-07f363ba.js} +1 -1
- package/dist/arcgis-coding-components/p-09be08b9.js +68 -0
- package/dist/arcgis-coding-components/{p-7d8a653c.js → p-40c7de90.js} +2 -2
- package/dist/arcgis-coding-components/p-78df1d2f.js +7 -0
- package/dist/arcgis-coding-components/{p-43ca4ff8.js → p-7a03c214.js} +2 -2
- package/dist/arcgis-coding-components/p-88548ea1.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-19e41297.js → p-93a07954.js} +2 -2
- package/dist/arcgis-coding-components/{p-3ad3b485.js → p-ab5bb57b.js} +3 -3
- package/dist/arcgis-coding-components/{p-d15b541d.js → p-c085a0af.js} +2 -2
- package/dist/arcgis-coding-components/{p-53a0b083.js → p-c301d376.js} +3 -3
- package/dist/arcgis-coding-components/{p-41f5c613.js → p-ca4f8a77.js} +2 -2
- package/dist/cjs/{arcade-defaults-85d2771a.js → arcade-defaults-d4681815.js} +620 -248
- package/dist/cjs/{arcade-mode-d675c5ea.js → arcade-mode-1bee51ae.js} +45 -51
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1560 -289
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-5e66f5d3.js → css-8c80bb2e.js} +1 -1
- package/dist/cjs/{cssMode-b94f6c97.js → cssMode-942065fb.js} +3 -3
- package/dist/cjs/{html-b264fb71.js → html-cabb489e.js} +3 -3
- package/dist/cjs/{htmlMode-14366ebc.js → htmlMode-915886ac.js} +3 -3
- package/dist/cjs/{index-6542b576.js → index-cd2104b5.js} +40 -4
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-40266757.js → javascript-3ae42af9.js} +4 -4
- package/dist/cjs/{jsonMode-241f2a4a.js → jsonMode-b6aa8f04.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-066b04bf.js → tsMode-7db5819d.js} +3 -3
- package/dist/cjs/{typescript-9ac6fd5a.js → typescript-457225f9.js} +3 -3
- package/dist/components/arcade-api.js +21 -32
- package/dist/components/arcade-contribution.js +72 -13
- package/dist/components/arcade-defaults.js +131 -149
- 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-63RMNUHL.js +1275 -0
- package/dist/components/code-editor.js +70 -78
- package/dist/components/fields.js +45 -45
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +389 -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-ef372fd5.js → arcade-defaults-0328d43a.js} +603 -235
- package/dist/esm/{arcade-mode-04d65df2.js → arcade-mode-30a3c186.js} +45 -51
- package/dist/esm/arcgis-arcade-api_6.entry.js +1560 -289
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-50e0f632.js → css-2a675679.js} +1 -1
- package/dist/esm/{cssMode-0740511f.js → cssMode-d741b7f4.js} +3 -3
- package/dist/esm/{html-9d2b157c.js → html-50d0ec6a.js} +3 -3
- package/dist/esm/{htmlMode-fd1c3eea.js → htmlMode-4cb80be7.js} +3 -3
- package/dist/esm/{index-7f8b9422.js → index-64f782ac.js} +40 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-014d6512.js → javascript-5607dae6.js} +4 -4
- package/dist/esm/{jsonMode-ccac7c7d.js → jsonMode-e9cfe47d.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-cfa861b3.js → tsMode-1be1ce42.js} +3 -3
- package/dist/esm/{typescript-9c1ebeca.js → typescript-2d04f7b3.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/arcgis-web-compoments/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/arcgis-web-compoments/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/arcgis-web-compoments/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/arcgis-web-compoments/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/arcgis-web-compoments/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/arcgis-web-compoments/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/arcgis-web-compoments/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/arcgis-web-compoments/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 -3
- package/package.json +21 -21
- package/dist/arcgis-coding-components/p-1927140d.js +0 -68
- package/dist/arcgis-coding-components/p-6aa84514.js +0 -7
- package/dist/arcgis-coding-components/p-c4f70a58.entry.js +0 -6
|
@@ -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.71
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { g as getAssetPath } from './index-64f782ac.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns the last element of an array.
|
|
@@ -20619,7 +20619,7 @@ class DragAndDropObserver extends Disposable {
|
|
|
20619
20619
|
}
|
|
20620
20620
|
}
|
|
20621
20621
|
const H_REGEX = /(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;
|
|
20622
|
-
function h
|
|
20622
|
+
function h(tag, ...args) {
|
|
20623
20623
|
let attributes;
|
|
20624
20624
|
let children;
|
|
20625
20625
|
if (Array.isArray(args[0])) {
|
|
@@ -113875,15 +113875,15 @@ class LinesLayout {
|
|
|
113875
113875
|
}
|
|
113876
113876
|
class MovedBlockOverlayWidget extends ViewZoneOverlayWidget {
|
|
113877
113877
|
constructor(_editor, _viewZone, _move, _kind, _diffModel) {
|
|
113878
|
-
const root = h
|
|
113878
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
113879
113879
|
super(_editor, _viewZone, root.root);
|
|
113880
113880
|
this._editor = _editor;
|
|
113881
113881
|
this._move = _move;
|
|
113882
113882
|
this._kind = _kind;
|
|
113883
113883
|
this._diffModel = _diffModel;
|
|
113884
|
-
this._nodes = h
|
|
113885
|
-
h
|
|
113886
|
-
h
|
|
113884
|
+
this._nodes = h('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
|
|
113885
|
+
h('div.text-content@textContent'),
|
|
113886
|
+
h('div.action-bar@actionBar'),
|
|
113887
113887
|
]);
|
|
113888
113888
|
root.root.appendChild(this._nodes.root);
|
|
113889
113889
|
const editorLayout = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114082,7 +114082,7 @@ class RevertButton {
|
|
|
114082
114082
|
this._diffs = _diffs;
|
|
114083
114083
|
this._selection = _selection;
|
|
114084
114084
|
this._id = `revertButton${RevertButton.counter++}`;
|
|
114085
|
-
this._domNode = h
|
|
114085
|
+
this._domNode = h('div.revertButton', {
|
|
114086
114086
|
title: this._selection
|
|
114087
114087
|
? localize('revertSelectedChanges', 'Revert Selected Changes')
|
|
114088
114088
|
: localize('revertChange', 'Revert Change')
|
|
@@ -114555,7 +114555,7 @@ HideUnchangedRegionsFeature = __decorate$1B([
|
|
|
114555
114555
|
], HideUnchangedRegionsFeature);
|
|
114556
114556
|
class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
114557
114557
|
constructor(_editor, _viewZone, _unchangedRegion, _unchangedRegionRange, _hide, _modifiedOutlineSource, _revealModifiedHiddenLine, _options) {
|
|
114558
|
-
const root = h
|
|
114558
|
+
const root = h('div.diff-hidden-lines-widget');
|
|
114559
114559
|
super(_editor, _viewZone, root.root);
|
|
114560
114560
|
this._editor = _editor;
|
|
114561
114561
|
this._unchangedRegion = _unchangedRegion;
|
|
@@ -114564,13 +114564,13 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114564
114564
|
this._modifiedOutlineSource = _modifiedOutlineSource;
|
|
114565
114565
|
this._revealModifiedHiddenLine = _revealModifiedHiddenLine;
|
|
114566
114566
|
this._options = _options;
|
|
114567
|
-
this._nodes = h
|
|
114568
|
-
h
|
|
114569
|
-
h
|
|
114570
|
-
h
|
|
114571
|
-
h
|
|
114567
|
+
this._nodes = h('div.diff-hidden-lines', [
|
|
114568
|
+
h('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
|
|
114569
|
+
h('div.center@content', { style: { display: 'flex' } }, [
|
|
114570
|
+
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)'))]),
|
|
114571
|
+
h('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
|
|
114572
114572
|
]),
|
|
114573
|
-
h
|
|
114573
|
+
h('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
|
|
114574
114574
|
]);
|
|
114575
114575
|
root.root.appendChild(this._nodes.root);
|
|
114576
114576
|
const layoutInfo = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
|
|
@@ -114695,7 +114695,7 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
|
|
|
114695
114695
|
for (let i = 0; i < items.length; i++) {
|
|
114696
114696
|
const item = items[i];
|
|
114697
114697
|
const icon = SymbolKinds.toIcon(item.kind);
|
|
114698
|
-
const divItem = h
|
|
114698
|
+
const divItem = h('div.breadcrumb-item', {
|
|
114699
114699
|
style: { display: 'flex', alignItems: 'center' },
|
|
114700
114700
|
}, [
|
|
114701
114701
|
renderIcon(icon),
|
|
@@ -116112,7 +116112,7 @@ let OverviewRulerPart = OverviewRulerPart_1 = class OverviewRulerPart extends Di
|
|
|
116112
116112
|
const viewportDomElement = createFastDomNode(document.createElement('div'));
|
|
116113
116113
|
viewportDomElement.setClassName('diffViewport');
|
|
116114
116114
|
viewportDomElement.setPosition('absolute');
|
|
116115
|
-
const diffOverviewRoot = h
|
|
116115
|
+
const diffOverviewRoot = h('div.diffOverview', {
|
|
116116
116116
|
style: { position: 'absolute', top: '0px', width: OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px' }
|
|
116117
116117
|
}).root;
|
|
116118
116118
|
this._register(appendRemoveOnDispose(diffOverviewRoot, viewportDomElement.domNode));
|
|
@@ -116592,11 +116592,11 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
116592
116592
|
this._parentInstantiationService = _parentInstantiationService;
|
|
116593
116593
|
this._audioCueService = _audioCueService;
|
|
116594
116594
|
this._editorProgressService = _editorProgressService;
|
|
116595
|
-
this.elements = h
|
|
116596
|
-
h
|
|
116597
|
-
h
|
|
116598
|
-
h
|
|
116599
|
-
h
|
|
116595
|
+
this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
|
|
116596
|
+
h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
|
|
116597
|
+
h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
|
|
116598
|
+
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
|
|
116599
|
+
h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
|
|
116600
116600
|
]);
|
|
116601
116601
|
this._diffModel = observableValue(this, undefined);
|
|
116602
116602
|
this._shouldDisposeDiffModel = false;
|
|
@@ -117730,8 +117730,8 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117730
117730
|
return { maxScroll: scroll2, width: this._originalWidth.read(reader) };
|
|
117731
117731
|
}
|
|
117732
117732
|
});
|
|
117733
|
-
this._elements = h
|
|
117734
|
-
h
|
|
117733
|
+
this._elements = h('div.multiDiffEntry', [
|
|
117734
|
+
h('div.content', {
|
|
117735
117735
|
style: {
|
|
117736
117736
|
display: 'flex',
|
|
117737
117737
|
flexDirection: 'column',
|
|
@@ -117739,19 +117739,19 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
|
|
|
117739
117739
|
overflow: 'hidden',
|
|
117740
117740
|
}
|
|
117741
117741
|
}, [
|
|
117742
|
-
h
|
|
117743
|
-
h
|
|
117744
|
-
h
|
|
117745
|
-
h
|
|
117742
|
+
h('div.header@header', [
|
|
117743
|
+
h('div.collapse-button@collapseButton'),
|
|
117744
|
+
h('div.title.show-file-icons@title', []),
|
|
117745
|
+
h('div.actions@actions'),
|
|
117746
117746
|
]),
|
|
117747
|
-
h
|
|
117747
|
+
h('div.editorParent', {
|
|
117748
117748
|
style: {
|
|
117749
117749
|
flex: '1',
|
|
117750
117750
|
display: 'flex',
|
|
117751
117751
|
flexDirection: 'column',
|
|
117752
117752
|
}
|
|
117753
117753
|
}, [
|
|
117754
|
-
h
|
|
117754
|
+
h('div.editorContainer@editor', { style: { flex: '1' } }),
|
|
117755
117755
|
])
|
|
117756
117756
|
])
|
|
117757
117757
|
]);
|
|
@@ -117952,17 +117952,17 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
|
|
|
117952
117952
|
this._workbenchUIElementFactory = _workbenchUIElementFactory;
|
|
117953
117953
|
this._parentContextKeyService = _parentContextKeyService;
|
|
117954
117954
|
this._parentInstantiationService = _parentInstantiationService;
|
|
117955
|
-
this._elements = h
|
|
117955
|
+
this._elements = h('div', {
|
|
117956
117956
|
style: {
|
|
117957
117957
|
overflowY: 'hidden',
|
|
117958
117958
|
}
|
|
117959
117959
|
}, [
|
|
117960
|
-
h
|
|
117960
|
+
h('div@content', {
|
|
117961
117961
|
style: {
|
|
117962
117962
|
overflow: 'hidden',
|
|
117963
117963
|
}
|
|
117964
117964
|
}),
|
|
117965
|
-
h
|
|
117965
|
+
h('div.monaco-editor@overflowWidgetsDomNode', {}),
|
|
117966
117966
|
]);
|
|
117967
117967
|
this._sizeObserver = this._register(new ObservableElementSizeObserver(this._element, undefined));
|
|
117968
117968
|
this._objectPool = this._register(new ObjectPool((data) => {
|
|
@@ -120522,7 +120522,7 @@ registerLanguage({
|
|
|
120522
120522
|
mimetypes: ["text/css"],
|
|
120523
120523
|
loader: () => {
|
|
120524
120524
|
{
|
|
120525
|
-
return import('./css-
|
|
120525
|
+
return import('./css-2a675679.js');
|
|
120526
120526
|
}
|
|
120527
120527
|
}
|
|
120528
120528
|
});
|
|
@@ -120540,7 +120540,7 @@ registerLanguage({
|
|
|
120540
120540
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120541
120541
|
loader: () => {
|
|
120542
120542
|
{
|
|
120543
|
-
return import('./html-
|
|
120543
|
+
return import('./html-50d0ec6a.js');
|
|
120544
120544
|
}
|
|
120545
120545
|
}
|
|
120546
120546
|
});
|
|
@@ -120560,7 +120560,7 @@ registerLanguage({
|
|
|
120560
120560
|
mimetypes: ["text/javascript"],
|
|
120561
120561
|
loader: () => {
|
|
120562
120562
|
{
|
|
120563
|
-
return import('./javascript-
|
|
120563
|
+
return import('./javascript-5607dae6.js');
|
|
120564
120564
|
}
|
|
120565
120565
|
}
|
|
120566
120566
|
});
|
|
@@ -120578,7 +120578,7 @@ registerLanguage({
|
|
|
120578
120578
|
mimetypes: ["text/typescript"],
|
|
120579
120579
|
loader: () => {
|
|
120580
120580
|
{
|
|
120581
|
-
return import('./typescript-
|
|
120581
|
+
return import('./typescript-2d04f7b3.js');
|
|
120582
120582
|
}
|
|
120583
120583
|
}
|
|
120584
120584
|
});
|
|
@@ -120699,7 +120699,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120699
120699
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120700
120700
|
function getMode$3() {
|
|
120701
120701
|
{
|
|
120702
|
-
return import('./cssMode-
|
|
120702
|
+
return import('./cssMode-d741b7f4.js');
|
|
120703
120703
|
}
|
|
120704
120704
|
}
|
|
120705
120705
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120824,7 +120824,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120824
120824
|
};
|
|
120825
120825
|
function getMode$2() {
|
|
120826
120826
|
{
|
|
120827
|
-
return import('./htmlMode-
|
|
120827
|
+
return import('./htmlMode-4cb80be7.js');
|
|
120828
120828
|
}
|
|
120829
120829
|
}
|
|
120830
120830
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120926,7 +120926,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120926
120926
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120927
120927
|
function getMode$1() {
|
|
120928
120928
|
{
|
|
120929
|
-
return import('./jsonMode-
|
|
120929
|
+
return import('./jsonMode-e9cfe47d.js');
|
|
120930
120930
|
}
|
|
120931
120931
|
}
|
|
120932
120932
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121195,7 +121195,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121195
121195
|
};
|
|
121196
121196
|
function getMode() {
|
|
121197
121197
|
{
|
|
121198
|
-
return import('./tsMode-
|
|
121198
|
+
return import('./tsMode-1be1ce42.js');
|
|
121199
121199
|
}
|
|
121200
121200
|
}
|
|
121201
121201
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -132853,8 +132853,8 @@ let InlineSuggestionHintsContentWidget = InlineSuggestionHintsContentWidget_1 =
|
|
|
132853
132853
|
this.id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget_1.id++}`;
|
|
132854
132854
|
this.allowEditorOverflow = true;
|
|
132855
132855
|
this.suppressMouseDown = false;
|
|
132856
|
-
this.nodes = h
|
|
132857
|
-
h
|
|
132856
|
+
this.nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
|
|
132857
|
+
h('div@toolBar'),
|
|
132858
132858
|
]);
|
|
132859
132859
|
this.previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon));
|
|
132860
132860
|
this.availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false);
|
|
@@ -132990,7 +132990,7 @@ class StatusBarViewItem$1 extends MenuEntryActionViewItem {
|
|
|
132990
132990
|
return super.updateLabel();
|
|
132991
132991
|
}
|
|
132992
132992
|
if (this.label) {
|
|
132993
|
-
const div = h
|
|
132993
|
+
const div = h('div.keybinding').root;
|
|
132994
132994
|
const k = new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions });
|
|
132995
132995
|
k.set(kb);
|
|
132996
132996
|
this.label.textContent = this._action.label;
|
|
@@ -168925,92 +168925,71 @@ var main = createCommonjsModule(function (module, exports) {
|
|
|
168925
168925
|
});
|
|
168926
168926
|
});
|
|
168927
168927
|
|
|
168928
|
-
|
|
168928
|
+
// src/index.ts
|
|
168929
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
168929
168930
|
function isDefaultModule(module) {
|
|
168930
|
-
|
|
168931
|
-
}
|
|
168932
|
-
async function requireModule(modulePath) {
|
|
168933
|
-
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
168934
|
-
resolve(moduleDefault);
|
|
168935
|
-
}));
|
|
168931
|
+
return module.default !== void 0;
|
|
168936
168932
|
}
|
|
168937
168933
|
async function importLayersFeatureLayer() {
|
|
168938
|
-
|
|
168939
|
-
|
|
168940
|
-
|
|
168941
|
-
|
|
168942
|
-
|
|
168934
|
+
if (isAMD) {
|
|
168935
|
+
return await window.$arcgis.import("esri/layers/FeatureLayer");
|
|
168936
|
+
}
|
|
168937
|
+
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
168938
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168939
|
+
}
|
|
168940
|
+
async function newLayersFeatureLayer(properties) {
|
|
168941
|
+
const ModConstructor = await importLayersFeatureLayer();
|
|
168942
|
+
return new ModConstructor(properties);
|
|
168943
168943
|
}
|
|
168944
168944
|
async function importPortalPortalItem() {
|
|
168945
|
-
|
|
168946
|
-
|
|
168947
|
-
|
|
168948
|
-
|
|
168949
|
-
|
|
168945
|
+
if (isAMD) {
|
|
168946
|
+
return await window.$arcgis.import("esri/portal/PortalItem");
|
|
168947
|
+
}
|
|
168948
|
+
const module = await import('@arcgis/core/portal/PortalItem.js');
|
|
168949
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168950
168950
|
}
|
|
168951
168951
|
async function newPortalPortalItem(properties) {
|
|
168952
|
-
|
|
168953
|
-
|
|
168952
|
+
const ModConstructor = await importPortalPortalItem();
|
|
168953
|
+
return new ModConstructor(properties);
|
|
168954
168954
|
}
|
|
168955
168955
|
async function importWebMap() {
|
|
168956
|
-
|
|
168957
|
-
|
|
168958
|
-
|
|
168959
|
-
|
|
168960
|
-
|
|
168956
|
+
if (isAMD) {
|
|
168957
|
+
return await window.$arcgis.import("esri/WebMap");
|
|
168958
|
+
}
|
|
168959
|
+
const module = await import('@arcgis/core/WebMap.js');
|
|
168960
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168961
168961
|
}
|
|
168962
168962
|
async function newWebMap(properties) {
|
|
168963
|
-
|
|
168964
|
-
|
|
168963
|
+
const ModConstructor = await importWebMap();
|
|
168964
|
+
return new ModConstructor(properties);
|
|
168965
168965
|
}
|
|
168966
168966
|
async function importWebScene() {
|
|
168967
|
-
|
|
168968
|
-
|
|
168969
|
-
|
|
168970
|
-
|
|
168971
|
-
|
|
168967
|
+
if (isAMD) {
|
|
168968
|
+
return await window.$arcgis.import("esri/WebScene");
|
|
168969
|
+
}
|
|
168970
|
+
const module = await import('@arcgis/core/WebScene.js');
|
|
168971
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168972
168972
|
}
|
|
168973
168973
|
async function newWebScene(properties) {
|
|
168974
|
-
|
|
168975
|
-
|
|
168974
|
+
const ModConstructor = await importWebScene();
|
|
168975
|
+
return new ModConstructor(properties);
|
|
168976
168976
|
}
|
|
168977
168977
|
async function importArcade() {
|
|
168978
|
-
|
|
168979
|
-
|
|
168980
|
-
|
|
168981
|
-
|
|
168982
|
-
|
|
168978
|
+
if (isAMD) {
|
|
168979
|
+
return await window.$arcgis.import("esri/arcade");
|
|
168980
|
+
}
|
|
168981
|
+
const module = await import('@arcgis/core/arcade.js');
|
|
168982
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168983
168983
|
}
|
|
168984
168984
|
async function importRequest() {
|
|
168985
|
-
|
|
168986
|
-
|
|
168987
|
-
|
|
168988
|
-
|
|
168989
|
-
|
|
168985
|
+
if (isAMD) {
|
|
168986
|
+
return await window.$arcgis.import("esri/request");
|
|
168987
|
+
}
|
|
168988
|
+
const module = await import('@arcgis/core/request.js');
|
|
168989
|
+
return isDefaultModule(module) ? module.default : module;
|
|
168990
168990
|
}
|
|
168991
168991
|
|
|
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
168992
|
//#region Type Guards
|
|
169000
|
-
function isSupportedLayerInstance(item) {
|
|
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
168993
|
function isQueryableLayerInstance(item) {
|
|
169015
168994
|
return (!!item &&
|
|
169016
168995
|
typeof item === "object" &&
|
|
@@ -169060,10 +169039,13 @@ function isFeatureLayerItemDefinition(item) {
|
|
|
169060
169039
|
return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
|
|
169061
169040
|
}
|
|
169062
169041
|
function isFieldsDefinition(item) {
|
|
169063
|
-
return
|
|
169042
|
+
return !!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields);
|
|
169064
169043
|
}
|
|
169065
169044
|
function isUrlDefinition(item) {
|
|
169066
|
-
return
|
|
169045
|
+
return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
|
|
169046
|
+
}
|
|
169047
|
+
function isSupportedServiceUrlDefinition(item) {
|
|
169048
|
+
return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
|
|
169067
169049
|
}
|
|
169068
169050
|
function isSubtypeInstance(item) {
|
|
169069
169051
|
return (!!item &&
|
|
@@ -169133,11 +169115,11 @@ async function supportedSourceFromDefinition(definition) {
|
|
|
169133
169115
|
return null;
|
|
169134
169116
|
}
|
|
169135
169117
|
let source = null;
|
|
169136
|
-
if (
|
|
169118
|
+
if (isFieldsDefinition(definition)) {
|
|
169137
169119
|
source = definition;
|
|
169138
169120
|
}
|
|
169139
169121
|
else {
|
|
169140
|
-
source = await
|
|
169122
|
+
source = await newLayersFeatureLayer(definition);
|
|
169141
169123
|
}
|
|
169142
169124
|
if (isLoadableSource(source)) {
|
|
169143
169125
|
await source.load();
|
|
@@ -169148,32 +169130,423 @@ async function serviceMetaData(url) {
|
|
|
169148
169130
|
url += "/layers";
|
|
169149
169131
|
const request = await importRequest();
|
|
169150
169132
|
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
169133
|
const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
|
|
169156
|
-
const layers =
|
|
169157
|
-
const tables =
|
|
169134
|
+
const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
|
|
169135
|
+
const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
|
|
169158
169136
|
return { layers, tables };
|
|
169159
169137
|
}
|
|
169160
|
-
function
|
|
169138
|
+
function getSupportedLayerInfos(layers, queryCapability) {
|
|
169139
|
+
if (!layers) {
|
|
169140
|
+
return [];
|
|
169141
|
+
}
|
|
169161
169142
|
return layers.filter((layer) => {
|
|
169162
|
-
|
|
169163
|
-
|
|
169143
|
+
switch (layer.type) {
|
|
169144
|
+
case "Feature Layer":
|
|
169145
|
+
case "Oriented Imagery Layer":
|
|
169146
|
+
case "Catalog Layer":
|
|
169147
|
+
case "Table": {
|
|
169148
|
+
const capabilities = layer.capabilities
|
|
169149
|
+
? layer.capabilities
|
|
169150
|
+
.toLowerCase()
|
|
169151
|
+
.split(",")
|
|
169152
|
+
.map((value) => value.trim())
|
|
169153
|
+
: [];
|
|
169154
|
+
return capabilities.includes(queryCapability);
|
|
169155
|
+
}
|
|
169156
|
+
default:
|
|
169157
|
+
return false;
|
|
169164
169158
|
}
|
|
169165
|
-
const capabilities = layer.capabilities
|
|
169166
|
-
? layer.capabilities
|
|
169167
|
-
.toLowerCase()
|
|
169168
|
-
.split(",")
|
|
169169
|
-
.map((value) => value.trim())
|
|
169170
|
-
: [];
|
|
169171
|
-
return capabilities.includes(queryCapability);
|
|
169172
169159
|
});
|
|
169173
169160
|
}
|
|
169174
169161
|
//#endregion
|
|
169175
169162
|
|
|
169176
|
-
|
|
169163
|
+
// src/array-utils.ts
|
|
169164
|
+
|
|
169165
|
+
// src/deferred.ts
|
|
169166
|
+
var Deferred = class {
|
|
169167
|
+
/**
|
|
169168
|
+
* Resolves the promise.
|
|
169169
|
+
* @param value The value to resolve the promise with.
|
|
169170
|
+
*/
|
|
169171
|
+
resolve(_value) {
|
|
169172
|
+
}
|
|
169173
|
+
/**
|
|
169174
|
+
* Rejects the promise.
|
|
169175
|
+
*/
|
|
169176
|
+
reject(_error) {
|
|
169177
|
+
}
|
|
169178
|
+
/**
|
|
169179
|
+
* Creates a new deferred promise.
|
|
169180
|
+
*/
|
|
169181
|
+
constructor() {
|
|
169182
|
+
this.promise = new Promise((resolve, reject) => {
|
|
169183
|
+
this.resolve = resolve;
|
|
169184
|
+
this.reject = reject;
|
|
169185
|
+
});
|
|
169186
|
+
}
|
|
169187
|
+
};
|
|
169188
|
+
|
|
169189
|
+
// src/dom.ts
|
|
169190
|
+
function inTargetElement(element, targetElement) {
|
|
169191
|
+
let currentElement = element;
|
|
169192
|
+
while (currentElement) {
|
|
169193
|
+
if (currentElement === targetElement) {
|
|
169194
|
+
return true;
|
|
169195
|
+
}
|
|
169196
|
+
if (!currentElement.parentNode) {
|
|
169197
|
+
return false;
|
|
169198
|
+
}
|
|
169199
|
+
if (currentElement.parentNode instanceof ShadowRoot) {
|
|
169200
|
+
currentElement = currentElement.parentNode.host;
|
|
169201
|
+
} else {
|
|
169202
|
+
currentElement = currentElement.parentNode;
|
|
169203
|
+
}
|
|
169204
|
+
}
|
|
169205
|
+
return false;
|
|
169206
|
+
}
|
|
169207
|
+
function observeAncestorsMutation(element, attributeFilter, callback) {
|
|
169208
|
+
const { subscribe } = observe(attributeFilter);
|
|
169209
|
+
return subscribe((mutations) => {
|
|
169210
|
+
const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
|
|
169211
|
+
if (matched)
|
|
169212
|
+
callback();
|
|
169213
|
+
});
|
|
169214
|
+
}
|
|
169215
|
+
var observers = {};
|
|
169216
|
+
function observe(attributeFilter) {
|
|
169217
|
+
const attributes = attributeFilter.join(",");
|
|
169218
|
+
const previousObserver = observers[attributes];
|
|
169219
|
+
if (previousObserver !== void 0)
|
|
169220
|
+
return previousObserver;
|
|
169221
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
169222
|
+
const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
|
|
169223
|
+
mutationObserver.observe(document.documentElement, {
|
|
169224
|
+
attributes: true,
|
|
169225
|
+
attributeFilter,
|
|
169226
|
+
subtree: true
|
|
169227
|
+
});
|
|
169228
|
+
const observer = {
|
|
169229
|
+
subscribe(callback) {
|
|
169230
|
+
subscribers.add(callback);
|
|
169231
|
+
return {
|
|
169232
|
+
remove: () => {
|
|
169233
|
+
subscribers.delete(callback);
|
|
169234
|
+
if (subscribers.size === 0) {
|
|
169235
|
+
mutationObserver.disconnect();
|
|
169236
|
+
observers[attributes] = void 0;
|
|
169237
|
+
}
|
|
169238
|
+
}
|
|
169239
|
+
};
|
|
169240
|
+
}
|
|
169241
|
+
};
|
|
169242
|
+
observers[attributes] = observer;
|
|
169243
|
+
return observer;
|
|
169244
|
+
}
|
|
169245
|
+
function closestElement(base, selector) {
|
|
169246
|
+
let currentElement = base;
|
|
169247
|
+
while (currentElement) {
|
|
169248
|
+
const element = currentElement.closest(selector);
|
|
169249
|
+
if (element) {
|
|
169250
|
+
return element;
|
|
169251
|
+
}
|
|
169252
|
+
const rootElement = currentElement.getRootNode();
|
|
169253
|
+
if (rootElement === document) {
|
|
169254
|
+
return null;
|
|
169255
|
+
}
|
|
169256
|
+
currentElement = rootElement.host;
|
|
169257
|
+
}
|
|
169258
|
+
return null;
|
|
169259
|
+
}
|
|
169260
|
+
function getElementTheme(base) {
|
|
169261
|
+
const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
|
|
169262
|
+
return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
|
|
169263
|
+
}
|
|
169264
|
+
function getElementAttribute(el, prop, fallbackValue) {
|
|
169265
|
+
const closest = closestElement(el, `[${prop}]`);
|
|
169266
|
+
return closest?.getAttribute(prop) ?? fallbackValue;
|
|
169267
|
+
}
|
|
169268
|
+
function isElement(ref) {
|
|
169269
|
+
return ref.nodeType === Node.ELEMENT_NODE;
|
|
169270
|
+
}
|
|
169271
|
+
function isHTMLWithSetFocus(ref) {
|
|
169272
|
+
return "setFocus" in ref && typeof ref.setFocus === "function";
|
|
169273
|
+
}
|
|
169274
|
+
function setFocus(ref, selector = "") {
|
|
169275
|
+
if (!isElement(ref)) {
|
|
169276
|
+
return false;
|
|
169277
|
+
}
|
|
169278
|
+
if (ref.matches(selector)) {
|
|
169279
|
+
if (isHTMLWithSetFocus(ref)) {
|
|
169280
|
+
setTimeout(() => ref.setFocus(), 0);
|
|
169281
|
+
}
|
|
169282
|
+
return true;
|
|
169283
|
+
}
|
|
169284
|
+
for (const child of ref.children) {
|
|
169285
|
+
if (setFocus(child, selector)) {
|
|
169286
|
+
return true;
|
|
169287
|
+
}
|
|
169288
|
+
}
|
|
169289
|
+
const shadowRoot = ref.shadowRoot;
|
|
169290
|
+
if (shadowRoot) {
|
|
169291
|
+
for (const child of shadowRoot.children) {
|
|
169292
|
+
if (setFocus(child, selector)) {
|
|
169293
|
+
return true;
|
|
169294
|
+
}
|
|
169295
|
+
}
|
|
169296
|
+
}
|
|
169297
|
+
return false;
|
|
169298
|
+
}
|
|
169299
|
+
function setFocusOnElement(ref, selector) {
|
|
169300
|
+
if (!ref?.shadowRoot) {
|
|
169301
|
+
return;
|
|
169302
|
+
}
|
|
169303
|
+
if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
|
|
169304
|
+
setFocus(ref, selector);
|
|
169305
|
+
return;
|
|
169306
|
+
}
|
|
169307
|
+
const mutationObserver = new MutationObserver(() => {
|
|
169308
|
+
mutationObserver.disconnect();
|
|
169309
|
+
setFocus(ref, selector);
|
|
169310
|
+
});
|
|
169311
|
+
mutationObserver.observe(ref, {
|
|
169312
|
+
attributes: true,
|
|
169313
|
+
attributeFilter: ["hydrated", "calcite-hydrated"]
|
|
169314
|
+
});
|
|
169315
|
+
}
|
|
169316
|
+
|
|
169317
|
+
// src/errors.ts
|
|
169318
|
+
function safeCall(callback, thisContext, ...rest) {
|
|
169319
|
+
try {
|
|
169320
|
+
return callback?.call(thisContext, ...rest);
|
|
169321
|
+
} catch (error) {
|
|
169322
|
+
console.error(error, callback);
|
|
169323
|
+
}
|
|
169324
|
+
return void 0;
|
|
169325
|
+
}
|
|
169326
|
+
async function safeAsyncCall(callback, thisContext, ...rest) {
|
|
169327
|
+
try {
|
|
169328
|
+
const result = callback?.call(thisContext, ...rest);
|
|
169329
|
+
return result instanceof Promise ? await result : result;
|
|
169330
|
+
} catch (error) {
|
|
169331
|
+
console.error(error, callback);
|
|
169332
|
+
}
|
|
169333
|
+
return void 0;
|
|
169334
|
+
}
|
|
169335
|
+
|
|
169336
|
+
// src/guid.ts
|
|
169337
|
+
function gen(count) {
|
|
169338
|
+
let out = "";
|
|
169339
|
+
for (let i = 0; i < count; i++) {
|
|
169340
|
+
out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
169341
|
+
}
|
|
169342
|
+
return out;
|
|
169343
|
+
}
|
|
169344
|
+
function generateGuid() {
|
|
169345
|
+
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
169346
|
+
}
|
|
169347
|
+
var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
|
|
169348
|
+
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
169349
|
+
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
169350
|
+
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
169351
|
+
|
|
169352
|
+
// src/intl.ts
|
|
169353
|
+
var supportedLocales = /* @__PURE__ */ new Set([
|
|
169354
|
+
"ar",
|
|
169355
|
+
"bg",
|
|
169356
|
+
"bs",
|
|
169357
|
+
"ca",
|
|
169358
|
+
"cs",
|
|
169359
|
+
"da",
|
|
169360
|
+
"de",
|
|
169361
|
+
"el",
|
|
169362
|
+
"en",
|
|
169363
|
+
"es",
|
|
169364
|
+
"et",
|
|
169365
|
+
"fi",
|
|
169366
|
+
"fr",
|
|
169367
|
+
"he",
|
|
169368
|
+
"hr",
|
|
169369
|
+
"hu",
|
|
169370
|
+
"id",
|
|
169371
|
+
"it",
|
|
169372
|
+
"ja",
|
|
169373
|
+
"ko",
|
|
169374
|
+
"lt",
|
|
169375
|
+
"lv",
|
|
169376
|
+
"nl",
|
|
169377
|
+
"nb",
|
|
169378
|
+
"pl",
|
|
169379
|
+
"pt-BR",
|
|
169380
|
+
"pt-PT",
|
|
169381
|
+
"ro",
|
|
169382
|
+
"ru",
|
|
169383
|
+
"sk",
|
|
169384
|
+
"sl",
|
|
169385
|
+
"sr",
|
|
169386
|
+
"sv",
|
|
169387
|
+
"th",
|
|
169388
|
+
"tr",
|
|
169389
|
+
"uk",
|
|
169390
|
+
"vi",
|
|
169391
|
+
"zh-CN",
|
|
169392
|
+
"zh-HK",
|
|
169393
|
+
"zh-TW"
|
|
169394
|
+
]);
|
|
169395
|
+
var defaultLocale = "en";
|
|
169396
|
+
async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
|
|
169397
|
+
const path = `${assetsPath}/${prefix}`;
|
|
169398
|
+
const filePath = `${path}${locale}.json`;
|
|
169399
|
+
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
169400
|
+
return await t9nStringsCache[filePath];
|
|
169401
|
+
}
|
|
169402
|
+
var t9nStringsCache = {};
|
|
169403
|
+
async function fetchBundle(locale, path) {
|
|
169404
|
+
const filePath = `${path}${locale}.json`;
|
|
169405
|
+
try {
|
|
169406
|
+
const response = await fetch(filePath);
|
|
169407
|
+
if (response.ok)
|
|
169408
|
+
return await response.json();
|
|
169409
|
+
} catch (error) {
|
|
169410
|
+
console.error(error);
|
|
169411
|
+
return fallbackBundle;
|
|
169412
|
+
}
|
|
169413
|
+
if (locale === defaultLocale)
|
|
169414
|
+
return fallbackBundle;
|
|
169415
|
+
return await fetchBundle(defaultLocale, path);
|
|
169416
|
+
}
|
|
169417
|
+
var fallbackBundle = new Proxy(
|
|
169418
|
+
{},
|
|
169419
|
+
{
|
|
169420
|
+
get: (_target, property) => camelToHuman(property.toString())
|
|
169421
|
+
}
|
|
169422
|
+
);
|
|
169423
|
+
function getElementLocales(element) {
|
|
169424
|
+
const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
|
|
169425
|
+
if (supportedLocales.has(lang)) {
|
|
169426
|
+
return { lang, t9nLocale: lang };
|
|
169427
|
+
}
|
|
169428
|
+
const rootCode = lang.slice(0, 2);
|
|
169429
|
+
return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
|
|
169430
|
+
}
|
|
169431
|
+
function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
|
|
169432
|
+
let result = void 0;
|
|
169433
|
+
const callback = () => void updateComponentLocateState(element, assetsPath, assetName).then((newResult) => {
|
|
169434
|
+
if (result?.lang !== newResult.lang || result.t9nLocale !== newResult.t9nLocale || result.t9nStrings !== newResult.t9nStrings)
|
|
169435
|
+
onUpdated(newResult);
|
|
169436
|
+
result = newResult;
|
|
169437
|
+
}).catch(console.error);
|
|
169438
|
+
callback();
|
|
169439
|
+
return observeAncestorsMutation(element, ["lang"], callback);
|
|
169440
|
+
}
|
|
169441
|
+
async function updateComponentLocateState(element, assetsPath, assetName = element.tagName.toLowerCase().replace("arcgis-", "")) {
|
|
169442
|
+
const { lang, t9nLocale } = getElementLocales(element);
|
|
169443
|
+
const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
|
|
169444
|
+
const prefix = `${assetName}.t9n.`;
|
|
169445
|
+
const t9nStrings = await fetchT9NStringsBundle(t9nLocale, t9nAssetsPath, prefix);
|
|
169446
|
+
return { lang, t9nLocale, t9nStrings };
|
|
169447
|
+
}
|
|
169448
|
+
|
|
169449
|
+
// src/strings.ts
|
|
169450
|
+
var doubleQuote = '"';
|
|
169451
|
+
var singleQuote = "'";
|
|
169452
|
+
function repeatString(value, n) {
|
|
169453
|
+
return new Array(n + 1).join(value);
|
|
169454
|
+
}
|
|
169455
|
+
function quoteString(value) {
|
|
169456
|
+
let quote = doubleQuote;
|
|
169457
|
+
let alternateQuote = singleQuote;
|
|
169458
|
+
const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
|
|
169459
|
+
if (avoidEscape) {
|
|
169460
|
+
alternateQuote = doubleQuote;
|
|
169461
|
+
quote = singleQuote;
|
|
169462
|
+
}
|
|
169463
|
+
const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
|
|
169464
|
+
value = value.replace(
|
|
169465
|
+
alternateEscape,
|
|
169466
|
+
(_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
|
|
169467
|
+
// We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
|
|
169468
|
+
boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
|
|
169469
|
+
)
|
|
169470
|
+
);
|
|
169471
|
+
const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
|
|
169472
|
+
value = value.replace(
|
|
169473
|
+
quoteEscape,
|
|
169474
|
+
(_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
|
|
169475
|
+
);
|
|
169476
|
+
return quote + value + quote;
|
|
169477
|
+
}
|
|
169478
|
+
function createFilterExpression(filterWord) {
|
|
169479
|
+
const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
|
|
169480
|
+
return new RegExp(sanitizedWord, "i");
|
|
169481
|
+
}
|
|
169482
|
+
function setValuesInString(message, values = {}) {
|
|
169483
|
+
return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
|
|
169484
|
+
}
|
|
169485
|
+
function addLTRMark(value) {
|
|
169486
|
+
return `\u200E${value ?? ""}\u200E`;
|
|
169487
|
+
}
|
|
169488
|
+
|
|
169489
|
+
// src/timeouts.ts
|
|
169490
|
+
function devToolsAwareTimeout(callback, timeout) {
|
|
169491
|
+
const interval = timeout > longTimeoutThreshold ? longTimeoutInterval : timeout / shortTimeoutIntervals;
|
|
169492
|
+
let elapsed = 0;
|
|
169493
|
+
const reference = setInterval(() => {
|
|
169494
|
+
elapsed += interval;
|
|
169495
|
+
if (elapsed >= timeout) {
|
|
169496
|
+
clearInterval(reference);
|
|
169497
|
+
callback();
|
|
169498
|
+
}
|
|
169499
|
+
}, interval);
|
|
169500
|
+
return reference;
|
|
169501
|
+
}
|
|
169502
|
+
var longTimeoutThreshold = 4e3;
|
|
169503
|
+
var longTimeoutInterval = 2e3;
|
|
169504
|
+
var shortTimeoutIntervals = 4;
|
|
169505
|
+
|
|
169506
|
+
// src/type-guards.ts
|
|
169507
|
+
function isNotNull(item) {
|
|
169508
|
+
return item !== null;
|
|
169509
|
+
}
|
|
169510
|
+
function isNotUndefined(item) {
|
|
169511
|
+
return item !== void 0;
|
|
169512
|
+
}
|
|
169513
|
+
|
|
169514
|
+
// src/ui.ts
|
|
169515
|
+
function debounce(func, waitFor = 100) {
|
|
169516
|
+
let timeout;
|
|
169517
|
+
return (...args) => {
|
|
169518
|
+
const later = () => {
|
|
169519
|
+
clearTimeout(timeout);
|
|
169520
|
+
func(...args);
|
|
169521
|
+
};
|
|
169522
|
+
clearTimeout(timeout);
|
|
169523
|
+
timeout = setTimeout(later, waitFor);
|
|
169524
|
+
};
|
|
169525
|
+
}
|
|
169526
|
+
|
|
169527
|
+
// src/url.ts
|
|
169528
|
+
function hasSameOrigin(url1, url2, ignoreProtocol = false) {
|
|
169529
|
+
if (!url1 || !url2) {
|
|
169530
|
+
return false;
|
|
169531
|
+
}
|
|
169532
|
+
const url1Obj = new URL(url1);
|
|
169533
|
+
const url2Obj = new URL(url2);
|
|
169534
|
+
if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
|
|
169535
|
+
return false;
|
|
169536
|
+
}
|
|
169537
|
+
if (url1Obj.host == null || url2Obj.host == null) {
|
|
169538
|
+
return false;
|
|
169539
|
+
}
|
|
169540
|
+
return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
|
|
169541
|
+
}
|
|
169542
|
+
function isURL(url) {
|
|
169543
|
+
try {
|
|
169544
|
+
new URL(url);
|
|
169545
|
+
return true;
|
|
169546
|
+
} catch (e) {
|
|
169547
|
+
return false;
|
|
169548
|
+
}
|
|
169549
|
+
}
|
|
169177
169550
|
|
|
169178
169551
|
/**
|
|
169179
169552
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -169186,7 +169559,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
169186
169559
|
if (!_keys.length) {
|
|
169187
169560
|
return [];
|
|
169188
169561
|
}
|
|
169189
|
-
const filterExpression =
|
|
169562
|
+
const filterExpression = createFilterExpression(filterWord);
|
|
169190
169563
|
return collection.filter((item) => {
|
|
169191
169564
|
if (beforeFilteringFn) {
|
|
169192
169565
|
const res = beforeFilteringFn(item);
|
|
@@ -169296,7 +169669,7 @@ function fieldAlias(field) {
|
|
|
169296
169669
|
//#endregion
|
|
169297
169670
|
//#region Support functions
|
|
169298
169671
|
async function getRelatedFeatureLayer(layer, relationship) {
|
|
169299
|
-
const relatedFeatureLayer = await
|
|
169672
|
+
const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
|
|
169300
169673
|
await relatedFeatureLayer.load();
|
|
169301
169674
|
return relatedFeatureLayer;
|
|
169302
169675
|
}
|
|
@@ -169386,8 +169759,8 @@ function variableToLSVariable(editorVariable, kind) {
|
|
|
169386
169759
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169387
169760
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169388
169761
|
kind,
|
|
169389
|
-
documentation: { kind: "markdown", value: description }
|
|
169390
|
-
}
|
|
169762
|
+
documentation: { kind: "markdown", value: description },
|
|
169763
|
+
},
|
|
169391
169764
|
};
|
|
169392
169765
|
}
|
|
169393
169766
|
async function featureToLSFeature(editorFeature, kind) {
|
|
@@ -169401,14 +169774,14 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169401
169774
|
insertText: name,
|
|
169402
169775
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169403
169776
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169404
|
-
kind
|
|
169777
|
+
kind,
|
|
169405
169778
|
};
|
|
169406
169779
|
const result = {
|
|
169407
169780
|
name,
|
|
169408
169781
|
description,
|
|
169409
169782
|
type: "dictionary",
|
|
169410
169783
|
properties: [],
|
|
169411
|
-
completion: resultCompletion
|
|
169784
|
+
completion: resultCompletion,
|
|
169412
169785
|
};
|
|
169413
169786
|
// No source definition, then it will be a feature without any known fields
|
|
169414
169787
|
if (!source) {
|
|
@@ -169446,8 +169819,8 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169446
169819
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169447
169820
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169448
169821
|
kind: main.CompletionItemKind.Field,
|
|
169449
|
-
documentation: { kind: "markdown", value: fieldCompletionDescription }
|
|
169450
|
-
}
|
|
169822
|
+
documentation: { kind: "markdown", value: fieldCompletionDescription },
|
|
169823
|
+
},
|
|
169451
169824
|
});
|
|
169452
169825
|
if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
|
|
169453
169826
|
return;
|
|
@@ -169468,8 +169841,8 @@ async function featureToLSFeature(editorFeature, kind) {
|
|
|
169468
169841
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169469
169842
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169470
169843
|
kind: main.CompletionItemKind.Field,
|
|
169471
|
-
documentation: { kind: "markdown", value: aliasCompletionDescription }
|
|
169472
|
-
}
|
|
169844
|
+
documentation: { kind: "markdown", value: aliasCompletionDescription },
|
|
169845
|
+
},
|
|
169473
169846
|
});
|
|
169474
169847
|
});
|
|
169475
169848
|
result.properties = [...fieldProfileValues, ...aliasProfileValues];
|
|
@@ -169502,8 +169875,8 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
|
|
|
169502
169875
|
insertTextMode: main.InsertTextMode.asIs,
|
|
169503
169876
|
insertTextFormat: main.InsertTextFormat.PlainText,
|
|
169504
169877
|
kind,
|
|
169505
|
-
documentation: { kind: "markdown", value: completionDescription }
|
|
169506
|
-
}
|
|
169878
|
+
documentation: { kind: "markdown", value: completionDescription },
|
|
169879
|
+
},
|
|
169507
169880
|
};
|
|
169508
169881
|
}
|
|
169509
169882
|
/**
|
|
@@ -169530,9 +169903,9 @@ class ProfileItemBase {
|
|
|
169530
169903
|
// If the component is under RTL, the string is messed up.
|
|
169531
169904
|
// It is converted from $feature to feature$, This is not acceptable since the label
|
|
169532
169905
|
// represents a variable name. We are adding in front of the $ sign a right to left mark.
|
|
169533
|
-
return
|
|
169906
|
+
return addLTRMark(this._label);
|
|
169534
169907
|
}
|
|
169535
|
-
return
|
|
169908
|
+
return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
|
|
169536
169909
|
}
|
|
169537
169910
|
/**
|
|
169538
169911
|
* Returns the description string.
|
|
@@ -169544,7 +169917,7 @@ class ProfileItemBase {
|
|
|
169544
169917
|
if (typeof this.description === "string") {
|
|
169545
169918
|
return this.description;
|
|
169546
169919
|
}
|
|
169547
|
-
return
|
|
169920
|
+
return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
|
|
169548
169921
|
}
|
|
169549
169922
|
/**
|
|
169550
169923
|
* Returns true if the item pass the filter test
|
|
@@ -169721,28 +170094,28 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169721
170094
|
return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
|
|
169722
170095
|
case "featureSet":
|
|
169723
170096
|
return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
|
|
169724
|
-
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
|
|
170097
|
+
new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
|
|
169725
170098
|
]);
|
|
169726
170099
|
case "featureSetCollection":
|
|
169727
170100
|
return new FeatureSetCollectionVariable(this, {
|
|
169728
170101
|
profile: this._profile,
|
|
169729
170102
|
declaration,
|
|
169730
170103
|
label: snippet,
|
|
169731
|
-
snippet
|
|
170104
|
+
snippet,
|
|
169732
170105
|
});
|
|
169733
170106
|
case "dictionary":
|
|
169734
170107
|
return new DictionaryVariable(this, {
|
|
169735
170108
|
profile: this._profile,
|
|
169736
170109
|
declaration,
|
|
169737
170110
|
label: snippet,
|
|
169738
|
-
snippet
|
|
170111
|
+
snippet,
|
|
169739
170112
|
});
|
|
169740
170113
|
case "array":
|
|
169741
170114
|
return new ArrayVariable({
|
|
169742
170115
|
profile: this._profile,
|
|
169743
170116
|
declaration,
|
|
169744
170117
|
label: snippet,
|
|
169745
|
-
snippet
|
|
170118
|
+
snippet,
|
|
169746
170119
|
});
|
|
169747
170120
|
default:
|
|
169748
170121
|
console.error("Editor profile: Invalid profile variable", declaration);
|
|
@@ -169754,7 +170127,7 @@ class DictionaryVariable extends CollectionBasedVariable {
|
|
|
169754
170127
|
type: this.type,
|
|
169755
170128
|
name: "",
|
|
169756
170129
|
...this.declaration,
|
|
169757
|
-
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170130
|
+
properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
169758
170131
|
};
|
|
169759
170132
|
}
|
|
169760
170133
|
}
|
|
@@ -169785,7 +170158,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169785
170158
|
return this._profile?.intlStrings.layer ?? "layer";
|
|
169786
170159
|
}
|
|
169787
170160
|
async loadSource() {
|
|
169788
|
-
if (
|
|
170161
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
169789
170162
|
return await this._loadPromise;
|
|
169790
170163
|
}
|
|
169791
170164
|
this._loadPromise = this._loadSource();
|
|
@@ -169820,7 +170193,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169820
170193
|
description: fieldAlias(field),
|
|
169821
170194
|
snippet: valueSnippet,
|
|
169822
170195
|
icon: fieldTypeToIconName(field),
|
|
169823
|
-
filterDescription: true
|
|
170196
|
+
filterDescription: true,
|
|
169824
170197
|
});
|
|
169825
170198
|
}
|
|
169826
170199
|
_getDomainDictionary(field) {
|
|
@@ -169859,6 +170232,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169859
170232
|
// Sepcial case for the subtype field
|
|
169860
170233
|
if (field.name === this._source.subtypeField) {
|
|
169861
170234
|
const domainDictionary = this._createDomainDictionary(field);
|
|
170235
|
+
domainDictionary.icon = "subtype";
|
|
169862
170236
|
domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
|
|
169863
170237
|
return domainDictionary;
|
|
169864
170238
|
}
|
|
@@ -169913,7 +170287,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169913
170287
|
return null;
|
|
169914
170288
|
}
|
|
169915
170289
|
const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
|
|
169916
|
-
code: "domainvalues"
|
|
170290
|
+
code: "domainvalues",
|
|
169917
170291
|
});
|
|
169918
170292
|
const domainDictionary = this._createDomainDictionary(field);
|
|
169919
170293
|
domainDictionary.variables.push(domainValuesGroup);
|
|
@@ -169931,7 +170305,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169931
170305
|
profile: this._profile,
|
|
169932
170306
|
label: `${label}`,
|
|
169933
170307
|
description: t.name,
|
|
169934
|
-
snippet: `"${label}"
|
|
170308
|
+
snippet: `"${label}"`,
|
|
169935
170309
|
});
|
|
169936
170310
|
}) ?? [];
|
|
169937
170311
|
return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
|
|
@@ -169942,7 +170316,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169942
170316
|
label: `${v.code}`,
|
|
169943
170317
|
description: v.name,
|
|
169944
170318
|
snippet: `"${v.code}"`,
|
|
169945
|
-
filterDescription: true
|
|
170319
|
+
filterDescription: true,
|
|
169946
170320
|
}));
|
|
169947
170321
|
return new GroupOfVariables(this._profile, label, values);
|
|
169948
170322
|
}
|
|
@@ -169968,8 +170342,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169968
170342
|
code: "domainvaluesfortypeformat",
|
|
169969
170343
|
formatValues: {
|
|
169970
170344
|
fieldName: alias,
|
|
169971
|
-
typeName: type.name
|
|
169972
|
-
}
|
|
170345
|
+
typeName: type.name,
|
|
170346
|
+
},
|
|
169973
170347
|
});
|
|
169974
170348
|
const id = isSubtypeInstance(type) ? type.code : type.id;
|
|
169975
170349
|
const label = `${id}`;
|
|
@@ -169979,7 +170353,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
169979
170353
|
label,
|
|
169980
170354
|
snippet,
|
|
169981
170355
|
description: type.name,
|
|
169982
|
-
declaration: { name: alias }
|
|
170356
|
+
declaration: { name: alias },
|
|
169983
170357
|
});
|
|
169984
170358
|
subtypeDictionary.variables = [domainValuesGroup];
|
|
169985
170359
|
variables.push(subtypeDictionary);
|
|
@@ -170001,7 +170375,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170001
170375
|
description: alias,
|
|
170002
170376
|
snippet: valueSnippet,
|
|
170003
170377
|
icon: "form-dropdown",
|
|
170004
|
-
declaration: { name: field.name }
|
|
170378
|
+
declaration: { name: field.name },
|
|
170005
170379
|
});
|
|
170006
170380
|
// Add the header group
|
|
170007
170381
|
const headerGroup = new GroupOfVariables(this._profile, alias, [
|
|
@@ -170009,8 +170383,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170009
170383
|
profile: this._profile,
|
|
170010
170384
|
label: valueSnippet,
|
|
170011
170385
|
description: "",
|
|
170012
|
-
snippet: valueSnippet
|
|
170013
|
-
})
|
|
170386
|
+
snippet: valueSnippet,
|
|
170387
|
+
}),
|
|
170014
170388
|
]);
|
|
170015
170389
|
domainDictionary.variables = [headerGroup];
|
|
170016
170390
|
// Add the SubtypeName or DomainName snippet if available
|
|
@@ -170020,7 +170394,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170020
170394
|
profile: this._profile,
|
|
170021
170395
|
label: subtypeOrDomainNameSnippet,
|
|
170022
170396
|
description: "",
|
|
170023
|
-
snippet: subtypeOrDomainNameSnippet
|
|
170397
|
+
snippet: subtypeOrDomainNameSnippet,
|
|
170024
170398
|
}));
|
|
170025
170399
|
}
|
|
170026
170400
|
return domainDictionary;
|
|
@@ -170050,10 +170424,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
170050
170424
|
declaration: { definition: relatedLayer },
|
|
170051
170425
|
label: relatedLayer.title,
|
|
170052
170426
|
description: "",
|
|
170053
|
-
nonInteractive: true
|
|
170427
|
+
nonInteractive: true,
|
|
170054
170428
|
}, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
|
|
170055
170429
|
}));
|
|
170056
|
-
relationshipsGroup.variables = relationshipItems.filter(
|
|
170430
|
+
relationshipsGroup.variables = relationshipItems.filter(isNotNull);
|
|
170057
170431
|
if (!relationshipsGroup.variables.length) {
|
|
170058
170432
|
return null;
|
|
170059
170433
|
}
|
|
@@ -170066,8 +170440,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170066
170440
|
this.type = "feature";
|
|
170067
170441
|
}
|
|
170068
170442
|
get title() {
|
|
170069
|
-
if (
|
|
170070
|
-
return this._source.title;
|
|
170443
|
+
if (isTitleCapableSource(this._source)) {
|
|
170444
|
+
return this._source.title ?? "";
|
|
170071
170445
|
}
|
|
170072
170446
|
return { code: "feature" };
|
|
170073
170447
|
}
|
|
@@ -170081,14 +170455,14 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170081
170455
|
throw new Error("Invalid definition");
|
|
170082
170456
|
}
|
|
170083
170457
|
// The title group and snippet
|
|
170084
|
-
const title =
|
|
170458
|
+
const title = isTitleCapableSource(this._source) ? this._source.title ?? "" : "";
|
|
170085
170459
|
this.variables.push(new GroupOfVariables(this._profile, title, [
|
|
170086
170460
|
new ValueVariable({
|
|
170087
170461
|
profile: this._profile,
|
|
170088
170462
|
label: this.snippet,
|
|
170089
170463
|
description: "",
|
|
170090
|
-
snippet: this.snippet
|
|
170091
|
-
})
|
|
170464
|
+
snippet: this.snippet,
|
|
170465
|
+
}),
|
|
170092
170466
|
]));
|
|
170093
170467
|
// The collection of feature attribute values
|
|
170094
170468
|
const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
|
|
@@ -170103,7 +170477,7 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170103
170477
|
description: "Geometry",
|
|
170104
170478
|
snippet,
|
|
170105
170479
|
icon: "shapes",
|
|
170106
|
-
filterDescription: true
|
|
170480
|
+
filterDescription: true,
|
|
170107
170481
|
});
|
|
170108
170482
|
valuesGroup.variables.push(geometryProperty);
|
|
170109
170483
|
}
|
|
@@ -170116,8 +170490,8 @@ class FeatureVariable extends SourceBasedVariable {
|
|
|
170116
170490
|
this.variables.push(relationshipsGroup);
|
|
170117
170491
|
}
|
|
170118
170492
|
}
|
|
170119
|
-
catch (
|
|
170120
|
-
console.error("
|
|
170493
|
+
catch (error) {
|
|
170494
|
+
console.error("Error with definition", error, this._definition);
|
|
170121
170495
|
this._source = null;
|
|
170122
170496
|
}
|
|
170123
170497
|
finally {
|
|
@@ -170139,8 +170513,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170139
170513
|
this.type = "featureSet";
|
|
170140
170514
|
}
|
|
170141
170515
|
get title() {
|
|
170142
|
-
if (
|
|
170143
|
-
return this._source.title;
|
|
170516
|
+
if (isTitleCapableSource(this._source)) {
|
|
170517
|
+
return this._source.title ?? "";
|
|
170144
170518
|
}
|
|
170145
170519
|
return { code: "featureset" };
|
|
170146
170520
|
}
|
|
@@ -170167,8 +170541,8 @@ class FeatureSetVariable extends SourceBasedVariable {
|
|
|
170167
170541
|
this.variables.push(relationshipsGroup);
|
|
170168
170542
|
}
|
|
170169
170543
|
}
|
|
170170
|
-
catch (
|
|
170171
|
-
console.error("
|
|
170544
|
+
catch (error) {
|
|
170545
|
+
console.error("Error with definition", error, this._definition);
|
|
170172
170546
|
this._source = null;
|
|
170173
170547
|
}
|
|
170174
170548
|
finally {
|
|
@@ -170217,7 +170591,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170217
170591
|
return this._profile?.intlStrings.map ?? "map";
|
|
170218
170592
|
}
|
|
170219
170593
|
async loadSource() {
|
|
170220
|
-
if (
|
|
170594
|
+
if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
|
|
170221
170595
|
return await this._loadPromise;
|
|
170222
170596
|
}
|
|
170223
170597
|
this._loadPromise = this._loadSource();
|
|
@@ -170238,24 +170612,24 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170238
170612
|
: {
|
|
170239
170613
|
code: "webmapformat",
|
|
170240
170614
|
formatValues: {
|
|
170241
|
-
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
|
|
170242
|
-
}
|
|
170615
|
+
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
|
|
170616
|
+
},
|
|
170243
170617
|
};
|
|
170244
170618
|
const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
|
|
170245
170619
|
new ValueVariable({
|
|
170246
170620
|
profile: this._profile,
|
|
170247
170621
|
label: this.snippet,
|
|
170248
170622
|
description: "",
|
|
170249
|
-
snippet: this.snippet
|
|
170250
|
-
})
|
|
170623
|
+
snippet: this.snippet,
|
|
170624
|
+
}),
|
|
170251
170625
|
]);
|
|
170252
170626
|
// Creates the groups for the layer and tables
|
|
170253
170627
|
const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
|
|
170254
170628
|
const tablesGroup = new GroupOfVariables(this._profile, { code: "tables" }, this._featureSetCollections.tables);
|
|
170255
170629
|
this.variables.push(headerGroup, layersGroup, tablesGroup);
|
|
170256
170630
|
}
|
|
170257
|
-
catch (
|
|
170258
|
-
console.error("
|
|
170631
|
+
catch (error) {
|
|
170632
|
+
console.error("Error with definition", error, this._definition);
|
|
170259
170633
|
this._featureSetCollections = null;
|
|
170260
170634
|
}
|
|
170261
170635
|
finally {
|
|
@@ -170270,7 +170644,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170270
170644
|
if (isMapInstance(this._definition)) {
|
|
170271
170645
|
return await this._featureSetCollectionFromMap(this._definition);
|
|
170272
170646
|
}
|
|
170273
|
-
if (
|
|
170647
|
+
if (isUrlDefinition(this._definition)) {
|
|
170274
170648
|
return await this._featureSetCollectionFromUrl(this._definition.url);
|
|
170275
170649
|
}
|
|
170276
170650
|
if (isPortalItemDefinition(this._definition)) {
|
|
@@ -170278,10 +170652,6 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170278
170652
|
// or Feature Service
|
|
170279
170653
|
return await this._featureSetCollectionFromPortalItem(this._definition.portalItem);
|
|
170280
170654
|
}
|
|
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
170655
|
return null;
|
|
170286
170656
|
}
|
|
170287
170657
|
async _featureSetCollectionFromMap(map) {
|
|
@@ -170294,7 +170664,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170294
170664
|
return {
|
|
170295
170665
|
layers: this._convertWebMapLayersToVariables(map.layers),
|
|
170296
170666
|
tables: this._convertWebMapLayersToVariables(map.tables, true),
|
|
170297
|
-
source: map
|
|
170667
|
+
source: map,
|
|
170298
170668
|
};
|
|
170299
170669
|
}
|
|
170300
170670
|
async _featureSetCollectionFromPortalItem(definition) {
|
|
@@ -170325,12 +170695,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170325
170695
|
}
|
|
170326
170696
|
const metadata = await serviceMetaData(processedUrl);
|
|
170327
170697
|
const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
|
|
170328
|
-
const featureLayer = await
|
|
170698
|
+
const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170329
170699
|
await featureLayer.load();
|
|
170330
170700
|
return this._createFeatureSetVariable(featureLayer);
|
|
170331
170701
|
}));
|
|
170332
170702
|
const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
|
|
170333
|
-
const table = await
|
|
170703
|
+
const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
|
|
170334
170704
|
await table.load();
|
|
170335
170705
|
return this._createFeatureSetVariable(table);
|
|
170336
170706
|
}));
|
|
@@ -170360,9 +170730,11 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170360
170730
|
return new FeatureSetVariable(this, {
|
|
170361
170731
|
profile: this._profile,
|
|
170362
170732
|
declaration: { name: featureLayer.title, definition: featureLayer },
|
|
170363
|
-
label:
|
|
170733
|
+
label: isFromWebMap
|
|
170734
|
+
? featureLayer.title
|
|
170735
|
+
: featureLayer.sourceJSON.name ?? featureLayer.title,
|
|
170364
170736
|
description: "",
|
|
170365
|
-
nonInteractive: true
|
|
170737
|
+
nonInteractive: true,
|
|
170366
170738
|
}, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
|
|
170367
170739
|
}
|
|
170368
170740
|
_makeFeatureSetSnippets(featureLayer, isFromWebMap = false) {
|
|
@@ -170374,7 +170746,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170374
170746
|
const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayer.title}")`;
|
|
170375
170747
|
return [
|
|
170376
170748
|
new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
|
|
170377
|
-
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
|
|
170749
|
+
new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
|
|
170378
170750
|
];
|
|
170379
170751
|
}
|
|
170380
170752
|
else {
|
|
@@ -170399,7 +170771,7 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170399
170771
|
// Delay the load of the variable declarations so we have a `this`
|
|
170400
170772
|
super(undefined, {
|
|
170401
170773
|
profile: null,
|
|
170402
|
-
declaration: { properties: [] }
|
|
170774
|
+
declaration: { properties: [] },
|
|
170403
170775
|
});
|
|
170404
170776
|
this.definition = definition;
|
|
170405
170777
|
this.intlStrings = intlStrings;
|
|
@@ -170431,28 +170803,20 @@ class EditorProfile extends DictionaryVariable {
|
|
|
170431
170803
|
toEditorProfileDefinition() {
|
|
170432
170804
|
return {
|
|
170433
170805
|
...this.definition,
|
|
170434
|
-
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
|
|
170806
|
+
variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
|
|
170435
170807
|
};
|
|
170436
170808
|
}
|
|
170437
170809
|
}
|
|
170438
170810
|
//#endregion
|
|
170439
170811
|
|
|
170440
170812
|
function isFeatureDefinition(item) {
|
|
170441
|
-
return (
|
|
170442
|
-
isFeatureSetInstance(item) ||
|
|
170443
|
-
isUrlDefinition(item) ||
|
|
170444
|
-
isFieldsDefinition(item) ||
|
|
170445
|
-
isFeatureLayerItemDefinition(item));
|
|
170813
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170446
170814
|
}
|
|
170447
170815
|
function isFeatureSetDefinition(item) {
|
|
170448
|
-
return (
|
|
170449
|
-
isFeatureSetInstance(item) ||
|
|
170450
|
-
isUrlDefinition(item) ||
|
|
170451
|
-
isFieldsDefinition(item) ||
|
|
170452
|
-
isFeatureLayerItemDefinition(item));
|
|
170816
|
+
return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
|
|
170453
170817
|
}
|
|
170454
170818
|
function isFeatureSetCollectionDefinition(item) {
|
|
170455
|
-
return isPortalItemDefinition(item) || isMapInstance(item) ||
|
|
170819
|
+
return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
|
|
170456
170820
|
}
|
|
170457
170821
|
/**
|
|
170458
170822
|
* Get a PredefinedProfile for a locale. If not already loaded then fetch it.
|
|
@@ -170464,7 +170828,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
|
|
|
170464
170828
|
if (profiles) {
|
|
170465
170829
|
return profiles;
|
|
170466
170830
|
}
|
|
170467
|
-
if (!
|
|
170831
|
+
if (!supportedLocales.has(locale)) {
|
|
170468
170832
|
return await getSdkPredefinedProfiles("en");
|
|
170469
170833
|
}
|
|
170470
170834
|
try {
|
|
@@ -170502,7 +170866,7 @@ function isExtendedPredefinedProfileDefinition(item) {
|
|
|
170502
170866
|
return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
|
|
170503
170867
|
}
|
|
170504
170868
|
function convertApiVariables(variables) {
|
|
170505
|
-
return variables
|
|
170869
|
+
return variables?.map(convertApiVariable);
|
|
170506
170870
|
}
|
|
170507
170871
|
function convertApiVariable(variable) {
|
|
170508
170872
|
switch (variable.type) {
|
|
@@ -170510,13 +170874,13 @@ function convertApiVariable(variable) {
|
|
|
170510
170874
|
return {
|
|
170511
170875
|
...variable,
|
|
170512
170876
|
type: variable.type,
|
|
170513
|
-
properties: convertApiVariables(variable.properties)
|
|
170877
|
+
properties: convertApiVariables(variable.properties),
|
|
170514
170878
|
};
|
|
170515
170879
|
case "array": {
|
|
170516
170880
|
return {
|
|
170517
170881
|
...variable,
|
|
170518
170882
|
type: variable.type,
|
|
170519
|
-
elementType: { type: "number", name: "number" }
|
|
170883
|
+
elementType: { type: "number", name: "number" },
|
|
170520
170884
|
};
|
|
170521
170885
|
}
|
|
170522
170886
|
default:
|
|
@@ -170534,43 +170898,47 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170534
170898
|
const editorProfile = {
|
|
170535
170899
|
bundles: [...sdkPredefinedProfile.bundles],
|
|
170536
170900
|
variables: [],
|
|
170537
|
-
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
|
|
170901
|
+
hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
|
|
170538
170902
|
};
|
|
170539
170903
|
// Merge the SDK variables' definitions/properties with the predefined profile definitions.
|
|
170540
|
-
sdkPredefinedProfile.variables.forEach((
|
|
170904
|
+
sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
|
|
170541
170905
|
// Don't include disabled variables
|
|
170542
|
-
if (predefinedProfile.disabledVariables?.includes(
|
|
170906
|
+
if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
|
|
170543
170907
|
return;
|
|
170544
170908
|
}
|
|
170545
|
-
// Try to get a definition from the predefined profile.
|
|
170546
|
-
const definition = predefinedProfile.definitions[
|
|
170909
|
+
// Try to get a definition from the predefined profile, for the variable that needs one.
|
|
170910
|
+
const definition = predefinedProfile.definitions[predefinedVariable.name];
|
|
170547
170911
|
// Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
|
|
170548
170912
|
// despite the type checking from the switch statement.
|
|
170549
|
-
switch (
|
|
170550
|
-
case "dictionary":
|
|
170913
|
+
switch (predefinedVariable.type) {
|
|
170914
|
+
case "dictionary": {
|
|
170551
170915
|
// For dictionary, we support properties overrride
|
|
170552
170916
|
return editorProfile.variables.push(convertApiVariable({
|
|
170553
|
-
...
|
|
170554
|
-
type:
|
|
170555
|
-
properties: Array.isArray(definition) ? [...definition] :
|
|
170917
|
+
...predefinedVariable,
|
|
170918
|
+
type: predefinedVariable.type,
|
|
170919
|
+
properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
|
|
170556
170920
|
}));
|
|
170921
|
+
}
|
|
170557
170922
|
case "feature":
|
|
170558
|
-
|
|
170559
|
-
|
|
170923
|
+
// If the definition is not valid, then we don't include it.
|
|
170924
|
+
if (!isFeatureDefinition(definition)) {
|
|
170925
|
+
return;
|
|
170560
170926
|
}
|
|
170561
|
-
return editorProfile.variables.push({ ...
|
|
170927
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170562
170928
|
case "featureSet":
|
|
170563
|
-
|
|
170564
|
-
|
|
170929
|
+
// If the definition is not valid, then we don't include it.
|
|
170930
|
+
if (!isFeatureSetDefinition(definition)) {
|
|
170931
|
+
return;
|
|
170565
170932
|
}
|
|
170566
|
-
return editorProfile.variables.push({ ...
|
|
170933
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170567
170934
|
case "featureSetCollection":
|
|
170568
|
-
|
|
170569
|
-
|
|
170935
|
+
// If the definition is not valid, then we don't include it.
|
|
170936
|
+
if (!isFeatureSetCollectionDefinition(definition)) {
|
|
170937
|
+
return;
|
|
170570
170938
|
}
|
|
170571
|
-
return editorProfile.variables.push({ ...
|
|
170939
|
+
return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
|
|
170572
170940
|
default:
|
|
170573
|
-
return editorProfile.variables.push(convertApiVariable(
|
|
170941
|
+
return editorProfile.variables.push(convertApiVariable(predefinedVariable));
|
|
170574
170942
|
}
|
|
170575
170943
|
});
|
|
170576
170944
|
if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
|
|
@@ -170581,7 +170949,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
170581
170949
|
|
|
170582
170950
|
const arcadeLanguageId = "arcade";
|
|
170583
170951
|
const defaultContext = {
|
|
170584
|
-
locale: "en"
|
|
170952
|
+
locale: "en",
|
|
170585
170953
|
};
|
|
170586
170954
|
class ArcadeLanguageServiceDefaults {
|
|
170587
170955
|
constructor() {
|
|
@@ -170635,7 +171003,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170635
171003
|
if (isPredefinedProfile(definition)) {
|
|
170636
171004
|
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
170637
171005
|
}
|
|
170638
|
-
const intlStrings = await
|
|
171006
|
+
const intlStrings = await fetchT9NStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
170639
171007
|
if (!intlStrings) {
|
|
170640
171008
|
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
170641
171009
|
}
|
|
@@ -170647,7 +171015,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170647
171015
|
this.updateApiContextForModel(modelId, {
|
|
170648
171016
|
locale: apiContext.locale,
|
|
170649
171017
|
profile: apiProfile,
|
|
170650
|
-
snippets: apiContext.snippets
|
|
171018
|
+
snippets: apiContext.snippets,
|
|
170651
171019
|
});
|
|
170652
171020
|
}
|
|
170653
171021
|
/**
|
|
@@ -170714,7 +171082,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
170714
171082
|
}
|
|
170715
171083
|
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
170716
171084
|
const arcade = {
|
|
170717
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
|
|
171085
|
+
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
170718
171086
|
};
|
|
170719
171087
|
|
|
170720
|
-
export { B, D,
|
|
171088
|
+
export { observeAncestorsMutation as A, KeyMod as B, monaco_editor_core_star as C, Deferred as D, typescriptDefaults as E, main as F, debounce as G, Emitter as H, IStandaloneThemeService as I, KeyCode as K, MarkerSeverity as M, Range as R, StandaloneServices as S, Uri as U, arcade as a, commonjsGlobal as b, createCommonjsModule as c, camelToKebab as d, editor as e, safeAsyncCall as f, generateTokensCSSForColorMap as g, devToolsAwareTimeout as h, startLocaleObserver as i, getElementLocales as j, isURL as k, hasSameOrigin as l, importRequest as m, languages as n, arcadeDefaults as o, setFocusOnElement as p, filterCollection as q, addLTRMark as r, safeCall as s, importArcade as t, generateGuid as u, getElementTheme as v, setValuesInString as w, quoteString as x, supportedFields as y, createFilterExpression as z };
|