@arcgis/coding-components 4.29.0-beta.47 → 4.29.0-beta.49

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.
Files changed (94) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +1 -1
  2. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +13 -13
  3. package/dist/arcgis-coding-components/index.esm.js +1 -1
  4. package/dist/arcgis-coding-components/{p-10a322ec.js → p-0d616249.js} +9 -9
  5. package/dist/arcgis-coding-components/p-2c0d6f15.js +2 -0
  6. package/dist/arcgis-coding-components/{p-71faf9a4.js → p-5802524a.js} +1 -1
  7. package/dist/arcgis-coding-components/{p-9eabda86.js → p-5ddccf04.js} +1 -1
  8. package/dist/arcgis-coding-components/p-7475f3a6.js +1 -0
  9. package/dist/arcgis-coding-components/{p-e6ede32d.js → p-7d8caba9.js} +1 -1
  10. package/dist/arcgis-coding-components/{p-f7d7d78d.js → p-9f6db08a.js} +1 -1
  11. package/dist/arcgis-coding-components/{p-e475e6cd.js → p-aefe77ce.js} +1 -1
  12. package/dist/arcgis-coding-components/p-ce2be55e.entry.js +1 -0
  13. package/dist/arcgis-coding-components/{p-ce586a8c.js → p-d425a387.js} +1 -1
  14. package/dist/arcgis-coding-components/{p-c084ada8.js → p-ff21f230.js} +1 -1
  15. package/dist/cjs/{arcade-defaults-8445d852.js → arcade-defaults-2d513b59.js} +1534 -1534
  16. package/dist/cjs/arcade-mode-6219f1b8.js +599 -0
  17. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1404 -1408
  18. package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
  19. package/dist/cjs/{cssMode-e63287bb.js → cssMode-1ec48254.js} +2 -2
  20. package/dist/cjs/{html-c0d4db3b.js → html-0e1741fe.js} +2 -2
  21. package/dist/cjs/{htmlMode-fdc44d57.js → htmlMode-279d3c29.js} +2 -2
  22. package/dist/cjs/{index-6a382a34.js → index-ac186201.js} +67 -24
  23. package/dist/cjs/index.cjs.js +2 -2
  24. package/dist/cjs/{javascript-a419d064.js → javascript-04f1bce0.js} +3 -3
  25. package/dist/cjs/{jsonMode-73aee5d2.js → jsonMode-59322f7a.js} +2 -2
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/cjs/{tsMode-37d1b053.js → tsMode-17561f70.js} +2 -2
  28. package/dist/cjs/{typescript-53f9f36a.js → typescript-b7da8629.js} +2 -2
  29. package/dist/components/arcade-api.js +160 -160
  30. package/dist/components/arcade-contribution.js +60 -60
  31. package/dist/components/arcade-defaults.js +1240 -1240
  32. package/dist/components/arcade-mode.js +514 -513
  33. package/dist/components/arcade-results.js +426 -430
  34. package/dist/components/arcade-suggestions.js +130 -132
  35. package/dist/components/arcade-variables.js +157 -155
  36. package/dist/components/arcgis-arcade-api.d.ts +2 -2
  37. package/dist/components/arcgis-arcade-editor.d.ts +2 -2
  38. package/dist/components/arcgis-arcade-editor.js +391 -391
  39. package/dist/components/arcgis-arcade-results.d.ts +2 -2
  40. package/dist/components/arcgis-arcade-suggestions.d.ts +2 -2
  41. package/dist/components/arcgis-arcade-variables.d.ts +2 -2
  42. package/dist/components/arcgis-code-editor.d.ts +2 -2
  43. package/dist/components/code-editor.js +251 -251
  44. package/dist/components/fields.js +69 -69
  45. package/dist/components/functional-components.js +1 -1
  46. package/dist/components/index2.js +2 -2
  47. package/dist/components/markdown.js +28 -28
  48. package/dist/components/utilities.js +20 -20
  49. package/dist/esm/{arcade-defaults-d7893362.js → arcade-defaults-0bafa696.js} +1534 -1534
  50. package/dist/esm/arcade-mode-c17a1fa1.js +595 -0
  51. package/dist/esm/arcgis-arcade-api_6.entry.js +1404 -1408
  52. package/dist/esm/arcgis-coding-components.js +3 -3
  53. package/dist/esm/{cssMode-b1771f92.js → cssMode-3d18bd2b.js} +2 -2
  54. package/dist/esm/{html-af635d52.js → html-2bce5d77.js} +2 -2
  55. package/dist/esm/{htmlMode-3021c301.js → htmlMode-69d56956.js} +2 -2
  56. package/dist/esm/{index-fd6b2fd8.js → index-022fb97b.js} +67 -24
  57. package/dist/esm/index.js +2 -2
  58. package/dist/esm/{javascript-70589186.js → javascript-ded5c9d7.js} +3 -3
  59. package/dist/esm/{jsonMode-cb509b79.js → jsonMode-0bf84cb2.js} +2 -2
  60. package/dist/esm/loader.js +2 -2
  61. package/dist/esm/{tsMode-ed90c9aa.js → tsMode-15d4e936.js} +2 -2
  62. package/dist/esm/{typescript-db8a0b18.js → typescript-cc4d00f0.js} +2 -2
  63. package/dist/types/components/arcade-api/arcade-api.d.ts +40 -40
  64. package/dist/types/components/arcade-api/t9n-types.d.ts +6 -6
  65. package/dist/types/components/arcade-editor/arcade-editor.d.ts +127 -127
  66. package/dist/types/components/arcade-editor/t9n-types.d.ts +6 -6
  67. package/dist/types/components/arcade-results/arcade-results.d.ts +47 -47
  68. package/dist/types/components/arcade-results/t9n-types.d.ts +11 -11
  69. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +34 -34
  70. package/dist/types/components/arcade-suggestions/t9n-types.d.ts +4 -4
  71. package/dist/types/components/arcade-variables/arcade-variables.d.ts +41 -41
  72. package/dist/types/components/arcade-variables/t9n-types.d.ts +6 -6
  73. package/dist/types/components/code-editor/code-editor.d.ts +73 -73
  74. package/dist/types/stencil-public-runtime.d.ts +8 -0
  75. package/dist/types/utils/arcade-executor.d.ts +79 -79
  76. package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +66 -66
  77. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +23 -23
  78. package/dist/types/utils/arcade-monaco/arcade-mode.d.ts +9 -9
  79. package/dist/types/utils/arcade-monaco/arcade-theme.d.ts +7 -7
  80. package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +9 -9
  81. package/dist/types/utils/arcade-monaco/arcade.worker.d.ts +12 -12
  82. package/dist/types/utils/arcade-monaco/types.d.ts +29 -29
  83. package/dist/types/utils/editor-suggestions.d.ts +24 -24
  84. package/dist/types/utils/functional-components.d.ts +1 -1
  85. package/dist/types/utils/markdown.d.ts +1 -1
  86. package/dist/types/utils/profile/editor-profile.d.ts +185 -185
  87. package/dist/types/utils/profile/types.d.ts +101 -101
  88. package/dist/types/utils/utilities.d.ts +1 -1
  89. package/package.json +7 -7
  90. package/dist/arcgis-coding-components/p-5d670bd2.js +0 -2
  91. package/dist/arcgis-coding-components/p-9e242e76.js +0 -1
  92. package/dist/arcgis-coding-components/p-ccdf0ac1.entry.js +0 -1
  93. package/dist/cjs/arcade-mode-b77afcc9.js +0 -598
  94. package/dist/esm/arcade-mode-70e22d22.js +0 -594
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Fragment, Host } from '@stencil/core/internal/client';
2
2
  import { editor, KeyCode } from 'monaco-editor';
