@arcgis/coding-components 4.31.0-next.53 → 4.31.0-next.55
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/code-editor/arcade.worker.js +3 -3
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +2 -2
- package/dist/arcgis-coding-components/assets/sql-expression-editor/t9n/sql-expression-editor.t9n.en.json +4 -0
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-34426b2b.js → p-091cdb1e.js} +2 -2
- package/dist/arcgis-coding-components/p-0e602e10.js +6 -0
- package/dist/arcgis-coding-components/{p-336225b0.js → p-141487fe.js} +2 -2
- package/dist/arcgis-coding-components/{p-3f1428d5.js → p-32cb6ea2.js} +1 -1
- package/dist/arcgis-coding-components/{p-53e1217d.entry.js → p-54f78145.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-6227844e.js → p-5cf73c57.js} +1 -1
- package/dist/arcgis-coding-components/{p-764a9235.js → p-67b27736.js} +3 -3
- package/dist/arcgis-coding-components/{p-23bca400.js → p-74e53b4a.js} +2 -2
- package/dist/arcgis-coding-components/{p-dd6b4bb0.js → p-773d9ba4.js} +2 -2
- package/dist/arcgis-coding-components/{p-6dff7ff6.js → p-80b0534e.js} +2 -2
- package/dist/arcgis-coding-components/p-8efb1de5.entry.js +6 -0
- package/dist/arcgis-coding-components/p-989e9ba7.js +6 -0
- package/dist/arcgis-coding-components/{p-e46e16f4.js → p-98bc0e2e.js} +2 -2
- package/dist/arcgis-coding-components/{p-8e84c70c.js → p-a6baba61.js} +9 -9
- package/dist/arcgis-coding-components/p-ba514722.js +6 -0
- package/dist/arcgis-coding-components/{p-fe6fcdff.js → p-d297077d.js} +2 -2
- package/dist/arcgis-coding-components/p-d43d29ac.js +6 -0
- package/dist/arcgis-coding-components/{p-e875189a.js → p-df8755a6.js} +1 -1
- package/dist/arcgis-coding-components/p-e54e0516.entry.js +6 -0
- package/dist/cjs/{app-globals-93ebd47b.js → app-globals-e6c77e1e.js} +1 -1
- package/dist/cjs/{arcade-defaults-ec107258.js → arcade-defaults-a9946815.js} +4 -4
- package/dist/cjs/{arcade-mode-9f3ab07c.js → arcade-mode-7b6729b3.js} +16 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +47 -123
- package/dist/cjs/arcgis-coding-components.cjs.js +4 -4
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +33 -11
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-fdd5622f.js → css-0e5b9fb9.js} +1 -1
- package/dist/cjs/{cssMode-bda7c7a2.js → cssMode-3d5ea09f.js} +2 -2
- package/dist/cjs/{html-230e1430.js → html-baccaba5.js} +2 -2
- package/dist/cjs/{htmlMode-55f5e9d4.js → htmlMode-54ec4b3d.js} +2 -2
- package/dist/cjs/{index-706da5e7.js → index-9e74612d.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-9420b602.js → javascript-ed0c5ba8.js} +3 -3
- package/dist/cjs/{jsonMode-b09d1025.js → jsonMode-e2e8cbc6.js} +2 -2
- package/dist/cjs/{language-defaults-base-384446f6.js → language-defaults-base-277ce995.js} +9 -9
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{sql-expr-defaults-d9b38c9c.js → sql-expr-defaults-a54696c1.js} +57 -34
- package/dist/cjs/{sql-expr-mode-32c4756e.js → sql-expr-mode-65d156b7.js} +17 -4
- package/dist/cjs/{tsMode-dc6ecf16.js → tsMode-5e037421.js} +2 -2
- package/dist/cjs/{typescript-3ad8c6b2.js → typescript-94a06ac9.js} +2 -2
- package/dist/cjs/useT9n-4e453944.js +115 -0
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +16 -3
- package/dist/components/arcade-results.js +2 -2
- package/dist/components/arcade-suggestions.js +2 -2
- package/dist/components/arcade-variables.js +2 -2
- package/dist/components/arcgis-arcade-editor.js +17 -10
- 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/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +33 -11
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/{chunk-BMBYH3VH.js → chunk-W77CUVCX.js} +54 -31
- package/dist/components/code-editor.js +4 -3
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +22 -4
- package/dist/components/language-defaults-base.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +15 -2
- package/dist/components/sql-expression-fields.js +2 -2
- package/dist/components/useT9n.js +2 -2
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-a6a11226.js → app-globals-5e71a2db.js} +1 -1
- package/dist/esm/{arcade-defaults-da87f04c.js → arcade-defaults-880f5e12.js} +4 -4
- package/dist/esm/{arcade-mode-ddfa9492.js → arcade-mode-970a9dae.js} +16 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +42 -118
- package/dist/esm/arcgis-coding-components.js +5 -5
- package/dist/esm/arcgis-sql-expression-editor.entry.js +33 -11
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-3128603e.js → css-f6ef0a8a.js} +1 -1
- package/dist/esm/{cssMode-9fca889c.js → cssMode-c9706c47.js} +2 -2
- package/dist/esm/{html-0388c262.js → html-adf0ac7b.js} +2 -2
- package/dist/esm/{htmlMode-e4df0119.js → htmlMode-f5b54f77.js} +2 -2
- package/dist/esm/{index-4ea7fae6.js → index-542987c6.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-b09c8010.js → javascript-17c964c5.js} +3 -3
- package/dist/esm/{jsonMode-683dc167.js → jsonMode-f5377551.js} +2 -2
- package/dist/esm/{language-defaults-base-3bedfdc0.js → language-defaults-base-cf9491cd.js} +10 -10
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{sql-expr-defaults-e5c72573.js → sql-expr-defaults-5d4eebcc.js} +58 -35
- package/dist/esm/{sql-expr-mode-c80ae5be.js → sql-expr-mode-8e292455.js} +17 -4
- package/dist/esm/{tsMode-3d873185.js → tsMode-64a3b7da.js} +2 -2
- package/dist/esm/{typescript-f121c870.js → typescript-80a07ece.js} +2 -2
- package/dist/esm/useT9n-917bda01.js +113 -0
- 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 +4 -3
- package/dist/types/components/language-api-panel/language-api-panel.d.ts +1 -0
- package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +31 -3
- package/dist/types/components.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/stencil.config.d.ts +3 -0
- package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +6 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +6 -0
- package/package.json +11 -11
- package/dist/arcgis-coding-components/p-2950e0ad.entry.js +0 -6
- package/dist/arcgis-coding-components/p-477f9563.js +0 -6
- package/dist/arcgis-coding-components/p-5674fca5.js +0 -6
- package/dist/arcgis-coding-components/p-715fa29e.js +0 -6
- package/dist/arcgis-coding-components/p-eaa1352e.entry.js +0 -6
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/sql-expression-editor/sql-expression-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
- /package/dist/types/data/{actions-runner-1 → 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 +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, a as colorizeCodeElement } from './markdown.js';
|
|
8
8
|
import { f as filterCollection } from './utilities.js';
|
|
9
|
-
import { u as useControllerManager } from './chunk-
|
|
9
|
+
import { u as useControllerManager } from './chunk-W77CUVCX.js';
|
|
10
10
|
import { r as setFocusOnElement } from './index2.js';
|
|
11
11
|
import { u as useT9n } from './useT9n.js';
|
|
12
12
|
import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
|
|
7
|
-
import { u as useControllerManager } from './chunk-
|
|
7
|
+
import { u as useControllerManager } from './chunk-W77CUVCX.js';
|
|
8
8
|
import { r as setFocusOnElement, d as createFilterExpression } from './index2.js';
|
|
9
9
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
10
10
|
import { u as useT9n } from './useT9n.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { KeyCode } from 'monaco-editor';
|
|
8
8
|
import { d as defineCustomElement$6, e as executeScript, D as DevelopersWebSitePath } from './arcade-results.js';
|
|
9
9
|
import { d as defineCustomElement$3, u as updateThemeColors, c as colorRulesKeys, s as setupMonacoEnvironment } from './code-editor.js';
|
|
10
|
-
import { u as useControllerManager, g as getSet } from './chunk-
|
|
10
|
+
import { u as useControllerManager, g as getSet } from './chunk-W77CUVCX.js';
|
|
11
11
|
import { D as Deferred, g as generateGuid, e as getElementTheme } from './index2.js';
|
|
12
12
|
import { b as arcadeDefaults, g as getArcadeDiagnosticService } from './arcade-defaults.js';
|
|
13
13
|
import { u as useT9n } from './useT9n.js';
|
|
@@ -108,11 +108,13 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
108
108
|
set: "ignore",
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
_messagesChanged() {
|
|
112
|
-
this.
|
|
111
|
+
async _messagesChanged() {
|
|
112
|
+
await this._updateEditorProfile().catch(console.error);
|
|
113
|
+
await this._updateApiLibrary().catch(console.error);
|
|
113
114
|
}
|
|
114
|
-
_profileChanged() {
|
|
115
|
-
this.
|
|
115
|
+
async _profileChanged() {
|
|
116
|
+
await this._updateEditorProfile().catch(console.error);
|
|
117
|
+
await this._updateApiLibrary().catch(console.error);
|
|
116
118
|
}
|
|
117
119
|
_testDataChanged() {
|
|
118
120
|
if (!this._showExecutionPanel) {
|
|
@@ -194,12 +196,15 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
194
196
|
// However, we need to setup the environment before the code editor is instantiated because
|
|
195
197
|
// we need to access the arcade language service to get the api library.
|
|
196
198
|
setupMonacoEnvironment(assetsPath);
|
|
197
|
-
await this.
|
|
199
|
+
await this._updateEditorProfile();
|
|
198
200
|
}
|
|
199
201
|
async componentDidLoad() {
|
|
200
202
|
// Mark on component as ready.
|
|
201
203
|
// Some methods are waiting for this state to actually continue.
|
|
202
204
|
this._componentReadyDefer.resolve();
|
|
205
|
+
// We do updateApiLibrary in componentDidLoad because we need to wait until code editor
|
|
206
|
+
// is rendered for worker to register and allow for fetching the sdk
|
|
207
|
+
await this._updateApiLibrary();
|
|
203
208
|
// Start listening to the validation diagnostics.
|
|
204
209
|
// We are doing this as late as possible
|
|
205
210
|
const diagnosticsService = await getArcadeDiagnosticService();
|
|
@@ -229,7 +234,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
229
234
|
}
|
|
230
235
|
// #endregion
|
|
231
236
|
// #region Private methods API
|
|
232
|
-
async
|
|
237
|
+
async _updateEditorProfile() {
|
|
233
238
|
// The profile definition or the locale has changed.
|
|
234
239
|
// Ask the arcade defaults to prepare the profile for the model and to download the api library.
|
|
235
240
|
this._preparingArcade = true;
|
|
@@ -239,7 +244,6 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
239
244
|
snippets: this.snippets,
|
|
240
245
|
});
|
|
241
246
|
this._editorProfile = arcadeDefaults.getEditorProfileForModel(this._modelId);
|
|
242
|
-
this._apiLibrary = await arcadeDefaults.getApiLibrary(this._modelId);
|
|
243
247
|
}
|
|
244
248
|
catch {
|
|
245
249
|
this._editorProfile = undefined;
|
|
@@ -249,6 +253,9 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
249
253
|
this._preparingArcade = false;
|
|
250
254
|
}
|
|
251
255
|
}
|
|
256
|
+
async _updateApiLibrary() {
|
|
257
|
+
this._apiLibrary = await arcadeDefaults.getApiLibrary(this._modelId);
|
|
258
|
+
}
|
|
252
259
|
// #endregion
|
|
253
260
|
//#region Render Main Action Bar
|
|
254
261
|
renderMainActionBar() {
|
|
@@ -331,7 +338,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
331
338
|
//#endregion
|
|
332
339
|
//#region Render
|
|
333
340
|
render() {
|
|
334
|
-
return (h(Host, { key: '
|
|
341
|
+
return (h(Host, { key: '0d94f0940e22ebdf09ce14dac1f29ff6d0cda848' }, this.renderMainActionBar(), h("div", { key: 'cf41e32ee268570fc70204de9885f351bf2f0f6e', class: "flex-row flex-adjustable" }, h("div", { key: 'd2dd6c0e068baa18aa057b53b31b5ee552de97bc', class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
|
|
335
342
|
}
|
|
336
343
|
static get assetsDirs() { return ["assets"]; }
|
|
337
344
|
get el() { return this; }
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
let resourceUrl = "https://js.arcgis.com/coding-components/next/";
|
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisLanguageApiPanel$1, d as defineCustomElement$1 } from './language-api-panel.js';
|
|
7
7
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
|
-
import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
|
-
import { u as useControllerManager } from './chunk-
|
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
|
+
import { u as useControllerManager } from './chunk-W77CUVCX.js';
|
|
8
8
|
import { g as generateGuid } from './index2.js';
|
|
9
9
|
import { s as sqlExprDefaults } from './sql-expr-defaults.js';
|
|
10
|
+
import { u as useT9n } from './useT9n.js';
|
|
10
11
|
import { d as defineCustomElement$4 } from './code-editor.js';
|
|
11
12
|
import { d as defineCustomElement$3 } from './language-api-panel.js';
|
|
12
13
|
import { d as defineCustomElement$2 } from './sql-expression-fields.js';
|
|
@@ -16,34 +17,49 @@ import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
|
16
17
|
const sqlExpressionEditorCss = "arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";
|
|
17
18
|
const ArcgisSqlExpressionEditorStyle0 = sqlExpressionEditorCss;
|
|
18
19
|
|
|
19
|
-
const __cmpMeta = [0,"arcgis-sql-expression-editor",{"profile":[1040],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32]},undefined,{"profile":["_profileChanged"]}];
|
|
20
|
+
const __cmpMeta = [0,"arcgis-sql-expression-editor",{"profile":[1040],"script":[1025],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32],"messages":[32]},undefined,{"messages":["_messagesChanged"],"profile":["_profileChanged"]}];
|
|
20
21
|
const SqlExpressionEditor = /*@__PURE__*/ proxyCustomElement(class SqlExpressionEditor extends HTMLElement {
|
|
21
22
|
connectedCallback() { this.manager._connectedCallback(); }
|
|
22
23
|
constructor() {
|
|
23
24
|
super();
|
|
24
25
|
this.__registerHost();
|
|
25
26
|
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
27
|
+
this.arcgisScriptChange = createEvent(this, "arcgisScriptChange", 3);
|
|
26
28
|
this.manager = useControllerManager(this,forceUpdate);
|
|
27
29
|
// #endregion
|
|
28
30
|
// #region Private properties
|
|
29
31
|
this._modelId = generateGuid();
|
|
30
32
|
this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
|
|
33
|
+
this._updateApiLibrary = async () => {
|
|
34
|
+
this._apiLibrary = await sqlExprDefaults.getApiLibrary(this._modelId);
|
|
35
|
+
};
|
|
36
|
+
this._onCodeEditorValueChange = (e) => {
|
|
37
|
+
e.stopPropagation();
|
|
38
|
+
this.script = e.detail;
|
|
39
|
+
this.arcgisScriptChange.emit(e.detail);
|
|
40
|
+
};
|
|
31
41
|
this._preparing = false;
|
|
32
42
|
this._editorProfile = undefined;
|
|
33
43
|
this._activeAction = undefined;
|
|
34
44
|
this._apiLibrary = undefined;
|
|
45
|
+
this.messages = useT9n();
|
|
35
46
|
this.profile = undefined;
|
|
47
|
+
this.script = "";
|
|
48
|
+
}
|
|
49
|
+
async _messagesChanged() {
|
|
50
|
+
await this._updateEditorProfile().catch(console.error);
|
|
51
|
+
await this._updateApiLibrary().catch(console.error);
|
|
36
52
|
}
|
|
37
|
-
_profileChanged() {
|
|
38
|
-
this.
|
|
53
|
+
async _profileChanged() {
|
|
54
|
+
await this._updateEditorProfile().catch(console.error);
|
|
55
|
+
await this._updateApiLibrary().catch(console.error);
|
|
39
56
|
}
|
|
40
57
|
// #endregion
|
|
41
58
|
// #region Private methods API
|
|
42
|
-
async
|
|
59
|
+
async _updateEditorProfile() {
|
|
43
60
|
this._preparing = true;
|
|
44
61
|
try {
|
|
45
62
|
await sqlExprDefaults.setProfileForModel(this._modelId, this.profile);
|
|
46
|
-
this._apiLibrary = await sqlExprDefaults.getApiLibrary(this._modelId);
|
|
47
63
|
}
|
|
48
64
|
catch {
|
|
49
65
|
this._editorProfile = undefined;
|
|
@@ -63,23 +79,29 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
63
79
|
// #endregion
|
|
64
80
|
// #region Component lifecycle events
|
|
65
81
|
async componentWillLoad() {
|
|
66
|
-
await this.
|
|
82
|
+
await this._updateEditorProfile().catch(console.error);
|
|
67
83
|
// The profile has to be refreshed on locale change
|
|
68
84
|
// this.manager.watch("messages", () => void this._updateEditorProfile().catch(console.error));
|
|
69
85
|
}
|
|
86
|
+
async componentDidLoad() {
|
|
87
|
+
// We do updateApiLibrary in componentDidLoad because we need to wait until code editor
|
|
88
|
+
// is rendered for worker to register and allow for fetching the sdk
|
|
89
|
+
await this._updateApiLibrary();
|
|
90
|
+
}
|
|
70
91
|
disconnectedCallback() {
|
|
71
92
|
this.manager._disconnectedCallback();
|
|
72
93
|
sqlExprDefaults.disposeForModel(this._modelId);
|
|
73
94
|
}
|
|
74
95
|
// #endregion
|
|
75
96
|
render() {
|
|
76
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: '63348b6e3e5aa7544203c5ec7270db7827c6f3ed' }, h("div", { key: '203ed656208717c877c540ed5c49fc12338d6b15', class: "flex-row flex-adjustable" }, h("div", { key: '4dfe400bbc9ab74ef86c4115ceeabbcb41913427', class: "flex-column flex-adjustable" }, h("arcgis-code-editor", { key: 'dfc9e247b39d2d9901ac911e147d993897809954', language: "arcgis-sql-expression", modelId: this._modelId, ref: (e) => (this._codeEditorElt = e), value: this.script ?? "", onArcgisValueChange: this._onCodeEditorValueChange })), this._activeAction === "fields" && (h("arcgis-sql-expression-fields", { key: 'b5a5516264aae278f3feec00a5e20e2d0855024d', class: "side-panel flex-panel border-inline-start", loading: this._preparing, modelId: this._modelId, "data-panel-name": "none", onArcgisFieldSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined) })), this._activeAction === "functions" && (h("arcgis-language-api-panel", { key: '6da236e289e8bcdadc27cadece6e1fb34c55b1da', class: "side-panel flex-panel border-inline-start", onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined), loading: this._preparing, apiLibrary: this._apiLibrary, "data-panel-name": "none" })), h("calcite-action-bar", { key: '91549ebac7e78165b911e5def1141010032dfa43', class: "side-action-bar border-inline-start", expanded: false, position: "end" }, h("calcite-action", { key: '32211e3b4e8db0530a047ba6c22234d15e504e17', id: "fields-action", text: this.messages.fields ?? "Fields", icon: "profile-variables", active: this._activeAction === "fields", "data-panel-name": "fields",
|
|
77
98
|
// need to use an arrow function to automatically bind 'this'
|
|
78
|
-
onClick: (e) => this._handleActionClick(e) }), h("calcite-action", { key: '
|
|
99
|
+
onClick: (e) => this._handleActionClick(e) }), h("calcite-action", { key: '3c308d994b45c67df76414580d881a082333d2f8', id: "functions-action", text: this.messages.functions ?? "Functions", icon: "function", active: this._activeAction === "functions", "data-panel-name": "functions", onClick: (e) => this._handleActionClick(e) })))));
|
|
79
100
|
}
|
|
80
101
|
static get assetsDirs() { return ["assets"]; }
|
|
81
102
|
get el() { return this; }
|
|
82
103
|
static get watchers() { return {
|
|
104
|
+
"messages": ["_messagesChanged"],
|
|
83
105
|
"profile": ["_profileChanged"]
|
|
84
106
|
}; }
|
|
85
107
|
static get style() { return ArcgisSqlExpressionEditorStyle0; }
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { S as SqlExpressionFields, d as defineCustomElement$1 } from './sql-expression-fields.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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { a as isNotUndefined, D as Deferred, k as safeAsyncCall, l as devToolsAwareTimeout, m as safeCall } from './index2.js';
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ function retrieveComponentMembers(component, isLit) {
|
|
|
15
15
|
([name, descriptor]) => descriptor.noAccessor ? void 0 : [
|
|
16
16
|
name,
|
|
17
17
|
[
|
|
18
|
-
(descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ :
|
|
18
|
+
(descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ : 16 /* Unknown */)
|
|
19
19
|
]
|
|
20
20
|
]
|
|
21
21
|
).filter(isNotUndefined)
|
|
@@ -500,14 +500,35 @@ function watch(component, property, callback) {
|
|
|
500
500
|
var ComponentInternals = class {
|
|
501
501
|
constructor(component) {
|
|
502
502
|
/**
|
|
503
|
-
* When watchers are set, set
|
|
504
|
-
* in the setter, read from `enabledWatchers`.
|
|
505
|
-
*
|
|
506
|
-
*
|
|
503
|
+
* When watchers are set, they are set into `allWatchers`. When watchers are
|
|
504
|
+
* read in the setter, they are read from `enabledWatchers`.
|
|
505
|
+
*
|
|
506
|
+
* In Stencil, on connectedCallback(), controller manager does
|
|
507
|
+
* `enabledWatchers=allWatchers`. Reasoning:
|
|
507
508
|
* - This disables watchers until connected callback (matches behavior of
|
|
508
509
|
* Stencil's watchers)
|
|
509
|
-
* - This removes
|
|
510
|
-
* not (as getters/setters are hot path, and should
|
|
510
|
+
* - This removes the need for a check in the setter for whether the watchers
|
|
511
|
+
* were enabled already or not (as getters/setters are hot path, and should
|
|
512
|
+
* be streamlined)
|
|
513
|
+
*
|
|
514
|
+
* In Lit, we set enabledWatchers to allWatchers in the constructor.
|
|
515
|
+
* Reasoning:
|
|
516
|
+
* - While in Stencil all user provided properties are either set before the
|
|
517
|
+
* component constructor (this is possible since Stencil's props store is
|
|
518
|
+
* externalized) or after connectedCallback, in Lit the properties may be
|
|
519
|
+
* set by attributeChangedCallback before connectedCallback. Thus, we need
|
|
520
|
+
* to enable watchers even before connectedCallback.
|
|
521
|
+
* - This means, that a watcher set for some prop before your component got
|
|
522
|
+
* a chance to set the default value will trigger the watcher when the
|
|
523
|
+
* default value is set - but, that is inline with Lit's willUpdate behavior
|
|
524
|
+
* of triggering for default values AND, the only way to set a watcher
|
|
525
|
+
* before default value is if you called watcher inside a controller. For
|
|
526
|
+
* now, there are no controllers written outside of arcgis-map-components
|
|
527
|
+
* package, so I was able to verify that this change would have no
|
|
528
|
+
* negative impact.
|
|
529
|
+
*
|
|
530
|
+
* In either way, I plan to remove watchers from controllers once Stencil
|
|
531
|
+
* support is removed.
|
|
511
532
|
*/
|
|
512
533
|
this.enabledWatchers = {};
|
|
513
534
|
this.allWatchers = {};
|
|
@@ -635,7 +656,7 @@ var ComponentInternals = class {
|
|
|
635
656
|
) : parsePropertyValue(rawNewValue, propType);
|
|
636
657
|
const internals = component2.manager.internals;
|
|
637
658
|
if (newValue === oldValue) {
|
|
638
|
-
originalSet.call(this,
|
|
659
|
+
originalSet.call(this, newValue);
|
|
639
660
|
} else {
|
|
640
661
|
const setters = shouldBypass.setter ? emptyArray : internals.setters[name2] ?? emptyArray;
|
|
641
662
|
for (let i = 0; i < setters.length; i++) {
|
|
@@ -696,7 +717,7 @@ var ControllerManager = class extends GenericController {
|
|
|
696
717
|
const controllers = /* @__PURE__ */ new Set();
|
|
697
718
|
function addController(controller) {
|
|
698
719
|
controllers.add(controller);
|
|
699
|
-
if (
|
|
720
|
+
if (!(controllerSymbol in controller) && component.renderRoot && component.el.isConnected) {
|
|
700
721
|
controller.hostConnected?.();
|
|
701
722
|
}
|
|
702
723
|
}
|
|
@@ -723,9 +744,6 @@ var ControllerManager = class extends GenericController {
|
|
|
723
744
|
this._controllers = controllers;
|
|
724
745
|
this.exports = void 0;
|
|
725
746
|
this.hasDestroy = autoDestroyDisabledPropName in this.component && typeof this.component.destroy === "function";
|
|
726
|
-
if (this.hasDestroy) {
|
|
727
|
-
watch(component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
|
|
728
|
-
}
|
|
729
747
|
this._bindLifecycleMethods();
|
|
730
748
|
const internals = this.internals;
|
|
731
749
|
Object.keys(internals.members).forEach((name2) => {
|
|
@@ -733,7 +751,9 @@ var ControllerManager = class extends GenericController {
|
|
|
733
751
|
internals.accessorSetter[name2] = defaultGetterSetter;
|
|
734
752
|
internals.getSetProxy(name2);
|
|
735
753
|
});
|
|
736
|
-
if (
|
|
754
|
+
if (isLit) {
|
|
755
|
+
this.internals.enabledWatchers = this.internals.allWatchers;
|
|
756
|
+
} else {
|
|
737
757
|
Object.defineProperty(component, "updateComplete", {
|
|
738
758
|
get: async () => await this._updatePromise.promise
|
|
739
759
|
});
|
|
@@ -750,13 +770,13 @@ var ControllerManager = class extends GenericController {
|
|
|
750
770
|
const isStencilDistBuild = component.el === component;
|
|
751
771
|
this._originalLifecycles = {
|
|
752
772
|
// These component's callbacks will be called by Lit, so we don't have to
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
773
|
+
_connectedCallback: isLit || isStencilDistBuild ? void 0 : component.connectedCallback,
|
|
774
|
+
_disconnectedCallback: isLit || isStencilDistBuild ? void 0 : component.disconnectedCallback,
|
|
775
|
+
_load: isLit ? component.load : component.componentWillLoad,
|
|
776
|
+
_loaded: isLit ? component.loaded : component.componentDidLoad,
|
|
777
|
+
_willUpdate: isLit ? void 0 : component.componentWillUpdate,
|
|
778
|
+
_updated: isLit ? void 0 : component.componentDidUpdate,
|
|
779
|
+
_destroy: component.destroy
|
|
760
780
|
};
|
|
761
781
|
const hostConnected = this._connectedCallback.bind(this);
|
|
762
782
|
const hostDisconnected = this._disconnectedCallback.bind(this);
|
|
@@ -805,7 +825,7 @@ var ControllerManager = class extends GenericController {
|
|
|
805
825
|
keyTrackResolve();
|
|
806
826
|
internals.enableReadonly?.();
|
|
807
827
|
this._controllers.forEach(callConnected);
|
|
808
|
-
this._originalLifecycles.
|
|
828
|
+
this._originalLifecycles._connectedCallback?.call(this.component);
|
|
809
829
|
}
|
|
810
830
|
/** @internal */
|
|
811
831
|
_disconnectedCallback() {
|
|
@@ -813,7 +833,7 @@ var ControllerManager = class extends GenericController {
|
|
|
813
833
|
return;
|
|
814
834
|
}
|
|
815
835
|
this._controllers.forEach(callDisconnected);
|
|
816
|
-
this._originalLifecycles.
|
|
836
|
+
this._originalLifecycles._disconnectedCallback?.call(this.component);
|
|
817
837
|
if (this.hasDestroy) {
|
|
818
838
|
this._setAutoDestroyTimeout();
|
|
819
839
|
}
|
|
@@ -831,22 +851,25 @@ var ControllerManager = class extends GenericController {
|
|
|
831
851
|
}
|
|
832
852
|
}
|
|
833
853
|
await Promise.allSettled(Array.from(this._controllers, callLoad, integrations));
|
|
834
|
-
await this._originalLifecycles.
|
|
854
|
+
await this._originalLifecycles._load?.call(this.component);
|
|
855
|
+
if (this.hasDestroy) {
|
|
856
|
+
watch(this.component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
|
|
857
|
+
}
|
|
835
858
|
}
|
|
836
859
|
/** @internal */
|
|
837
860
|
_loaded() {
|
|
838
861
|
this._controllers.forEach(callLoaded);
|
|
839
|
-
this._originalLifecycles.
|
|
862
|
+
this._originalLifecycles._loaded?.call(this.component);
|
|
840
863
|
}
|
|
841
864
|
_update() {
|
|
842
865
|
const changedProperties = this.component.changedProperties;
|
|
843
866
|
this._controllers.forEach(callUpdate2, changedProperties);
|
|
844
|
-
|
|
867
|
+
this._originalLifecycles._willUpdate?.call(this.component);
|
|
845
868
|
}
|
|
846
869
|
_updated() {
|
|
847
870
|
const maybeLitComponent = this.component;
|
|
848
871
|
this._controllers.forEach(callUpdated, maybeLitComponent.changedProperties);
|
|
849
|
-
this._originalLifecycles.
|
|
872
|
+
this._originalLifecycles._updated?.call(this.component);
|
|
850
873
|
if (this.isLit) {
|
|
851
874
|
maybeLitComponent.changedProperties = /* @__PURE__ */ new Map();
|
|
852
875
|
} else {
|
|
@@ -871,13 +894,13 @@ var ControllerManager = class extends GenericController {
|
|
|
871
894
|
this.destroyed = true;
|
|
872
895
|
this._controllers.forEach(callDestroy);
|
|
873
896
|
this._controllers.clear();
|
|
874
|
-
await this._originalLifecycles.
|
|
897
|
+
await this._originalLifecycles._destroy?.call(this.component);
|
|
875
898
|
}
|
|
876
899
|
_setAutoDestroyTimeout() {
|
|
900
|
+
if (this._autoDestroyTimeout !== void 0) {
|
|
901
|
+
clearTimeout(this._autoDestroyTimeout);
|
|
902
|
+
}
|
|
877
903
|
if (!this.component.el.isConnected && !this.component.autoDestroyDisabled) {
|
|
878
|
-
if (this._autoDestroyTimeout !== void 0) {
|
|
879
|
-
clearTimeout(this._autoDestroyTimeout);
|
|
880
|
-
}
|
|
881
904
|
const destroy = () => void this.destroy().catch(console.error);
|
|
882
905
|
{
|
|
883
906
|
this._autoDestroyTimeout = devToolsAwareTimeout(destroy, autoDestroyOnDisconnectTimeout);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { editor, languages, Range, Uri, KeyMod, KeyCode } from 'monaco-editor';
|
|
8
8
|
import { i as importRequest } from './fields.js';
|
|
9
9
|
import { h as isURL, j as hasSameOrigin, D as Deferred, g as generateGuid, o as observeAncestorsMutation, e as getElementTheme } from './index2.js';
|
|
10
|
-
import { u as useControllerManager, g as getSet } from './chunk-
|
|
10
|
+
import { u as useControllerManager, g as getSet } from './chunk-W77CUVCX.js';
|
|
11
11
|
import { b as arcadeDefaults, c as getMode } from './arcade-defaults.js';
|
|
12
12
|
import { s as sqlExprDefaults, g as getMode$1 } from './sql-expr-defaults.js';
|
|
13
13
|
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
@@ -353,6 +353,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
353
353
|
}
|
|
354
354
|
disconnectedCallback() {
|
|
355
355
|
this.manager._disconnectedCallback();
|
|
356
|
+
this._editorInstance?.getModel()?.dispose();
|
|
356
357
|
while (this._disposables.length) {
|
|
357
358
|
this._disposables.pop()?.dispose();
|
|
358
359
|
}
|
|
@@ -420,7 +421,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
420
421
|
//#endregion
|
|
421
422
|
// #region Rendering
|
|
422
423
|
render() {
|
|
423
|
-
return h(Host, { key: '
|
|
424
|
+
return h(Host, { key: 'ad62779413690025ea1498106aee049b3c786582' });
|
|
424
425
|
}
|
|
425
426
|
static get assetsDirs() { return ["assets"]; }
|
|
426
427
|
get el() { return this; }
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
// src/index.ts
|
|
7
7
|
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis && !("forceESM" in window.$arcgis);
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
export { setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizedAllCodeElements } from './markdown.js';
|
|
8
8
|
import { f as filterCollection } from './utilities.js';
|
|
9
|
-
import { u as useControllerManager } from './chunk-
|
|
9
|
+
import { u as useControllerManager } from './chunk-W77CUVCX.js';
|
|
10
10
|
import { r as setFocusOnElement, b as addLTRMark } from './index2.js';
|
|
11
11
|
import { u as useT9n } from './useT9n.js';
|
|
12
12
|
import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
|
|
@@ -23,7 +23,7 @@ import "@esri/calcite-components/dist/components/calcite-list.js";
|
|
|
23
23
|
const languageApiPanelCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-block p:first-of-type{margin-top:0}:host calcite-block code{font-family:var(--calcite-code-family)}:host calcite-block pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
24
24
|
const ArcgisLanguageApiPanelStyle0 = languageApiPanelCss;
|
|
25
25
|
|
|
26
|
-
const __cmpMeta = [1,"arcgis-language-api-panel",{"hideDocumentationActions":[1028,"hide-documentation-actions"],"loading":[1028],"apiLibrary":[1040],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]}];
|
|
26
|
+
const __cmpMeta = [1,"arcgis-language-api-panel",{"hideDocumentationActions":[1028,"hide-documentation-actions"],"loading":[1028],"apiLibrary":[1040],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]},undefined,{"apiLibrary":["_apiLibraryChanged"]}];
|
|
27
27
|
const ArcgisLanguageApiPanel = /*@__PURE__*/ proxyCustomElement(class ArcgisLanguageApiPanel extends HTMLElement {
|
|
28
28
|
connectedCallback() { this.manager._connectedCallback(); }
|
|
29
29
|
constructor() {
|
|
@@ -81,6 +81,21 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
81
81
|
this.loading = false;
|
|
82
82
|
this.apiLibrary = undefined;
|
|
83
83
|
}
|
|
84
|
+
_apiLibraryChanged(newVal) {
|
|
85
|
+
// refresh the selected api item if there is one to use the new language
|
|
86
|
+
if (!this._selectedApiItem) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
for (const category of newVal ?? []) {
|
|
90
|
+
for (const item of category.items) {
|
|
91
|
+
if (item.name === this._selectedApiItem.name) {
|
|
92
|
+
this._selectedApiItem = item;
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
this._selectedApiItem = undefined;
|
|
98
|
+
}
|
|
84
99
|
//#endregion
|
|
85
100
|
// #region Component lifecycle events
|
|
86
101
|
async componentWillLoad() {
|
|
@@ -143,10 +158,13 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
143
158
|
render() {
|
|
144
159
|
const categories = (this.apiLibrary ?? []).map((apiCategory) => this.renderApiCategory(apiCategory));
|
|
145
160
|
const empty = categories.every((g) => !g);
|
|
146
|
-
return (h(Host, { key: '
|
|
161
|
+
return (h(Host, { key: '777e65f0a9891fbdf8fd6177890df475261d198e' }, h("style", { key: 'bacffd5a30dfa72f9cc99db6a7066fd551c06e60' }, this._colorizeStyle), h("calcite-flow", { key: 'b48417bccd1a1a5e400d5b205ff0dc3a21e08a76', ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { key: 'a44cdb484d60daa1a6410ed7d513eb680f20f883', heading: this.messages.constantsandfunctions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { key: 'ebe4708ce6ccb62b2d5639bb9cbc5ee207e7e2b9', value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), this.loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "Loading" })) : (h("calcite-list", null, empty ? h("div", { class: "notice-container" }, this.messages.noitems) : categories))), this.renderApiItemFlowItem())));
|
|
147
162
|
}
|
|
148
163
|
static get assetsDirs() { return ["assets"]; }
|
|
149
164
|
get el() { return this; }
|
|
165
|
+
static get watchers() { return {
|
|
166
|
+
"apiLibrary": ["_apiLibraryChanged"]
|
|
167
|
+
}; }
|
|
150
168
|
static get style() { return ArcgisLanguageApiPanelStyle0; }
|
|
151
169
|
}, __cmpMeta);
|
|
152
170
|
function defineCustomElement() {
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.55
|
|
5
5
|
*/
|
|
6
6
|
import { n as newLayersFeatureLayer, i as importRequest, s as supportedFields, a as newPortalPortalItem, b as newWebScene, c as newWebMap, f as fieldAlias, d as fieldTypeToIconName, e as fieldTypeToApiValueVarType } from './fields.js';
|
|
7
7
|
import { p as portalItemPageUrl } from './utilities.js';
|