@arcgis/coding-components 4.32.0-next.1 → 4.32.0-next.3
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/sql-expr.worker.js +82 -92
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-642cb3ba.entry.js → p-04943142.entry.js} +2 -2
- package/dist/arcgis-coding-components/p-1234f08d.js +6 -0
- package/dist/arcgis-coding-components/{p-8d52ce65.js → p-287402ed.js} +2 -2
- package/dist/arcgis-coding-components/{p-cbb89767.js → p-311dd536.js} +1 -1
- package/dist/arcgis-coding-components/{p-dd590647.entry.js → p-4058edd1.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-95967a1d.js → p-4a30d396.js} +2 -2
- package/dist/arcgis-coding-components/{p-8eb0bf11.js → p-560bea09.js} +2 -2
- package/dist/arcgis-coding-components/{p-fe436d02.js → p-5979fa51.js} +2 -2
- package/dist/arcgis-coding-components/{p-4d9c89e8.js → p-5c5b0a08.js} +10 -10
- package/dist/arcgis-coding-components/{p-942a3112.js → p-6f1bcfa3.js} +2 -2
- package/dist/arcgis-coding-components/{p-beb4b118.entry.js → p-724745ad.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-39946a0f.js → p-9b806946.js} +1 -1
- package/dist/arcgis-coding-components/{p-8e28481b.js → p-a7a82970.js} +1 -1
- package/dist/arcgis-coding-components/p-a7e4fb53.js +6 -0
- package/dist/arcgis-coding-components/{p-397cd035.js → p-ad692c80.js} +2 -2
- package/dist/arcgis-coding-components/{p-69492dd1.js → p-bdd0f633.js} +2 -2
- package/dist/arcgis-coding-components/{p-609b503d.js → p-c5292bed.js} +2 -2
- package/dist/arcgis-coding-components/{p-3abd5d93.js → p-cc6996ac.js} +2 -2
- package/dist/cjs/{app-globals-f2405bb9.js → app-globals-5225ccfc.js} +1 -1
- package/dist/cjs/{arcade-defaults-a73dd954.js → arcade-defaults-2f363afb.js} +3 -3
- package/dist/cjs/{arcade-mode-91a5e99e.js → arcade-mode-bc7ac732.js} +15 -11
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-69287236.js → css-015c863a.js} +1 -1
- package/dist/cjs/{cssMode-52fa0cd4.js → cssMode-7e7c0d5e.js} +3 -3
- package/dist/cjs/{html-7fd6c69f.js → html-523d91be.js} +3 -3
- package/dist/cjs/{htmlMode-98ed691c.js → htmlMode-9e9c8c7a.js} +3 -3
- package/dist/cjs/{index-7cdfac26.js → index-7742ae99.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-a0746b24.js → javascript-52adf106.js} +4 -4
- package/dist/cjs/{jsonMode-43f926c2.js → jsonMode-fc9e7ade.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-7849269b.js → sql-expr-defaults-dad1b3ed.js} +10 -10
- package/dist/cjs/{sql-expr-mode-67b27235.js → sql-expr-mode-53565192.js} +16 -12
- package/dist/cjs/{tsMode-f358944a.js → tsMode-fc608e3f.js} +3 -3
- package/dist/cjs/{typescript-62f57b1c.js → typescript-2f89097d.js} +3 -3
- package/dist/cjs/{useT9n-1090bf48.js → useT9n-fb57f86f.js} +56 -53
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +13 -9
- package/dist/components/arcade-results.js +2 -2
- package/dist/components/arcade-suggestions.js +2 -2
- package/dist/components/arcgis-arcade-editor.js +2 -2
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.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-editor-variables.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +2 -2
- package/dist/components/arcgis-sql-expression-fields.js +2 -2
- package/dist/components/{chunk-72CFD2QZ.js → chunk-UO6SL5WB.js} +8 -4
- package/dist/components/code-editor.js +2 -2
- package/dist/components/editor-variables.js +2 -2
- package/dist/components/fields.js +1 -1
- package/dist/components/index.d.ts +18 -3
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/language-api-panel.js +2 -2
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +14 -10
- package/dist/components/useT9n.js +49 -50
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-94d7a32e.js → app-globals-f27d9fca.js} +1 -1
- package/dist/esm/{arcade-defaults-f8b8b18f.js → arcade-defaults-a9fe3a7e.js} +3 -3
- package/dist/esm/{arcade-mode-4cc42af6.js → arcade-mode-41d1a4a6.js} +15 -11
- package/dist/esm/arcgis-arcade-editor_6.entry.js +7 -7
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-4eeff876.js → css-4190e5b3.js} +1 -1
- package/dist/esm/{cssMode-2056ff0a.js → cssMode-6f9b5832.js} +3 -3
- package/dist/esm/{html-ffcf003f.js → html-72c94071.js} +3 -3
- package/dist/esm/{htmlMode-e93a32a0.js → htmlMode-7e1af53c.js} +3 -3
- package/dist/esm/{index-011c2912.js → index-d4c46155.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-e0a600c3.js → javascript-fc0ace4e.js} +4 -4
- package/dist/esm/{jsonMode-7559691e.js → jsonMode-9e212bde.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-91ae9bb2.js → sql-expr-defaults-8c95f33b.js} +11 -11
- package/dist/esm/{sql-expr-mode-6547aee6.js → sql-expr-mode-13b1db07.js} +16 -12
- package/dist/esm/{tsMode-47248b4e.js → tsMode-d893e415.js} +3 -3
- package/dist/esm/{typescript-66f4b785.js → typescript-d87bb201.js} +3 -3
- package/dist/esm/{useT9n-7fbdf543.js → useT9n-2711cd55.js} +56 -53
- 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/data/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 +1 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +1 -1
- package/package.json +20 -15
- package/dist/arcgis-coding-components/p-21f33673.js +0 -6
- package/dist/arcgis-coding-components/p-b72de164.js +0 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.3
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { g as getAssetPath } from './index-d4c46155.js';
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis && !("forceESM" in window.$arcgis);
|
|
@@ -124672,7 +124672,7 @@ registerLanguage({
|
|
|
124672
124672
|
mimetypes: ["text/css"],
|
|
124673
124673
|
loader: () => {
|
|
124674
124674
|
{
|
|
124675
|
-
return import('./css-
|
|
124675
|
+
return import('./css-4190e5b3.js');
|
|
124676
124676
|
}
|
|
124677
124677
|
}
|
|
124678
124678
|
});
|
|
@@ -124690,7 +124690,7 @@ registerLanguage({
|
|
|
124690
124690
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
124691
124691
|
loader: () => {
|
|
124692
124692
|
{
|
|
124693
|
-
return import('./html-
|
|
124693
|
+
return import('./html-72c94071.js');
|
|
124694
124694
|
}
|
|
124695
124695
|
}
|
|
124696
124696
|
});
|
|
@@ -124710,7 +124710,7 @@ registerLanguage({
|
|
|
124710
124710
|
mimetypes: ["text/javascript"],
|
|
124711
124711
|
loader: () => {
|
|
124712
124712
|
{
|
|
124713
|
-
return import('./javascript-
|
|
124713
|
+
return import('./javascript-fc0ace4e.js');
|
|
124714
124714
|
}
|
|
124715
124715
|
}
|
|
124716
124716
|
});
|
|
@@ -124728,7 +124728,7 @@ registerLanguage({
|
|
|
124728
124728
|
mimetypes: ["text/typescript"],
|
|
124729
124729
|
loader: () => {
|
|
124730
124730
|
{
|
|
124731
|
-
return import('./typescript-
|
|
124731
|
+
return import('./typescript-d87bb201.js');
|
|
124732
124732
|
}
|
|
124733
124733
|
}
|
|
124734
124734
|
});
|
|
@@ -124849,7 +124849,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
124849
124849
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
124850
124850
|
function getMode$3() {
|
|
124851
124851
|
{
|
|
124852
|
-
return import('./cssMode-
|
|
124852
|
+
return import('./cssMode-6f9b5832.js');
|
|
124853
124853
|
}
|
|
124854
124854
|
}
|
|
124855
124855
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -124974,7 +124974,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
124974
124974
|
};
|
|
124975
124975
|
function getMode$2() {
|
|
124976
124976
|
{
|
|
124977
|
-
return import('./htmlMode-
|
|
124977
|
+
return import('./htmlMode-7e1af53c.js');
|
|
124978
124978
|
}
|
|
124979
124979
|
}
|
|
124980
124980
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -125076,7 +125076,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
125076
125076
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
125077
125077
|
function getMode$1() {
|
|
125078
125078
|
{
|
|
125079
|
-
return import('./jsonMode-
|
|
125079
|
+
return import('./jsonMode-9e212bde.js');
|
|
125080
125080
|
}
|
|
125081
125081
|
}
|
|
125082
125082
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -125345,7 +125345,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
125345
125345
|
};
|
|
125346
125346
|
function getMode() {
|
|
125347
125347
|
{
|
|
125348
|
-
return import('./tsMode-
|
|
125348
|
+
return import('./tsMode-d893e415.js');
|
|
125349
125349
|
}
|
|
125350
125350
|
}
|
|
125351
125351
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -171080,4 +171080,4 @@ const sqlExpression = {
|
|
|
171080
171080
|
getApiLibraryForModel: sqlExprDefaults.getApiLibraryForModel.bind(sqlExprDefaults),
|
|
171081
171081
|
};
|
|
171082
171082
|
|
|
171083
|
-
export { KeyMod as A, createFilterExpression as B, addLTRMark as C, Deferred as D, EditorProfile as E, isNotUndefined as F, safeAsyncCall as G, devToolsAwareTimeout as H, IStandaloneThemeService as I, safeCall as J, KeyCode as K, LanguageDefaultsBase as L,
|
|
171083
|
+
export { KeyMod as A, createFilterExpression as B, addLTRMark as C, Deferred as D, EditorProfile as E, isNotUndefined as F, safeAsyncCall as G, devToolsAwareTimeout as H, IStandaloneThemeService as I, safeCall as J, KeyCode as K, LanguageDefaultsBase as L, getElementLocales as M, startLocaleObserver as N, monaco_editor_core_star as O, typescriptDefaults as P, MarkerSeverity as Q, Range as R, StandaloneServices as S, debounce as T, Uri as U, Emitter as V, isFeatureSetCollectionDefinition as a, isFeatureSetDefinition as b, isFeatureDefinition as c, supportedLocales as d, fetchT9nStringsBundle as e, fieldsToProfileValues as f, importArcade as g, isURL as h, isPredefinedProfile as i, hasSameOrigin as j, importRequest as k, generateGuid as l, main as m, setValuesInString as n, supportedFields as o, generateTokensCSSForColorMap as p, quoteString as q, editor as r, sqlExpression as s, commonjsGlobal as t, setFocusOnElement as u, filterCollection as v, languages as w, sqlExprDefaults as x, observeAncestorsMutation as y, getElementTheme as z };
|
|
@@ -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.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.3
|
|
5
5
|
*/
|
|
6
|
-
import { D as Deferred, r as editor, T as debounce, w as languages, x as sqlExprDefaults, V as Emitter } from './sql-expr-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { D as Deferred, r as editor, T as debounce, w as languages, x as sqlExprDefaults, V as Emitter } from './sql-expr-defaults-8c95f33b.js';
|
|
7
|
+
import './index-d4c46155.js';
|
|
8
8
|
|
|
9
9
|
// hold onto a promise that resolves when the worker is ready
|
|
10
10
|
let deferredWorker = new Deferred();
|
|
@@ -330,7 +330,7 @@ class SqlExprDiagnosticsAdapter {
|
|
|
330
330
|
this._languageId = _languageId;
|
|
331
331
|
this._worker = _worker;
|
|
332
332
|
this._disposables = [];
|
|
333
|
-
this.
|
|
333
|
+
this._modelListeners = new Map();
|
|
334
334
|
this._diagnosticsService = diagnosticService;
|
|
335
335
|
this._defaults = defaults;
|
|
336
336
|
const onModelAdd = (model) => {
|
|
@@ -343,16 +343,20 @@ class SqlExprDiagnosticsAdapter {
|
|
|
343
343
|
throw err;
|
|
344
344
|
});
|
|
345
345
|
});
|
|
346
|
-
|
|
346
|
+
const didChangeListener = model.onDidChangeContent(debouncedValidate);
|
|
347
|
+
const didChangeAttachedListener = model.onDidChangeAttached(debouncedValidate);
|
|
348
|
+
this._modelListeners.set(model.uri.toString(), [didChangeListener, didChangeAttachedListener]);
|
|
347
349
|
this._doValidate(model, languageId).catch(console.error);
|
|
348
350
|
};
|
|
349
351
|
const onModelRemoved = (model) => {
|
|
350
|
-
const
|
|
352
|
+
const uriStr = model.uri.toString();
|
|
351
353
|
editor.setModelMarkers(model, this._languageId, []);
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
const listeners = this._modelListeners.get(uriStr);
|
|
355
|
+
if (listeners) {
|
|
356
|
+
while (listeners.length) {
|
|
357
|
+
listeners.pop()?.dispose();
|
|
358
|
+
}
|
|
359
|
+
this._modelListeners.delete(uriStr);
|
|
356
360
|
}
|
|
357
361
|
};
|
|
358
362
|
this._disposables.push(editor.onDidCreateModel(onModelAdd));
|
|
@@ -378,8 +382,8 @@ class SqlExprDiagnosticsAdapter {
|
|
|
378
382
|
}));
|
|
379
383
|
this._disposables.push({
|
|
380
384
|
dispose: () => {
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
385
|
+
this._modelListeners.forEach((listeners) => listeners.forEach((disposable) => disposable.dispose()));
|
|
386
|
+
this._modelListeners.clear();
|
|
383
387
|
},
|
|
384
388
|
});
|
|
385
389
|
editor.getModels().forEach(onModelAdd);
|
|
@@ -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.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.3
|
|
5
5
|
*/
|
|
6
|
-
import { P as typescriptDefaults, O as monaco_editor_core_star } from './sql-expr-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { P as typescriptDefaults, O as monaco_editor_core_star } from './sql-expr-defaults-8c95f33b.js';
|
|
7
|
+
import './index-d4c46155.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.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.3
|
|
5
5
|
*/
|
|
6
|
-
import { O as monaco_editor_core_star } from './sql-expr-defaults-
|
|
7
|
-
import './index-
|
|
6
|
+
import { O as monaco_editor_core_star } from './sql-expr-defaults-8c95f33b.js';
|
|
7
|
+
import './index-d4c46155.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.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.3
|
|
5
5
|
*/
|
|
6
|
-
import { F as isNotUndefined, D as Deferred, G as safeAsyncCall, H as devToolsAwareTimeout, J as safeCall, M as
|
|
7
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { F as isNotUndefined, D as Deferred, G as safeAsyncCall, H as devToolsAwareTimeout, J as safeCall, M as getElementLocales, N as startLocaleObserver } from './sql-expr-defaults-8c95f33b.js';
|
|
7
|
+
import { g as getAssetPath } from './index-d4c46155.js';
|
|
8
8
|
|
|
9
9
|
// src/framework.ts
|
|
10
10
|
function retrieveComponentMembers(component, isLit) {
|
|
@@ -226,8 +226,8 @@ var Controller = class {
|
|
|
226
226
|
}
|
|
227
227
|
this._ready.resolve(exports);
|
|
228
228
|
}
|
|
229
|
-
setProvisionalExports(exports) {
|
|
230
|
-
this._exports = makeProvisionalValue(exports);
|
|
229
|
+
setProvisionalExports(exports, proxy = true) {
|
|
230
|
+
this._exports = proxy ? makeProvisionalValue(exports) : exports;
|
|
231
231
|
this._exportWatchers.forEach(safeCall);
|
|
232
232
|
}
|
|
233
233
|
watchExports(callback) {
|
|
@@ -662,8 +662,12 @@ var ComponentInternals = class {
|
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
|
|
665
|
+
const preAccessorValue = newValue;
|
|
666
666
|
originalSet.call(this, newValue);
|
|
667
|
+
newValue = internals.accessorSetter[name2](newValue, oldValue, name2);
|
|
668
|
+
if (newValue !== preAccessorValue) {
|
|
669
|
+
originalSet.call(this, newValue);
|
|
670
|
+
}
|
|
667
671
|
if (newValue !== oldValue) {
|
|
668
672
|
internals.enabledWatchers[name2]?.forEach((watcher) => watcher(newValue, oldValue, name2));
|
|
669
673
|
}
|
|
@@ -1179,55 +1183,54 @@ var FunctionalController = class extends Controller {
|
|
|
1179
1183
|
}
|
|
1180
1184
|
};
|
|
1181
1185
|
var proxy = proxyExports(FunctionalController);
|
|
1182
|
-
var makeT9nController = (getAssetPath) => (options = {}) => (
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
controller.onLifecycle(() => watch(componentWithOverrides, "messageOverrides", applyOverrides));
|
|
1218
|
-
}
|
|
1219
|
-
if (options.blocking) {
|
|
1220
|
-
return controller.ready;
|
|
1186
|
+
var makeT9nController = (getAssetPath) => (options = {}) => makeController((component, controller) => {
|
|
1187
|
+
const locale = getElementLocales(component.el);
|
|
1188
|
+
const pending = {
|
|
1189
|
+
_lang: locale.lang,
|
|
1190
|
+
_t9nLocale: locale.t9nLocale,
|
|
1191
|
+
_loading: true
|
|
1192
|
+
};
|
|
1193
|
+
const componentWithOverrides = component;
|
|
1194
|
+
controller.onLifecycle(
|
|
1195
|
+
() => startLocaleObserver(
|
|
1196
|
+
component.el,
|
|
1197
|
+
getAssetPath("./assets"),
|
|
1198
|
+
({ t9nLocale, t9nStrings, lang }) => {
|
|
1199
|
+
const withoutOverrides = {
|
|
1200
|
+
...t9nStrings,
|
|
1201
|
+
_lang: lang,
|
|
1202
|
+
_t9nLocale: t9nLocale,
|
|
1203
|
+
_loading: false
|
|
1204
|
+
};
|
|
1205
|
+
controller.exports = withoutOverrides;
|
|
1206
|
+
const label = t9nStrings.componentLabel ?? t9nStrings.widgetLabel;
|
|
1207
|
+
if (typeof label === "string" && "label" in component && component.label == null) {
|
|
1208
|
+
component.label ?? (component.label = label);
|
|
1209
|
+
}
|
|
1210
|
+
applyOverrides(componentWithOverrides.messageOverrides);
|
|
1211
|
+
},
|
|
1212
|
+
options.name
|
|
1213
|
+
)
|
|
1214
|
+
);
|
|
1215
|
+
function applyOverrides(messageOverrides) {
|
|
1216
|
+
const currentValue = controller.exports;
|
|
1217
|
+
const rawMessages = currentValue._original ?? currentValue;
|
|
1218
|
+
const updated = deepMerge(rawMessages, messageOverrides);
|
|
1219
|
+
if (messageOverrides) {
|
|
1220
|
+
updated._original = rawMessages;
|
|
1221
1221
|
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1222
|
+
controller.exports = updated;
|
|
1223
|
+
}
|
|
1224
|
+
if ("messageOverrides" in componentWithOverrides) {
|
|
1225
|
+
controller.onLifecycle(() => watch(componentWithOverrides, "messageOverrides", applyOverrides));
|
|
1226
|
+
}
|
|
1227
|
+
if (options.blocking) {
|
|
1228
|
+
controller.setProvisionalExports(pending, false);
|
|
1229
|
+
return void 0;
|
|
1230
|
+
} else {
|
|
1228
1231
|
return pending;
|
|
1229
|
-
}
|
|
1230
|
-
);
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1231
1234
|
function deepMerge(original, overwrites) {
|
|
1232
1235
|
if (!overwrites) {
|
|
1233
1236
|
return original;
|
package/dist/loader/cdn.js
CHANGED
package/dist/loader/index.cjs.js
CHANGED
package/dist/loader/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.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.3
|
|
5
5
|
*/
|
|
6
6
|
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
7
7
|
export * from '../esm/loader.js';
|
|
@@ -7,7 +7,7 @@ export declare class DiagnosticsAdapter {
|
|
|
7
7
|
private _languageId;
|
|
8
8
|
private _worker;
|
|
9
9
|
private _disposables;
|
|
10
|
-
private
|
|
10
|
+
private _modelListeners;
|
|
11
11
|
private _diagnosticsService;
|
|
12
12
|
private _defaults;
|
|
13
13
|
constructor(_languageId: string, _worker: IArcadeWorkerAccessor, { defaults, diagnosticsService, }: {
|
|
@@ -13,7 +13,7 @@ export declare class SqlExprDiagnosticsAdapter {
|
|
|
13
13
|
private _languageId;
|
|
14
14
|
private _worker;
|
|
15
15
|
private _disposables;
|
|
16
|
-
private
|
|
16
|
+
private _modelListeners;
|
|
17
17
|
private _diagnosticsService;
|
|
18
18
|
private _defaults;
|
|
19
19
|
constructor(_languageId: string, _worker: ISqlExprWorkerAccessor, { defaults, diagnosticService, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.32.0-next.
|
|
3
|
+
"version": "4.32.0-next.3",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -50,24 +50,24 @@
|
|
|
50
50
|
"generate": "stencil generate"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@arcgis/arcade-languageservice": "4.32.0-next.
|
|
54
|
-
"@arcgis/components-
|
|
55
|
-
"@arcgis/components-
|
|
56
|
-
"@arcgis/
|
|
53
|
+
"@arcgis/arcade-languageservice": "4.32.0-next.3",
|
|
54
|
+
"@arcgis/components-build-utils": "4.32.0-next.3",
|
|
55
|
+
"@arcgis/components-controllers": "4.32.0-next.3",
|
|
56
|
+
"@arcgis/components-utils": "4.32.0-next.3",
|
|
57
|
+
"@arcgis/languages-api-utils": "4.32.0-next.3",
|
|
57
58
|
"@stencil/core": "4.20.0",
|
|
58
59
|
"monaco-editor": "0.45.0",
|
|
59
60
|
"tslib": "^2.7.0",
|
|
60
61
|
"vscode-languageserver-types": "^3.17.5"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"@arcgis/components-
|
|
64
|
-
"@arcgis/components-plugins": "4.32.0-next.1",
|
|
64
|
+
"@arcgis/components-plugins": "4.32.0-next.3",
|
|
65
65
|
"@arcgis/core": ">=4.31.0-next <4.32",
|
|
66
|
-
"@arcgis/core-adapter": "4.32.0-next.
|
|
66
|
+
"@arcgis/core-adapter": "4.32.0-next.3",
|
|
67
67
|
"@arcgis/sql-expression-sdk": "^1.1.0-next.14",
|
|
68
|
-
"@arcgis/storybook-utils": "4.32.0-next.
|
|
69
|
-
"@arcgis/typescript-config": "4.32.0-next.
|
|
70
|
-
"@esri/calcite-components": "^2.
|
|
68
|
+
"@arcgis/storybook-utils": "4.32.0-next.3",
|
|
69
|
+
"@arcgis/typescript-config": "4.32.0-next.3",
|
|
70
|
+
"@esri/calcite-components": "^2.13.0",
|
|
71
71
|
"@stencil/react-output-target": "0.5.3",
|
|
72
72
|
"@stencil/sass": "^3.0.12",
|
|
73
73
|
"@swc/core": "^1.7.23",
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"jest-cli": "^29.5.0",
|
|
86
86
|
"magic-string": "^0.30.10",
|
|
87
87
|
"marked": "^5.1.2",
|
|
88
|
-
"postcss": "
|
|
88
|
+
"postcss": "^8.4.47",
|
|
89
89
|
"postcss-discard-comments": "^5.1.2",
|
|
90
90
|
"postcss-url": "^10.1.3",
|
|
91
91
|
"resolve-pkg": "^2.0.0",
|
|
92
92
|
"rimraf": "^5.0.0",
|
|
93
|
-
"rollup": "^4.
|
|
93
|
+
"rollup": "^4.24.0",
|
|
94
94
|
"rollup-plugin-import-css": "^3.5.4",
|
|
95
95
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
96
96
|
"storybook": "^8.2.4",
|
|
@@ -101,7 +101,12 @@
|
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@arcgis/core": ">=4.31.0-next <4.32",
|
|
104
|
-
"@esri/calcite-components": "
|
|
104
|
+
"@esri/calcite-components": ">=2.13.0 <3.0.0"
|
|
105
105
|
},
|
|
106
|
-
"
|
|
106
|
+
"webGISComponents": {
|
|
107
|
+
"deployBuilds": {
|
|
108
|
+
"storybook-static": "builds"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"gitHead": "afc83258caec2a09162da0def77c2ff3867212c1"
|
|
107
112
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.1
|
|
5
|
-
*/
|
|
6
|
-
import{m as e,r as t,Q as s,R as r,w as n,T as i,D as a,V as o}from"./p-4d9c89e8.js";import"./p-39946a0f.js";var c=[[],[],[]];["++","--"].forEach((e=>c[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>c[e.length-1]?.push(e))),["||","&&"].forEach((e=>c[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>c[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>c[e.length-1]?.push(e)));var u=Object.values({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"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),u.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const l={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:u.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class p{constructor(e,s,{defaults:r,diagnosticsService:n}){this._languageId=e,this._worker=s,this._disposables=[],this._listener=new Map,this._diagnosticsService=n,this._defaults=r;const a=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(s)),this._doValidate(e,t).catch(console.error)},o=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._listener.get(s);r&&(r.dispose(),this._listener.delete(s))};this._disposables.push(t.onDidCreateModel(a)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),a(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),a(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),t.getModels().forEach(a)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),i=await r.doValidation(e.uri.toString(),n),a=i.map((e=>{return{severity:d((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,a)}catch(e){console.error(e)}}}function d(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function h(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function m(e){return{range:h(e.range),text:e.newText}}function x(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class w{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),a=this._defaults.getApiContextForModel(t.uri),o=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),a),c=t.getWordUntilPosition(s),u=new r(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=o.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:x(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:h(t.textEdit.insert),replace:h(t.textEdit.replace)}:h(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(m)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:o.isIncomplete,suggestions:l}}}class f{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:h(e.range),text:e.newText})))}}let k,b=new a;class y{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,b=new a),this._client=null}static async waitForWorker(){return await b.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),b.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}async function v(...e){return await y.waitForWorker(),await new Promise(((t,s)=>{k?t(k(...e)):s(new Error("Arcade not registered!"))}))}const C=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function _(){return C}function F(e){const t=new y(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);k=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,l),n.registerCompletionItemProvider(e.languageId,new w(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new f(s,e)),new p(e.languageId,s,{defaults:e,diagnosticsService:C})}export{_ as getArcadeDiagnosticService,v as getArcadeWorker,F as setupMode}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.1
|
|
5
|
-
*/
|
|
6
|
-
import{F as t,D as i,G as s,H as o,J as e,M as n,N as h}from"./p-4d9c89e8.js";import{g as c}from"./p-39946a0f.js";var r,a=(t,i)=>t.manager.internals.members?.[i]?.[0],d=Symbol.for("controller");function u(t){r!==t&&(r=t,queueMicrotask((()=>{r===t&&(r=void 0)})))}function f(){return r}var l,v=[];function y(t){if(void 0===t)return void(v=[]);const i=v.indexOf(t);v=-1===i?[...v,t]:v.slice(0,i+1),queueMicrotask((()=>{v=[]}))}var p,g=async(t,i)=>{const s=b(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},w=async t=>{const i=b(t);return await i.ready,i},b=t=>{const i=function(){const t=l;return l=void 0,t}();if(void 0!==i)return i;const s=f().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(d in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},m={setter:!1,getter:!1,readOnly:!1},_=new WeakMap;p=d;var j=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[p]=!0,this.ready=this._ready.promise,this._exports=M(this),this._exportWatchers=new Set;const s=t??f();this.component=s,this.component.addController(this),y(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(e),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=M(t),this._exportWatchers.forEach(e)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return u(this.component),g}get useRef(){return u(this.component),w}get useRefSync(){return u(this.component),b}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&e(t.hostConnected,t),this._callbacks.hostConnected.forEach(e),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&e(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(e),this._lifecycleCleanups.forEach(e),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&e(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(e),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&e(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(k,t)}triggerUpdated(t){const i=this;i.hostUpdated&&e(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(k,t)}triggerDestroy(){const t=this;t.hostDestroy&&e(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(e)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){u(this.component);const i=e(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function k(t){e(t,void 0,this)}var L=j;function M(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,o){if(!O.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,o):void 0},set:(t,i,s,o)=>Reflect.set(t,i,s,o)});return i}var O=new Set(["exports","_exports"]),U=void 0;function x(){Array.from(U?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),U=void 0}function C(t,i,s){var o;const n=i,h=t.manager.internals;(o=h.allWatchers)[n]??(o[n]=[]);const c=h.allWatchers[n],r=s,a=(t,i,s)=>e(r,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var D=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var o;2048&s&&((o=t.setters)[i]??(o[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=q,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(m.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=q,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const o=i.el.constructor.prototype;s!==o&&this._getSetProxy(o,t,"html")}_getSetProxy(t,i,s){const o=a(this.component,i);let e;do{e=Object.getOwnPropertyDescriptor(t,i)}while(!e&&(t=Object.getPrototypeOf(t)));if(!e)return;const n=e.get,h=e.set,c=P in n,r=P in h;if(c&&r)return;const d=!c,u=!r,f=d?function(){let t=n.call(this);const s=_.get(this);if(void 0===s)return t;const o=s.manager.internals;t=o.accessorGetter[i](t,i);const e=o.getters[i]??S;for(let s=0;s<e.length;s++)t=e[s](t,i);return t}:n,l=u?function(t){const s=n.call(this),e=_.get(this);if(void 0===e)return void h.call(this,t);let c=e.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,o);const r=e.manager.internals;if(c===s)h.call(this,c);else{const t=m.setter?S:r.setters[i]??S;for(let o=0;o<t.length&&(c=t[o](c,s,i),c!==s);o++);c=r.accessorSetter[i](c,s,i),h.call(this,c),c!==s&&r.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}r.keyTrackers.length>0&&r?.firePropTrackers(i,t)}:h;d&&(f[P]=!0),u&&(l[P]=!0),Object.defineProperty(t,i,{...e,get:f,set:l})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},S=[],P=Symbol(),q=Symbol(),R=(t,i)=>new E(t,i),E=class extends L{constructor(s,o){const e="addController"in s,n=new Set,h=s;if(h.addController=function(t){n.add(t),!(d in t)&&s.renderRoot&&s.el.isConnected&&t.hostConnected?.()},h.removeController=function(t){n.delete(t),t.controllerRemoved?.()},!e){const t=o??s.constructor.__forceUpdate;h.requestUpdate=()=>t(s)}super(s),this.internals=new D(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=e,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:16)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,e),this._controllers=n,this.exports=void 0,this.hasDestroy=A in this.component&&"function"==typeof this.component.destroy,this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=$,c.accessorSetter[t]=$,c.getSetProxy(t)})),e?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),y(void 0),u(s),_.set(s.el,s),_.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={_connectedCallback:i||s?void 0:t.connectedCallback,_disconnectedCallback:i||s?void 0:t.disconnectedCallback,_load:i?t.load:t.componentWillLoad,_loaded:i?t.loaded:t.componentDidLoad,_willUpdate:i?void 0:t.componentWillUpdate,_updated:i?void 0:t.componentDidUpdate,_destroy:t.destroy};const o=this._connectedCallback.bind(this),e=this._disconnectedCallback.bind(this),n=this._update.bind(this),h=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:o,hostDisconnected:e,hostUpdate:n,hostUpdated:h}):(t.connectedCallback=o,t.disconnectedCallback=e,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=n,t.componentDidUpdate=h),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${A} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,x(),t.enableReadonly?.(),this._controllers.forEach(F),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(I),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,N,t)),await(this._originalLifecycles._load?.call(this.component)),this.hasDestroy&&C(this.component,A,(()=>this._setAutoDestroyTimeout()))}_loaded(){this._controllers.forEach(W),this._originalLifecycles._loaded?.call(this.component)}_update(){this._controllers.forEach(G,this.component.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(H,t.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)t.$changes=new Map;else{const t=this._updatePromise;this._updatePromise=new i,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(J),this._controllers.clear(),await(this._originalLifecycles._destroy?.call(this.component))}}_setAutoDestroyTimeout(){void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this.component.el.isConnected||this.component.autoDestroyDisabled||(this._autoDestroyTimeout=o((()=>{this.destroy().catch(console.error)}),T))}},A="autoDestroyDisabled",T=1e3,$=t=>t;function F(t){"triggerConnected"in t?t.triggerConnected():e(t.hostConnected,t)}function I(t){"triggerDisconnected"in t?t.triggerDisconnected():e(t.hostDisconnected,t)}async function N(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function W(t){"triggerLoaded"in t?t.triggerLoaded():e(t.hostLoaded,t)}function G(t){"triggerUpdate"in t?t.triggerUpdate(this):e(t.hostUpdate,t,this)}function H(t){"triggerUpdated"in t?t.triggerUpdated(this):e(t.hostUpdated,t,this)}function J(t){"triggerDestroy"in t?t.triggerDestroy():e(t.hostDestroy,t)}function z(t,i,s){const o=t.manager.internals;return o.trackedValue!==q&&o.trackedValue!==s&&o.firePropTrackers(void 0,void 0),0===o.keyTrackers.length&&queueMicrotask((()=>o.firePropTrackers(void 0,void 0))),o.trackedValue=s,o.keyTrackers.push(((t,o)=>e(i,void 0,s===o?t:void 0))),s}function B(t,i){const s=f();return z(s,(o=>{const e=o,n=s.manager,h=s,c=h[e];if(null!=c&&c!==t&&"function"==typeof i.set){const s=i.set(c,t,e);if(s!==c)if(n.isLit)h[e]=s;else{let t=!0;n.onConnected((()=>{t&&(t=!0,function(){m.setter=!0;try{return void(h[e]=s)}finally{m.setter=!1}}())}))}}!function(t,i,s){var o,e;const n=s,h=t.manager.internals,c="function"==typeof n.get?n.get:void 0;c&&((o=h.getters)[i]??(o[i]=[]),h.getters[i].unshift(c));const r="ignore"===n.set?Q:n.set;r&&((e=h.setters)[i]??(e[i]=[]),h.setters[i].unshift(r))}(s,e,i)}),t)}var K,Q=(t,i)=>i,V=(K=class extends j{constructor(t,i){super(t);const s=this.exports;try{u(this.component);const t=i(this.component,this),o=this.exports!==s;if(t instanceof Promise){o||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else o&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=v,s=new K(...t),o=s.exports;y(i.at(-1));const n=s.component.manager.internals;var h;return n.markExports(s,o),s.watchExports((t=>n.markExports(s,t))),l!==(h=s)&&(l=h,queueMicrotask((()=>{l===h&&(l=void 0)}))),function(t,i,s){const o=Array.isArray(t)?t:[t];let n=o.length+1;const h=t=>{n-=1,void 0!==t&&(n=Math.min(n,0)),0===n&&i(t)};o.forEach((t=>function(t,i,s){const o=Object.keys(t),n=o.length;void 0===U&&queueMicrotask(x),U??(U=new Map);let h=U.get(t);return void 0===h&&(h={callbacks:[],keyCount:n},U.set(t,h)),h.keyCount!==n&&(h.callbacks.forEach((t=>t(o))),h.callbacks=[],h.keyCount=n),h.callbacks.push((o=>{const h=o[n];e(i,null,void 0===h?void 0:t[h]===s?h:void 0)})),s}(t,(i=>h(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=o.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&z(c,(t=>h(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==a(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:o},e){const n=i,h=n[s]!==e;n[s]!==t.exports&&!h&&e!==t.exports&&(n[s]=t.exports);if(i===t.component){if(o){const i=t.component.manager.internals;h&&i.markExports(t,n[s]),C(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=o?void 0:s}t.watchExports((()=>{if(n[s]===t.exports)return;const i=t.component.manager,o=i.internals.setters[s]?.includes(i.internals.readonlySetter);o?function(){m.readOnly=!0;try{return void(n[s]=t.exports)}finally{m.readOnly=!1}}():n[s]=t.exports}))}(s,t,o)),o)});function X(t,i){if(!i)return t;const s={...t};return Object.entries(i).forEach((([i,o])=>{s[i]="object"==typeof o?X(t[i],o):o??t[i]})),s}const Y=(t=>(i={})=>V(void 0,((s,o)=>{const e=s;function c(t){const i=o.exports,s=i._original??i,e=X(s,t);t&&(e._original=s),o.exports=e}if(o.onLifecycle((()=>n(s.el,t("./assets"),(({t9nLocale:t,t9nStrings:i,lang:n})=>{const h={...i,_lang:n,_t9nLocale:t,_loading:!1};o.exports=h;const r=i.componentLabel??i.widgetLabel;"string"==typeof r&&"label"in s&&null==s.label&&(s.label??(s.label=r)),c(e.messageOverrides)}),i.name))),"messageOverrides"in e&&o.onLifecycle((()=>C(e,"messageOverrides",c))),i.blocking)return o.ready;const r=h(s.el);return{_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0}})))(c);export{Y as a,B as g,R as u}
|