3
3
  import { e as executeScript, D as DevelopersWebSitePath, d as defineCustomElement$5 } from './arcade-results.js';
4
- import { p, j, P, F, U } from './index2.js';
4
+ import { p, $, P, F, U } from './index2.js';
5
5
  import { s as setupMonacoEnvironment, a as getArcadeDiagnosticService } from './arcade-contribution.js';
6
6
  import { b as arcadeDefaults } from './arcade-defaults.js';
7
7
  import '@esri/calcite-components/dist/components/calcite-action-bar.js';
@@ -34,425 +34,425 @@ const themeConfig = {
34
34
  };
35
35
 
36
36
  function setupArcadeTheme() {
37
- ["light", "dark"].forEach((theme) => {
38
- const base = theme === "light" ? "vs" : "vs-dark";
39
- const colors = themeConfig[`arcade-${theme}-theme`];
40
- // Defines the light and dark theme based on the calcite theme name
41
- editor.defineTheme(base, {
42
- base,
43
- inherit: true,
44
- rules: [
45
- { token: "comment.arc", foreground: colors.comment },
46
- { token: "constant.arc", foreground: colors.constant },
47
- { token: "keyword.arc", foreground: colors.keyword },
48
- { token: "identifier.arc", foreground: colors.identifier },
49
- { token: "number.arc", foreground: colors.number },
50
- { token: "string.arc", foreground: colors.string }
51
- ],
52
- colors: {}
37
+ ["light", "dark"].forEach((theme) => {
38
+ const base = theme === "light" ? "vs" : "vs-dark";
39
+ const colors = themeConfig[`arcade-${theme}-theme`];
40
+ // Defines the light and dark theme based on the calcite theme name
41
+ editor.defineTheme(base, {
42
+ base,
43
+ inherit: true,
44
+ rules: [
45
+ { token: "comment.arc", foreground: colors.comment },
46
+ { token: "constant.arc", foreground: colors.constant },
47
+ { token: "keyword.arc", foreground: colors.keyword },
48
+ { token: "identifier.arc", foreground: colors.identifier },
49
+ { token: "number.arc", foreground: colors.number },
50
+ { token: "string.arc", foreground: colors.string }
51
+ ],
52
+ colors: {}
53
+ });
53
54
  });
54
- });
55
55
  }
56
56
  function updateThemeColors(theme, colorRules) {
57
- if (colorRules === undefined) {
58
- setupArcadeTheme();
59
- return;
60
- }
61
- const base = theme === "light" ? "vs" : "vs-dark";
62
- const rules = [];
63
- ["comment", "keyword", "identifier", "string", "number", "constant"].forEach((key) => {
64
- // @ts-expect-error
65
- const foreground = colorRules[key];
66
- if (!foreground) {
67
- return;
57
+ if (colorRules === undefined) {
58
+ setupArcadeTheme();
59
+ return;
68
60
  }
69
- rules.push({ token: `${key}.arc`, foreground });
70
- });
71
- editor.defineTheme(base, { base, inherit: true, rules, colors: {} });
61
+ const base = theme === "light" ? "vs" : "vs-dark";
62
+ const rules = [];
63
+ ["comment", "keyword", "identifier", "string", "number", "constant"].forEach((key) => {
64
+ // @ts-expect-error
65
+ const foreground = colorRules[key];
66
+ if (!foreground) {
67
+ return;
68
+ }
69
+ rules.push({ token: `${key}.arc`, foreground });
70
+ });
71
+ editor.defineTheme(base, { base, inherit: true, rules, colors: {} });
72
72
  }
73
73
 
74
74
  const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;height:100%;width:100%;position:relative;overflow:hidden;border:1px solid var(--calcite-ui-border-3);box-sizing:border-box;background-color:var(--calcite-ui-foreground-1)}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:1px solid var(--calcite-ui-border-3);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:1px solid var(--calcite-ui-border-3);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);background-color:var(--calcite-ui-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:25%}arcgis-arcade-editor .side-panel{max-width:45%;width:600px}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:1px solid var(--calcite-ui-border-3);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}arcgis-arcade-editor arcgis-arcade-results{border-top:1px solid var(--calcite-ui-border-3);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}arcgis-arcade-editor calcite-list-item-group calcite-list-item{margin-bottom:1px;box-shadow:0 1px 0 var(--calcite-ui-border-3)}arcgis-arcade-editor calcite-list-item-group calcite-list-item:last-child{box-shadow:none}arcgis-arcade-editor calcite-list-item-group:last-child{margin-bottom:var(--calcite-spacing-1)}";
