@arcgis/coding-components 4.31.0-next.2 → 4.31.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/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-0105cc95.js +6 -0
- package/dist/arcgis-coding-components/{p-9eced6fc.js → p-111ba641.js} +2 -2
- package/dist/arcgis-coding-components/p-3ca5ba95.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-bb7e832e.js → p-42c8b545.js} +3 -3
- package/dist/arcgis-coding-components/{p-93a97573.js → p-4986aaf2.js} +3 -3
- package/dist/arcgis-coding-components/p-5e26a360.js +6 -0
- package/dist/arcgis-coding-components/{p-60c2a820.js → p-5eb82abf.js} +2 -2
- package/dist/arcgis-coding-components/{p-62ee6251.js → p-6554a853.js} +1 -1
- package/dist/arcgis-coding-components/{p-7984ea8e.js → p-7c6b3d40.js} +2 -2
- package/dist/arcgis-coding-components/{p-5ef7cce5.js → p-86106a9a.js} +1 -1
- package/dist/arcgis-coding-components/{p-03ea6cd7.js → p-8b4298d5.js} +3 -3
- package/dist/arcgis-coding-components/p-9132bc9c.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-36fedc23.js → p-93d0e0cc.js} +10 -10
- package/dist/arcgis-coding-components/{p-e8211ffe.js → p-9c7e0089.js} +1 -1
- package/dist/arcgis-coding-components/p-b82e98f0.js +6 -0
- package/dist/arcgis-coding-components/{p-e7ee4d64.js → p-c4a5150e.js} +3 -3
- package/dist/arcgis-coding-components/p-d353f1ba.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-0c6de9b3.js → p-fe6ccfe0.js} +2 -2
- package/dist/cjs/{app-globals-aee5f4b5.js → app-globals-92c5b499.js} +1 -1
- package/dist/cjs/arcade-defaults-34e82ff5.js +116 -0
- package/dist/cjs/{arcade-mode-b85ae7d4.js → arcade-mode-dfd66b4b.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-9b0053c3.js} +1 -1
- package/dist/cjs/{cssMode-2b0daeae.js → cssMode-62e53008.js} +4 -4
- package/dist/cjs/{html-f56911e1.js → html-3036e89e.js} +4 -4
- package/dist/cjs/{htmlMode-43eed674.js → htmlMode-c37eee42.js} +4 -4
- package/dist/cjs/{index-b34238a6.js → index-be6b2520.js} +9 -1
- package/dist/cjs/index.cjs.js +4 -3
- package/dist/cjs/{javascript-5115cb76.js → javascript-7276c023.js} +4 -4
- package/dist/cjs/{jsonMode-550dda36.js → jsonMode-baa295f0.js} +4 -4
- package/dist/cjs/{arcade-defaults-a8d8f8e2.js → language-defaults-base-5817af52.js} +61 -162
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/sql-expr-defaults-746bbc5f.js +1285 -0
- package/dist/cjs/sql-expr-mode-a9f1b697.js +25135 -0
- package/dist/cjs/{tsMode-336306a9.js → tsMode-36398912.js} +5 -5
- package/dist/cjs/{typescript-b395242f.js → typescript-608a420b.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-5e178541.js} +1 -1
- package/dist/esm/arcade-defaults-6dac6b30.js +111 -0
- package/dist/esm/{arcade-mode-5d46035e.js → arcade-mode-02336ce9.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-e79f1ed1.js} +1 -1
- package/dist/esm/{cssMode-c11f7f40.js → cssMode-cd007d02.js} +3 -3
- package/dist/esm/{html-a6c37a99.js → html-d079d00d.js} +3 -3
- package/dist/esm/{htmlMode-1270bc7d.js → htmlMode-ff14e035.js} +3 -3
- package/dist/esm/{index-a970952c.js → index-88fc341d.js} +9 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/{javascript-ee179624.js → javascript-69f7c282.js} +4 -4
- package/dist/esm/{jsonMode-07502ccb.js → jsonMode-18ddadde.js} +3 -3
- package/dist/esm/{arcade-defaults-9eb28407.js → language-defaults-base-6687d11a.js} +55 -158
- package/dist/esm/loader.js +5 -5
- package/dist/esm/sql-expr-defaults-2cdfe08a.js +1279 -0
- package/dist/esm/sql-expr-mode-f10e5a43.js +25132 -0
- package/dist/esm/{tsMode-96749a12.js → tsMode-c2e5d33a.js} +3 -3
- package/dist/esm/{typescript-a3cf9881.js → typescript-a0fbebf0.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,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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.3
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-be6b2520.js');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
11
11
|
if (e && e.__esModule) return e;
|
|
@@ -120616,7 +120616,7 @@ registerLanguage({
|
|
|
120616
120616
|
mimetypes: ["text/css"],
|
|
120617
120617
|
loader: () => {
|
|
120618
120618
|
{
|
|
120619
|
-
return Promise.resolve().then(function () { return require('./css-
|
|
120619
|
+
return Promise.resolve().then(function () { return require('./css-9b0053c3.js'); });
|
|
120620
120620
|
}
|
|
120621
120621
|
}
|
|
120622
120622
|
});
|
|
@@ -120634,7 +120634,7 @@ registerLanguage({
|
|
|
120634
120634
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120635
120635
|
loader: () => {
|
|
120636
120636
|
{
|
|
120637
|
-
return Promise.resolve().then(function () { return require('./html-
|
|
120637
|
+
return Promise.resolve().then(function () { return require('./html-3036e89e.js'); });
|
|
120638
120638
|
}
|
|
120639
120639
|
}
|
|
120640
120640
|
});
|
|
@@ -120654,7 +120654,7 @@ registerLanguage({
|
|
|
120654
120654
|
mimetypes: ["text/javascript"],
|
|
120655
120655
|
loader: () => {
|
|
120656
120656
|
{
|
|
120657
|
-
return Promise.resolve().then(function () { return require('./javascript-
|
|
120657
|
+
return Promise.resolve().then(function () { return require('./javascript-7276c023.js'); });
|
|
120658
120658
|
}
|
|
120659
120659
|
}
|
|
120660
120660
|
});
|
|
@@ -120672,7 +120672,7 @@ registerLanguage({
|
|
|
120672
120672
|
mimetypes: ["text/typescript"],
|
|
120673
120673
|
loader: () => {
|
|
120674
120674
|
{
|
|
120675
|
-
return Promise.resolve().then(function () { return require('./typescript-
|
|
120675
|
+
return Promise.resolve().then(function () { return require('./typescript-608a420b.js'); });
|
|
120676
120676
|
}
|
|
120677
120677
|
}
|
|
120678
120678
|
});
|
|
@@ -120791,19 +120791,19 @@ var cssDefaults = new LanguageServiceDefaultsImpl$3("css", optionsDefault$1, mod
|
|
|
120791
120791
|
var scssDefaults = new LanguageServiceDefaultsImpl$3("scss", optionsDefault$1, modeConfigurationDefault$2);
|
|
120792
120792
|
var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, modeConfigurationDefault$2);
|
|
120793
120793
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120794
|
-
function getMode$
|
|
120794
|
+
function getMode$3() {
|
|
120795
120795
|
{
|
|
120796
|
-
return Promise.resolve().then(function () { return require('./cssMode-
|
|
120796
|
+
return Promise.resolve().then(function () { return require('./cssMode-62e53008.js'); });
|
|
120797
120797
|
}
|
|
120798
120798
|
}
|
|
120799
120799
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
120800
|
-
getMode$
|
|
120800
|
+
getMode$3().then((mode) => mode.setupMode(lessDefaults));
|
|
120801
120801
|
});
|
|
120802
120802
|
monaco_editor_core_exports$3.languages.onLanguage("scss", () => {
|
|
120803
|
-
getMode$
|
|
120803
|
+
getMode$3().then((mode) => mode.setupMode(scssDefaults));
|
|
120804
120804
|
});
|
|
120805
120805
|
monaco_editor_core_exports$3.languages.onLanguage("css", () => {
|
|
120806
|
-
getMode$
|
|
120806
|
+
getMode$3().then((mode) => mode.setupMode(cssDefaults));
|
|
120807
120807
|
});
|
|
120808
120808
|
|
|
120809
120809
|
/*!-----------------------------------------------------------------------------
|
|
@@ -120916,16 +120916,16 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120916
120916
|
razorLanguageService,
|
|
120917
120917
|
registerHTMLLanguageService
|
|
120918
120918
|
};
|
|
120919
|
-
function getMode$
|
|
120919
|
+
function getMode$2() {
|
|
120920
120920
|
{
|
|
120921
|
-
return Promise.resolve().then(function () { return require('./htmlMode-
|
|
120921
|
+
return Promise.resolve().then(function () { return require('./htmlMode-c37eee42.js'); });
|
|
120922
120922
|
}
|
|
120923
120923
|
}
|
|
120924
120924
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
120925
120925
|
const defaults = new LanguageServiceDefaultsImpl$2(languageId, options, modeConfiguration);
|
|
120926
120926
|
let mode;
|
|
120927
120927
|
const onLanguageListener = monaco_editor_core_exports$2.languages.onLanguage(languageId, async () => {
|
|
120928
|
-
mode = (await getMode$
|
|
120928
|
+
mode = (await getMode$2()).setupMode(defaults);
|
|
120929
120929
|
});
|
|
120930
120930
|
return {
|
|
120931
120931
|
defaults,
|
|
@@ -121018,9 +121018,9 @@ var modeConfigurationDefault$1 = {
|
|
|
121018
121018
|
};
|
|
121019
121019
|
var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault, modeConfigurationDefault$1);
|
|
121020
121020
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
121021
|
-
function getMode$
|
|
121021
|
+
function getMode$1() {
|
|
121022
121022
|
{
|
|
121023
|
-
return Promise.resolve().then(function () { return require('./jsonMode-
|
|
121023
|
+
return Promise.resolve().then(function () { return require('./jsonMode-baa295f0.js'); });
|
|
121024
121024
|
}
|
|
121025
121025
|
}
|
|
121026
121026
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121030,7 +121030,7 @@ monaco_editor_core_exports$1.languages.register({
|
|
|
121030
121030
|
mimetypes: ["application/json"]
|
|
121031
121031
|
});
|
|
121032
121032
|
monaco_editor_core_exports$1.languages.onLanguage("json", () => {
|
|
121033
|
-
getMode$
|
|
121033
|
+
getMode$1().then((mode) => mode.setupMode(jsonDefaults));
|
|
121034
121034
|
});
|
|
121035
121035
|
|
|
121036
121036
|
/*!-----------------------------------------------------------------------------
|
|
@@ -121270,10 +121270,10 @@ var modeConfigurationDefault = {
|
|
|
121270
121270
|
var typescriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, target: 99 /* Latest */ }, { noSemanticValidation: false, noSyntaxValidation: false, onlyVisible: false }, {}, {}, modeConfigurationDefault);
|
|
121271
121271
|
var javascriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, allowJs: true, target: 99 /* Latest */ }, { noSemanticValidation: true, noSyntaxValidation: false, onlyVisible: false }, {}, {}, modeConfigurationDefault);
|
|
121272
121272
|
var getTypeScriptWorker = () => {
|
|
121273
|
-
return getMode
|
|
121273
|
+
return getMode().then((mode) => mode.getTypeScriptWorker());
|
|
121274
121274
|
};
|
|
121275
121275
|
var getJavaScriptWorker = () => {
|
|
121276
|
-
return getMode
|
|
121276
|
+
return getMode().then((mode) => mode.getJavaScriptWorker());
|
|
121277
121277
|
};
|
|
121278
121278
|
monaco_editor_core_exports.languages.typescript = {
|
|
121279
121279
|
ModuleKind,
|
|
@@ -121287,16 +121287,16 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121287
121287
|
getTypeScriptWorker,
|
|
121288
121288
|
getJavaScriptWorker
|
|
121289
121289
|
};
|
|
121290
|
-
function getMode
|
|
121290
|
+
function getMode() {
|
|
121291
121291
|
{
|
|
121292
|
-
return Promise.resolve().then(function () { return require('./tsMode-
|
|
121292
|
+
return Promise.resolve().then(function () { return require('./tsMode-36398912.js'); });
|
|
121293
121293
|
}
|
|
121294
121294
|
}
|
|
121295
121295
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
121296
|
-
return getMode
|
|
121296
|
+
return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));
|
|
121297
121297
|
});
|
|
121298
121298
|
monaco_editor_core_exports.languages.onLanguage("javascript", () => {
|
|
121299
|
-
return getMode
|
|
121299
|
+
return getMode().then((mode) => mode.setupJavaScript(javascriptDefaults));
|
|
121300
121300
|
});
|
|
121301
121301
|
|
|
121302
121302
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -169012,7 +169012,7 @@ var main = {exports: {}};
|
|
|
169012
169012
|
}(main, main.exports));
|
|
169013
169013
|
|
|
169014
169014
|
// src/index.ts
|
|
169015
|
-
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
|
|
169015
|
+
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis && !("forceESM" in window.$arcgis);
|
|
169016
169016
|
function isDefaultModule(module) {
|
|
169017
169017
|
return module.default !== void 0;
|
|
169018
169018
|
}
|
|
@@ -169432,13 +169432,9 @@ function gen(count) {
|
|
|
169432
169432
|
function generateGuid() {
|
|
169433
169433
|
return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
|
|
169434
169434
|
}
|
|
169435
|
-
var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
|
|
169436
|
-
var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
|
|
169437
|
-
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
169438
|
-
var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
|
|
169439
169435
|
|
|
169440
169436
|
// src/intl.ts
|
|
169441
|
-
var
|
|
169437
|
+
var supportedLocalesArray = [
|
|
169442
169438
|
"ar",
|
|
169443
169439
|
"bg",
|
|
169444
169440
|
"bs",
|
|
@@ -169479,9 +169475,18 @@ var supportedLocales = /* @__PURE__ */ new Set([
|
|
|
169479
169475
|
"zh-CN",
|
|
169480
169476
|
"zh-HK",
|
|
169481
169477
|
"zh-TW"
|
|
169482
|
-
]
|
|
169478
|
+
];
|
|
169479
|
+
var supportedLocales = new Set(supportedLocalesArray);
|
|
169483
169480
|
var defaultLocale = "en";
|
|
169484
|
-
|
|
169481
|
+
var localeEquivalencies = {
|
|
169482
|
+
// We use `pt-BR` as it will have the same translations as `pt`, which has no corresponding bundle
|
|
169483
|
+
pt: "pt-PT",
|
|
169484
|
+
// We support both 'nb' and 'no' (BCP 47) for Norwegian but only `nb` has corresponding bundle
|
|
169485
|
+
no: "nb",
|
|
169486
|
+
// We can `zh-CN` as base translation for chinese locales which has no corresponding bundle.
|
|
169487
|
+
zh: "zh-CN"
|
|
169488
|
+
};
|
|
169489
|
+
async function fetchT9nStringsBundle(locale, assetsPath, prefix = "") {
|
|
169485
169490
|
const path = `${assetsPath}/${prefix}`;
|
|
169486
169491
|
const filePath = `${path}${locale}.json`;
|
|
169487
169492
|
t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
|
|
@@ -169497,26 +169502,29 @@ async function fetchBundle(locale, path) {
|
|
|
169497
169502
|
}
|
|
169498
169503
|
} catch (error) {
|
|
169499
169504
|
console.error(error);
|
|
169500
|
-
return
|
|
169505
|
+
return {};
|
|
169501
169506
|
}
|
|
169502
169507
|
if (locale === defaultLocale) {
|
|
169503
|
-
return
|
|
169508
|
+
return {};
|
|
169504
169509
|
}
|
|
169505
169510
|
return await fetchBundle(defaultLocale, path);
|
|
169506
169511
|
}
|
|
169507
|
-
var fallbackBundle = new Proxy(
|
|
169508
|
-
{},
|
|
169509
|
-
{
|
|
169510
|
-
get: (_target, property) => camelToHuman(property.toString())
|
|
169511
|
-
}
|
|
169512
|
-
);
|
|
169513
169512
|
function getElementLocales(element) {
|
|
169514
169513
|
const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
|
|
169515
|
-
|
|
169516
|
-
|
|
169514
|
+
return { lang, t9nLocale: langToLocale(lang) };
|
|
169515
|
+
}
|
|
169516
|
+
function langToLocale(lang) {
|
|
169517
|
+
const parts = lang.split("-");
|
|
169518
|
+
const normalized = `${parts[0].toLowerCase()}${parts.slice(1).join("-").toUpperCase()}`;
|
|
169519
|
+
if (supportedLocales.has(normalized)) {
|
|
169520
|
+
return normalized;
|
|
169521
|
+
}
|
|
169522
|
+
const languageCode = normalized.slice(0, 2).toLowerCase();
|
|
169523
|
+
const locale = localeEquivalencies[languageCode] ?? languageCode;
|
|
169524
|
+
if (supportedLocales.has(locale)) {
|
|
169525
|
+
return locale;
|
|
169517
169526
|
}
|
|
169518
|
-
|
|
169519
|
-
return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
|
|
169527
|
+
return defaultLocale;
|
|
169520
169528
|
}
|
|
169521
169529
|
function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
|
|
169522
169530
|
let result = void 0;
|
|
@@ -169533,7 +169541,7 @@ async function updateComponentLocateState(element, assetsPath, assetName = eleme
|
|
|
169533
169541
|
const { lang, t9nLocale } = getElementLocales(element);
|
|
169534
169542
|
const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
|
|
169535
169543
|
const prefix = `${assetName}.t9n.`;
|
|
169536
|
-
const t9nStrings = await
|
|
169544
|
+
const t9nStrings = await fetchT9nStringsBundle(t9nLocale, t9nAssetsPath, prefix);
|
|
169537
169545
|
return { lang, t9nLocale, t9nStrings };
|
|
169538
169546
|
}
|
|
169539
169547
|
|
|
@@ -171038,41 +171046,6 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
171038
171046
|
return editorProfile;
|
|
171039
171047
|
}
|
|
171040
171048
|
|
|
171041
|
-
/**
|
|
171042
|
-
* Returns the arcade diagnostic service.
|
|
171043
|
-
* Example:
|
|
171044
|
-
* ```ts
|
|
171045
|
-
* const diagnosticService = await getArcadeDiagnosticService();
|
|
171046
|
-
* diagnosticService.onDidChangeDiagnostics(({uri, diaganostics }) => {
|
|
171047
|
-
* // Filter the diagnostics for the uri of interest
|
|
171048
|
-
* // Do something with the diagnostics
|
|
171049
|
-
* });
|
|
171050
|
-
* ```
|
|
171051
|
-
*/
|
|
171052
|
-
async function getArcadeDiagnosticService() {
|
|
171053
|
-
const mode = await getMode();
|
|
171054
|
-
return mode.getArcadeDiagnosticService();
|
|
171055
|
-
}
|
|
171056
|
-
/**
|
|
171057
|
-
* Returns the arcade worker for the model.
|
|
171058
|
-
* Example:
|
|
171059
|
-
* ```ts
|
|
171060
|
-
* const arcadeWorker = await getArcadeWorker(model.uri);
|
|
171061
|
-
* ```
|
|
171062
|
-
* @returns arcade worker
|
|
171063
|
-
*/
|
|
171064
|
-
async function getArcadeWorker(uri) {
|
|
171065
|
-
const mode = await getMode();
|
|
171066
|
-
return await mode.getArcadeWorker(uri);
|
|
171067
|
-
}
|
|
171068
|
-
/**
|
|
171069
|
-
* Request the arcade mode
|
|
171070
|
-
* @returns arcade mode module
|
|
171071
|
-
*/
|
|
171072
|
-
async function getMode() {
|
|
171073
|
-
return await Promise.resolve().then(function () { return require('./arcade-mode-b85ae7d4.js'); });
|
|
171074
|
-
}
|
|
171075
|
-
|
|
171076
171049
|
// this file contains the building blocks for a language default provider
|
|
171077
171050
|
const defaultContext = {
|
|
171078
171051
|
locale: "en",
|
|
@@ -171114,20 +171087,11 @@ class LanguageDefaultsBase {
|
|
|
171114
171087
|
return this._languageOptions;
|
|
171115
171088
|
}
|
|
171116
171089
|
/**
|
|
171117
|
-
* Dispose
|
|
171118
|
-
* It is the responsibility of the caller that created the editor profile to dispose it.
|
|
171119
|
-
* @param modelId The model id for which to dispose the editor profile.
|
|
171090
|
+
* Dispose any cached resources for the model
|
|
171120
171091
|
*/
|
|
171121
|
-
|
|
171092
|
+
disposeForModel(modelId) {
|
|
171122
171093
|
const key = this._getApiKey(modelId);
|
|
171123
171094
|
this._profileMap.delete(key);
|
|
171124
|
-
}
|
|
171125
|
-
/**
|
|
171126
|
-
* Dispose the api context for the given model id.
|
|
171127
|
-
* @param modelId The model id for which to dispose the api context.
|
|
171128
|
-
*/
|
|
171129
|
-
disposeApiContextForModel(modelId) {
|
|
171130
|
-
const key = this._getApiKey(modelId);
|
|
171131
171095
|
if (this._apiContextMap.delete(key)) {
|
|
171132
171096
|
this._fireModelContextDidChange(key);
|
|
171133
171097
|
}
|
|
@@ -171168,100 +171132,35 @@ class LanguageDefaultsBase {
|
|
|
171168
171132
|
}
|
|
171169
171133
|
}
|
|
171170
171134
|
|
|
171171
|
-
const arcadeLanguageId = "arcade";
|
|
171172
|
-
class ArcadeLanguageServiceDefaults extends LanguageDefaultsBase {
|
|
171173
|
-
constructor() {
|
|
171174
|
-
super(...arguments);
|
|
171175
|
-
this._languageId = arcadeLanguageId;
|
|
171176
|
-
this._languageOptions = {};
|
|
171177
|
-
}
|
|
171178
|
-
/**
|
|
171179
|
-
* Create an EditorProfile for the given model id using the given definition and locale.
|
|
171180
|
-
* The EditorProfile is used by the the Arcade Language service as well by the cosing components.
|
|
171181
|
-
* The definition can be a pre-defined profile or an editor profile definition.
|
|
171182
|
-
* If the locale is not provided then the 'en' locale is used.
|
|
171183
|
-
* @param modelId The model id for which to create the context.
|
|
171184
|
-
* @param definition The definition to use for the model context.
|
|
171185
|
-
* @param locale The locale to use for the model context.
|
|
171186
|
-
* @returns The EditorProfile for the model.
|
|
171187
|
-
*/
|
|
171188
|
-
async setProfileForModel(modelId, definition, apiContext = { locale: "en" }) {
|
|
171189
|
-
// Convert pre-defined profile to a runtime profile
|
|
171190
|
-
if (isPredefinedProfile(definition)) {
|
|
171191
|
-
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
171192
|
-
}
|
|
171193
|
-
const intlStrings = await fetchT9NStringsBundle(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
171194
|
-
if (!intlStrings) {
|
|
171195
|
-
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
171196
|
-
}
|
|
171197
|
-
this.disposeEditorProfileForModel(modelId);
|
|
171198
|
-
const key = this._getApiKey(modelId);
|
|
171199
|
-
const editorProfile = new EditorProfile(definition, intlStrings);
|
|
171200
|
-
this._profileMap.set(key, editorProfile);
|
|
171201
|
-
const apiProfile = await editorProfile.toLSProfile();
|
|
171202
|
-
this.updateApiContextForModel(modelId, {
|
|
171203
|
-
locale: apiContext.locale,
|
|
171204
|
-
profile: apiProfile,
|
|
171205
|
-
snippets: apiContext.snippets,
|
|
171206
|
-
});
|
|
171207
|
-
}
|
|
171208
|
-
/**
|
|
171209
|
-
* Set or update the Arcade language service options.
|
|
171210
|
-
* @param languageOptions The language options to set.
|
|
171211
|
-
*/
|
|
171212
|
-
setLanguageOptions(languageOptions = {}) {
|
|
171213
|
-
// Check if options have actually changed.
|
|
171214
|
-
// Avoid restarting the worker when no updates.
|
|
171215
|
-
// Today we only have the 'assetsPath' as a property
|
|
171216
|
-
if (this._languageOptions.assetsPath === languageOptions.assetsPath) {
|
|
171217
|
-
return;
|
|
171218
|
-
}
|
|
171219
|
-
this._languageOptions = { ...this._languageOptions, ...languageOptions };
|
|
171220
|
-
this._onDidChange.fire(this);
|
|
171221
|
-
}
|
|
171222
|
-
/**
|
|
171223
|
-
* Gets the API library for the given model id.
|
|
171224
|
-
* @param modelId The model id for which to get the API library.
|
|
171225
|
-
* @returns The API library for the model.
|
|
171226
|
-
*/
|
|
171227
|
-
async getApiLibrary(modelId) {
|
|
171228
|
-
const uri = Uri.parse(modelId);
|
|
171229
|
-
const worker = await getArcadeWorker(uri);
|
|
171230
|
-
return await worker.getApiLibrary(this.getApiContextForModel(uri));
|
|
171231
|
-
}
|
|
171232
|
-
}
|
|
171233
|
-
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
171234
|
-
const arcade = {
|
|
171235
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
171236
|
-
};
|
|
171237
|
-
|
|
171238
171135
|
exports.Deferred = Deferred;
|
|
171136
|
+
exports.EditorProfile = EditorProfile;
|
|
171239
171137
|
exports.Emitter = Emitter;
|
|
171240
171138
|
exports.IStandaloneThemeService = IStandaloneThemeService;
|
|
171241
171139
|
exports.KeyCode = KeyCode;
|
|
171242
171140
|
exports.KeyMod = KeyMod;
|
|
171141
|
+
exports.LanguageDefaultsBase = LanguageDefaultsBase;
|
|
171243
171142
|
exports.MarkerSeverity = MarkerSeverity;
|
|
171244
171143
|
exports.Range = Range;
|
|
171245
171144
|
exports.Uri = Uri;
|
|
171246
171145
|
exports.addLTRMark = addLTRMark;
|
|
171247
|
-
exports.arcade = arcade;
|
|
171248
|
-
exports.arcadeDefaults = arcadeDefaults;
|
|
171249
|
-
exports.camelToKebab = camelToKebab;
|
|
171250
171146
|
exports.commonjsGlobal = commonjsGlobal;
|
|
171147
|
+
exports.convertToEditorProfileDefinition = convertToEditorProfileDefinition;
|
|
171251
171148
|
exports.createFilterExpression = createFilterExpression;
|
|
171252
171149
|
exports.debounce = debounce;
|
|
171253
171150
|
exports.devToolsAwareTimeout = devToolsAwareTimeout;
|
|
171254
171151
|
exports.editor = editor;
|
|
171152
|
+
exports.fetchT9nStringsBundle = fetchT9nStringsBundle;
|
|
171255
171153
|
exports.filterCollection = filterCollection;
|
|
171256
171154
|
exports.generateGuid = generateGuid;
|
|
171257
171155
|
exports.generateTokensCSSForColorMap = generateTokensCSSForColorMap;
|
|
171258
|
-
exports.getArcadeDiagnosticService = getArcadeDiagnosticService;
|
|
171259
171156
|
exports.getElementLocales = getElementLocales;
|
|
171260
171157
|
exports.getElementTheme = getElementTheme;
|
|
171261
|
-
exports.getMode = getMode;
|
|
171262
171158
|
exports.hasSameOrigin = hasSameOrigin;
|
|
171263
171159
|
exports.importArcade = importArcade;
|
|
171264
171160
|
exports.importRequest = importRequest;
|
|
171161
|
+
exports.isFeatureSetDefinition = isFeatureSetDefinition;
|
|
171162
|
+
exports.isNotUndefined = isNotUndefined;
|
|
171163
|
+
exports.isPredefinedProfile = isPredefinedProfile;
|
|
171265
171164
|
exports.isURL = isURL;
|
|
171266
171165
|
exports.languages = languages;
|
|
171267
171166
|
exports.main = main;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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.3
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const appGlobals = require('./app-globals-
|
|
10
|
+
const index = require('./index-be6b2520.js');
|
|
11
|
+
const appGlobals = require('./app-globals-92c5b499.js');
|
|
12
12
|
|
|
13
13
|
const defineCustomElements = async (win, options) => {
|
|
14
14
|
if (typeof window === 'undefined') return undefined;
|
|
15
15
|
await appGlobals.globalScripts();
|
|
16
|
-
return index.bootstrapLazy([["arcgis-arcade-editor_6.cjs",[[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],"
|
|
16
|
+
return index.bootstrapLazy([["arcgis-sql-expression-fields.cjs",[[1,"arcgis-sql-expression-fields",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}]]],["arcgis-arcade-editor_6.cjs",[[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.cjs",[[0,"arcgis-sql-expression-editor",{"profile":[16],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32]},null,{"profile":["_profileChanged"]}]]]], options);
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
exports.setNonce = index.setNonce;
|