@arcgis/coding-components 4.31.0-next.6 → 4.31.0-next.61
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/README.md +22 -3
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +6 -6
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +5 -5
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.ca.json +2 -2
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.de.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.he.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.ca.json +1 -1
- package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.it.json +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +3 -3
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +460 -7
- package/dist/arcgis-coding-components/assets/language-api-panel/t9n/language-api-panel.t9n.ca.json +1 -1
- package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +30 -30
- package/dist/arcgis-coding-components/assets/sql-expression-editor/t9n/sql-expression-editor.t9n.en.json +4 -0
- package/dist/arcgis-coding-components/assets/sql-expression-fields/t9n/sql-expression-fields.t9n.en.json +4 -0
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/p-0cb4fef5.js +68 -0
- package/dist/arcgis-coding-components/p-210b84af.js +6 -0
- package/dist/arcgis-coding-components/{p-10cab8d9.js → p-38ac5715.js} +2 -2
- package/dist/arcgis-coding-components/{p-41c932b5.js → p-4926ce1a.js} +3 -3
- package/dist/arcgis-coding-components/p-5a153155.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-38534c31.js → p-5ebbf307.js} +3 -3
- package/dist/arcgis-coding-components/{p-8c6a6176.js → p-64a223f6.js} +3 -3
- package/dist/arcgis-coding-components/p-67743b19.js +6 -0
- package/dist/arcgis-coding-components/p-81daa81b.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-14ab3ed5.js → p-8becedb9.js} +1 -1
- package/dist/arcgis-coding-components/{p-2a7ef2fd.js → p-9327da9f.js} +2 -2
- package/dist/arcgis-coding-components/{p-e11999af.js → p-a95711a0.js} +2 -2
- package/dist/arcgis-coding-components/{p-19b4f0e9.js → p-b53816d4.js} +2 -2
- package/dist/arcgis-coding-components/{p-022df536.js → p-d1bfcb69.js} +1 -1
- package/dist/arcgis-coding-components/p-ec5b9ea3.entry.js +6 -0
- package/dist/arcgis-coding-components/p-eca30e5b.js +6 -0
- package/dist/arcgis-coding-components/p-eee3ff96.js +7 -0
- package/dist/arcgis-coding-components/p-f9d23ea0.js +6 -0
- package/dist/cjs/{app-globals-8991f48d.js → app-globals-f4c1e97c.js} +1 -1
- package/dist/cjs/arcade-defaults-ec32f7d1.js +350 -0
- package/dist/cjs/{arcade-mode-ee5f5a57.js → arcade-mode-532caf55.js} +18 -5
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +59 -103
- package/dist/cjs/arcgis-coding-components.cjs.js +5 -5
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +32 -11
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +16 -10
- package/dist/cjs/{css-c0ad88d7.js → css-498723df.js} +1 -1
- package/dist/cjs/{cssMode-deeb6f90.js → cssMode-2def57fb.js} +2 -3
- package/dist/cjs/{html-be08d94a.js → html-54a71c36.js} +2 -3
- package/dist/cjs/{htmlMode-f5b8239a.js → htmlMode-3a79512a.js} +2 -3
- package/dist/cjs/{index-358de60d.js → index-8f53c170.js} +203 -156
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-37d3d13f.js → javascript-67d269fa.js} +3 -4
- package/dist/cjs/{jsonMode-12a2a091.js → jsonMode-46d9bccc.js} +2 -3
- package/dist/cjs/{language-defaults-base-1f082ad7.js → language-defaults-base-337abff1.js} +812 -1036
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{sql-expr-defaults-dca57c68.js → sql-expr-defaults-c246fecf.js} +226 -75
- package/dist/cjs/sql-expr-mode-58361d32.js +480 -0
- package/dist/cjs/{tsMode-d33a7021.js → tsMode-0032d144.js} +2 -3
- package/dist/cjs/{typescript-f3be2ce7.js → typescript-e84c6b80.js} +2 -3
- package/dist/components/arcade-defaults.js +239 -4
- package/dist/components/arcade-mode.js +18 -4
- package/dist/components/arcade-results.js +3 -3
- package/dist/components/arcade-suggestions.js +2 -2
- package/dist/components/arcade-variables.js +2 -2
- package/dist/components/arcgis-arcade-editor.js +21 -13
- 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 +26 -26
- package/dist/components/arcgis-assets.js +2 -2
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +33 -11
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/{chunk-3IUJHIAA.js → chunk-WEX2VUZV.js} +87 -92
- package/dist/components/code-editor.js +17 -23
- package/dist/components/fields.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +4 -4
- package/dist/components/language-api-panel.js +22 -4
- package/dist/components/language-defaults-base.js +61 -287
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +77 -24
- package/dist/components/sql-expr-mode.js +294 -24950
- package/dist/components/sql-expression-fields.js +15 -8
- package/dist/components/useT9n.js +41 -2
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-3e4e0353.js → app-globals-fa265627.js} +1 -1
- package/dist/esm/arcade-defaults-337657fa.js +345 -0
- package/dist/esm/{arcade-mode-4a83348d.js → arcade-mode-a63523c8.js} +18 -5
- package/dist/esm/arcgis-arcade-editor_6.entry.js +55 -99
- package/dist/esm/arcgis-coding-components.js +6 -6
- package/dist/esm/arcgis-sql-expression-editor.entry.js +32 -11
- package/dist/esm/arcgis-sql-expression-fields.entry.js +16 -10
- package/dist/esm/{css-bad8d1c3.js → css-d85cb176.js} +1 -1
- package/dist/esm/{cssMode-68a5f601.js → cssMode-d79695ab.js} +2 -3
- package/dist/esm/{html-9b27df1a.js → html-16fb0022.js} +2 -3
- package/dist/esm/{htmlMode-361ad282.js → htmlMode-cb57ceed.js} +2 -3
- package/dist/esm/{index-8a552796.js → index-ebdb3a18.js} +203 -156
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-8004e14f.js → javascript-ae8e86d4.js} +3 -4
- package/dist/esm/{jsonMode-91a0be74.js → jsonMode-06c411fd.js} +2 -3
- package/dist/esm/{language-defaults-base-df906b3d.js → language-defaults-base-5dfd6f32.js} +809 -1036
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{sql-expr-defaults-ae0be602.js → sql-expr-defaults-f324cf8f.js} +225 -74
- package/dist/esm/sql-expr-mode-f606957e.js +476 -0
- package/dist/esm/{tsMode-2756c213.js → tsMode-2114c9fd.js} +2 -3
- package/dist/esm/{typescript-1aaf3ddd.js → typescript-b771d29f.js} +2 -3
- package/dist/loader/cdn.js +2 -3
- package/dist/loader/index.cjs.js +2 -3
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +2 -3
- package/dist/loader/index.js +2 -3
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +16 -5
- package/dist/types/components/code-editor/code-editor.d.ts +14 -4
- package/dist/types/components/language-api-panel/language-api-panel.d.ts +1 -0
- package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +31 -3
- package/dist/types/components/sql-expression-fields/sql-expression-fields.d.ts +17 -0
- package/dist/types/components.d.ts +40 -13
- package/dist/types/data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
- package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +8 -1
- package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +5 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +1 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -0
- package/dist/types/utils/arcade-monaco/arcade-profile-strategy.d.ts +9 -0
- package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +6 -0
- package/dist/types/utils/fields.d.ts +2 -2
- package/dist/types/utils/profile/editor-profile.d.ts +7 -6
- package/dist/types/utils/profile/types.d.ts +28 -0
- package/dist/types/utils/profile/utils.d.ts +5 -1
- package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +56 -5
- package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +61 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +1 -11
- package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +0 -1
- package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +18 -534
- package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +34 -1
- package/dist/types/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +30 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +19 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -7
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +73 -77
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +5 -6
- package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +8 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +11 -8
- package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +13 -0
- package/dist/types/utils/sql-expr-monaco/types.d.ts +30 -28
- package/package.json +19 -19
- package/dist/arcgis-coding-components/p-1baf3624.entry.js +0 -6
- package/dist/arcgis-coding-components/p-8e61744c.js +0 -68
- package/dist/arcgis-coding-components/p-933de2b5.entry.js +0 -6
- package/dist/arcgis-coding-components/p-9dfc06ea.js +0 -6
- package/dist/arcgis-coding-components/p-a536144e.js +0 -6
- package/dist/arcgis-coding-components/p-cd67026d.js +0 -6
- package/dist/arcgis-coding-components/p-d7e83ea1.entry.js +0 -6
- package/dist/arcgis-coding-components/p-e055c041.js +0 -6
- package/dist/arcgis-coding-components/p-f1fab45e.js +0 -7
- package/dist/cjs/arcade-defaults-2d36c400.js +0 -116
- package/dist/cjs/sql-expr-mode-c644220d.js +0 -25135
- package/dist/esm/arcade-defaults-1adb5004.js +0 -111
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/sql-expr-mode-1821b2b9.js +0 -25132
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
- package/dist/types/utils/profile/predefined-profile.d.ts +0 -4
- package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +0 -41
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +0 -16
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +0 -26
- package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +0 -37
- package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +0 -11
- package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +0 -122
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +0 -5
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +0 -18
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +0 -6
- package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +0 -156
- package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +0 -150
- package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +0 -1397
- package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +0 -59
- package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +0 -295
- package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +0 -135
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +0 -3
- package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +0 -2
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/sql-expression-editor/sql-expression-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -0
- /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -0
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.61
|
|
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-ebdb3a18.js';
|
|
7
|
+
export { s as setNonce } from './index-ebdb3a18.js';
|
|
8
|
+
import { g as globalScripts } from './app-globals-fa265627.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-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"],"
|
|
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"],"editorOptions":[16],"editorInstance":[16],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]},null,{"language":["languagePropChange"],"modelId":["modelIdPropChange"],"editorOptions":["editorOptionsPropChange"]}],[1,"arcgis-language-api-panel",{"hideDocumentationActions":[4,"hide-documentation-actions"],"loading":[4],"apiLibrary":[16],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"apiLibrary":["_apiLibraryChanged"]}]]],["arcgis-sql-expression-editor",[[0,"arcgis-sql-expression-editor",{"profile":[16],"script":[1025],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32],"messages":[32]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"]}]]]], options);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { defineCustomElements };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.61
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { B as isNotUndefined, D as Deferred, C as safeAsyncCall, F as devToolsAwareTimeout, G as safeCall, H as startLocaleObserver, J as getElementLocales, f as fieldsToProfileValues, i as isPredefinedProfile, b as isFeatureSetDefinition, m as main, L as LanguageDefaultsBase, d as fetchT9nStringsBundle, E as EditorProfile, U as Uri } from './language-defaults-base-5dfd6f32.js';
|
|
7
|
+
import { g as getAssetPath } from './index-ebdb3a18.js';
|
|
8
8
|
|
|
9
9
|
// src/framework.ts
|
|
10
10
|
function retrieveComponentMembers(component, isLit) {
|
|
@@ -16,7 +16,7 @@ function retrieveComponentMembers(component, isLit) {
|
|
|
16
16
|
([name, descriptor]) => descriptor.noAccessor ? void 0 : [
|
|
17
17
|
name,
|
|
18
18
|
[
|
|
19
|
-
(descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ :
|
|
19
|
+
(descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ : 16 /* Unknown */)
|
|
20
20
|
]
|
|
21
21
|
]
|
|
22
22
|
).filter(isNotUndefined)
|
|
@@ -146,6 +146,7 @@ var shouldBypass = {
|
|
|
146
146
|
};
|
|
147
147
|
var elementToInstance = /* @__PURE__ */ new WeakMap();
|
|
148
148
|
var _a;
|
|
149
|
+
_a = controllerSymbol;
|
|
149
150
|
var Controller = class {
|
|
150
151
|
constructor(component) {
|
|
151
152
|
this._callbacks = {
|
|
@@ -161,8 +162,8 @@ var Controller = class {
|
|
|
161
162
|
this._ready = new Deferred();
|
|
162
163
|
this._lifecycleCleanups = [];
|
|
163
164
|
this.connectedCalled = false;
|
|
164
|
-
this.
|
|
165
|
-
this.
|
|
165
|
+
this._loadCalled = false;
|
|
166
|
+
this.loadedCalled = false;
|
|
166
167
|
this[_a] = true;
|
|
167
168
|
this.ready = this._ready.promise;
|
|
168
169
|
/*
|
|
@@ -194,12 +195,12 @@ var Controller = class {
|
|
|
194
195
|
if (!connectedWillStillHappen && !this.connectedCalled) {
|
|
195
196
|
this.triggerConnected();
|
|
196
197
|
}
|
|
197
|
-
const loadWillStillHappen = !manager.
|
|
198
|
+
const loadWillStillHappen = !manager._loadCalled;
|
|
198
199
|
if (loadWillStillHappen) {
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
201
202
|
this.triggerLoad().then(() => {
|
|
202
|
-
const loadedWillStillHappen = !manager.
|
|
203
|
+
const loadedWillStillHappen = !manager.loadedCalled;
|
|
203
204
|
if (loadedWillStillHappen) {
|
|
204
205
|
return;
|
|
205
206
|
}
|
|
@@ -341,10 +342,10 @@ var Controller = class {
|
|
|
341
342
|
}
|
|
342
343
|
/** @internal */
|
|
343
344
|
async triggerLoad() {
|
|
344
|
-
if (this.
|
|
345
|
+
if (this._loadCalled) {
|
|
345
346
|
return;
|
|
346
347
|
}
|
|
347
|
-
this.
|
|
348
|
+
this._loadCalled = true;
|
|
348
349
|
const genericController = this;
|
|
349
350
|
if (genericController.hostLoad) {
|
|
350
351
|
await safeAsyncCall(genericController.hostLoad, genericController);
|
|
@@ -356,7 +357,7 @@ var Controller = class {
|
|
|
356
357
|
}
|
|
357
358
|
/** @internal */
|
|
358
359
|
triggerLoaded() {
|
|
359
|
-
if (this.
|
|
360
|
+
if (this.loadedCalled) {
|
|
360
361
|
return;
|
|
361
362
|
}
|
|
362
363
|
const genericController = this;
|
|
@@ -364,7 +365,7 @@ var Controller = class {
|
|
|
364
365
|
safeCall(genericController.hostLoaded, genericController);
|
|
365
366
|
}
|
|
366
367
|
this._callbacks.hostLoaded.forEach(safeCall);
|
|
367
|
-
this.
|
|
368
|
+
this.loadedCalled = true;
|
|
368
369
|
}
|
|
369
370
|
/** @internal */
|
|
370
371
|
triggerUpdate(changedProperties) {
|
|
@@ -411,7 +412,6 @@ var Controller = class {
|
|
|
411
412
|
});
|
|
412
413
|
}
|
|
413
414
|
};
|
|
414
|
-
_a = controllerSymbol;
|
|
415
415
|
function callUpdate(callback) {
|
|
416
416
|
safeCall(callback, void 0, this);
|
|
417
417
|
}
|
|
@@ -420,9 +420,9 @@ function makeProvisionalValue(base) {
|
|
|
420
420
|
if (typeof base !== "object" && typeof base !== "function" || base === null) {
|
|
421
421
|
return base;
|
|
422
422
|
}
|
|
423
|
-
const
|
|
423
|
+
const proxy = new Proxy(base, {
|
|
424
424
|
get(target, prop, receiver) {
|
|
425
|
-
if (cyclical.has(prop) && prop in target && target[prop] ===
|
|
425
|
+
if (cyclical.has(prop) && prop in target && target[prop] === proxy) {
|
|
426
426
|
return void 0;
|
|
427
427
|
}
|
|
428
428
|
if (prop in target || prop in Promise.prototype || typeof prop === "symbol") {
|
|
@@ -434,7 +434,7 @@ function makeProvisionalValue(base) {
|
|
|
434
434
|
return Reflect.set(target, prop, newValue, receiver);
|
|
435
435
|
}
|
|
436
436
|
});
|
|
437
|
-
return
|
|
437
|
+
return proxy;
|
|
438
438
|
}
|
|
439
439
|
var cyclical = /* @__PURE__ */ new Set(["exports", "_exports"]);
|
|
440
440
|
function toControllerHost(component) {
|
|
@@ -501,14 +501,35 @@ function watch(component, property, callback) {
|
|
|
501
501
|
var ComponentInternals = class {
|
|
502
502
|
constructor(component) {
|
|
503
503
|
/**
|
|
504
|
-
* When watchers are set, set
|
|
505
|
-
* in the setter, read from `enabledWatchers`.
|
|
506
|
-
*
|
|
507
|
-
*
|
|
504
|
+
* When watchers are set, they are set into `allWatchers`. When watchers are
|
|
505
|
+
* read in the setter, they are read from `enabledWatchers`.
|
|
506
|
+
*
|
|
507
|
+
* In Stencil, on connectedCallback(), controller manager does
|
|
508
|
+
* `enabledWatchers=allWatchers`. Reasoning:
|
|
508
509
|
* - This disables watchers until connected callback (matches behavior of
|
|
509
510
|
* Stencil's watchers)
|
|
510
|
-
* - This removes
|
|
511
|
-
* not (as getters/setters are hot path, and should
|
|
511
|
+
* - This removes the need for a check in the setter for whether the watchers
|
|
512
|
+
* were enabled already or not (as getters/setters are hot path, and should
|
|
513
|
+
* be streamlined)
|
|
514
|
+
*
|
|
515
|
+
* In Lit, we set enabledWatchers to allWatchers in the constructor.
|
|
516
|
+
* Reasoning:
|
|
517
|
+
* - While in Stencil all user provided properties are either set before the
|
|
518
|
+
* component constructor (this is possible since Stencil's props store is
|
|
519
|
+
* externalized) or after connectedCallback, in Lit the properties may be
|
|
520
|
+
* set by attributeChangedCallback before connectedCallback. Thus, we need
|
|
521
|
+
* to enable watchers even before connectedCallback.
|
|
522
|
+
* - This means, that a watcher set for some prop before your component got
|
|
523
|
+
* a chance to set the default value will trigger the watcher when the
|
|
524
|
+
* default value is set - but, that is inline with Lit's willUpdate behavior
|
|
525
|
+
* of triggering for default values AND, the only way to set a watcher
|
|
526
|
+
* before default value is if you called watcher inside a controller. For
|
|
527
|
+
* now, there are no controllers written outside of arcgis-map-components
|
|
528
|
+
* package, so I was able to verify that this change would have no
|
|
529
|
+
* negative impact.
|
|
530
|
+
*
|
|
531
|
+
* In either way, I plan to remove watchers from controllers once Stencil
|
|
532
|
+
* support is removed.
|
|
512
533
|
*/
|
|
513
534
|
this.enabledWatchers = {};
|
|
514
535
|
this.allWatchers = {};
|
|
@@ -586,7 +607,10 @@ var ComponentInternals = class {
|
|
|
586
607
|
_getSetProxy(prototype, name2, type) {
|
|
587
608
|
const component = this.component;
|
|
588
609
|
const propType = getMemberType(component, name2);
|
|
589
|
-
|
|
610
|
+
let descriptor;
|
|
611
|
+
do {
|
|
612
|
+
descriptor = Object.getOwnPropertyDescriptor(prototype, name2);
|
|
613
|
+
} while (!descriptor && (prototype = Object.getPrototypeOf(prototype)));
|
|
590
614
|
if (!descriptor) {
|
|
591
615
|
return void 0;
|
|
592
616
|
}
|
|
@@ -594,11 +618,11 @@ var ComponentInternals = class {
|
|
|
594
618
|
const originalSet = descriptor.set;
|
|
595
619
|
const isGetterAlreadyOverwritten = customAccessor in originalGet;
|
|
596
620
|
const isSetterAlreadyOverwritten = customAccessor in originalSet;
|
|
597
|
-
|
|
598
|
-
const shouldOverwriteSet = !isSetterAlreadyOverwritten;
|
|
599
|
-
if (!shouldOverwriteGet && !shouldOverwriteSet) {
|
|
621
|
+
if (isGetterAlreadyOverwritten && isSetterAlreadyOverwritten) {
|
|
600
622
|
return;
|
|
601
623
|
}
|
|
624
|
+
const shouldOverwriteGet = !isGetterAlreadyOverwritten;
|
|
625
|
+
const shouldOverwriteSet = !isSetterAlreadyOverwritten;
|
|
602
626
|
const finalGetter = shouldOverwriteGet ? function getter() {
|
|
603
627
|
let value = originalGet.call(this);
|
|
604
628
|
const component2 = elementToInstance.get(this);
|
|
@@ -620,10 +644,20 @@ var ComponentInternals = class {
|
|
|
620
644
|
originalSet.call(this, rawNewValue);
|
|
621
645
|
return;
|
|
622
646
|
}
|
|
623
|
-
let newValue = component2.manager.isLit ?
|
|
647
|
+
let newValue = component2.manager.isLit ? (
|
|
648
|
+
/*
|
|
649
|
+
* Cast `null` to `undefined`. Reasons:
|
|
650
|
+
* - component can declare properties simply using
|
|
651
|
+
* `@property() name?: string;` and get accurate typings,
|
|
652
|
+
* without being forced to use
|
|
653
|
+
* `@property() name?: string | Nil;`.
|
|
654
|
+
* - simplifies checks in the code and thus reduces bugs
|
|
655
|
+
*/
|
|
656
|
+
rawNewValue ?? void 0
|
|
657
|
+
) : parsePropertyValue(rawNewValue, propType);
|
|
624
658
|
const internals = component2.manager.internals;
|
|
625
659
|
if (newValue === oldValue) {
|
|
626
|
-
originalSet.call(this,
|
|
660
|
+
originalSet.call(this, newValue);
|
|
627
661
|
} else {
|
|
628
662
|
const setters = shouldBypass.setter ? emptyArray : internals.setters[name2] ?? emptyArray;
|
|
629
663
|
for (let i = 0; i < setters.length; i++) {
|
|
@@ -684,7 +718,7 @@ var ControllerManager = class extends GenericController {
|
|
|
684
718
|
const controllers = /* @__PURE__ */ new Set();
|
|
685
719
|
function addController(controller) {
|
|
686
720
|
controllers.add(controller);
|
|
687
|
-
if (
|
|
721
|
+
if (!(controllerSymbol in controller) && component.renderRoot && component.el.isConnected) {
|
|
688
722
|
controller.hostConnected?.();
|
|
689
723
|
}
|
|
690
724
|
}
|
|
@@ -711,9 +745,6 @@ var ControllerManager = class extends GenericController {
|
|
|
711
745
|
this._controllers = controllers;
|
|
712
746
|
this.exports = void 0;
|
|
713
747
|
this.hasDestroy = autoDestroyDisabledPropName in this.component && typeof this.component.destroy === "function";
|
|
714
|
-
if (this.hasDestroy) {
|
|
715
|
-
watch(component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
|
|
716
|
-
}
|
|
717
748
|
this._bindLifecycleMethods();
|
|
718
749
|
const internals = this.internals;
|
|
719
750
|
Object.keys(internals.members).forEach((name2) => {
|
|
@@ -721,7 +752,9 @@ var ControllerManager = class extends GenericController {
|
|
|
721
752
|
internals.accessorSetter[name2] = defaultGetterSetter;
|
|
722
753
|
internals.getSetProxy(name2);
|
|
723
754
|
});
|
|
724
|
-
if (
|
|
755
|
+
if (isLit) {
|
|
756
|
+
this.internals.enabledWatchers = this.internals.allWatchers;
|
|
757
|
+
} else {
|
|
725
758
|
Object.defineProperty(component, "updateComplete", {
|
|
726
759
|
get: async () => await this._updatePromise.promise
|
|
727
760
|
});
|
|
@@ -738,13 +771,13 @@ var ControllerManager = class extends GenericController {
|
|
|
738
771
|
const isStencilDistBuild = component.el === component;
|
|
739
772
|
this._originalLifecycles = {
|
|
740
773
|
// These component's callbacks will be called by Lit, so we don't have to
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
774
|
+
_connectedCallback: isLit || isStencilDistBuild ? void 0 : component.connectedCallback,
|
|
775
|
+
_disconnectedCallback: isLit || isStencilDistBuild ? void 0 : component.disconnectedCallback,
|
|
776
|
+
_load: isLit ? component.load : component.componentWillLoad,
|
|
777
|
+
_loaded: isLit ? component.loaded : component.componentDidLoad,
|
|
778
|
+
_willUpdate: isLit ? void 0 : component.componentWillUpdate,
|
|
779
|
+
_updated: isLit ? void 0 : component.componentDidUpdate,
|
|
780
|
+
_destroy: component.destroy
|
|
748
781
|
};
|
|
749
782
|
const hostConnected = this._connectedCallback.bind(this);
|
|
750
783
|
const hostDisconnected = this._disconnectedCallback.bind(this);
|
|
@@ -793,7 +826,7 @@ var ControllerManager = class extends GenericController {
|
|
|
793
826
|
keyTrackResolve();
|
|
794
827
|
internals.enableReadonly?.();
|
|
795
828
|
this._controllers.forEach(callConnected);
|
|
796
|
-
this._originalLifecycles.
|
|
829
|
+
this._originalLifecycles._connectedCallback?.call(this.component);
|
|
797
830
|
}
|
|
798
831
|
/** @internal */
|
|
799
832
|
_disconnectedCallback() {
|
|
@@ -801,7 +834,7 @@ var ControllerManager = class extends GenericController {
|
|
|
801
834
|
return;
|
|
802
835
|
}
|
|
803
836
|
this._controllers.forEach(callDisconnected);
|
|
804
|
-
this._originalLifecycles.
|
|
837
|
+
this._originalLifecycles._disconnectedCallback?.call(this.component);
|
|
805
838
|
if (this.hasDestroy) {
|
|
806
839
|
this._setAutoDestroyTimeout();
|
|
807
840
|
}
|
|
@@ -819,22 +852,25 @@ var ControllerManager = class extends GenericController {
|
|
|
819
852
|
}
|
|
820
853
|
}
|
|
821
854
|
await Promise.allSettled(Array.from(this._controllers, callLoad, integrations));
|
|
822
|
-
await this._originalLifecycles.
|
|
855
|
+
await this._originalLifecycles._load?.call(this.component);
|
|
856
|
+
if (this.hasDestroy) {
|
|
857
|
+
watch(this.component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
|
|
858
|
+
}
|
|
823
859
|
}
|
|
824
860
|
/** @internal */
|
|
825
861
|
_loaded() {
|
|
826
862
|
this._controllers.forEach(callLoaded);
|
|
827
|
-
this._originalLifecycles.
|
|
863
|
+
this._originalLifecycles._loaded?.call(this.component);
|
|
828
864
|
}
|
|
829
865
|
_update() {
|
|
830
866
|
const changedProperties = this.component.changedProperties;
|
|
831
867
|
this._controllers.forEach(callUpdate2, changedProperties);
|
|
832
|
-
|
|
868
|
+
this._originalLifecycles._willUpdate?.call(this.component);
|
|
833
869
|
}
|
|
834
870
|
_updated() {
|
|
835
871
|
const maybeLitComponent = this.component;
|
|
836
872
|
this._controllers.forEach(callUpdated, maybeLitComponent.changedProperties);
|
|
837
|
-
this._originalLifecycles.
|
|
873
|
+
this._originalLifecycles._updated?.call(this.component);
|
|
838
874
|
if (this.isLit) {
|
|
839
875
|
maybeLitComponent.changedProperties = /* @__PURE__ */ new Map();
|
|
840
876
|
} else {
|
|
@@ -859,13 +895,13 @@ var ControllerManager = class extends GenericController {
|
|
|
859
895
|
this.destroyed = true;
|
|
860
896
|
this._controllers.forEach(callDestroy);
|
|
861
897
|
this._controllers.clear();
|
|
862
|
-
await this._originalLifecycles.
|
|
898
|
+
await this._originalLifecycles._destroy?.call(this.component);
|
|
863
899
|
}
|
|
864
900
|
_setAutoDestroyTimeout() {
|
|
901
|
+
if (this._autoDestroyTimeout !== void 0) {
|
|
902
|
+
clearTimeout(this._autoDestroyTimeout);
|
|
903
|
+
}
|
|
865
904
|
if (!this.component.el.isConnected && !this.component.autoDestroyDisabled) {
|
|
866
|
-
if (this._autoDestroyTimeout !== void 0) {
|
|
867
|
-
clearTimeout(this._autoDestroyTimeout);
|
|
868
|
-
}
|
|
869
905
|
const destroy = () => void this.destroy().catch(console.error);
|
|
870
906
|
{
|
|
871
907
|
this._autoDestroyTimeout = devToolsAwareTimeout(destroy, autoDestroyOnDisconnectTimeout);
|
|
@@ -947,7 +983,7 @@ function trackKey(hostsCandidates, onResolved, defaultValue) {
|
|
|
947
983
|
const resolved = (resolution) => {
|
|
948
984
|
leftToResolve -= 1;
|
|
949
985
|
if (resolution !== void 0) {
|
|
950
|
-
leftToResolve = 0;
|
|
986
|
+
leftToResolve = Math.min(leftToResolve, 0);
|
|
951
987
|
}
|
|
952
988
|
if (leftToResolve === 0) {
|
|
953
989
|
onResolved(resolution);
|
|
@@ -996,8 +1032,7 @@ function getSet(defaultValue, getSet2) {
|
|
|
996
1032
|
const genericComponent = component;
|
|
997
1033
|
const value = genericComponent[name2];
|
|
998
1034
|
const isStencilHotReload = "production" !== "production" ;
|
|
999
|
-
|
|
1000
|
-
if (value != null && value !== defaultValue && typeof getSet2.set === "function" && initialSet && !isStencilHotReload) {
|
|
1035
|
+
if (value != null && value !== defaultValue && typeof getSet2.set === "function" && !isStencilHotReload) {
|
|
1001
1036
|
const newValue = getSet2.set(value, defaultValue, name2);
|
|
1002
1037
|
if (newValue !== value) {
|
|
1003
1038
|
if (manager.isLit) {
|
|
@@ -1151,7 +1186,120 @@ var FunctionalController = class extends Controller {
|
|
|
1151
1186
|
}
|
|
1152
1187
|
};
|
|
1153
1188
|
var proxy = proxyExports(FunctionalController);
|
|
1189
|
+
var makeT9nController = (getAssetPath) => (options = {}) => (
|
|
1190
|
+
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
|
1191
|
+
makeController((component, controller) => {
|
|
1192
|
+
const componentWithOverrides = component;
|
|
1193
|
+
controller.onLifecycle(
|
|
1194
|
+
() => startLocaleObserver(
|
|
1195
|
+
component.el,
|
|
1196
|
+
getAssetPath("./assets"),
|
|
1197
|
+
({ t9nLocale, t9nStrings, lang }) => {
|
|
1198
|
+
const withoutOverrides = {
|
|
1199
|
+
...t9nStrings,
|
|
1200
|
+
_lang: lang,
|
|
1201
|
+
_t9nLocale: t9nLocale,
|
|
1202
|
+
_loading: false
|
|
1203
|
+
};
|
|
1204
|
+
controller.exports = withoutOverrides;
|
|
1205
|
+
const label = t9nStrings.componentLabel ?? t9nStrings.widgetLabel;
|
|
1206
|
+
if (typeof label === "string" && "label" in component && component.label == null) {
|
|
1207
|
+
component.label ?? (component.label = label);
|
|
1208
|
+
}
|
|
1209
|
+
applyOverrides(componentWithOverrides.messageOverrides);
|
|
1210
|
+
},
|
|
1211
|
+
options.name
|
|
1212
|
+
)
|
|
1213
|
+
);
|
|
1214
|
+
function applyOverrides(messageOverrides) {
|
|
1215
|
+
const currentValue = controller.exports;
|
|
1216
|
+
const rawMessages = currentValue._original ?? currentValue;
|
|
1217
|
+
const updated = deepMerge(rawMessages, messageOverrides);
|
|
1218
|
+
updated._original = rawMessages;
|
|
1219
|
+
controller.exports = updated;
|
|
1220
|
+
}
|
|
1221
|
+
if ("messageOverrides" in componentWithOverrides) {
|
|
1222
|
+
controller.onLifecycle(() => watch(componentWithOverrides, "messageOverrides", applyOverrides));
|
|
1223
|
+
}
|
|
1224
|
+
if (options.blocking) {
|
|
1225
|
+
return controller.ready;
|
|
1226
|
+
}
|
|
1227
|
+
const locale = getElementLocales(component.el);
|
|
1228
|
+
const pending = {
|
|
1229
|
+
_lang: locale.lang,
|
|
1230
|
+
_t9nLocale: locale.t9nLocale,
|
|
1231
|
+
_loading: true
|
|
1232
|
+
};
|
|
1233
|
+
return pending;
|
|
1234
|
+
})
|
|
1235
|
+
);
|
|
1236
|
+
function deepMerge(original, overwrites) {
|
|
1237
|
+
if (!overwrites) {
|
|
1238
|
+
return original;
|
|
1239
|
+
}
|
|
1240
|
+
const merged = { ...original };
|
|
1241
|
+
Object.entries(overwrites).forEach(([key, value]) => {
|
|
1242
|
+
if (typeof value === "object") {
|
|
1243
|
+
merged[key] = deepMerge(original[key], value);
|
|
1244
|
+
} else {
|
|
1245
|
+
merged[key] = value ?? original[key];
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1248
|
+
return merged;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
const useT9n = makeT9nController(getAssetPath);
|
|
1154
1252
|
|
|
1253
|
+
// #region convert editor profile to apiProfile
|
|
1254
|
+
/**
|
|
1255
|
+
* Converts an editor profile to an api profile.
|
|
1256
|
+
* The api profile is an optimized version of the editor profile designed for minimal data transfer between the main thread and the worker.
|
|
1257
|
+
*/
|
|
1258
|
+
const sqlExprEditorToApiProfile = (editorProfile) => {
|
|
1259
|
+
const { apiVersion, bundles, hiddenApiItems } = editorProfile.toEditorProfileDefinition();
|
|
1260
|
+
const variable = editorProfile.variables[0];
|
|
1261
|
+
if (!variable || !(variable.type === "featureSet")) {
|
|
1262
|
+
throw Error("No variable found in the editor profile");
|
|
1263
|
+
}
|
|
1264
|
+
const hydratedVariable = variableToApiProfile(variable);
|
|
1265
|
+
return {
|
|
1266
|
+
apiVersion,
|
|
1267
|
+
bundles,
|
|
1268
|
+
variables: [hydratedVariable],
|
|
1269
|
+
hiddenApiItems: hiddenApiItems?.map((s) => s.toLowerCase()),
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
function variableToApiProfile(variable) {
|
|
1273
|
+
const { name } = variable;
|
|
1274
|
+
const description = variable.getDescription();
|
|
1275
|
+
const { definition } = variable.toProfileVariableDefinition();
|
|
1276
|
+
const resultCompletion = {
|
|
1277
|
+
label: name,
|
|
1278
|
+
detail: name,
|
|
1279
|
+
insertText: name,
|
|
1280
|
+
insertTextMode: main.exports.InsertTextMode.asIs,
|
|
1281
|
+
insertTextFormat: main.exports.InsertTextFormat.PlainText,
|
|
1282
|
+
kind: main.exports.CompletionItemKind.Field,
|
|
1283
|
+
};
|
|
1284
|
+
const result = {
|
|
1285
|
+
name,
|
|
1286
|
+
description,
|
|
1287
|
+
type: "dictionary",
|
|
1288
|
+
properties: [],
|
|
1289
|
+
completion: resultCompletion,
|
|
1290
|
+
};
|
|
1291
|
+
// No fields or definition, then it will be a feature without any known fields
|
|
1292
|
+
if (!definition || !("fields" in definition)) {
|
|
1293
|
+
return result;
|
|
1294
|
+
}
|
|
1295
|
+
// Create properties for the fields
|
|
1296
|
+
// Also improve the feature completion documentation
|
|
1297
|
+
// TODO: should we add aliases to completion? what about domains?
|
|
1298
|
+
const [properties, featureCompletionDescription] = fieldsToProfileValues(definition.fields, description);
|
|
1299
|
+
result.properties = properties;
|
|
1300
|
+
resultCompletion.documentation = { kind: "markdown", value: featureCompletionDescription };
|
|
1301
|
+
return result;
|
|
1302
|
+
}
|
|
1155
1303
|
const tempHardcodedProfile = {
|
|
1156
1304
|
en: {
|
|
1157
1305
|
id: "field-calculation",
|
|
@@ -1200,16 +1348,28 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
|
|
|
1200
1348
|
});
|
|
1201
1349
|
return editorProfile;
|
|
1202
1350
|
}
|
|
1351
|
+
// #endregion
|
|
1203
1352
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1353
|
+
/**
|
|
1354
|
+
* Returns the sql-expression worker for the model.
|
|
1355
|
+
* Example:
|
|
1356
|
+
* ```ts
|
|
1357
|
+
* const sqlExpressionWorker = await getSqlExpressionWorker(model.uri);
|
|
1358
|
+
* ```
|
|
1359
|
+
* @returns sql-expression worker
|
|
1360
|
+
*/
|
|
1361
|
+
async function getSqlExprWorker(uri) {
|
|
1362
|
+
const mode = await getMode();
|
|
1363
|
+
return await mode.getSqlExprWorker(uri);
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Request the sql-expression mode
|
|
1367
|
+
* @returns sql-expression mode module
|
|
1368
|
+
*/
|
|
1369
|
+
async function getMode() {
|
|
1370
|
+
return await import('./sql-expr-mode-f606957e.js');
|
|
1371
|
+
}
|
|
1207
1372
|
|
|
1208
|
-
// const defaultContext: ApiContext = {
|
|
1209
|
-
// locale: "en",
|
|
1210
|
-
// };
|
|
1211
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
1212
|
-
const apiPathTemplate = "${assetsPath}/api/sql-expression-api.t9n.${locale}.json";
|
|
1213
1373
|
const languageId = "arcgis-sql-expression";
|
|
1214
1374
|
class SqlExprDefaults extends LanguageDefaultsBase {
|
|
1215
1375
|
constructor() {
|
|
@@ -1222,7 +1382,6 @@ class SqlExprDefaults extends LanguageDefaultsBase {
|
|
|
1222
1382
|
updateFeatureLayerForModel(modelId, layer) {
|
|
1223
1383
|
const key = this._getApiKey(modelId);
|
|
1224
1384
|
this._layerMap.set(key, layer);
|
|
1225
|
-
this._onDidChange.fire(this);
|
|
1226
1385
|
}
|
|
1227
1386
|
setLanguageOptions(languageOptions) {
|
|
1228
1387
|
this._languageOptions = languageOptions;
|
|
@@ -1245,7 +1404,7 @@ class SqlExprDefaults extends LanguageDefaultsBase {
|
|
|
1245
1404
|
const key = this._getApiKey(modelId);
|
|
1246
1405
|
const editorProfile = new EditorProfile(definition, intlStrings);
|
|
1247
1406
|
this._profileMap.set(key, editorProfile);
|
|
1248
|
-
const apiProfile =
|
|
1407
|
+
const apiProfile = sqlExprEditorToApiProfile(editorProfile);
|
|
1249
1408
|
this.updateApiContextForModel(modelId, {
|
|
1250
1409
|
locale: apiContext.locale,
|
|
1251
1410
|
profile: apiProfile,
|
|
@@ -1257,18 +1416,10 @@ class SqlExprDefaults extends LanguageDefaultsBase {
|
|
|
1257
1416
|
}
|
|
1258
1417
|
async getApiLibrary(modelId) {
|
|
1259
1418
|
const uri = Uri.parse(modelId);
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
service = new g({
|
|
1263
|
-
assetsPath: getAssetPath("./assets/sql-expression-editor"),
|
|
1264
|
-
languageId,
|
|
1265
|
-
apiPathTemplate,
|
|
1266
|
-
});
|
|
1267
|
-
this._apiService = service;
|
|
1268
|
-
}
|
|
1269
|
-
return await service.getApiLibrary(this.getApiContextForModel(uri));
|
|
1419
|
+
const worker = await getSqlExprWorker(uri);
|
|
1420
|
+
return await worker.getApiLibrary(this.getApiContextForModel(uri));
|
|
1270
1421
|
}
|
|
1271
1422
|
}
|
|
1272
1423
|
const sqlExprDefaults = new SqlExprDefaults();
|
|
1273
1424
|
|
|
1274
|
-
export {
|
|
1425
|
+
export { useT9n as a, getMode as b, getSet as g, sqlExprDefaults as s, useControllerManager as u };
|