75
75
 
76
76
  setupArcadeTheme();
77
77
  const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeEditor extends HTMLElement {
78
- constructor() {
79
- super();
80
- this.__registerHost();
81
- this.scriptChange = createEvent(this, "scriptChange", 3);
82
- this.diagnosticsChange = createEvent(this, "diagnosticsChange", 3);
83
- this._componentReadyDefer = new p();
84
- this._modelId = j();
85
- this._editorProfilePromise = Promise.resolve(undefined);
86
- this._disposables = [];
87
- this._executeScript = async () => {
88
- const testContext = this.testData;
89
- if (!this._codeEditorElt || !testContext) {
90
- return;
91
- }
92
- const editorProfile = await this._editorProfilePromise;
93
- if (!editorProfile) {
94
- this._executionResult = { type: "error", value: "Missing editor profile", error: null };
95
- return;
96
- }
97
- this._showExecutionPanel = true;
98
- this._executingScript = true;
99
- this._consoleLogs = [];
100
- setTimeout(async () => {
101
- const script = await this._codeEditorElt?.getValue();
102
- this._executionResult = await executeScript(editorProfile.definition, script, testContext, (log) => setTimeout(() => (this._consoleLogs = [...this._consoleLogs, log]), 0));
78
+ constructor() {
79
+ super();
80
+ this.__registerHost();
81
+ this.scriptChange = createEvent(this, "scriptChange", 3);
82
+ this.diagnosticsChange = createEvent(this, "diagnosticsChange", 3);
83
+ this._componentReadyDefer = new p();
84
+ this._modelId = $();
85
+ this._editorProfilePromise = Promise.resolve(undefined);
86
+ this._disposables = [];
87
+ this._executeScript = async () => {
88
+ const testContext = this.testData;
89
+ if (!this._codeEditorElt || !testContext) {
90
+ return;
91
+ }
92
+ const editorProfile = await this._editorProfilePromise;
93
+ if (!editorProfile) {
94
+ this._executionResult = { type: "error", value: "Missing editor profile", error: null };
95
+ return;
96
+ }
97
+ this._showExecutionPanel = true;
98
+ this._executingScript = true;
99
+ this._consoleLogs = [];
100
+ setTimeout(async () => {
101
+ const script = await this._codeEditorElt?.getValue();
102
+ this._executionResult = await executeScript(editorProfile.definition, script, testContext, (log) => setTimeout(() => (this._consoleLogs = [...this._consoleLogs, log]), 0));
103
+ this._executingScript = false;
104
+ }, 0);
105
+ };
106
+ this._toggleShowExecutionPanel = () => (this._showExecutionPanel = !this._showExecutionPanel);
107
+ this._toggleSideActionBarExpanded = () => (this.sideActionBarExpanded = !this.sideActionBarExpanded);
108
+ this._toggleSidePanel = async (e) => {
109
+ if (!e.target) {
110
+ return;
111
+ }
112
+ const panelName = e.target?.dataset.panelName ?? "none";
113
+ // Setup the new panel. Toggle to none if already opened
114
+ this.openedSidePanel = panelName === this.openedSidePanel ? "none" : panelName;
115
+ if (this.openedSidePanel === "none") {
116
+ // Reset focus on the code editor if no panel displayed
117
+ await this._codeEditorElt?.setFocus();
118
+ }
119
+ };
120
+ this._openArcadeHelp = () => window.open(DevelopersWebSitePath, "Arcade Help");
121
+ this._emitScriptChange = (e) => {
122
+ e.stopPropagation();
123
+ this.scriptChange.emit(e.detail);
124
+ };
125
+ this._insertAsSnippet = (e) => this._codeEditorElt?.insertSnippet(e.detail);
126
+ this._insertAsText = (e) => this._codeEditorElt?.insertText(e.detail);
127
+ this._onResultPanelChange = (e) => (this._resultPanel = e.detail);
128
+ this._onExecutionPanelClose = () => (this._showExecutionPanel = false);
129
+ this._lang = "";
130
+ this._t9nLocale = "";
131
+ this._t9nStrings = undefined;
132
+ this._standaloneCodeEditor = undefined;
133
+ this._preparingProfile = false;
134
+ this._editorProfile = undefined;
135
+ this._showExecutionPanel = false;
136
+ this._resultPanel = "output";
103
137
  this._executingScript = false;
104
- }, 0);
105
- };
106
- this._toggleShowExecutionPanel = () => (this._showExecutionPanel = !this._showExecutionPanel);
107
- this._toggleSideActionBarExpanded = () => (this.sideActionBarExpanded = !this.sideActionBarExpanded);
108
- this._toggleSidePanel = async (e) => {
109
- if (!e.target) {
110
- return;
111
- }
112
- const panelName = e.target?.dataset.panelName ?? "none";
113
- // Setup the new panel. Toggle to none if already opened
114
- this.openedSidePanel = panelName === this.openedSidePanel ? "none" : panelName;
115
- if (this.openedSidePanel === "none") {
116
- // Reset focus on the code editor if no panel displayed
117
- await this._codeEditorElt?.setFocus();
118
- }
119
- };
120
- this._openArcadeHelp = () => window.open(DevelopersWebSitePath, "Arcade Help");
121
- this._emitScriptChange = (e) => {
122
- e.stopPropagation();
123
- this.scriptChange.emit(e.detail);
124
- };
125
- this._insertAsSnippet = (e) => this._codeEditorElt?.insertSnippet(e.detail);
126
- this._insertAsText = (e) => this._codeEditorElt?.insertText(e.detail);
127
- this._onResultPanelChange = (e) => (this._resultPanel = e.detail);
128
- this._onExecutionPanelClose = () => (this._showExecutionPanel = false);
129
- this._lang = "";
130
- this._t9nLocale = "";
131
- this._t9nStrings = undefined;
132
- this._standaloneCodeEditor = undefined;
133
- this._preparingProfile = false;
134
- this._editorProfile = undefined;
135
- this._showExecutionPanel = false;
136
- this._resultPanel = "output";
137
- this._executingScript = false;
138
- this._consoleLogs = [];
139
- this._executionResult = undefined;
140
- this.profile = undefined;
141
- this.script = "";
142
- this.testData = undefined;
143
- this.suggestions = undefined;
144
- this.snippets = undefined;
145
- this.hideDocumentationActions = false;
146
- this.hideSideBar = false;
147
- this.sideActionBarExpanded = false;
148
- this.openedSidePanel = "none";
149
- }
150
- _profileChanged(newValue, oldValue) {
151
- // Prevent the execution as long as the component has not been fully loaded
152
- if (newValue === oldValue) {
153
- return;
138
+ this._consoleLogs = [];
139
+ this._executionResult = undefined;
140
+ this.profile = undefined;
141
+ this.script = "";
142
+ this.testData = undefined;
143
+ this.suggestions = undefined;
144
+ this.snippets = undefined;
145
+ this.hideDocumentationActions = false;
146
+ this.hideSideBar = false;
147
+ this.sideActionBarExpanded = false;
148
+ this.openedSidePanel = "none";
154
149
  }
155
- this._updateEditorProfile();
156
- }
157
- _testDataChanged(newValue, oldValue) {
158
- if (newValue === oldValue || !this._showExecutionPanel) {
159
- return;
150
+ _profileChanged(newValue, oldValue) {
151
+ // Prevent the execution as long as the component has not been fully loaded
152
+ if (newValue === oldValue) {
153
+ return;
154
+ }
155
+ this._updateEditorProfile();
160
156
  }
161
- this._executeScript();
162
- }
163
- _snippetChanged(newValue, oldValue) {
164
- if (newValue === oldValue) {
165
- return;
157
+ _testDataChanged(newValue, oldValue) {
158
+ if (newValue === oldValue || !this._showExecutionPanel) {
159
+ return;
160
+ }
161
+ this._executeScript();
166
162
  }
167
- arcadeDefaults.updateApiContextForModel(this._modelId, {
168
- snippets: this.snippets
169
- });
170
- }
171
- // #endregion
172
- // #region Public methods API
173
- /**
174
- * Returns the current script.
175
- * @returns {Promise<string>}
176
- */
177
- async getScript() {
178
- await this._componentReadyDefer.promise;
179
- return this._codeEditorElt?.getValue();
180
- }
181
- /**
182
- * Set the focus on the element.
183
- */
184
- async setFocus() {
185
- await this._componentReadyDefer.promise;
186
- await this._codeEditorElt?.setFocus();
187
- }
188
- /**
189
- * @internal
190
- * Returns the editor instance.
191
- * @returns {Promise<IStandaloneCodeEditor>} - The monaco editor instance
192
- */
193
- async getEditorInstance() {
194
- await this._componentReadyDefer.promise;
195
- return this._codeEditorElt?.getEditorInstance();
196
- }
197
- /**
198
- * Returns the Arcade result for the script for the provided test data.
199
- */
200
- async getTestResult() {
201
- if (!this.testData) {
202
- return { type: "error", value: "Missing test data", error: null };
163
+ _snippetChanged(newValue, oldValue) {
164
+ if (newValue === oldValue) {
165
+ return;
166
+ }
167
+ arcadeDefaults.updateApiContextForModel(this._modelId, {
168
+ snippets: this.snippets
169
+ });
203
170
  }
204
- const editorProfile = await this._editorProfilePromise;
205
- if (!editorProfile) {
206
- return { type: "error", value: "Missing editor profile", error: null };
171
+ // #endregion
172
+ // #region Public methods API
173
+ /**
174
+ * Returns the current script.
175
+ * @returns {Promise<string>}
176
+ */
177
+ async getScript() {
178
+ await this._componentReadyDefer.promise;
179
+ return this._codeEditorElt?.getValue();
207
180
  }
208
- await this._componentReadyDefer.promise;
209
- const script = await this._codeEditorElt?.getValue();
210
- return executeScript(editorProfile.definition, script, this.testData);
211
- }
212
- /**
213
- * Returns the Arcade output type for the script.
214
- * @deprecated Use getTestResult
215
- * @internal
216
- */
217
- async getOutputType() {
218
- return (await this.getTestResult()).type;
219
- }
220
- /**
221
- * Allows to change theme colors
222
- * @internal
223
- */
224
- async updateThemeColors(colorRules) {
225
- const theme = P(this._hostElement);
226
- updateThemeColors(theme, colorRules);
227
- if (colorRules === undefined) {
228
- ["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
229
- this._hostElement.style.removeProperty(`--arcgis-arcade-editor-${key}`);
230
- });
231
- return;
181
+ /**
182
+ * Set the focus on the element.
183
+ */
184
+ async setFocus() {
185
+ await this._componentReadyDefer.promise;
186
+ await this._codeEditorElt?.setFocus();
232
187
  }
233
- ["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
234
- // @ts-expect-error
235
- const foreground = colorRules[key];
236
- if (!foreground) {
237
- return;
238
- }
239
- this._hostElement.style.setProperty(`--arcgis-arcade-editor-${key}`, foreground);
240
- });
241
- }
242
- // #endregion
243
- // #region Component lifecycle events
244
- async componentWillLoad() {
245
- const assetsPath = getAssetPath("./assets");
246
- // We are a bit in a chicken and egg situation here.
247
- // Normally, it is the code editor that is responsible for setting up the Monaco environement.
248
- // However, we need to setup the environment before the code editor is instantiated because
249
- // we need to access the arcade language service to get the api library.
250
- setupMonacoEnvironment(assetsPath);
251
- // Starts a locale observer. It will load the correct t9n strings for the component
252
- // when the locale changes. We also pass updateEditorProfile. It will be invoked the first
253
- // and on each locale change. The profile has to be refreshed on locale change as well.
254
- await F(this, assetsPath, async () => await this._updateEditorProfile());
255
- }
256
- async componentDidLoad() {
257
- // Mark on component as ready.
258
- // Some methods are waiting for this state to actually continue.
259
- this._componentReadyDefer.resolve();
260
- // Start listening to the validation diagnostics.
261
- // We are doing this as late as possible
262
- const diagnosticsService = await getArcadeDiagnosticService();
263
- this._disposables.push(diagnosticsService.onDiagnosticsChange((ev) => !this._preparingProfile && this.diagnosticsChange.emit(ev.diagnostics)));
264
- // Get editor instance and add action
265
- this._standaloneCodeEditor = await this.getEditorInstance();
266
- this._standaloneCodeEditor?.addAction({
267
- // An unique identifier for the action.
268
- id: "run-script",
269
- label: "Run Arcade Expression",
270
- keybindings: [KeyCode.F5],
271
- contextMenuGroupId: "code",
272
- contextMenuOrder: 1,
273
- run: () => {
274
- if (this.testData) {
275
- this._executeScript();
188
+ /**
189
+ * @internal
190
+ * Returns the editor instance.
191
+ * @returns {Promise<IStandaloneCodeEditor>} - The monaco editor instance
192
+ */
193
+ async getEditorInstance() {
194
+ await this._componentReadyDefer.promise;
195
+ return this._codeEditorElt?.getEditorInstance();
196
+ }
197
+ /**
198
+ * Returns the Arcade result for the script for the provided test data.
199
+ */
200
+ async getTestResult() {
201
+ if (!this.testData) {
202
+ return { type: "error", value: "Missing test data", error: null };
276
203
  }
277
- }
278
- });
279
- await this._codeEditorElt?.setFocus();
280
- }
281
- disconnectedCallback() {
282
- U(this);
283
- arcadeDefaults.disposeApiContextForModel(this._modelId);
284
- arcadeDefaults.disposeEditorProfileForModel(this._modelId);
285
- while (this._disposables.length) {
286
- this._disposables.pop()?.dispose();
204
+ const editorProfile = await this._editorProfilePromise;
205
+ if (!editorProfile) {
206
+ return { type: "error", value: "Missing editor profile", error: null };
207
+ }
208
+ await this._componentReadyDefer.promise;
209
+ const script = await this._codeEditorElt?.getValue();
210
+ return executeScript(editorProfile.definition, script, this.testData);
211
+ }
212
+ /**
213
+ * Returns the Arcade output type for the script.
214
+ * @deprecated Use getTestResult
215
+ * @internal
216
+ */
217
+ async getOutputType() {
218
+ return (await this.getTestResult()).type;
219
+ }
220
+ /**
221
+ * Allows to change theme colors
222
+ * @internal
223
+ */
224
+ async updateThemeColors(colorRules) {
225
+ const theme = P(this._hostElement);
226
+ updateThemeColors(theme, colorRules);
227
+ if (colorRules === undefined) {
228
+ ["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
229
+ this._hostElement.style.removeProperty(`--arcgis-arcade-editor-${key}`);
230
+ });
231
+ return;
232
+ }
233
+ ["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
234
+ // @ts-expect-error
235
+ const foreground = colorRules[key];
236
+ if (!foreground) {
237
+ return;
238
+ }
239
+ this._hostElement.style.setProperty(`--arcgis-arcade-editor-${key}`, foreground);
240
+ });
241
+ }
242
+ // #endregion
243
+ // #region Component lifecycle events
244
+ async componentWillLoad() {
245
+ const assetsPath = getAssetPath("./assets");
246
+ // We are a bit in a chicken and egg situation here.
247
+ // Normally, it is the code editor that is responsible for setting up the Monaco environement.
248
+ // However, we need to setup the environment before the code editor is instantiated because
249
+ // we need to access the arcade language service to get the api library.
250
+ setupMonacoEnvironment(assetsPath);
251
+ // Starts a locale observer. It will load the correct t9n strings for the component
252
+ // when the locale changes. We also pass updateEditorProfile. It will be invoked the first
253
+ // and on each locale change. The profile has to be refreshed on locale change as well.
254
+ await F(this, assetsPath, async () => await this._updateEditorProfile());
287
255
  }
288
- }
289
- // #endregion
290
- // #region Private methods API
291
- async _updateEditorProfile() {
292
- // The goal is to
293
- // - convert the runtime profile into a specialized instance that will serve the UI better.
294
- // - extract the language service profile that is specialized for completion and validation
295
- this._preparingProfile = true;
296
- try {
297
- // Set a new profile for the model using the profile definition and the locale.
298
- await arcadeDefaults.setProfileForModel(this._modelId, this.profile, {
299
- locale: this._t9nLocale,
300
- snippets: this.snippets
301
- });
302
- // Get the corresponding editor profile for the model.
303
- // The editor profile contains the specialized profile for the UI.
304
- this._editorProfile = arcadeDefaults.getEditorProfileForModel(this._modelId);
256
+ async componentDidLoad() {
257
+ // Mark on component as ready.
258
+ // Some methods are waiting for this state to actually continue.
259
+ this._componentReadyDefer.resolve();
260
+ // Start listening to the validation diagnostics.
261
+ // We are doing this as late as possible
262
+ const diagnosticsService = await getArcadeDiagnosticService();
263
+ this._disposables.push(diagnosticsService.onDiagnosticsChange((event) => !this._preparingProfile && this.diagnosticsChange.emit(event.diagnostics)));
264
+ // Get editor instance and add action
265
+ this._standaloneCodeEditor = await this.getEditorInstance();
266
+ this._standaloneCodeEditor?.addAction({
267
+ // An unique identifier for the action.
268
+ id: "run-script",
269
+ label: "Run Arcade Expression",
270
+ keybindings: [KeyCode.F5],
271
+ contextMenuGroupId: "code",
272
+ contextMenuOrder: 1,
273
+ run: () => {
274
+ if (this.testData) {
275
+ this._executeScript();
276
+ }
277
+ }
278
+ });
279
+ await this._codeEditorElt?.setFocus();
280
+ }
281
+ disconnectedCallback() {
282
+ U(this);
283
+ arcadeDefaults.disposeApiContextForModel(this._modelId);
284
+ arcadeDefaults.disposeEditorProfileForModel(this._modelId);
285
+ while (this._disposables.length) {
286
+ this._disposables.pop()?.dispose();
287
+ }
305
288
  }
306
- catch (e) {
307
- this._editorProfile = undefined;
289
+ // #endregion
290
+ // #region Private methods API
291
+ async _updateEditorProfile() {
292
+ // The goal is to
293
+ // - convert the runtime profile into a specialized instance that will serve the UI better.
294
+ // - extract the language service profile that is specialized for completion and validation
295
+ this._preparingProfile = true;
296
+ try {
297
+ // Set a new profile for the model using the profile definition and the locale.
298
+ await arcadeDefaults.setProfileForModel(this._modelId, this.profile, {
299
+ locale: this._t9nLocale,
300
+ snippets: this.snippets
301
+ });
302
+ // Get the corresponding editor profile for the model.
303
+ // The editor profile contains the specialized profile for the UI.
304
+ this._editorProfile = arcadeDefaults.getEditorProfileForModel(this._modelId);
305
+ }
306
+ catch (e) {
307
+ this._editorProfile = undefined;
308
+ }
309
+ finally {
310
+ this._editorProfilePromise = Promise.resolve(this._editorProfile);
311
+ this._preparingProfile = false;
312
+ }
308
313
  }
309
- finally {
310
- this._editorProfilePromise = Promise.resolve(this._editorProfile);
311
- this._preparingProfile = false;
314
+ // #endregion
315
+ //#region Render Main Action Bar
316
+ renderMainActionBar() {
317
+ if (!this.testData) {
318
+ return null;
319
+ }
320
+ return (h("calcite-action-bar", { class: "main-action-bar", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { text: this._t9nStrings?.run ?? "Run", "text-enabled": true, icon: "play", scale: "s", loading: this._preparingProfile, onClick: this._executeScript }), this._executionResult ? (h("calcite-action", { text: this._t9nStrings?.lastresults ?? "Last results", active: this._showExecutionPanel, "text-enabled": true, icon: "access-string-results", iconFlipRtl: true, scale: "s", onClick: this._toggleShowExecutionPanel })) : null)));
312
321
  }
313
- }
314
- // #endregion
315
- //#region Render Main Action Bar
316
- renderMainActionBar() {
317
- if (!this.testData) {
318
- return null;
322
+ //#endregion
323
+ //#region Render Main Panel
324
+ renderMainPanel() {
325
+ return (
326
+ // <div class="flex-adjustable">
327
+ h("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, onValueChange: this._emitScriptChange, ref: (e) => (this._codeEditorElt = e) })
328
+ // </div>
329
+ );
319
330
  }
320
- return (h("calcite-action-bar", { class: "main-action-bar", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { text: this._t9nStrings?.run ?? "Run", "text-enabled": true, icon: "play", scale: "s", loading: this._preparingProfile, onClick: this._executeScript }), this._executionResult ? (h("calcite-action", { text: this._t9nStrings?.lastresults ?? "Last results", active: this._showExecutionPanel, "text-enabled": true, icon: "access-string-results", iconFlipRtl: true, scale: "s", onClick: this._toggleShowExecutionPanel })) : null)));
321
- }
322
- //#endregion
323
- //#region Render Main Panel
324
- renderMainPanel() {
325
- return (
326
- // <div class="flex-adjustable">
327
- h("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, onValueChange: this._emitScriptChange, ref: (e) => (this._codeEditorElt = e) })
328
- // </div>
329
- );
330
- }
331
- //#endregion
332
- //#region Rendering the Action Bar
333
- renderSideActionBar() {
334
- if (this.hideSideBar) {
335
- return null;
331
+ //#endregion
332
+ //#region Rendering the Action Bar
333
+ renderSideActionBar() {
334
+ if (this.hideSideBar) {
335
+ return null;
336
+ }
337
+ return (h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h("calcite-action-group", null, h("calcite-action", { id: "profile-variables-action", text: this._t9nStrings?.profilevariables ?? "Profile variables", icon: "profile-variables", active: this.openedSidePanel === "variables", onClick: this._toggleSidePanel, "data-panel-name": "variables" }), h("calcite-action", { id: "function-action", text: this._t9nStrings?.constantsandfunctions ?? "Constants and functions", icon: "function", active: this.openedSidePanel === "api", onClick: this._toggleSidePanel, "data-panel-name": "api" }), this.suggestions?.length ? (h(Fragment, null, h("calcite-action", { id: "suggestions-action", text: this._t9nStrings?.suggestions ?? "Suggestions", icon: "lightbulb", active: this.openedSidePanel === "suggestions", onClick: this._toggleSidePanel, "data-panel-name": "suggestions" }))) : null, this.hideDocumentationActions ? null : (h(Fragment, null, h("calcite-action", { id: "developer-website-action", text: this._t9nStrings?.help ?? "Help", icon: "question", iconFlipRtl: this._t9nLocale === "ar", onClick: this._openArcadeHelp }))))));
336
338
  }
337
- return (h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h("calcite-action-group", null, h("calcite-action", { id: "profile-variables-action", text: this._t9nStrings?.profilevariables ?? "Profile variables", icon: "profile-variables", active: this.openedSidePanel === "variables", onClick: this._toggleSidePanel, "data-panel-name": "variables" }), h("calcite-action", { id: "function-action", text: this._t9nStrings?.constantsandfunctions ?? "Constants and functions", icon: "function", active: this.openedSidePanel === "api", onClick: this._toggleSidePanel, "data-panel-name": "api" }), this.suggestions?.length ? (h(Fragment, null, h("calcite-action", { id: "suggestions-action", text: this._t9nStrings?.suggestions ?? "Suggestions", icon: "lightbulb", active: this.openedSidePanel === "suggestions", onClick: this._toggleSidePanel, "data-panel-name": "suggestions" }))) : null, this.hideDocumentationActions ? null : (h(Fragment, null, h("calcite-action", { id: "developer-website-action", text: this._t9nStrings?.help ?? "Help", icon: "question", iconFlipRtl: this._t9nLocale === "ar", onClick: this._openArcadeHelp }))))));
338
- }
339
- // private renderTooltip(id: string, label: string | undefined): VNode | null {
340
- // if (this.sideActionBarExpanded || !label) {
341
- // return null;
342
- // }
343
- // return (
344
- // <calcite-tooltip label={label} reference-element={id} placement="leading-start">
345
- // <span>{label}</span>
346
- // </calcite-tooltip>
347
- // );
348
- // }
349
- //#endregion
350
- //#region Render Side Panel
351
- renderSidePanel() {
352
- if (this.hideSideBar) {
353
- return null;
339
+ // private renderTooltip(id: string, label: string | undefined): VNode | null {
340
+ // if (this.sideActionBarExpanded || !label) {
341
+ // return null;
342
+ // }
343
+ // return (
344
+ // <calcite-tooltip label={label} reference-element={id} placement="leading-start">
345
+ // <span>{label}</span>
346
+ // </calcite-tooltip>
347
+ // );
348
+ // }
349
+ //#endregion
350
+ //#region Render Side Panel
351
+ renderSidePanel() {
352
+ if (this.hideSideBar) {
353
+ return null;
354
+ }
355
+ switch (this.openedSidePanel) {
356
+ case "api":
357
+ return (h("arcgis-arcade-api", { class: "side-panel flex-panel border-inline-start", modelId: this._modelId, hideDocumentationActions: this.hideDocumentationActions, onItemSelected: this._insertAsSnippet, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
358
+ case "variables":
359
+ return (h("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingProfile, modelId: this._modelId, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
360
+ case "suggestions":
361
+ return (h("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
362
+ default:
363
+ return null;
364
+ }
354
365
  }
355
- switch (this.openedSidePanel) {
356
- case "api":
357
- return (h("arcgis-arcade-api", { class: "side-panel flex-panel border-inline-start", modelId: this._modelId, hideDocumentationActions: this.hideDocumentationActions, onItemSelected: this._insertAsSnippet, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
358
- case "variables":
359
- return (h("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingProfile, modelId: this._modelId, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
360
- case "suggestions":
361
- return (h("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onItemSelected: this._insertAsText, onClose: this._toggleSidePanel, "data-panel-name": "none" }));
362
- default:
363
- return null;
366
+ //#endregion
367
+ //#region Rendering Results Panel
368
+ renderResultsPanel() {
369
+ if (!this._showExecutionPanel) {
370
+ return null;
371
+ }
372
+ return (h("arcgis-arcade-results", { class: "flex-adjustable", openedResultPanel: this._resultPanel, loading: this._executingScript, result: this._executionResult, consoleLogs: this._consoleLogs, onOpenedResultPanelChange: this._onResultPanelChange, onClose: this._onExecutionPanelClose }));
364
373
  }
365
- }
366
- //#endregion
367
- //#region Rendering Results Panel
368
- renderResultsPanel() {
369
- if (!this._showExecutionPanel) {
370
- return null;
374
+ //#endregion
375
+ //#region Render
376
+ render() {
377
+ return (h(Host, null, this.renderMainActionBar(), h("div", { class: "flex-row flex-adjustable" }, h("div", { class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
371
378
  }
372
- return (h("arcgis-arcade-results", { class: "flex-adjustable", openedResultPanel: this._resultPanel, loading: this._executingScript, result: this._executionResult, consoleLogs: this._consoleLogs, onOpenedResultPanelChange: this._onResultPanelChange, onClose: this._onExecutionPanelClose }));
373
- }
374
- //#endregion
375
- //#region Render
376
- render() {
377
- return (h(Host, null, this.renderMainActionBar(), h("div", { class: "flex-row flex-adjustable" }, h("div", { class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
378
- }
379
- static get assetsDirs() { return ["assets"]; }
380
- get _hostElement() { return this; }
381
- static get watchers() { return {
382
- "profile": ["_profileChanged"],
383
- "testData": ["_testDataChanged"],
384
- "snippets": ["_snippetChanged"]
385
- }; }
386
- static get style() { return arcadeEditorCss; }
379
+ static get assetsDirs() { return ["assets"]; }
380
+ get _hostElement() { return this; }
381
+ static get watchers() { return {
382
+ "profile": ["_profileChanged"],
383
+ "testData": ["_testDataChanged"],
384
+ "snippets": ["_snippetChanged"]
385
+ }; }
386
+ static get style() { return arcadeEditorCss; }
387
387
  }, [0, "arcgis-arcade-editor", {
388
- "profile": [16],
389
- "script": [1],
390
- "testData": [16],
391
- "suggestions": [16],
392
- "snippets": [16],
393
- "hideDocumentationActions": [4, "hide-documentation-actions"],
394
- "hideSideBar": [4, "hide-side-bar"],
395
- "sideActionBarExpanded": [1540, "side-action-bar-expanded"],
396
- "openedSidePanel": [1537, "opened-side-panel"],
397
- "_lang": [32],
398
- "_t9nLocale": [32],
399
- "_t9nStrings": [32],
400
- "_standaloneCodeEditor": [32],
401
- "_preparingProfile": [32],
402
- "_editorProfile": [32],
403
- "_showExecutionPanel": [32],
404
- "_resultPanel": [32],
405
- "_executingScript": [32],
406
- "_consoleLogs": [32],
407
- "_executionResult": [32],
408
- "getScript": [64],
409
- "setFocus": [64],
410
- "getEditorInstance": [64],
411
- "getTestResult": [64],
412
- "getOutputType": [64],
413
- "updateThemeColors": [64]
414
- }, undefined, {
415
- "profile": ["_profileChanged"],
416
- "testData": ["_testDataChanged"],
417
- "snippets": ["_snippetChanged"]
418
- }]);
388
+ "profile": [16],
389
+ "script": [1],
390
+ "testData": [16],
391
+ "suggestions": [16],
392
+ "snippets": [16],
393
+ "hideDocumentationActions": [4, "hide-documentation-actions"],
394
+ "hideSideBar": [4, "hide-side-bar"],
395
+ "sideActionBarExpanded": [1540, "side-action-bar-expanded"],
396
+ "openedSidePanel": [1537, "opened-side-panel"],
397
+ "_lang": [32],
398
+ "_t9nLocale": [32],
399
+ "_t9nStrings": [32],
400
+ "_standaloneCodeEditor": [32],
401
+ "_preparingProfile": [32],
402
+ "_editorProfile": [32],
403
+ "_showExecutionPanel": [32],
404
+ "_resultPanel": [32],
405
+ "_executingScript": [32],
406
+ "_consoleLogs": [32],
407
+ "_executionResult": [32],
408
+ "getScript": [64],
409
+ "setFocus": [64],
410
+ "getEditorInstance": [64],
411
+ "getTestResult": [64],
412
+ "getOutputType": [64],
413
+ "updateThemeColors": [64]
414
+ }, undefined, {
415
+ "profile": ["_profileChanged"],
416
+ "testData": ["_testDataChanged"],
417
+ "snippets": ["_snippetChanged"]
418
+ }]);
419
419
  function defineCustomElement$1() {
420
- if (typeof customElements === "undefined") {
421
- return;
422
- }
423
- const components = ["arcgis-arcade-editor", "arcgis-arcade-api", "arcgis-arcade-results", "arcgis-arcade-suggestions", "arcgis-arcade-variables", "arcgis-code-editor"];
424
- components.forEach(tagName => { switch (tagName) {
425
- case "arcgis-arcade-editor":
426
- if (!customElements.get(tagName)) {
427
- customElements.define(tagName, ArcgisArcadeEditor$1);
428
- }
429
- break;
430
- case "arcgis-arcade-api":
431
- if (!customElements.get(tagName)) {
432
- defineCustomElement$6();
433
- }
434
- break;
435
- case "arcgis-arcade-results":
436
- if (!customElements.get(tagName)) {
437
- defineCustomElement$5();
438
- }
439
- break;
440
- case "arcgis-arcade-suggestions":
441
- if (!customElements.get(tagName)) {
442
- defineCustomElement$4();
443
- }
444
- break;
445
- case "arcgis-arcade-variables":
446
- if (!customElements.get(tagName)) {
447
- defineCustomElement$3();
448
- }
449
- break;
450
- case "arcgis-code-editor":
451
- if (!customElements.get(tagName)) {
452
- defineCustomElement$2();
453
- }
454
- break;
455
- } });
420
+ if (typeof customElements === "undefined") {
421
+ return;
422
+ }
423
+ const components = ["arcgis-arcade-editor", "arcgis-arcade-api", "arcgis-arcade-results", "arcgis-arcade-suggestions", "arcgis-arcade-variables", "arcgis-code-editor"];
424
+ components.forEach(tagName => { switch (tagName) {
425
+ case "arcgis-arcade-editor":
426
+ if (!customElements.get(tagName)) {
427
+ customElements.define(tagName, ArcgisArcadeEditor$1);
428
+ }
429
+ break;
430
+ case "arcgis-arcade-api":
431
+ if (!customElements.get(tagName)) {
432
+ defineCustomElement$6();
433
+ }
434
+ break;
435
+ case "arcgis-arcade-results":
436
+ if (!customElements.get(tagName)) {
437
+ defineCustomElement$5();
438
+ }
439
+ break;
440
+ case "arcgis-arcade-suggestions":
441
+ if (!customElements.get(tagName)) {
442
+ defineCustomElement$4();
443
+ }
444
+ break;
445
+ case "arcgis-arcade-variables":
446
+ if (!customElements.get(tagName)) {
447
+ defineCustomElement$3();
448
+ }
449
+ break;
450
+ case "arcgis-code-editor":
451
+ if (!customElements.get(tagName)) {
452
+ defineCustomElement$2();
453
+ }
454
+ break;
455
+ } });
456
456
  }
457
457
  defineCustomElement$1();
458
458