@arcgis/coding-components 4.30.0-next.45 → 4.30.0-next.47
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/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-c9761d56.js → p-0fee5174.js} +2 -2
- package/dist/arcgis-coding-components/{p-9d824c7e.js → p-1a627096.js} +2 -2
- package/dist/arcgis-coding-components/{p-ebe0dd23.js → p-29207f1e.js} +1 -1
- package/dist/arcgis-coding-components/p-2b6dab4b.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-4928cbf5.js → p-4fd5a02d.js} +3 -3
- package/dist/arcgis-coding-components/{p-e3f33726.js → p-621187ef.js} +2 -2
- package/dist/arcgis-coding-components/{p-bcfde3a0.js → p-6fd22ff7.js} +2 -2
- package/dist/arcgis-coding-components/{p-e1381c29.js → p-833b0216.js} +2 -2
- package/dist/arcgis-coding-components/{p-ad83a4c3.js → p-a0704d86.js} +10 -10
- package/dist/arcgis-coding-components/{p-5ff71a20.js → p-a412be74.js} +2 -2
- package/dist/arcgis-coding-components/{p-f59a3139.js → p-ab7e89c0.js} +2 -2
- package/dist/arcgis-coding-components/{p-2cd4a423.js → p-d5df8d73.js} +2 -2
- package/dist/cjs/{arcade-defaults-9cd78c83.js → arcade-defaults-4e0664fb.js} +10 -10
- package/dist/cjs/{arcade-mode-64fa17b4.js → arcade-mode-61a07430.js} +3 -3
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +85 -66
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-3faba200.js → css-fac19960.js} +1 -1
- package/dist/cjs/{cssMode-50de9c49.js → cssMode-22d917f0.js} +3 -3
- package/dist/cjs/{html-7d93e27c.js → html-5bc24648.js} +3 -3
- package/dist/cjs/{htmlMode-304aeb14.js → htmlMode-f09628e1.js} +3 -3
- package/dist/cjs/{index-91a65ccf.js → index-02749111.js} +6 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-13393a52.js → javascript-29521fd3.js} +4 -4
- package/dist/cjs/{jsonMode-373f0b84.js → jsonMode-99606370.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-beaaa0a0.js → tsMode-e34432d7.js} +3 -3
- package/dist/cjs/{typescript-0e0dd0e1.js → typescript-8ce06335.js} +3 -3
- package/dist/components/arcade-api.js +2 -2
- package/dist/components/arcade-contribution.js +1 -1
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- 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-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +14 -11
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/{chunk-HXHHCYA6.js → chunk-36QZLGG2.js} +22 -12
- package/dist/components/code-editor.js +54 -61
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{arcade-defaults-6869481f.js → arcade-defaults-fdba0972.js} +10 -10
- package/dist/esm/{arcade-mode-e4e834c6.js → arcade-mode-0d144d92.js} +3 -3
- package/dist/esm/arcgis-arcade-api_6.entry.js +85 -66
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-fe8f3a4b.js → css-58b4c966.js} +1 -1
- package/dist/esm/{cssMode-e562138d.js → cssMode-f5916932.js} +3 -3
- package/dist/esm/{html-ea09066e.js → html-7c8fbcc5.js} +3 -3
- package/dist/esm/{htmlMode-ea206439.js → htmlMode-d7755346.js} +3 -3
- package/dist/esm/{index-34f0cc38.js → index-c6b28dae.js} +6 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-21f7e90c.js → javascript-9ac36865.js} +4 -4
- package/dist/esm/{jsonMode-d577e66d.js → jsonMode-ef328849.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-4ba96e2b.js → tsMode-0daf7dc9.js} +3 -3
- package/dist/esm/{typescript-214d5803.js → typescript-a34ba038.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 +9 -5
- package/dist/types/components/code-editor/code-editor.d.ts +14 -12
- package/dist/types/components.d.ts +22 -11
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +0 -3
- package/package.json +9 -9
- package/dist/arcgis-coding-components/p-4b5a4653.entry.js +0 -6
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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
6
|
export { setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
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;
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
6
|
import { editor } from 'monaco-editor';
|
|
7
7
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { g as getAssetPath } from './index-c6b28dae.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns the last element of an array.
|
|
@@ -120522,7 +120522,7 @@ registerLanguage({
|
|
|
120522
120522
|
mimetypes: ["text/css"],
|
|
120523
120523
|
loader: () => {
|
|
120524
120524
|
{
|
|
120525
|
-
return import('./css-
|
|
120525
|
+
return import('./css-58b4c966.js');
|
|
120526
120526
|
}
|
|
120527
120527
|
}
|
|
120528
120528
|
});
|
|
@@ -120540,7 +120540,7 @@ registerLanguage({
|
|
|
120540
120540
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120541
120541
|
loader: () => {
|
|
120542
120542
|
{
|
|
120543
|
-
return import('./html-
|
|
120543
|
+
return import('./html-7c8fbcc5.js');
|
|
120544
120544
|
}
|
|
120545
120545
|
}
|
|
120546
120546
|
});
|
|
@@ -120560,7 +120560,7 @@ registerLanguage({
|
|
|
120560
120560
|
mimetypes: ["text/javascript"],
|
|
120561
120561
|
loader: () => {
|
|
120562
120562
|
{
|
|
120563
|
-
return import('./javascript-
|
|
120563
|
+
return import('./javascript-9ac36865.js');
|
|
120564
120564
|
}
|
|
120565
120565
|
}
|
|
120566
120566
|
});
|
|
@@ -120578,7 +120578,7 @@ registerLanguage({
|
|
|
120578
120578
|
mimetypes: ["text/typescript"],
|
|
120579
120579
|
loader: () => {
|
|
120580
120580
|
{
|
|
120581
|
-
return import('./typescript-
|
|
120581
|
+
return import('./typescript-a34ba038.js');
|
|
120582
120582
|
}
|
|
120583
120583
|
}
|
|
120584
120584
|
});
|
|
@@ -120699,7 +120699,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120699
120699
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120700
120700
|
function getMode$3() {
|
|
120701
120701
|
{
|
|
120702
|
-
return import('./cssMode-
|
|
120702
|
+
return import('./cssMode-f5916932.js');
|
|
120703
120703
|
}
|
|
120704
120704
|
}
|
|
120705
120705
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120824,7 +120824,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120824
120824
|
};
|
|
120825
120825
|
function getMode$2() {
|
|
120826
120826
|
{
|
|
120827
|
-
return import('./htmlMode-
|
|
120827
|
+
return import('./htmlMode-d7755346.js');
|
|
120828
120828
|
}
|
|
120829
120829
|
}
|
|
120830
120830
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120926,7 +120926,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120926
120926
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120927
120927
|
function getMode$1() {
|
|
120928
120928
|
{
|
|
120929
|
-
return import('./jsonMode-
|
|
120929
|
+
return import('./jsonMode-ef328849.js');
|
|
120930
120930
|
}
|
|
120931
120931
|
}
|
|
120932
120932
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121195,7 +121195,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121195
121195
|
};
|
|
121196
121196
|
function getMode() {
|
|
121197
121197
|
{
|
|
121198
|
-
return import('./tsMode-
|
|
121198
|
+
return import('./tsMode-0daf7dc9.js');
|
|
121199
121199
|
}
|
|
121200
121200
|
}
|
|
121201
121201
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { A as main, e as editor, M as MarkerSeverity, R as Range, l as languages, B as debounce, E as Emitter } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { A as main, e as editor, M as MarkerSeverity, R as Range, l as languages, B as debounce, E as Emitter } from './arcade-defaults-fdba0972.js';
|
|
7
|
+
import './index-c6b28dae.js';
|
|
8
8
|
|
|
9
9
|
var j={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Fe=["++","--"],Qe=["-","+","!","~"],Ze=["=","/=","*=","%=","+=","-="],Xe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Fe.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Xe.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ht=Object.values(f),dt=Object.values(j);dt.map(t=>({label:t,kind:main.CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:main.CompletionItemKind.Keyword}));
|
|
10
10
|
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { f as forceUpdate, g as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-
|
|
7
|
-
import { g as generateTokensCSSForColorMap, e as editor, S as StandaloneServices, I as IStandaloneThemeService, c as createCommonjsModule, b as commonjsGlobal, i as importCoreAccessor, d as importCoreAccessorSupportDecorators, f as isURL, h as hasSameOrigin, j as importRequest, l as languages, k as arcadeDefaults, U as Uri, s as setFocusOnElement, m as filterCollection, n as addLTRMark, o as importArcade, D as Deferred$1, p as generateGuid, q as getElementTheme, K as KeyCode, r as setValuesInString, t as quoteString, u as supportedFields, v as createFilterExpression, R as Range, w as observeAncestorsMutation$1, x as KeyMod } from './arcade-defaults-
|
|
6
|
+
import { f as forceUpdate, g as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-c6b28dae.js';
|
|
7
|
+
import { g as generateTokensCSSForColorMap, e as editor, S as StandaloneServices, I as IStandaloneThemeService, c as createCommonjsModule, b as commonjsGlobal, i as importCoreAccessor, d as importCoreAccessorSupportDecorators, f as isURL, h as hasSameOrigin, j as importRequest, l as languages, k as arcadeDefaults, U as Uri, s as setFocusOnElement, m as filterCollection, n as addLTRMark, o as importArcade, D as Deferred$1, p as generateGuid, q as getElementTheme, K as KeyCode, r as setValuesInString, t as quoteString, u as supportedFields, v as createFilterExpression, R as Range, w as observeAncestorsMutation$1, x as KeyMod } from './arcade-defaults-fdba0972.js';
|
|
8
8
|
|
|
9
9
|
async function colorizeCode(code) {
|
|
10
10
|
return await editor.colorize(code, "arcade", { tabSize: 2 });
|
|
@@ -3998,7 +3998,6 @@ var ControllerManager = class extends GenericController {
|
|
|
3998
3998
|
this._connected = new Deferred();
|
|
3999
3999
|
this.internals = new ComponentInternals(this.component);
|
|
4000
4000
|
this.connected = this._connected.promise;
|
|
4001
|
-
this.hasDestroy = false;
|
|
4002
4001
|
this.destroyed = false;
|
|
4003
4002
|
this._updatePromise = new Deferred();
|
|
4004
4003
|
this._originalLifecycles = {};
|
|
@@ -4069,9 +4068,9 @@ var ControllerManager = class extends GenericController {
|
|
|
4069
4068
|
retrieveComponentMeta(component);
|
|
4070
4069
|
this._controllers = controllers;
|
|
4071
4070
|
this.exports = void 0;
|
|
4072
|
-
this.hasDestroy = "
|
|
4071
|
+
this.hasDestroy = "autoDestroyDisabled" in this.component && typeof this.component.destroy === "function";
|
|
4073
4072
|
if (this.hasDestroy)
|
|
4074
|
-
this.watch("
|
|
4073
|
+
this.watch("autoDestroyDisabled", () => this._autoDestroyDisabledWatcher());
|
|
4075
4074
|
this._bindLifecycleMethods();
|
|
4076
4075
|
Object.defineProperty(component, "updateComplete", {
|
|
4077
4076
|
get: async () => await this._updatePromise.promise
|
|
@@ -4124,9 +4123,11 @@ var ControllerManager = class extends GenericController {
|
|
|
4124
4123
|
const tagName = this.component.el.tagName.toLowerCase();
|
|
4125
4124
|
this.component.el.remove();
|
|
4126
4125
|
throw new Error(
|
|
4127
|
-
`The ${tagName} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the
|
|
4126
|
+
`The ${tagName} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the autoDestroyDisabled prop.`
|
|
4128
4127
|
);
|
|
4129
4128
|
}
|
|
4129
|
+
if (this._autoDestroyTimeout !== void 0)
|
|
4130
|
+
clearTimeout(this._autoDestroyTimeout);
|
|
4130
4131
|
this.internals.enabledWatchers = this.internals.allWatchers;
|
|
4131
4132
|
keyTrackResolve();
|
|
4132
4133
|
this._connected.resolve();
|
|
@@ -4143,7 +4144,7 @@ var ControllerManager = class extends GenericController {
|
|
|
4143
4144
|
);
|
|
4144
4145
|
this._originalLifecycles.disconnectedCallback?.call(this.component);
|
|
4145
4146
|
if (this.hasDestroy)
|
|
4146
|
-
this.
|
|
4147
|
+
this._autoDestroyDisabledWatcher();
|
|
4147
4148
|
}
|
|
4148
4149
|
async _componentWillLoad() {
|
|
4149
4150
|
await this.internals.reactiveUtilsIntegration();
|
|
@@ -4200,18 +4201,26 @@ var ControllerManager = class extends GenericController {
|
|
|
4200
4201
|
return;
|
|
4201
4202
|
if (this.component.el.isConnected) {
|
|
4202
4203
|
this.hasDestroy = false;
|
|
4203
|
-
|
|
4204
|
-
|
|
4204
|
+
try {
|
|
4205
|
+
this.component.el.remove();
|
|
4206
|
+
} finally {
|
|
4207
|
+
this.hasDestroy = true;
|
|
4208
|
+
}
|
|
4205
4209
|
}
|
|
4210
|
+
this._autoDestroyTimeout = void 0;
|
|
4206
4211
|
this.destroyed = true;
|
|
4207
4212
|
this._controllers.forEach(
|
|
4208
4213
|
(controller) => "triggerDestroy" in controller ? controller.triggerDestroy() : safeCall(() => controller.hostDestroy?.())
|
|
4209
4214
|
);
|
|
4210
4215
|
await this._originalLifecycles.destroy?.call(this.component);
|
|
4211
4216
|
}
|
|
4212
|
-
|
|
4213
|
-
if (!this.component.el.isConnected && !this.component.
|
|
4214
|
-
|
|
4217
|
+
_autoDestroyDisabledWatcher() {
|
|
4218
|
+
if (!this.component.el.isConnected && !this.component.autoDestroyDisabled) {
|
|
4219
|
+
if (this._autoDestroyTimeout !== void 0)
|
|
4220
|
+
clearTimeout(this._autoDestroyTimeout);
|
|
4221
|
+
const destroy = () => void this.destroy().catch(console.error);
|
|
4222
|
+
this._autoDestroyTimeout = setTimeout(destroy, autoDestroyOnDisconnectTimeout);
|
|
4223
|
+
}
|
|
4215
4224
|
}
|
|
4216
4225
|
/**
|
|
4217
4226
|
* Make a @Prop() or @State() readonly (prevent overwriting default value).
|
|
@@ -4282,8 +4291,9 @@ var destroyErrorMessage = `
|
|
|
4282
4291
|
If the component uses a controller that uses destroy() method, then the
|
|
4283
4292
|
component must have the following properties:
|
|
4284
4293
|
${// Don't expose internal code in production, and keep bundle smaller:
|
|
4285
|
-
`
|
|
4294
|
+
`autoDestroyDisabled and destroy` }
|
|
4286
4295
|
`.trim();
|
|
4296
|
+
var autoDestroyOnDisconnectTimeout = 1e3;
|
|
4287
4297
|
|
|
4288
4298
|
// src/proxyExports.ts
|
|
4289
4299
|
var proxyExports = (Class) => (...args) => {
|
|
@@ -4532,7 +4542,7 @@ async function getArcadeWorker(uri) {
|
|
|
4532
4542
|
* @returns arcade mode module
|
|
4533
4543
|
*/
|
|
4534
4544
|
async function getMode() {
|
|
4535
|
-
return await import('./arcade-mode-
|
|
4545
|
+
return await import('./arcade-mode-0d144d92.js');
|
|
4536
4546
|
}
|
|
4537
4547
|
// Register the language in Monaco
|
|
4538
4548
|
languages.register({
|
|
@@ -4977,8 +4987,9 @@ const ArcgisArcadeEditor = class {
|
|
|
4977
4987
|
}
|
|
4978
4988
|
};
|
|
4979
4989
|
this._openArcadeHelp = () => void window.open(DevelopersWebSitePath, "Arcade Help");
|
|
4980
|
-
this.
|
|
4990
|
+
this._onCodeEditorValueChange = (e) => {
|
|
4981
4991
|
e.stopPropagation();
|
|
4992
|
+
this.script = e.detail;
|
|
4982
4993
|
this.arcgisScriptChange.emit(e.detail);
|
|
4983
4994
|
};
|
|
4984
4995
|
this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
|
|
@@ -5004,6 +5015,10 @@ const ArcgisArcadeEditor = class {
|
|
|
5004
5015
|
this.sideActionBarExpanded = false;
|
|
5005
5016
|
this.openedSidePanel = "none";
|
|
5006
5017
|
this.editorOptions = undefined;
|
|
5018
|
+
this.editorInstance = this.manager.getSet(undefined, {
|
|
5019
|
+
get: () => this._codeEditorElt?.editorInstance,
|
|
5020
|
+
set: (_value, prevValue) => prevValue,
|
|
5021
|
+
});
|
|
5007
5022
|
}
|
|
5008
5023
|
_profileChanged() {
|
|
5009
5024
|
this._updateEditorProfile().catch(console.error);
|
|
@@ -5022,12 +5037,11 @@ const ArcgisArcadeEditor = class {
|
|
|
5022
5037
|
// #endregion
|
|
5023
5038
|
// #region Public methods API
|
|
5024
5039
|
/**
|
|
5025
|
-
*
|
|
5026
|
-
* @returns {Promise<string>}
|
|
5040
|
+
* @deprecated Use `script` property instead.
|
|
5027
5041
|
*/
|
|
5028
5042
|
async getScript() {
|
|
5029
5043
|
await this._componentReadyDefer.promise;
|
|
5030
|
-
return
|
|
5044
|
+
return this._codeEditorElt?.value;
|
|
5031
5045
|
}
|
|
5032
5046
|
/**
|
|
5033
5047
|
* Set the focus on the element.
|
|
@@ -5038,12 +5052,11 @@ const ArcgisArcadeEditor = class {
|
|
|
5038
5052
|
}
|
|
5039
5053
|
/**
|
|
5040
5054
|
* @internal
|
|
5041
|
-
*
|
|
5042
|
-
* @returns {Promise<IStandaloneCodeEditor>} - The monaco editor instance
|
|
5055
|
+
* @deprecated Use `editorInstance` property instead.
|
|
5043
5056
|
*/
|
|
5044
5057
|
async getEditorInstance() {
|
|
5045
5058
|
await this._componentReadyDefer.promise;
|
|
5046
|
-
return
|
|
5059
|
+
return this._codeEditorElt?.editorInstance;
|
|
5047
5060
|
}
|
|
5048
5061
|
/**
|
|
5049
5062
|
* Returns the Arcade result for the script for the provided test data.
|
|
@@ -5162,7 +5175,7 @@ const ArcgisArcadeEditor = class {
|
|
|
5162
5175
|
//#endregion
|
|
5163
5176
|
//#region Render Main Panel
|
|
5164
5177
|
renderMainPanel() {
|
|
5165
|
-
return (h("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, options: this.editorOptions, onArcgisValueChange: this.
|
|
5178
|
+
return (h("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, options: this.editorOptions, onArcgisValueChange: this._onCodeEditorValueChange, ref: (e) => (this._codeEditorElt = e) }));
|
|
5166
5179
|
}
|
|
5167
5180
|
//#endregion
|
|
5168
5181
|
//#region Rendering the Action Bar
|
|
@@ -5763,65 +5776,66 @@ const ArcgisCodeEditor = class {
|
|
|
5763
5776
|
registerInstance(this, hostRef);
|
|
5764
5777
|
this.arcgisValueChange = createEvent(this, "arcgisValueChange", 3);
|
|
5765
5778
|
this.arcgisSelectionChange = createEvent(this, "arcgisSelectionChange", 3);
|
|
5779
|
+
this.manager = useControllerManager(this);
|
|
5766
5780
|
this._componentReadyDefer = new Deferred$1();
|
|
5767
5781
|
this._disposables = [];
|
|
5768
|
-
this.value =
|
|
5782
|
+
this.value = this.manager.getSet("", {
|
|
5783
|
+
get: () => this._editorInstance?.getValue() ?? "",
|
|
5784
|
+
set: (newValue, oldValue) => {
|
|
5785
|
+
if (!this._editorInstance) {
|
|
5786
|
+
return "";
|
|
5787
|
+
}
|
|
5788
|
+
const model = this._editorInstance.getModel();
|
|
5789
|
+
if (!model) {
|
|
5790
|
+
return "";
|
|
5791
|
+
}
|
|
5792
|
+
if (model.getValue() === newValue) {
|
|
5793
|
+
return newValue;
|
|
5794
|
+
}
|
|
5795
|
+
// Set the value and preserve the undo stack
|
|
5796
|
+
const range = model.getFullModelRange();
|
|
5797
|
+
this._editorInstance.executeEdits("", [{ range, text: newValue ?? "", forceMoveMarkers: true }]);
|
|
5798
|
+
this._editorInstance.pushUndoStop();
|
|
5799
|
+
// By returning oldValue we are preventing a re-render.
|
|
5800
|
+
// The getter will return the new value anyway.
|
|
5801
|
+
return oldValue;
|
|
5802
|
+
},
|
|
5803
|
+
});
|
|
5769
5804
|
this.language = undefined;
|
|
5770
5805
|
this.modelId = generateGuid();
|
|
5771
5806
|
this.options = undefined;
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
}
|
|
5777
|
-
this._editorInstance.setValue(newValue ?? "");
|
|
5807
|
+
this.editorInstance = this.manager.getSet(undefined, {
|
|
5808
|
+
get: () => this._editorInstance,
|
|
5809
|
+
set: (_value, prevValue) => prevValue,
|
|
5810
|
+
});
|
|
5778
5811
|
}
|
|
5779
5812
|
languagePropChange() {
|
|
5780
|
-
if (!this._editorInstance) {
|
|
5781
|
-
return;
|
|
5782
|
-
}
|
|
5783
5813
|
this.updateModel();
|
|
5784
5814
|
}
|
|
5785
5815
|
modelIdPropChange() {
|
|
5786
|
-
if (!this._editorInstance) {
|
|
5787
|
-
return;
|
|
5788
|
-
}
|
|
5789
5816
|
this.updateModel();
|
|
5790
5817
|
}
|
|
5791
5818
|
optionsPropChange(newValue) {
|
|
5792
|
-
if (!
|
|
5819
|
+
if (!newValue) {
|
|
5793
5820
|
return;
|
|
5794
5821
|
}
|
|
5795
|
-
this._editorInstance
|
|
5822
|
+
this._editorInstance?.updateOptions(newValue);
|
|
5796
5823
|
}
|
|
5797
5824
|
//#endregion
|
|
5798
5825
|
// #region Public methods API
|
|
5799
5826
|
/**
|
|
5800
|
-
*
|
|
5801
|
-
* @returns {Promise<string>}
|
|
5827
|
+
* @deprecated Use `value` property instead.
|
|
5802
5828
|
*/
|
|
5803
5829
|
async getValue() {
|
|
5804
5830
|
await this._componentReadyDefer.promise;
|
|
5805
|
-
return this.
|
|
5831
|
+
return this.value;
|
|
5806
5832
|
}
|
|
5807
5833
|
/**
|
|
5808
|
-
*
|
|
5809
|
-
* on the model to preserve undo/redo stack.
|
|
5810
|
-
* @param text
|
|
5811
|
-
* @returns {Promise<void>}
|
|
5834
|
+
* @deprecated Use `value` property instead.
|
|
5812
5835
|
*/
|
|
5813
5836
|
async setValue(text) {
|
|
5814
5837
|
await this._componentReadyDefer.promise;
|
|
5815
|
-
|
|
5816
|
-
return;
|
|
5817
|
-
}
|
|
5818
|
-
const model = this._editorInstance.getModel();
|
|
5819
|
-
if (!model) {
|
|
5820
|
-
return;
|
|
5821
|
-
}
|
|
5822
|
-
const range = model.getFullModelRange();
|
|
5823
|
-
this._editorInstance.executeEdits("", [{ range, text: text ?? "", forceMoveMarkers: true }]);
|
|
5824
|
-
this._editorInstance.pushUndoStop();
|
|
5838
|
+
this.value = text ?? "";
|
|
5825
5839
|
}
|
|
5826
5840
|
/**
|
|
5827
5841
|
* Inserts a text at the current position in the editor.
|
|
@@ -5856,8 +5870,7 @@ const ArcgisCodeEditor = class {
|
|
|
5856
5870
|
}
|
|
5857
5871
|
/**
|
|
5858
5872
|
* @internal
|
|
5859
|
-
*
|
|
5860
|
-
* @returns {Promise<IStandaloneCodeEditor>} - The monaco editor instance
|
|
5873
|
+
* @deprecated Use `editorInstance` property instead.
|
|
5861
5874
|
*/
|
|
5862
5875
|
async getEditorInstance() {
|
|
5863
5876
|
await this._componentReadyDefer.promise;
|
|
@@ -5891,7 +5904,7 @@ const ArcgisCodeEditor = class {
|
|
|
5891
5904
|
const model = editor.createModel("", this.language, this.getUri());
|
|
5892
5905
|
// Create the editor for the host element.
|
|
5893
5906
|
// This will not trigger a diagnostic.
|
|
5894
|
-
this._editorInstance = editor.create(this.
|
|
5907
|
+
this._editorInstance = editor.create(this.el, {
|
|
5895
5908
|
...(this.options ?? {}),
|
|
5896
5909
|
model,
|
|
5897
5910
|
fixedOverflowWidgets: true,
|
|
@@ -5904,19 +5917,19 @@ const ArcgisCodeEditor = class {
|
|
|
5904
5917
|
this._componentReadyDefer.resolve();
|
|
5905
5918
|
this._editorInstance.updateOptions(EditorOptionsDefaults);
|
|
5906
5919
|
this._editorInstance.onDidChangeModelContent(() => {
|
|
5907
|
-
|
|
5908
|
-
this.arcgisValueChange.emit(
|
|
5920
|
+
this.value = this._editorInstance?.getValue() ?? "";
|
|
5921
|
+
this.arcgisValueChange.emit(this.value);
|
|
5909
5922
|
});
|
|
5910
5923
|
this._editorInstance.onDidChangeCursorSelection((e) => {
|
|
5911
5924
|
this.arcgisSelectionChange.emit({ selection: e.selection, model: this._editorInstance?.getModel() });
|
|
5912
5925
|
});
|
|
5913
5926
|
// Detect if the host element or its ancestors got a theme attribute mutation
|
|
5914
|
-
this._themeObserver = observeAncestorsMutation$1(this.
|
|
5927
|
+
this._themeObserver = observeAncestorsMutation$1(this.el, ["class"], () => this.updateTheme());
|
|
5915
5928
|
// Update the theme of the Monaco Editor
|
|
5916
5929
|
this.updateTheme();
|
|
5917
5930
|
// Creates a resize observer to re-layout the editor on size changing
|
|
5918
5931
|
const resizeObserver = new ResizeObserver(() => this._editorInstance?.layout());
|
|
5919
|
-
resizeObserver.observe(this.
|
|
5932
|
+
resizeObserver.observe(this.el);
|
|
5920
5933
|
// Add common actions to the Monaco Editor's context menu and command palette
|
|
5921
5934
|
this.addCommonEditorActions();
|
|
5922
5935
|
}
|
|
@@ -5926,6 +5939,13 @@ const ArcgisCodeEditor = class {
|
|
|
5926
5939
|
}
|
|
5927
5940
|
this._themeObserver?.remove();
|
|
5928
5941
|
}
|
|
5942
|
+
componentShouldUpdate(_newVal, _oldVal, propName) {
|
|
5943
|
+
if (propName === "value" || propName === "language" || propName === "modelId" || propName === "options") {
|
|
5944
|
+
// These are properties that we directly pass to the editor
|
|
5945
|
+
return false;
|
|
5946
|
+
}
|
|
5947
|
+
return true;
|
|
5948
|
+
}
|
|
5929
5949
|
//#endregion
|
|
5930
5950
|
// #region Private methods API
|
|
5931
5951
|
updateModel() {
|
|
@@ -5933,7 +5953,7 @@ const ArcgisCodeEditor = class {
|
|
|
5933
5953
|
return;
|
|
5934
5954
|
}
|
|
5935
5955
|
this._editorInstance.getModel()?.dispose();
|
|
5936
|
-
this._editorInstance.setModel(editor.createModel(this.value
|
|
5956
|
+
this._editorInstance.setModel(editor.createModel(this.value, this.language, this.getUri()));
|
|
5937
5957
|
}
|
|
5938
5958
|
getUri() {
|
|
5939
5959
|
return this.modelId ? Uri.parse(this.modelId) : Uri.parse("");
|
|
@@ -5942,7 +5962,7 @@ const ArcgisCodeEditor = class {
|
|
|
5942
5962
|
// This is called the first time and subsequently by the Mutation Observer
|
|
5943
5963
|
// Figure out the theme by walking the ancestor path.
|
|
5944
5964
|
// If no theme is found then default to light.
|
|
5945
|
-
const theme = getElementTheme(this.
|
|
5965
|
+
const theme = getElementTheme(this.el) === "light" ? "vs" : "vs-dark";
|
|
5946
5966
|
if (theme === this._currentTheme) {
|
|
5947
5967
|
return;
|
|
5948
5968
|
}
|
|
@@ -5984,9 +6004,8 @@ const ArcgisCodeEditor = class {
|
|
|
5984
6004
|
return h(Host, null);
|
|
5985
6005
|
}
|
|
5986
6006
|
static get assetsDirs() { return ["assets"]; }
|
|
5987
|
-
get
|
|
6007
|
+
get el() { return getElement(this); }
|
|
5988
6008
|
static get watchers() { return {
|
|
5989
|
-
"value": ["valuePropChange"],
|
|
5990
6009
|
"language": ["languagePropChange"],
|
|
5991
6010
|
"modelId": ["modelIdPropChange"],
|
|
5992
6011
|
"options": ["optionsPropChange"]
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
7
|
-
export { s as setNonce } from './index-
|
|
6
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c6b28dae.js';
|
|
7
|
+
export { s as setNonce } from './index-c6b28dae.js';
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -19,5 +19,5 @@ const patchBrowser = () => {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
patchBrowser().then(options => {
|
|
22
|
-
return bootstrapLazy([["arcgis-arcade-api_6",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[
|
|
22
|
+
return bootstrapLazy([["arcgis-arcade-api_6",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1025],"testData":[16],"suggestions":[16],"snippets":[16],"hideDocumentationActions":[4,"hide-documentation-actions"],"hideSideBar":[4,"hide-side-bar"],"sideActionBarExpanded":[1540,"side-action-bar-expanded"],"openedSidePanel":[1537,"opened-side-panel"],"editorOptions":[16],"editorInstance":[16],"messages":[32],"_standaloneCodeEditor":[32],"_preparingProfile":[32],"_editorProfile":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"updateThemeColors":[64]},null,{"profile":["_profileChanged"],"testData":["_testDataChanged"],"snippets":["_snippetChanged"]}],[1,"arcgis-arcade-api",{"hideDocumentationActions":[4,"hide-documentation-actions"],"modelId":[1,"model-id"],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32],"_preparingApi":[32],"_apiLibrary":[32]}],[1,"arcgis-arcade-results",{"loading":[4],"openedResultPanel":[1537,"opened-result-panel"],"result":[16],"consoleLogs":[16]}],[1,"arcgis-arcade-suggestions",{"suggestions":[16],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"suggestions":["suggestionsPropChanged"]}],[1,"arcgis-arcade-variables",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}],[0,"arcgis-code-editor",{"value":[1],"language":[1],"modelId":[1,"model-id"],"options":[16],"editorInstance":[16],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]},null,{"language":["languagePropChange"],"modelId":["modelIdPropChange"],"options":["optionsPropChange"]}]]]], options);
|
|
23
23
|
});
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { y as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { y as monaco_editor_core_star } from './arcade-defaults-fdba0972.js';
|
|
7
|
+
import './index-c6b28dae.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { y as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { y as monaco_editor_core_star } from './arcade-defaults-fdba0972.js';
|
|
7
|
+
import './index-c6b28dae.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { y as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { y as monaco_editor_core_star } from './arcade-defaults-fdba0972.js';
|
|
7
|
+
import './index-c6b28dae.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
6
|
const NAMESPACE = 'arcgis-coding-components';
|
|
7
7
|
|
|
@@ -1368,6 +1368,11 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
1370
1370
|
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1371
|
+
if (instance.componentShouldUpdate) {
|
|
1372
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1371
1376
|
// looks like this value actually changed, so we've got work to do!
|
|
1372
1377
|
// but only if we've already rendered, otherwise just chill out
|
|
1373
1378
|
// queue that we need to do an update, but don't worry about queuing
|
package/dist/esm/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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
export { a as arcade } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
export { a as arcade } from './arcade-defaults-fdba0972.js';
|
|
7
|
+
import './index-c6b28dae.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { conf as conf$1, language as language$1 } from './typescript-
|
|
7
|
-
import './arcade-defaults-
|
|
8
|
-
import './index-
|
|
6
|
+
import { conf as conf$1, language as language$1 } from './typescript-a34ba038.js';
|
|
7
|
+
import './arcade-defaults-fdba0972.js';
|
|
8
|
+
import './index-c6b28dae.js';
|
|
9
9
|
|
|
10
10
|
/*!-----------------------------------------------------------------------------
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.47
|
|
5
5
|
*/
|
|
6
|
-
import { y as monaco_editor_core_star } from './arcade-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { y as monaco_editor_core_star } from './arcade-defaults-fdba0972.js';
|
|
7
|
+
import './index-c6b28dae.js';
|
|
8
8
|
|
|
9
9
|
/*!-----------------------------------------------------------------------------
|
|
10
10
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|