@arcgis/coding-components 4.29.0-beta.99 → 4.29.0
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.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +113 -113
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +19 -19
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +111 -111
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +66 -66
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ar.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.bg.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.bs.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ca.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.cs.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.da.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.de.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.el.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.en.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.es.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.et.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.fi.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.fr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.he.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.hr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.hu.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.id.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.it.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ja.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ko.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.lt.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.lv.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.nb.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.nl.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pl.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pt-BR.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.pt-PT.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ro.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.ru.json +3 -3
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sk.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sl.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.sv.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.th.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.tr.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.uk.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.vi.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-CN.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-HK.json +4 -4
- package/dist/arcgis-coding-components/assets/arcade-language/profiles/arcade-profiles.t9n.zh-TW.json +4 -4
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-e1cb02b3.js → p-0a2edf01.js} +2 -2
- package/dist/arcgis-coding-components/p-11e79992.js +6 -0
- package/dist/arcgis-coding-components/{p-f75beb80.js → p-36e2cbc2.js} +3 -3
- package/dist/arcgis-coding-components/{p-457e3916.js → p-4406b5a8.js} +2 -2
- package/dist/arcgis-coding-components/{p-87d7ad9e.js → p-4eb30e60.js} +1 -1
- package/dist/arcgis-coding-components/{p-7f9d3fdc.js → p-619ca372.js} +1 -1
- package/dist/arcgis-coding-components/{p-7e0e8ecc.js → p-71125c69.js} +2 -2
- package/dist/arcgis-coding-components/{p-0bab0228.js → p-8d7f0979.js} +2 -2
- package/dist/arcgis-coding-components/p-9b8091c1.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-ad86a5f5.js → p-bd81fdff.js} +11 -11
- package/dist/arcgis-coding-components/{p-f23f7fee.js → p-ecc8dd8a.js} +2 -2
- package/dist/arcgis-coding-components/{p-4648782b.js → p-f9016c56.js} +2 -2
- package/dist/cjs/{arcade-defaults-5dd9ebb7.js → arcade-defaults-b30ccec8.js} +271 -236
- package/dist/cjs/{arcade-mode-0b4c53a1.js → arcade-mode-eb755260.js} +11 -14
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +160 -184
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-fe7f8980.js → css-9e907aa0.js} +1 -1
- package/dist/cjs/{cssMode-4c9b3a32.js → cssMode-e4189b13.js} +3 -3
- package/dist/cjs/{html-b044fbba.js → html-2582ae43.js} +3 -3
- package/dist/cjs/{htmlMode-956a6ffa.js → htmlMode-0edcf1ee.js} +3 -3
- package/dist/cjs/{index-aaceaf1f.js → index-54d6f9be.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-6c55ac8b.js → javascript-425c653a.js} +4 -4
- package/dist/cjs/{jsonMode-d83e322c.js → jsonMode-eea03515.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-5c5ffa3e.js → tsMode-b92c9221.js} +3 -3
- package/dist/cjs/{typescript-6143656a.js → typescript-cfc1221c.js} +3 -3
- package/dist/components/arcade-api.js +20 -18
- package/dist/components/arcade-contribution.js +9 -8
- package/dist/components/arcade-defaults.js +188 -168
- package/dist/components/arcade-mode.js +10 -12
- package/dist/components/arcade-results.js +29 -83
- package/dist/components/arcade-suggestions.js +15 -12
- package/dist/components/arcade-variables.js +30 -21
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +61 -49
- 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-code-editor.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +37 -23
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +3 -3
- package/dist/components/markdown.js +10 -1
- package/dist/components/utilities.js +4 -4
- package/dist/esm/{arcade-defaults-2d7283d4.js → arcade-defaults-a5dc6132.js} +267 -233
- package/dist/esm/{arcade-mode-a8abe5af.js → arcade-mode-d06b6e4f.js} +11 -14
- package/dist/esm/arcgis-arcade-api_6.entry.js +160 -184
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-d31a02ca.js → css-59b4804d.js} +1 -1
- package/dist/esm/{cssMode-5ee45e91.js → cssMode-2bce7da7.js} +3 -3
- package/dist/esm/{html-5c2e488c.js → html-3ad47fc0.js} +3 -3
- package/dist/esm/{htmlMode-376cd5e8.js → htmlMode-6cb73c91.js} +3 -3
- package/dist/esm/{index-1b265749.js → index-ee54d182.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-13ddec2b.js → javascript-8917f926.js} +4 -4
- package/dist/esm/{jsonMode-674e89d6.js → jsonMode-9a1dbf00.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-4c4398d7.js → tsMode-2caf1509.js} +3 -3
- package/dist/esm/{typescript-b328b622.js → typescript-a3abccc0.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-editor/arcade-editor.d.ts +2 -7
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +0 -1
- package/dist/types/components.d.ts +2 -7
- package/dist/types/utils/arcade-monaco/arcade-contribution.d.ts +2 -2
- package/dist/types/utils/arcade-monaco/arcade-theme.d.ts +1 -0
- package/dist/types/utils/constants.d.ts +2 -2
- package/dist/types/utils/fields.d.ts +1 -0
- package/dist/types/utils/markdown.d.ts +3 -0
- package/dist/types/utils/profile/editor-profile.d.ts +49 -63
- package/dist/types/utils/profile/types.d.ts +122 -1
- package/dist/types/utils/profile/utils.d.ts +22 -9
- package/package.json +8 -8
- package/dist/arcgis-coding-components/p-6d56a4b8.entry.js +0 -6
- package/dist/arcgis-coding-components/p-a75f5087.js +0 -6
- package/dist/components/functional-components.js +0 -15
- package/dist/types/utils/functional-components.d.ts +0 -7
- package/dist/types/utils/json-format.d.ts +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h as h$1, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { editor, KeyCode } from 'monaco-editor';
|
|
8
8
|
import { e as executeScript, D as DevelopersWebSitePath, d as defineCustomElement$5 } from './arcade-results.js';
|
|
9
|
-
import { h, U, k, B,
|
|
9
|
+
import { h, U, k, B, q } from './index2.js';
|
|
10
10
|
import { s as setupMonacoEnvironment, a as getArcadeDiagnosticService } from './arcade-contribution.js';
|
|
11
11
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
12
12
|
import '@esri/calcite-components/dist/components/calcite-action-bar.js';
|
|
13
13
|
import '@esri/calcite-components/dist/components/calcite-action-group.js';
|
|
14
14
|
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
15
|
+
import '@esri/calcite-components/dist/components/calcite-tooltip.js';
|
|
15
16
|
import { d as defineCustomElement$6 } from './arcade-api.js';
|
|
16
17
|
import { d as defineCustomElement$4 } from './arcade-suggestions.js';
|
|
17
18
|
import { d as defineCustomElement$3 } from './arcade-variables.js';
|
|
@@ -58,7 +59,8 @@ function setupArcadeTheme() {
|
|
|
58
59
|
});
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
const
|
|
62
|
+
const monacoThemeKeys = ["comment", "keyword", "identifier", "string", "number", "constant"];
|
|
63
|
+
const colorRulesKeys = [...monacoThemeKeys, "date"];
|
|
62
64
|
function updateThemeColors(theme, colorRules) {
|
|
63
65
|
if (colorRules === undefined) {
|
|
64
66
|
setupArcadeTheme();
|
|
@@ -66,14 +68,7 @@ function updateThemeColors(theme, colorRules) {
|
|
|
66
68
|
}
|
|
67
69
|
const base = theme === "light" ? "vs" : "vs-dark";
|
|
68
70
|
const rules = [];
|
|
69
|
-
|
|
70
|
-
const foreground = colorRules[key];
|
|
71
|
-
if (!foreground) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
rules.push({ token: `${key}.arc`, foreground });
|
|
75
|
-
});
|
|
76
|
-
validKeys.forEach((key) => {
|
|
71
|
+
monacoThemeKeys.forEach((key) => {
|
|
77
72
|
const foreground = colorRules[key];
|
|
78
73
|
if (!foreground) {
|
|
79
74
|
return;
|
|
@@ -109,15 +104,19 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
109
104
|
this._showExecutionPanel = true;
|
|
110
105
|
this._executingScript = true;
|
|
111
106
|
this._consoleLogs = [];
|
|
112
|
-
setTimeout(async () => {
|
|
107
|
+
setTimeout(() => void (async () => {
|
|
113
108
|
const script = await this._codeEditorElt?.getValue();
|
|
114
109
|
this._executionResult = await executeScript(editorProfile.definition, script, testContext, (log) => setTimeout(() => (this._consoleLogs = [...this._consoleLogs, log]), 0));
|
|
115
110
|
this._executingScript = false;
|
|
116
|
-
}, 0);
|
|
111
|
+
})(), 0);
|
|
112
|
+
};
|
|
113
|
+
this._toggleShowExecutionPanel = () => {
|
|
114
|
+
this._showExecutionPanel = !this._showExecutionPanel;
|
|
117
115
|
};
|
|
118
|
-
this.
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
this._toggleSideActionBarExpanded = () => {
|
|
117
|
+
this.sideActionBarExpanded = !this.sideActionBarExpanded;
|
|
118
|
+
};
|
|
119
|
+
this._toggleSidePanel = (e) => {
|
|
121
120
|
if (!e.target) {
|
|
122
121
|
return;
|
|
123
122
|
}
|
|
@@ -126,18 +125,18 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
126
125
|
this.openedSidePanel = panelName === this.openedSidePanel ? "none" : panelName;
|
|
127
126
|
if (this.openedSidePanel === "none") {
|
|
128
127
|
// Reset focus on the code editor if no panel displayed
|
|
129
|
-
|
|
128
|
+
this._codeEditorElt?.setFocus().catch(console.error);
|
|
130
129
|
}
|
|
131
130
|
};
|
|
132
|
-
this._openArcadeHelp = () => window.open(DevelopersWebSitePath, "Arcade Help");
|
|
131
|
+
this._openArcadeHelp = () => void window.open(DevelopersWebSitePath, "Arcade Help");
|
|
133
132
|
this._emitScriptChange = (e) => {
|
|
134
133
|
e.stopPropagation();
|
|
135
134
|
this.scriptChange.emit(e.detail);
|
|
136
135
|
};
|
|
137
|
-
this._insertAsSnippet =
|
|
138
|
-
this._insertAsText =
|
|
139
|
-
this._onResultPanelChange = (e) => (this._resultPanel = e.detail);
|
|
140
|
-
this._onExecutionPanelClose = () => (this._showExecutionPanel = false);
|
|
136
|
+
this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
|
|
137
|
+
this._insertAsText = (e) => void this._codeEditorElt?.insertText(e.detail).catch(console.error);
|
|
138
|
+
this._onResultPanelChange = (e) => void (this._resultPanel = e.detail);
|
|
139
|
+
this._onExecutionPanelClose = () => void (this._showExecutionPanel = false);
|
|
141
140
|
this._lang = "";
|
|
142
141
|
this._t9nLocale = "";
|
|
143
142
|
this._t9nStrings = undefined;
|
|
@@ -164,13 +163,13 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
164
163
|
if (newValue === oldValue) {
|
|
165
164
|
return;
|
|
166
165
|
}
|
|
167
|
-
this._updateEditorProfile();
|
|
166
|
+
this._updateEditorProfile().catch(console.error);
|
|
168
167
|
}
|
|
169
168
|
_testDataChanged(newValue, oldValue) {
|
|
170
169
|
if (newValue === oldValue || !this._showExecutionPanel) {
|
|
171
170
|
return;
|
|
172
171
|
}
|
|
173
|
-
this._executeScript();
|
|
172
|
+
this._executeScript().catch(console.error);
|
|
174
173
|
}
|
|
175
174
|
_snippetChanged(newValue, oldValue) {
|
|
176
175
|
if (newValue === oldValue) {
|
|
@@ -221,14 +220,6 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
221
220
|
const script = await this._codeEditorElt?.getValue();
|
|
222
221
|
return await executeScript(editorProfile.definition, script, this.testData);
|
|
223
222
|
}
|
|
224
|
-
/**
|
|
225
|
-
* Returns the Arcade output type for the script.
|
|
226
|
-
* @deprecated Use getTestResult
|
|
227
|
-
* @internal
|
|
228
|
-
*/
|
|
229
|
-
async getOutputType() {
|
|
230
|
-
return (await this.getTestResult()).type;
|
|
231
|
-
}
|
|
232
223
|
/**
|
|
233
224
|
* Allows to change theme colors
|
|
234
225
|
* @internal
|
|
@@ -237,13 +228,12 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
237
228
|
const theme = k(this._hostElement);
|
|
238
229
|
updateThemeColors(theme, colorRules);
|
|
239
230
|
if (colorRules === undefined) {
|
|
240
|
-
|
|
231
|
+
colorRulesKeys.forEach((key) => {
|
|
241
232
|
this._hostElement.style.removeProperty(`--arcgis-arcade-editor-${key}`);
|
|
242
233
|
});
|
|
243
234
|
return;
|
|
244
235
|
}
|
|
245
|
-
|
|
246
|
-
// @ts-expect-error
|
|
236
|
+
colorRulesKeys.forEach((key) => {
|
|
247
237
|
const foreground = colorRules[key];
|
|
248
238
|
if (!foreground) {
|
|
249
239
|
return;
|
|
@@ -284,14 +274,14 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
284
274
|
contextMenuOrder: 1,
|
|
285
275
|
run: () => {
|
|
286
276
|
if (this.testData) {
|
|
287
|
-
this._executeScript();
|
|
277
|
+
this._executeScript().catch(console.error);
|
|
288
278
|
}
|
|
289
279
|
}
|
|
290
280
|
});
|
|
291
281
|
await this._codeEditorElt?.setFocus();
|
|
292
282
|
}
|
|
293
283
|
disconnectedCallback() {
|
|
294
|
-
|
|
284
|
+
q(this);
|
|
295
285
|
arcadeDefaults.disposeApiContextForModel(this._modelId);
|
|
296
286
|
arcadeDefaults.disposeEditorProfileForModel(this._modelId);
|
|
297
287
|
while (this._disposables.length) {
|
|
@@ -342,22 +332,45 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
342
332
|
}
|
|
343
333
|
//#endregion
|
|
344
334
|
//#region Rendering the Action Bar
|
|
335
|
+
renderAction({ id, label, icon, active, panelName, onClick = this._toggleSidePanel }) {
|
|
336
|
+
return (h$1(Fragment, null, h$1("calcite-action", { id: id, text: label, icon: icon, active: active, onClick: onClick, "data-panel-name": panelName }), !this.sideActionBarExpanded && (h$1("calcite-tooltip", { label: label, "reference-element": id }, h$1("span", null, label)))));
|
|
337
|
+
}
|
|
345
338
|
renderSideActionBar() {
|
|
346
339
|
if (this.hideSideBar) {
|
|
347
340
|
return null;
|
|
348
341
|
}
|
|
349
|
-
|
|
342
|
+
console.log("expanded", this.sideActionBarExpanded);
|
|
343
|
+
return (h$1("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h$1("calcite-action-group", null, this.renderAction({
|
|
344
|
+
id: "profile-variables-action",
|
|
345
|
+
label: this._t9nStrings?.profilevariables ?? "Profile variables",
|
|
346
|
+
icon: "profile-variables",
|
|
347
|
+
active: this.openedSidePanel === "variables",
|
|
348
|
+
panelName: "variables"
|
|
349
|
+
}), this.renderAction({
|
|
350
|
+
id: "function-action",
|
|
351
|
+
label: this._t9nStrings?.constantsandfunctions ?? "Constants and functions",
|
|
352
|
+
icon: "function",
|
|
353
|
+
active: this.openedSidePanel === "api",
|
|
354
|
+
panelName: "api"
|
|
355
|
+
}), this.suggestions?.length
|
|
356
|
+
? this.renderAction({
|
|
357
|
+
id: "suggestions-action",
|
|
358
|
+
label: this._t9nStrings?.suggestions ?? "Suggestions",
|
|
359
|
+
icon: "lightbulb",
|
|
360
|
+
active: this.openedSidePanel === "suggestions",
|
|
361
|
+
panelName: "suggestions"
|
|
362
|
+
})
|
|
363
|
+
: null, this.hideDocumentationActions
|
|
364
|
+
? null
|
|
365
|
+
: this.renderAction({
|
|
366
|
+
id: "developer-website-action",
|
|
367
|
+
label: this._t9nStrings?.help ?? "Help",
|
|
368
|
+
icon: "question",
|
|
369
|
+
active: false,
|
|
370
|
+
panelName: "none",
|
|
371
|
+
onClick: this._openArcadeHelp
|
|
372
|
+
}))));
|
|
350
373
|
}
|
|
351
|
-
// private renderTooltip(id: string, label: string | undefined): VNode | null {
|
|
352
|
-
// if (this.sideActionBarExpanded || !label) {
|
|
353
|
-
// return null;
|
|
354
|
-
// }
|
|
355
|
-
// return (
|
|
356
|
-
// <calcite-tooltip label={label} reference-element={id} placement="leading-start">
|
|
357
|
-
// <span>{label}</span>
|
|
358
|
-
// </calcite-tooltip>
|
|
359
|
-
// );
|
|
360
|
-
// }
|
|
361
374
|
//#endregion
|
|
362
375
|
//#region Render Side Panel
|
|
363
376
|
renderSidePanel() {
|
|
@@ -421,7 +434,6 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
421
434
|
"setFocus": [64],
|
|
422
435
|
"getEditorInstance": [64],
|
|
423
436
|
"getTestResult": [64],
|
|
424
|
-
"getOutputType": [64],
|
|
425
437
|
"updateThemeColors": [64]
|
|
426
438
|
}, undefined, {
|
|
427
439
|
"profile": ["_profileChanged"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeResults$1, d as defineCustomElement$1 } from './arcade-results.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeSuggestions$1, d as defineCustomElement$1 } from './arcade-suggestions.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeVariables$1, d as defineCustomElement$1 } from './arcade-variables.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisCodeEditor$1, d as defineCustomElement$1 } from './code-editor.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h as h$1, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { Range, editor, Uri, KeyMod, KeyCode } from 'monaco-editor';
|
|
@@ -1,59 +1,70 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
return
|
|
6
|
+
const isAMD = "define" in window && typeof window.define === "function" && "amd" in window.define;
|
|
7
|
+
function isDefaultModule(module) {
|
|
8
|
+
return module.default !== undefined;
|
|
9
|
+
}
|
|
10
|
+
async function requireModule(modulePath) {
|
|
11
|
+
return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
9
12
|
resolve(moduleDefault);
|
|
10
13
|
}));
|
|
11
14
|
}
|
|
12
15
|
async function importLayersFeatureLayer() {
|
|
13
|
-
if (
|
|
14
|
-
return requireModule("esri/layers/FeatureLayer");
|
|
16
|
+
if (isAMD) {
|
|
17
|
+
return await requireModule("esri/layers/FeatureLayer");
|
|
15
18
|
}
|
|
16
19
|
const module = await import('@arcgis/core/layers/FeatureLayer.js');
|
|
17
|
-
return module.default;
|
|
20
|
+
return isDefaultModule(module) ? module.default : module;
|
|
18
21
|
}
|
|
19
22
|
async function importPortalPortalItem() {
|
|
20
|
-
if (
|
|
21
|
-
return requireModule("esri/portal/PortalItem");
|
|
23
|
+
if (isAMD) {
|
|
24
|
+
return await requireModule("esri/portal/PortalItem");
|
|
22
25
|
}
|
|
23
26
|
const module = await import('@arcgis/core/portal/PortalItem.js');
|
|
24
|
-
return module.default;
|
|
27
|
+
return isDefaultModule(module) ? module.default : module;
|
|
28
|
+
}
|
|
29
|
+
async function newPortalPortalItem(properties) {
|
|
30
|
+
const ModConstructor = await importPortalPortalItem();
|
|
31
|
+
return new ModConstructor(properties);
|
|
25
32
|
}
|
|
26
33
|
async function importWebMap() {
|
|
27
|
-
if (
|
|
28
|
-
return requireModule("esri/WebMap");
|
|
34
|
+
if (isAMD) {
|
|
35
|
+
return await requireModule("esri/WebMap");
|
|
29
36
|
}
|
|
30
37
|
const module = await import('@arcgis/core/WebMap.js');
|
|
31
|
-
return module.default;
|
|
38
|
+
return isDefaultModule(module) ? module.default : module;
|
|
39
|
+
}
|
|
40
|
+
async function newWebMap(properties) {
|
|
41
|
+
const ModConstructor = await importWebMap();
|
|
42
|
+
return new ModConstructor(properties);
|
|
32
43
|
}
|
|
33
44
|
async function importWebScene() {
|
|
34
|
-
if (
|
|
35
|
-
return requireModule("esri/WebScene");
|
|
45
|
+
if (isAMD) {
|
|
46
|
+
return await requireModule("esri/WebScene");
|
|
36
47
|
}
|
|
37
48
|
const module = await import('@arcgis/core/WebScene.js');
|
|
38
|
-
return module.default;
|
|
49
|
+
return isDefaultModule(module) ? module.default : module;
|
|
39
50
|
}
|
|
40
51
|
async function newWebScene(properties) {
|
|
41
52
|
const ModConstructor = await importWebScene();
|
|
42
53
|
return new ModConstructor(properties);
|
|
43
54
|
}
|
|
44
55
|
async function importArcade() {
|
|
45
|
-
if (
|
|
46
|
-
return requireModule("esri/arcade");
|
|
56
|
+
if (isAMD) {
|
|
57
|
+
return await requireModule("esri/arcade");
|
|
47
58
|
}
|
|
48
59
|
const module = await import('@arcgis/core/arcade.js');
|
|
49
|
-
return module;
|
|
60
|
+
return isDefaultModule(module) ? module.default : module;
|
|
50
61
|
}
|
|
51
62
|
async function importRequest() {
|
|
52
|
-
if (
|
|
53
|
-
return requireModule("esri/request");
|
|
63
|
+
if (isAMD) {
|
|
64
|
+
return await requireModule("esri/request");
|
|
54
65
|
}
|
|
55
66
|
const module = await import('@arcgis/core/request.js');
|
|
56
|
-
return module.default;
|
|
67
|
+
return isDefaultModule(module) ? module.default : module;
|
|
57
68
|
}
|
|
58
69
|
|
|
59
70
|
/**
|
|
@@ -137,5 +148,8 @@ function supportedFields(fields) {
|
|
|
137
148
|
}
|
|
138
149
|
});
|
|
139
150
|
}
|
|
151
|
+
function fieldAlias(field) {
|
|
152
|
+
return field.alias || field.name;
|
|
153
|
+
}
|
|
140
154
|
|
|
141
|
-
export {
|
|
155
|
+
export { importRequest as a, newWebScene as b, newWebMap as c, fieldTypeToIconName as d, fieldTypeToArcadeType as e, fieldAlias as f, importArcade as g, importLayersFeatureLayer as i, newPortalPortalItem as n, supportedFields as s };
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
|
-
var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return setTimeout(()=>e
|
|
6
|
+
var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function R(e){return "setFocus"in e&&typeof e.setFocus=="function"}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return R(e)&&setTimeout(()=>e.setFocus(),0),!0;for(let r of e.children)if(d(r,t))return !0;let n=e.shadowRoot;if(n){for(let r of n.children)if(d(r,t))return !0}return !1}function W(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}var N='"',w="'";function L(e,t){return new Array(t+1).join(e)}function D(e){let t=N,n=w;e.includes(t)&&!e.includes(n)&&(n=N,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function K(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function Z(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function G(e){return `\u200E${e??""}\u200E`}function ee(e){return e!==null}function te(e){return e!==void 0}function re(e,t=100){let n;return (...r)=>{let o=()=>{clearTimeout(n),e(...r);};clearTimeout(n),n=setTimeout(o,t);}}function se(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function ie(e){try{return new URL(e),!0}catch{return !1}}
|
|
7
7
|
|
|
8
|
-
export { B, D, E,
|
|
8
|
+
export { B, D, E, G, K, U, W, Z, ee as e, h, ie as i, k, q, re as r, se as s, te as t, v, x };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
6
|
import { editor } from 'monaco-editor';
|
|
7
7
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
@@ -22,16 +22,21 @@ async function colorizeCodeElement(e, text) {
|
|
|
22
22
|
if (!e || e.tagName !== "CODE") {
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
+
// eslint-disable-next-line require-atomic-updates
|
|
25
26
|
e.innerHTML = await colorizeCode(text ?? "");
|
|
26
27
|
}
|
|
27
28
|
function generateColorizeStyles() {
|
|
29
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
|
|
28
30
|
const themeService = StandaloneServices.get(IStandaloneThemeService);
|
|
29
31
|
const theme = themeService.getColorTheme();
|
|
30
32
|
return generateTokensCSSForColorMap(theme.tokenTheme.getColorMap());
|
|
33
|
+
/* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
|
|
31
34
|
}
|
|
32
35
|
function onColorizeThemeChanged(func) {
|
|
36
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
|
|
33
37
|
const themeService = StandaloneServices.get(IStandaloneThemeService);
|
|
34
38
|
return themeService.onDidColorThemeChange(() => func());
|
|
39
|
+
/* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -2927,6 +2932,7 @@ var marked_umd = createCommonjsModule(function (module, exports) {
|
|
|
2927
2932
|
}));
|
|
2928
2933
|
});
|
|
2929
2934
|
|
|
2935
|
+
// Set up the marked library to use GitHub Flavored Markdown and to use the custom renderer for links.
|
|
2930
2936
|
marked_umd.marked.use({
|
|
2931
2937
|
gfm: true,
|
|
2932
2938
|
renderer: {
|
|
@@ -2935,6 +2941,9 @@ marked_umd.marked.use({
|
|
|
2935
2941
|
}
|
|
2936
2942
|
}
|
|
2937
2943
|
});
|
|
2944
|
+
/**
|
|
2945
|
+
* Converts a markdown string to HTML using the marked library.
|
|
2946
|
+
*/
|
|
2938
2947
|
function convertMarkdownString(value) {
|
|
2939
2948
|
value ?? (value = "");
|
|
2940
2949
|
const result = marked_umd.marked(typeof value === "string" ? value : value.value, {
|
|
@@ -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.29/esri/copyright.txt for details.
|
|
4
|
-
* v4.29.0
|
|
4
|
+
* v4.29.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { K } from './index2.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -16,7 +16,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
16
16
|
if (!_keys.length) {
|
|
17
17
|
return [];
|
|
18
18
|
}
|
|
19
|
-
const filterExpression =
|
|
19
|
+
const filterExpression = K(filterWord);
|
|
20
20
|
return collection.filter((item) => {
|
|
21
21
|
if (beforeFilteringFn) {
|
|
22
22
|
const res = beforeFilteringFn(item);
|
|
@@ -24,7 +24,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
|
|
|
24
24
|
return res;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
return _keys.some((key) => filterExpression.test(
|
|
27
|
+
return _keys.some((key) => filterExpression.test(String(item[key] ?? "")));
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
/**
|