@arcgis/coding-components 4.31.0-next.2 → 4.31.0-next.4
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/css.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +11 -0
- package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +735 -0
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/p-103bdac3.js +6 -0
- package/dist/arcgis-coding-components/{p-7984ea8e.js → p-26c67f7c.js} +2 -2
- package/dist/arcgis-coding-components/{p-e8211ffe.js → p-2d14950e.js} +1 -1
- package/dist/arcgis-coding-components/p-374b59c1.js +6 -0
- package/dist/arcgis-coding-components/{p-62ee6251.js → p-4e56f8ae.js} +1 -1
- package/dist/arcgis-coding-components/{p-5ef7cce5.js → p-5da03560.js} +1 -1
- package/dist/arcgis-coding-components/p-5e173b51.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-bb7e832e.js → p-736d890c.js} +3 -3
- package/dist/arcgis-coding-components/{p-03ea6cd7.js → p-86625411.js} +3 -3
- package/dist/arcgis-coding-components/{p-93a97573.js → p-8d67b196.js} +3 -3
- package/dist/arcgis-coding-components/{p-60c2a820.js → p-8e93417c.js} +2 -2
- package/dist/arcgis-coding-components/{p-36fedc23.js → p-a256ee9c.js} +10 -10
- package/dist/arcgis-coding-components/{p-0c6de9b3.js → p-a36c357f.js} +2 -2
- package/dist/arcgis-coding-components/{p-e7ee4d64.js → p-ab0f6db7.js} +3 -3
- package/dist/arcgis-coding-components/p-b23a3f4e.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-9eced6fc.js → p-b570d7af.js} +2 -2
- package/dist/arcgis-coding-components/p-de5cabbb.js +6 -0
- package/dist/arcgis-coding-components/p-e6cac921.entry.js +6 -0
- package/dist/cjs/{app-globals-aee5f4b5.js → app-globals-209c2310.js} +1 -1
- package/dist/cjs/arcade-defaults-ee308e3a.js +116 -0
- package/dist/cjs/{arcade-mode-b85ae7d4.js → arcade-mode-f2c3951e.js} +62 -62
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +177 -1491
- package/dist/cjs/arcgis-coding-components.cjs.js +4 -4
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +81 -0
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +80 -0
- package/dist/cjs/{css-7cc05f76.js → css-bbd000cd.js} +1 -1
- package/dist/cjs/{cssMode-2b0daeae.js → cssMode-ad163e66.js} +4 -4
- package/dist/cjs/{html-f56911e1.js → html-5c67b9d0.js} +4 -4
- package/dist/cjs/{htmlMode-43eed674.js → htmlMode-e32a97bd.js} +4 -4
- package/dist/cjs/{index-b34238a6.js → index-8b891c40.js} +9 -1
- package/dist/cjs/index.cjs.js +4 -3
- package/dist/cjs/{javascript-5115cb76.js → javascript-e159fa2f.js} +4 -4
- package/dist/cjs/{jsonMode-550dda36.js → jsonMode-5c107443.js} +4 -4
- package/dist/cjs/{arcade-defaults-a8d8f8e2.js → language-defaults-base-4300e691.js} +61 -162
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/sql-expr-defaults-783d9c24.js +1285 -0
- package/dist/cjs/sql-expr-mode-6cac37ed.js +25135 -0
- package/dist/cjs/{tsMode-336306a9.js → tsMode-83c4587f.js} +5 -5
- package/dist/cjs/{typescript-b395242f.js → typescript-f6ca5d84.js} +4 -4
- package/dist/components/arcade-defaults.js +8 -1557
- package/dist/components/arcade-mode.js +2 -2
- package/dist/components/arcade-results.js +6 -4
- package/dist/components/arcade-suggestions.js +7 -5
- package/dist/components/arcade-variables.js +8 -6
- package/dist/components/arcgis-arcade-editor.js +33 -32
- 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.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-editor.js +120 -0
- package/dist/components/arcgis-sql-expression-fields.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-fields.js +11 -0
- package/dist/components/chunk-6TARY3NN.js +1159 -0
- package/dist/components/code-editor.js +41 -7
- package/dist/components/fields.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +30 -22
- package/dist/components/language-api-panel.js +13 -40
- package/dist/components/language-defaults-base.js +1551 -0
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +131 -0
- package/dist/components/sql-expr-mode.js +25132 -0
- package/dist/components/sql-expression-fields.js +102 -0
- package/dist/components/useT9n.js +45 -8
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-59faaf33.js → app-globals-60a61d0d.js} +1 -1
- package/dist/esm/arcade-defaults-b1a5f013.js +111 -0
- package/dist/esm/{arcade-mode-5d46035e.js → arcade-mode-7e6764ac.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +124 -1438
- package/dist/esm/arcgis-coding-components.js +5 -5
- package/dist/esm/arcgis-sql-expression-editor.entry.js +77 -0
- package/dist/esm/arcgis-sql-expression-fields.entry.js +76 -0
- package/dist/esm/{css-e257dc49.js → css-7d75b7ca.js} +1 -1
- package/dist/esm/{cssMode-c11f7f40.js → cssMode-95305ae2.js} +3 -3
- package/dist/esm/{html-a6c37a99.js → html-84fc596c.js} +3 -3
- package/dist/esm/{htmlMode-1270bc7d.js → htmlMode-c961f619.js} +3 -3
- package/dist/esm/{index-a970952c.js → index-1c1754c0.js} +9 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/{javascript-ee179624.js → javascript-0aa4505f.js} +4 -4
- package/dist/esm/{jsonMode-07502ccb.js → jsonMode-86b234eb.js} +3 -3
- package/dist/esm/{arcade-defaults-9eb28407.js → language-defaults-base-949fa7fb.js} +55 -158
- package/dist/esm/loader.js +5 -5
- package/dist/esm/sql-expr-defaults-f2f50289.js +1279 -0
- package/dist/esm/sql-expr-mode-14c94be3.js +25132 -0
- package/dist/esm/{tsMode-96749a12.js → tsMode-ee945c40.js} +3 -3
- package/dist/esm/{typescript-a3cf9881.js → typescript-8bd2bb48.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 +33 -8
- package/dist/types/components/arcade-results/arcade-results.d.ts +43 -1
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +22 -1
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +28 -1
- package/dist/types/components/code-editor/code-editor.d.ts +2 -1
- package/dist/types/components/language-api-panel/language-api-panel.d.ts +34 -8
- package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +24 -0
- package/dist/types/components/sql-expression-fields/sql-expression-fields.d.ts +32 -0
- package/dist/types/components.d.ts +85 -11
- package/dist/types/data/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 +13 -0
- package/dist/types/dependencies.d.ts +6 -10
- package/dist/types/utils/language-defaults-base.d.ts +2 -9
- package/dist/types/utils/profile/predefined-profile.d.ts +3 -1
- package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +41 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +16 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +26 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +37 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +11 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +122 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +5 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +18 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +6 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +156 -0
- package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +150 -0
- package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +1397 -0
- package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +59 -0
- package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +295 -0
- package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +135 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +5 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +11 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +22 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +540 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-language-syntax.d.ts +8 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +10 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +3 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +41 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +99 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +41 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +15 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +21 -0
- package/dist/types/utils/sql-expr-monaco/types.d.ts +91 -0
- package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +2 -0
- package/package.json +25 -20
- package/dist/arcgis-coding-components/p-81c37dab.entry.js +0 -6
- package/dist/components/chunk-IHYYRFLQ.js +0 -1363
- package/dist/types/components/arcade-editor/t9n-types.d.ts +0 -8
- package/dist/types/components/arcade-results/t9n-types.d.ts +0 -13
- package/dist/types/components/arcade-suggestions/t9n-types.d.ts +0 -6
- package/dist/types/components/arcade-variables/t9n-types.d.ts +0 -8
- package/dist/types/components/language-api-panel/t9n-types.d.ts +0 -8
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.4
|
|
5
5
|
*/
|
|
6
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { g as getAssetPath } from './index-1c1754c0.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns the last element of an array.
|
|
@@ -120594,7 +120594,7 @@ registerLanguage({
|
|
|
120594
120594
|
mimetypes: ["text/css"],
|
|
120595
120595
|
loader: () => {
|
|
120596
120596
|
{
|
|
120597
|
-
return import('./css-
|
|
120597
|
+
return import('./css-7d75b7ca.js');
|
|
120598
120598
|
}
|
|
120599
120599
|
}
|
|
120600
120600
|
});
|
|
@@ -120612,7 +120612,7 @@ registerLanguage({
|
|
|
120612
120612
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120613
120613
|
loader: () => {
|
|
120614
120614
|
{
|
|
120615
|
-
return import('./html-
|
|
120615
|
+
return import('./html-84fc596c.js');
|
|
120616
120616
|
}
|
|
120617
120617
|
}
|
|
120618
120618
|
});
|
|
@@ -120632,7 +120632,7 @@ registerLanguage({
|
|
|
120632
120632
|
mimetypes: ["text/javascript"],
|
|
120633
120633
|
loader: () => {
|
|
120634
120634
|
{
|
|
120635
|
-
return import('./javascript-
|
|
120635
|
+
return import('./javascript-0aa4505f.js');
|
|
120636
120636
|
}
|
|
120637
120637
|
}
|
|
120638
120638
|
});
|
|
@@ -120650,7 +120650,7 @@ registerLanguage({
|
|
|
120650
120650
|
mimetypes: ["text/typescript"],
|
|
120651
120651
|
loader: () => {
|
|
120652
120652
|
{
|
|
120653
|
-
return import('./typescript-
|
|
120653
|
+
return import('./typescript-8bd2bb48.js');
|
|
120654
120654
|
}
|
|
120655
120655
|
}
|
|
120656
120656
|
});
|
|
@@ -120769,19 +120769,19 @@ var cssDefaults = new LanguageServiceDefaultsImpl$3("css", optionsDefault$1, mod
|
|
|
120769
120769
|
var scssDefaults = new LanguageServiceDefaultsImpl$3("scss", optionsDefault$1, modeConfigurationDefault$2);
|
|
120770
120770
|
var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, modeConfigurationDefault$2);
|
|
120771
120771
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120772
|
-
function getMode$
|
|
120772
|
+
function getMode$3() {
|
|
120773
120773
|
{
|
|
120774
|
-
return import('./cssMode-
|
|
120774
|
+
return import('./cssMode-95305ae2.js');
|
|
120775
120775
|
}
|
|
120776
120776
|
}
|
|
120777
120777
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
120778
|
-
getMode$
|
|
120778
|
+
getMode$3().then((mode) => mode.setupMode(lessDefaults));
|
|
120779
120779
|
});
|
|
120780
120780
|
monaco_editor_core_exports$3.languages.onLanguage("scss", () => {
|
|
120781
|
-
getMode$
|
|
120781
|
+
getMode$3().then((mode) => mode.setupMode(scssDefaults));
|
|
120782
120782
|
});
|
|
120783
120783
|
monaco_editor_core_exports$3.languages.onLanguage("css", () => {
|
|
120784
|
-
getMode$
|
|
120784
|
+
getMode$3().then((mode) => mode.setupMode(cssDefaults));
|
|
120785
120785
|
});
|
|
120786
120786
|
|
|
120787
120787
|
/*!-----------------------------------------------------------------------------
|
|
@@ -120894,16 +120894,16 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120894
120894
|
razorLanguageService,
|
|
120895
120895
|
registerHTMLLanguageService
|
|
120896
120896
|
};
|
|
120897
|
-
function getMode$
|
|
120897
|
+
function getMode$2() {
|
|
120898
120898
|
{
|
|
120899
|
-
return import('./htmlMode-
|
|
120899
|
+
return import('./htmlMode-c961f619.js');
|
|
120900
120900
|
}
|
|
120901
120901
|
}
|
|
120902
120902
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
120903
120903
|
const defaults = new LanguageServiceDefaultsImpl$2(languageId, options, modeConfiguration);
|
|
120904
120904
|
let mode;
|
|
120905
120905
|
const onLanguageListener = monaco_editor_core_exports$2.languages.onLanguage(languageId, async () => {
|
|
120906
|
-
mode = (await getMode$
|
|
120906
|
+
mode = (await getMode$2()).setupMode(defaults);
|
|
120907
120907
|
});
|
|
120908
120908
|
return {
|
|
120909
120909
|
defaults,
|
|
@@ -120996,9 +120996,9 @@ var modeConfigurationDefault$1 = {
|
|
|
120996
120996
|
};
|
|
120997
120997
|
var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault, modeConfigurationDefault$1);
|
|
120998
120998
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120999
|
-
function getMode$
|
|
120999
|
+
function getMode$1() {
|
|
121000
121000
|
{
|
|
121001
|
-
return import('./jsonMode-
|
|
121001
|
+
return import('./jsonMode-86b234eb.js');
|
|
121002
121002
|
}
|
|
121003
121003
|
}
|
|
121004
121004
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121008,7 +121008,7 @@ monaco_editor_core_exports$1.languages.register({
|
|
|
121008
121008
|
mimetypes: ["application/json"]
|
|
121009
121009
|
});
|
|
121010
121010
|
monaco_editor_core_exports$1.languages.onLanguage("json", () => {
|
|
121011
|
-
getMode$
|
|
121011
|
+
getMode$1().then((mode) => mode.setupMode(jsonDefaults));
|
|
121012
121012
|
});
|
|
121013
121013
|
|
|
121014
121014
|
/*!-----------------------------------------------------------------------------
|
|
@@ -121248,10 +121248,10 @@ var modeConfigurationDefault = {
|
|
|
121248
121248
|
var typescriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, target: 99 /* Latest */ }, { noSemanticValidation: false, noSyntaxValidation: false, onlyVisible: false }, {}, {}, modeConfigurationDefault);
|
|
121249
121249
|
var javascriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, allowJs: true, target: 99 /* Latest */ }, { noSemanticValidation: true, noSyntaxValidation: false, onlyVisible: false }, {}, {}, modeConfigurationDefault);
|
|
121250
121250
|
var getTypeScriptWorker = () => {
|
|
121251
|
-
return getMode
|
|
121251
|
+
return getMode().then((mode) => mode.getTypeScriptWorker());
|
|
121252
121252
|
};
|
|
121253
121253
|
var getJavaScriptWorker = () => {
|
|
121254
|
-
return getMode
|
|
121254
|
+
return getMode().then((mode) => mode.getJavaScriptWorker());
|
|
121255
121255
|
};
|
|
121256
121256
|
monaco_editor_core_exports.languages.typescript = {
|
|
121257
121257
|
ModuleKind,
|
|
@@ -121265,16 +121265,16 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121265
121265
|
getTypeScriptWorker,
|
|
121266
121266
|
getJavaScriptWorker
|
|
121267
121267
|
};
|
|
121268
|
-
function getMode
|
|
121268
|
+
function getMode() {
|
|
121269
121269
|
{
|
|
121270
|
-
return import('./tsMode-
|
|
121270
|
+
return import('./tsMode-ee945c40.js');
|
|
121271
121271
|
}
|
|
121272
121272
|
}
|
|
121273
121273
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
121274
|
-
return getMode
|
|
121274
|
+
return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));
|
|
121275
121275
|
});
|
|
121276
121276
|
monaco_editor_core_exports.languages.onLanguage("javascript", () => {
|
|
121277
|
-
return getMode
|
|
121277
|
+
return getMode().then((mode) => mode.setupJavaScript(javascriptDefaults));
|
|
121278
121278
|
});
|
|
121279
121279
|
|
|
121280
121280
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -168990,7 +168990,7 @@ var main = {exports: {}};
|
|
|
168990
168990
|
}(main, main.exports));
|
|
168991
168991
|
|
|
168992
168992
|
// src/index.ts
|
|
168993
|
-
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
168993
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis && !("forceESM" in window.$arcgis);
|
|
168994
168994
|
function isDefaultModule(module) {
|
|
168995
168995
|
return module.default !== void 0;
|
|
168996
168996
|
}
|
|
@@ -169410,13 +169410,9 @@ function gen(count) {
|
|
|
169410
169410
|
function generateGuid() {
|
|
169411
169411
|
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
169412
169412
|
}
|
|
169413
|
-
var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
|
|
169414
|
-
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
169415
|
-
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
169416
|
-
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
169417
169413
|
|
|
169418
169414
|
// src/intl.ts
|
|
169419
|
-
var
|
|
169415
|
+
var supportedLocalesArray = [
|
|
169420
169416
|
"ar",
|
|
169421
169417
|
"bg",
|
|
169422
169418
|
"bs",
|
|
@@ -169457,9 +169453,18 @@ var supportedLocales = /* @__PURE__ */ new Set([
|
|
|
169457
169453
|
"zh-CN",
|
|
169458
169454
|
"zh-HK",
|
|
169459
169455
|
"zh-TW"
|
|
169460
|
-
]
|
|
169456
|
+
];
|
|
169457
|
+
var supportedLocales = new Set(supportedLocalesArray);
|
|
169461
169458
|
var defaultLocale = "en";
|
|
169462
|
-
|
|
169459
|
+
var localeEquivalencies = {
|
|
169460
|
+
// We use `pt-BR` as it will have the same translations as `pt`, which has no corresponding bundle
|
|
169461
|
+
pt: "pt-PT",
|
|
169462
|
+
// We support both 'nb' and 'no' (BCP 47) for Norwegian but only `nb` has corresponding bundle
|
|
169463
|
+
no: "nb",
|
|
169464
|
+
// We can `zh-CN` as base translation for chinese locales which has no corresponding bundle.
|
|
169465
|
+
zh: "zh-CN"
|
|
169466
|
+
};
|
|
169467
|
+
async function fetchT9nStringsBundle(locale, assetsPath, prefix = "") {
|
|
169463
169468
|
const path = `${assetsPath}/${prefix}`;
|
|
169464
169469
|
const filePath = `${path}${locale}.json`;
|
|
169465
169470
|
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
@@ -169475,26 +169480,29 @@ async function fetchBundle(locale, path) {
|
|
|
169475
169480
|
}
|
|
169476
169481
|
} catch (error) {
|
|
169477
169482
|
console.error(error);
|
|
169478
|
-
return
|
|
169483
|
+
return {};
|
|
169479
169484
|
}
|
|
169480
169485
|
if (locale === defaultLocale) {
|
|
169481
|
-
return
|
|
169486
|
+
return {};
|
|
169482
169487
|
}
|
|
169483
169488
|
return await fetchBundle(defaultLocale, path);
|
|
169484
169489
|
}
|
|
169485
|
-
var fallbackBundle = new Proxy(
|
|
169486
|
-
{},
|
|
169487
|
-
{
|
|
169488
|
-
get: (_target, property) => camelToHuman(property.toString())
|
|
169489
|
-
}
|
|
169490
|
-
);
|
|
169491
169490
|
function getElementLocales(element) {
|
|
169492
169491
|
const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
|
|
169493
|
-
|
|
169494
|
-
|
|
169492
|
+
return { lang, t9nLocale: langToLocale(lang) };
|
|
169493
|
+
}
|
|
169494
|
+
function langToLocale(lang) {
|
|
169495
|
+
const parts = lang.split("-");
|
|
169496
|
+
const normalized = `${parts[0].toLowerCase()}${parts.slice(1).join("-").toUpperCase()}`;
|
|
169497
|
+
if (supportedLocales.has(normalized)) {
|
|
169498
|
+
return normalized;
|
|
169499
|
+
}
|
|
169500
|
+
const languageCode = normalized.slice(0, 2).toLowerCase();
|
|
169501
|
+
const locale = localeEquivalencies[languageCode] ?? languageCode;
|
|
169502
|
+
if (supportedLocales.has(locale)) {
|
|
169503
|
+
return locale;
|
|
169495
169504
|
}
|
|
169496
|
-
|
|
169497
|
-
return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
|
|
169505
|
+
return defaultLocale;
|
|
169498
169506
|
}
|
|
169499
169507
|
function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
|
|
169500
169508
|
let result = void 0;
|
|
@@ -169511,7 +169519,7 @@ async function updateComponentLocateState(element, assetsPath, assetName = eleme
|
|
|
169511
169519
|
const { lang, t9nLocale } = getElementLocales(element);
|
|
169512
169520
|
const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
|
|
169513
169521
|
const prefix = `${assetName}.t9n.`;
|
|
169514
|
-
const t9nStrings = await
|
|
169522
|
+
const t9nStrings = await fetchT9nStringsBundle(t9nLocale, t9nAssetsPath, prefix);
|
|
169515
169523
|
return { lang, t9nLocale, t9nStrings };
|
|
169516
169524
|
}
|
|
169517
169525
|
|
|
@@ -171016,41 +171024,6 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
171016
171024
|
return editorProfile;
|
|
171017
171025
|
}
|
|
171018
171026
|
|
|
171019
|
-
/**
|
|
171020
|
-
* Returns the arcade diagnostic service.
|
|
171021
|
-
* Example:
|
|
171022
|
-
* ```ts
|
|
171023
|
-
* const diagnosticService = await getArcadeDiagnosticService();
|
|
171024
|
-
* diagnosticService.onDidChangeDiagnostics(({uri, diaganostics }) => {
|
|
171025
|
-
* // Filter the diagnostics for the uri of interest
|
|
171026
|
-
* // Do something with the diagnostics
|
|
171027
|
-
* });
|
|
171028
|
-
* ```
|
|
171029
|
-
*/
|
|
171030
|
-
async function getArcadeDiagnosticService() {
|
|
171031
|
-
const mode = await getMode();
|
|
171032
|
-
return mode.getArcadeDiagnosticService();
|
|
171033
|
-
}
|
|
171034
|
-
/**
|
|
171035
|
-
* Returns the arcade worker for the model.
|
|
171036
|
-
* Example:
|
|
171037
|
-
* ```ts
|
|
171038
|
-
* const arcadeWorker = await getArcadeWorker(model.uri);
|
|
171039
|
-
* ```
|
|
171040
|
-
* @returns arcade worker
|
|
171041
|
-
*/
|
|
171042
|
-
async function getArcadeWorker(uri) {
|
|
171043
|
-
const mode = await getMode();
|
|
171044
|
-
return await mode.getArcadeWorker(uri);
|
|
171045
|
-
}
|
|
171046
|
-
/**
|
|
171047
|
-
* Request the arcade mode
|
|
171048
|
-
* @returns arcade mode module
|
|
171049
|
-
*/
|
|
171050
|
-
async function getMode() {
|
|
171051
|
-
return await import('./arcade-mode-5d46035e.js');
|
|
171052
|
-
}
|
|
171053
|
-
|
|
171054
171027
|
// this file contains the building blocks for a language default provider
|
|
171055
171028
|
const defaultContext = {
|
|
171056
171029
|
locale: "en",
|
|
@@ -171092,20 +171065,11 @@ class LanguageDefaultsBase {
|
|
|
171092
171065
|
return this._languageOptions;
|
|
171093
171066
|
}
|
|
171094
171067
|
/**
|
|
171095
|
-
* Dispose
|
|
171096
|
-
* It is the responsibility of the caller that created the editor profile to dispose it.
|
|
171097
|
-
* @param modelId The model id for which to dispose the editor profile.
|
|
171068
|
+
* Dispose any cached resources for the model
|
|
171098
171069
|
*/
|
|
171099
|
-
|
|
171070
|
+
disposeForModel(modelId) {
|
|
171100
171071
|
const key = this._getApiKey(modelId);
|
|
171101
171072
|
this._profileMap.delete(key);
|
|
171102
|
-
}
|
|
171103
|
-
/**
|
|
171104
|
-
* Dispose the api context for the given model id.
|
|
171105
|
-
* @param modelId The model id for which to dispose the api context.
|
|
171106
|
-
*/
|
|
171107
|
-
disposeApiContextForModel(modelId) {
|
|
171108
|
-
const key = this._getApiKey(modelId);
|
|
171109
171073
|
if (this._apiContextMap.delete(key)) {
|
|
171110
171074
|
this._fireModelContextDidChange(key);
|
|
171111
171075
|
}
|
|
@@ -171146,71 +171110,4 @@ class LanguageDefaultsBase {
|
|
|
171146
171110
|
}
|
|
171147
171111
|
}
|
|
171148
171112
|
|
|
171149
|
-
|
|
171150
|
-
class ArcadeLanguageServiceDefaults extends LanguageDefaultsBase {
|
|
171151
|
-
constructor() {
|
|
171152
|
-
super(...arguments);
|
|
171153
|
-
this._languageId = arcadeLanguageId;
|
|
171154
|
-
this._languageOptions = {};
|
|
171155
|
-
}
|
|
171156
|
-
/**
|
|
171157
|
-
* Create an EditorProfile for the given model id using the given definition and locale.
|
|
171158
|
-
* The EditorProfile is used by the the Arcade Language service as well by the cosing components.
|
|
171159
|
-
* The definition can be a pre-defined profile or an editor profile definition.
|
|
171160
|
-
* If the locale is not provided then the 'en' locale is used.
|
|
171161
|
-
* @param modelId The model id for which to create the context.
|
|
171162
|
-
* @param definition The definition to use for the model context.
|
|
171163
|
-
* @param locale The locale to use for the model context.
|
|
171164
|
-
* @returns The EditorProfile for the model.
|
|
171165
|
-
*/
|
|
171166
|
-
async setProfileForModel(modelId, definition, apiContext = { locale: "en" }) {
|
|
171167
|
-
// Convert pre-defined profile to a runtime profile
|
|
171168
|
-
if (isPredefinedProfile(definition)) {
|
|
171169
|
-
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
171170
|
-
}
|
|
171171
|
-
const intlStrings = await fetchT9NStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
171172
|
-
if (!intlStrings) {
|
|
171173
|
-
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
171174
|
-
}
|
|
171175
|
-
this.disposeEditorProfileForModel(modelId);
|
|
171176
|
-
const key = this._getApiKey(modelId);
|
|
171177
|
-
const editorProfile = new EditorProfile(definition, intlStrings);
|
|
171178
|
-
this._profileMap.set(key, editorProfile);
|
|
171179
|
-
const apiProfile = await editorProfile.toLSProfile();
|
|
171180
|
-
this.updateApiContextForModel(modelId, {
|
|
171181
|
-
locale: apiContext.locale,
|
|
171182
|
-
profile: apiProfile,
|
|
171183
|
-
snippets: apiContext.snippets,
|
|
171184
|
-
});
|
|
171185
|
-
}
|
|
171186
|
-
/**
|
|
171187
|
-
* Set or update the Arcade language service options.
|
|
171188
|
-
* @param languageOptions The language options to set.
|
|
171189
|
-
*/
|
|
171190
|
-
setLanguageOptions(languageOptions = {}) {
|
|
171191
|
-
// Check if options have actually changed.
|
|
171192
|
-
// Avoid restarting the worker when no updates.
|
|
171193
|
-
// Today we only have the 'assetsPath' as a property
|
|
171194
|
-
if (this._languageOptions.assetsPath === languageOptions.assetsPath) {
|
|
171195
|
-
return;
|
|
171196
|
-
}
|
|
171197
|
-
this._languageOptions = { ...this._languageOptions, ...languageOptions };
|
|
171198
|
-
this._onDidChange.fire(this);
|
|
171199
|
-
}
|
|
171200
|
-
/**
|
|
171201
|
-
* Gets the API library for the given model id.
|
|
171202
|
-
* @param modelId The model id for which to get the API library.
|
|
171203
|
-
* @returns The API library for the model.
|
|
171204
|
-
*/
|
|
171205
|
-
async getApiLibrary(modelId) {
|
|
171206
|
-
const uri = Uri.parse(modelId);
|
|
171207
|
-
const worker = await getArcadeWorker(uri);
|
|
171208
|
-
return await worker.getApiLibrary(this.getApiContextForModel(uri));
|
|
171209
|
-
}
|
|
171210
|
-
}
|
|
171211
|
-
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
171212
|
-
const arcade = {
|
|
171213
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
171214
|
-
};
|
|
171215
|
-
|
|
171216
|
-
export { observeAncestorsMutation as A, KeyMod as B, addLTRMark as C, Deferred as D, monaco_editor_core_star as E, typescriptDefaults as F, main as G, debounce as H, IStandaloneThemeService as I, Emitter as J, KeyCode as K, MarkerSeverity as M, Range as R, StandaloneServices as S, Uri as U, arcade as a, safeAsyncCall as b, camelToKebab as c, devToolsAwareTimeout as d, editor as e, startLocaleObserver as f, getElementLocales as g, isURL as h, importArcade as i, hasSameOrigin as j, importRequest as k, generateGuid as l, arcadeDefaults as m, getElementTheme as n, getArcadeDiagnosticService as o, setValuesInString as p, quoteString as q, supportedFields as r, safeCall as s, generateTokensCSSForColorMap as t, commonjsGlobal as u, setFocusOnElement as v, filterCollection as w, createFilterExpression as x, languages as y, getMode as z };
|
|
171113
|
+
export { devToolsAwareTimeout as A, safeCall as B, isFeatureSetDefinition as C, Deferred as D, EditorProfile as E, main as F, monaco_editor_core_star as G, typescriptDefaults as H, IStandaloneThemeService as I, debounce as J, KeyCode as K, LanguageDefaultsBase as L, MarkerSeverity as M, Emitter as N, Range as R, StandaloneServices as S, Uri as U, importArcade as a, isURL as b, convertToEditorProfileDefinition as c, importRequest as d, editor as e, fetchT9nStringsBundle as f, getElementLocales as g, hasSameOrigin as h, isPredefinedProfile as i, generateGuid as j, getElementTheme as k, setValuesInString as l, supportedFields as m, generateTokensCSSForColorMap as n, commonjsGlobal as o, setFocusOnElement as p, quoteString as q, filterCollection as r, startLocaleObserver as s, createFilterExpression as t, languages as u, observeAncestorsMutation as v, KeyMod as w, addLTRMark as x, isNotUndefined as y, safeAsyncCall as z };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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.4
|
|
5
5
|
*/
|
|
6
|
-
import { b as bootstrapLazy } from './index-
|
|
7
|
-
export { s as setNonce } from './index-
|
|
8
|
-
import { g as globalScripts } from './app-globals-
|
|
6
|
+
import { b as bootstrapLazy } from './index-1c1754c0.js';
|
|
7
|
+
export { s as setNonce } from './index-1c1754c0.js';
|
|
8
|
+
import { g as globalScripts } from './app-globals-60a61d0d.js';
|
|
9
9
|
|
|
10
10
|
const defineCustomElements = async (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return undefined;
|
|
12
12
|
await globalScripts();
|
|
13
|
-
return bootstrapLazy([["arcgis-arcade-editor_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],"
|
|
13
|
+
return bootstrapLazy([["arcgis-sql-expression-fields",[[1,"arcgis-sql-expression-fields",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}]]],["arcgis-arcade-editor_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],"_preparingArcade":[32],"_editorProfile":[32],"_apiLibrary":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"messages":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"updateThemeColors":[64]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"],"testData":["_testDataChanged"],"snippets":["_snippetChanged"]}],[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"]}],[1,"arcgis-language-api-panel",{"hideDocumentationActions":[4,"hide-documentation-actions"],"loading":[4],"apiLibrary":[16],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]}]]],["arcgis-sql-expression-editor",[[0,"arcgis-sql-expression-editor",{"profile":[16],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32]},null,{"profile":["_profileChanged"]}]]]], options);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { defineCustomElements };
|