@arcgis/coding-components 4.30.0 → 4.31.0-next.10
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 +3 -3
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +13 -13
- 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 +3 -3
- package/dist/arcgis-coding-components/p-025fda85.js +6 -0
- package/dist/arcgis-coding-components/{p-b7981062.js → p-02cae55d.js} +4 -4
- package/dist/arcgis-coding-components/p-193ac44f.js +6 -0
- package/dist/arcgis-coding-components/{p-ed5c78ce.js → p-22253750.js} +2 -2
- package/dist/arcgis-coding-components/p-4fc79a07.entry.js +6 -0
- package/dist/arcgis-coding-components/p-50484a4f.js +6 -0
- package/dist/arcgis-coding-components/p-6e28fd70.js +6 -0
- package/dist/arcgis-coding-components/p-7164c348.js +6 -0
- package/dist/arcgis-coding-components/p-767b17ee.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-69ef969a.js → p-790067b1.js} +11 -11
- package/dist/arcgis-coding-components/{p-e9510c84.js → p-8196fa73.js} +3 -3
- package/dist/arcgis-coding-components/{p-f40fe9c5.js → p-8cf09bcc.js} +2 -2
- package/dist/arcgis-coding-components/{p-ca3f5530.js → p-923858b5.js} +3 -3
- package/dist/arcgis-coding-components/{p-ae0db715.js → p-960aa9dc.js} +3 -3
- package/dist/arcgis-coding-components/p-9956a574.js +6 -0
- package/dist/arcgis-coding-components/{p-9770fb37.js → p-ab78d6c4.js} +4 -4
- package/dist/arcgis-coding-components/{p-e37595ba.js → p-ad75160d.js} +4 -4
- package/dist/arcgis-coding-components/{p-24fb1d11.js → p-da9431ba.js} +3 -3
- package/dist/arcgis-coding-components/p-f452d4b8.entry.js +6 -0
- package/dist/cjs/{app-globals-18ba6880.js → app-globals-bade840e.js} +2 -2
- package/dist/cjs/arcade-defaults-8b8d6c07.js +116 -0
- package/dist/cjs/arcade-language-features-747fb1da.js +274 -0
- package/dist/cjs/arcade-mode-dce44622.js +336 -0
- package/dist/cjs/{arcgis-arcade-api_6.cjs.entry.js → arcgis-arcade-editor_6.cjs.entry.js} +3806 -5154
- package/dist/cjs/arcgis-coding-components.cjs.js +5 -5
- 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-d8a65bb9.js → css-077ba0c5.js} +2 -2
- package/dist/cjs/{cssMode-07dbb853.js → cssMode-7f2030db.js} +5 -5
- package/dist/cjs/{html-bb10cced.js → html-e3a243e9.js} +5 -5
- package/dist/cjs/{htmlMode-7df0a09d.js → htmlMode-c273d6dc.js} +5 -5
- package/dist/cjs/{index-15bcce7e.js → index-37a86ff4.js} +12 -4
- package/dist/cjs/index.cjs.js +5 -4
- package/dist/cjs/{javascript-f0dbed11.js → javascript-7a33cca7.js} +5 -5
- package/dist/cjs/{jsonMode-9e54e9b7.js → jsonMode-6b4e0850.js} +5 -5
- package/dist/cjs/{arcade-defaults-d0931224.js → language-defaults-base-b32cb091.js} +88 -144
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/sql-expr-defaults-8a5834f3.js +1280 -0
- package/dist/cjs/sql-expr-mode-a72a1f92.js +21838 -0
- package/dist/cjs/{tsMode-ca28bc5f.js → tsMode-c2edcd57.js} +6 -6
- package/dist/cjs/{typescript-39540ed7.js → typescript-c50c5516.js} +5 -5
- package/dist/components/arcade-defaults.js +47 -1537
- package/dist/components/arcade-language-features.js +271 -0
- package/dist/components/arcade-mode.js +7 -267
- package/dist/components/arcade-results.js +7 -7
- package/dist/components/arcade-suggestions.js +8 -8
- package/dist/components/arcade-variables.js +7 -7
- package/dist/components/arcgis-arcade-editor.js +49 -50
- package/dist/components/arcgis-arcade-results.js +2 -2
- package/dist/components/arcgis-arcade-suggestions.js +2 -2
- package/dist/components/arcgis-arcade-variables.js +2 -2
- package/dist/components/arcgis-assets.d.ts +2 -2
- package/dist/components/arcgis-assets.js +3 -3
- package/dist/components/arcgis-code-editor.js +2 -2
- package/dist/components/arcgis-language-api-panel.d.ts +11 -0
- package/dist/components/arcgis-language-api-panel.js +11 -0
- 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-3IUJHIAA.js +1154 -0
- package/dist/components/code-editor.js +186 -17
- package/dist/components/fields.js +3 -3
- package/dist/components/index.js +2 -2
- package/dist/components/index2.js +31 -23
- package/dist/components/{arcade-api.js → language-api-panel.js} +29 -60
- package/dist/components/language-defaults-base.js +1535 -0
- package/dist/components/markdown.js +3 -3
- package/dist/components/sql-expr-defaults.js +131 -0
- package/dist/components/sql-expr-mode.js +21836 -0
- package/dist/components/sql-expression-fields.js +102 -0
- package/dist/components/useT9n.js +46 -9
- package/dist/components/utilities.js +2 -2
- package/dist/esm/{app-globals-2a0e9afb.js → app-globals-ed47e16d.js} +2 -2
- package/dist/esm/arcade-defaults-562fe19b.js +111 -0
- package/dist/esm/arcade-language-features-8edb3527.js +269 -0
- package/dist/esm/{arcade-mode-e9728a63.js → arcade-mode-ad036f46.js} +7 -266
- package/dist/esm/{arcgis-arcade-api_6.entry.js → arcgis-arcade-editor_6.entry.js} +3793 -5141
- package/dist/esm/arcgis-coding-components.js +6 -6
- 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-61c794c2.js → css-810518f1.js} +2 -2
- package/dist/esm/{cssMode-6e0ccd51.js → cssMode-a7208024.js} +4 -4
- package/dist/esm/{html-44ad432e.js → html-e187d7d8.js} +4 -4
- package/dist/esm/{htmlMode-fd336434.js → htmlMode-06b7bae2.js} +4 -4
- package/dist/esm/{index-0d124a57.js → index-3743d31f.js} +12 -4
- package/dist/esm/index.js +5 -4
- package/dist/esm/{javascript-ac057954.js → javascript-04a3f866.js} +5 -5
- package/dist/esm/{jsonMode-ea8fa529.js → jsonMode-ee8bb2ea.js} +4 -4
- package/dist/esm/{arcade-defaults-811bdd4d.js → language-defaults-base-52a397f5.js} +82 -142
- package/dist/esm/loader.js +6 -6
- package/dist/esm/sql-expr-defaults-f7c2d5ef.js +1274 -0
- package/dist/esm/sql-expr-mode-433b4a39.js +21835 -0
- package/dist/esm/{tsMode-af9c3001.js → tsMode-c80c462e.js} +4 -4
- package/dist/esm/{typescript-baec45d6.js → typescript-a9b8caa7.js} +4 -4
- package/dist/loader/cdn.js +2 -2
- package/dist/loader/index.cjs.js +2 -2
- package/dist/loader/index.es2017.js +2 -2
- package/dist/loader/index.js +2 -2
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +45 -10
- 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 +16 -5
- package/dist/types/components/language-api-panel/language-api-panel.d.ts +73 -0
- 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 +148 -70
- 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 +21 -0
- package/dist/types/utils/arcade-monaco/arcade-contribution.d.ts +1 -24
- package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +12 -49
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +6 -4
- package/dist/types/utils/arcade-monaco/arcade-mode.d.ts +3 -2
- package/dist/types/utils/arcade-monaco/arcade-service-accessors.d.ts +31 -0
- package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +3 -2
- package/dist/types/utils/arcade-monaco/arcade.worker.d.ts +5 -5
- package/dist/types/utils/arcade-monaco/types.d.ts +6 -35
- package/dist/types/utils/language-defaults-base.d.ts +69 -0
- package/dist/types/utils/profile/predefined-profile.d.ts +3 -1
- package/dist/types/utils/profile/types.d.ts +29 -69
- package/dist/types/utils/profile/utils.d.ts +4 -7
- 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 +6 -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 +61 -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 +23 -17
- package/dist/arcgis-coding-components/p-98cf909d.js +0 -6
- package/dist/arcgis-coding-components/p-bf047552.entry.js +0 -6
- package/dist/arcgis-coding-components/p-f602fc86.js +0 -6
- package/dist/cjs/arcade-mode-8424eafa.js +0 -595
- package/dist/components/arcade-contribution.js +0 -181
- package/dist/components/arcgis-arcade-api.d.ts +0 -11
- package/dist/components/arcgis-arcade-api.js +0 -11
- package/dist/components/chunk-2CDDVOQU.js +0 -1364
- package/dist/types/components/arcade-api/arcade-api.d.ts +0 -45
- package/dist/types/components/arcade-api/t9n-types.d.ts +0 -8
- 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/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.ar.json → language-api-panel/t9n/language-api-panel.t9n.ar.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.bg.json → language-api-panel/t9n/language-api-panel.t9n.bg.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.bs.json → language-api-panel/t9n/language-api-panel.t9n.bs.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.ca.json → language-api-panel/t9n/language-api-panel.t9n.ca.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.cs.json → language-api-panel/t9n/language-api-panel.t9n.cs.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.da.json → language-api-panel/t9n/language-api-panel.t9n.da.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.de.json → language-api-panel/t9n/language-api-panel.t9n.de.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.el.json → language-api-panel/t9n/language-api-panel.t9n.el.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.en.json → language-api-panel/t9n/language-api-panel.t9n.en.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.es.json → language-api-panel/t9n/language-api-panel.t9n.es.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.et.json → language-api-panel/t9n/language-api-panel.t9n.et.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.fi.json → language-api-panel/t9n/language-api-panel.t9n.fi.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.fr.json → language-api-panel/t9n/language-api-panel.t9n.fr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.he.json → language-api-panel/t9n/language-api-panel.t9n.he.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.hr.json → language-api-panel/t9n/language-api-panel.t9n.hr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.hu.json → language-api-panel/t9n/language-api-panel.t9n.hu.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.id.json → language-api-panel/t9n/language-api-panel.t9n.id.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.it.json → language-api-panel/t9n/language-api-panel.t9n.it.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.ja.json → language-api-panel/t9n/language-api-panel.t9n.ja.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.ko.json → language-api-panel/t9n/language-api-panel.t9n.ko.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.lt.json → language-api-panel/t9n/language-api-panel.t9n.lt.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.lv.json → language-api-panel/t9n/language-api-panel.t9n.lv.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.nb.json → language-api-panel/t9n/language-api-panel.t9n.nb.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.nl.json → language-api-panel/t9n/language-api-panel.t9n.nl.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.pl.json → language-api-panel/t9n/language-api-panel.t9n.pl.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.pt-BR.json → language-api-panel/t9n/language-api-panel.t9n.pt-BR.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.pt-PT.json → language-api-panel/t9n/language-api-panel.t9n.pt-PT.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.ro.json → language-api-panel/t9n/language-api-panel.t9n.ro.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.ru.json → language-api-panel/t9n/language-api-panel.t9n.ru.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.sk.json → language-api-panel/t9n/language-api-panel.t9n.sk.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.sl.json → language-api-panel/t9n/language-api-panel.t9n.sl.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.sr.json → language-api-panel/t9n/language-api-panel.t9n.sr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.sv.json → language-api-panel/t9n/language-api-panel.t9n.sv.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.th.json → language-api-panel/t9n/language-api-panel.t9n.th.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.tr.json → language-api-panel/t9n/language-api-panel.t9n.tr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.uk.json → language-api-panel/t9n/language-api-panel.t9n.uk.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.vi.json → language-api-panel/t9n/language-api-panel.t9n.vi.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.zh-CN.json → language-api-panel/t9n/language-api-panel.t9n.zh-CN.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.zh-HK.json → language-api-panel/t9n/language-api-panel.t9n.zh-HK.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-api/t9n/arcade-api.t9n.zh-TW.json → language-api-panel/t9n/language-api-panel.t9n.zh-TW.json} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
|
|
7
|
-
import { u as useControllerManager } from './chunk-
|
|
8
|
-
import {
|
|
7
|
+
import { u as useControllerManager } from './chunk-3IUJHIAA.js';
|
|
8
|
+
import { r as setFocusOnElement, d as createFilterExpression } from './index2.js';
|
|
9
9
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
10
10
|
import { u as useT9n } from './useT9n.js';
|
|
11
11
|
import "@esri/calcite-components/dist/components/calcite-flow-item.js";
|
|
@@ -135,7 +135,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
135
135
|
});
|
|
136
136
|
loading = true;
|
|
137
137
|
}
|
|
138
|
-
return (h("calcite-flow-item", { heading: this.messages.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "
|
|
138
|
+
return (h("calcite-flow-item", { heading: this.messages.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
renderEditorVariables(collection) {
|
|
@@ -143,7 +143,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
143
143
|
const filterExpression = createFilterExpression(this._filterValue);
|
|
144
144
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
145
145
|
if (!filteredVariables.length) {
|
|
146
|
-
return h("div", { class: "notice-container" }, this.messages.noitems
|
|
146
|
+
return h("div", { class: "notice-container" }, this.messages.noitems);
|
|
147
147
|
}
|
|
148
148
|
return filteredVariables.map((variable) => this.renderEditorVariable(variable));
|
|
149
149
|
}
|
|
@@ -159,7 +159,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
159
159
|
render() {
|
|
160
160
|
const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
|
|
161
161
|
if (!this.loading && !profile?.variables.length) {
|
|
162
|
-
return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage
|
|
162
|
+
return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage))));
|
|
163
163
|
}
|
|
164
164
|
return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
|
|
165
165
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { KeyCode } from 'monaco-editor';
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { u as updateThemeColors, c as colorRulesKeys, s as setupMonacoEnvironment
|
|
10
|
-
import { u as useControllerManager } from './chunk-
|
|
11
|
-
import { D as Deferred,
|
|
12
|
-
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
8
|
+
import { d as defineCustomElement$6, e as executeScript, D as DevelopersWebSitePath } from './arcade-results.js';
|
|
9
|
+
import { d as defineCustomElement$3, u as updateThemeColors, c as colorRulesKeys, s as setupMonacoEnvironment } from './code-editor.js';
|
|
10
|
+
import { u as useControllerManager, g as getSet } from './chunk-3IUJHIAA.js';
|
|
11
|
+
import { D as Deferred, g as generateGuid, e as getElementTheme } from './index2.js';
|
|
12
|
+
import { b as arcadeDefaults, g as getArcadeDiagnosticService } from './arcade-defaults.js';
|
|
13
13
|
import { u as useT9n } from './useT9n.js';
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$4 } from './arcade-
|
|
16
|
-
import { d as defineCustomElement$
|
|
17
|
-
import { d as defineCustomElement$2 } from './code-editor.js';
|
|
14
|
+
import { d as defineCustomElement$5 } from './arcade-suggestions.js';
|
|
15
|
+
import { d as defineCustomElement$4 } from './arcade-variables.js';
|
|
16
|
+
import { d as defineCustomElement$2 } from './language-api-panel.js';
|
|
18
17
|
import "@esri/calcite-components/dist/components/calcite-action-bar.js";
|
|
19
18
|
import "@esri/calcite-components/dist/components/calcite-action-group.js";
|
|
20
19
|
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
@@ -24,7 +23,7 @@ import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
|
24
23
|
const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:25%}arcgis-arcade-editor .side-panel{max-width:45%;width:600px}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor arcgis-arcade-results{border-top:1px solid var(--calcite-color-border-3);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}";
|
|
25
24
|
const ArcgisArcadeEditorStyle0 = arcadeEditorCss;
|
|
26
25
|
|
|
27
|
-
const __cmpMeta = [0,"arcgis-arcade-editor",{"profile":[1040],"script":[1025],"testData":[1040],"suggestions":[1040],"snippets":[1040],"hideDocumentationActions":[1028,"hide-documentation-actions"],"hideSideBar":[1028,"hide-side-bar"],"sideActionBarExpanded":[1540,"side-action-bar-expanded"],"openedSidePanel":[1537,"opened-side-panel"],"editorOptions":[1040],"editorInstance":[1040],"
|
|
26
|
+
const __cmpMeta = [0,"arcgis-arcade-editor",{"profile":[1040],"script":[1025],"testData":[1040],"suggestions":[1040],"snippets":[1040],"hideDocumentationActions":[1028,"hide-documentation-actions"],"hideSideBar":[1028,"hide-side-bar"],"sideActionBarExpanded":[1540,"side-action-bar-expanded"],"openedSidePanel":[1537,"opened-side-panel"],"editorOptions":[1040],"editorInstance":[1040],"_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]},undefined,{"messages":["_messagesChanged"],"profile":["_profileChanged"],"testData":["_testDataChanged"],"snippets":["_snippetChanged"]}];
|
|
28
27
|
const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeEditor extends HTMLElement {
|
|
29
28
|
connectedCallback() { this.manager._connectedCallback(); }
|
|
30
29
|
constructor() {
|
|
@@ -52,7 +51,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
52
51
|
this._executingScript = true;
|
|
53
52
|
this._consoleLogs = [];
|
|
54
53
|
setTimeout(() => void (async () => {
|
|
55
|
-
const script =
|
|
54
|
+
const script = this._codeEditorElt?.value;
|
|
56
55
|
this._executionResult = await executeScript(editorProfile.definition, script, testContext, (log) => setTimeout(() => (this._consoleLogs = [...this._consoleLogs, log]), 0));
|
|
57
56
|
this._executingScript = false;
|
|
58
57
|
})(), 0);
|
|
@@ -85,14 +84,15 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
85
84
|
this._insertAsText = (e) => void this._codeEditorElt?.insertText(e.detail).catch(console.error);
|
|
86
85
|
this._onResultPanelChange = (e) => void (this._resultPanel = e.detail);
|
|
87
86
|
this._onExecutionPanelClose = () => void (this._showExecutionPanel = false);
|
|
88
|
-
this.
|
|
89
|
-
this._preparingProfile = false;
|
|
87
|
+
this._preparingArcade = false;
|
|
90
88
|
this._editorProfile = undefined;
|
|
89
|
+
this._apiLibrary = undefined;
|
|
91
90
|
this._showExecutionPanel = false;
|
|
92
91
|
this._resultPanel = "output";
|
|
93
92
|
this._executingScript = false;
|
|
94
93
|
this._consoleLogs = [];
|
|
95
94
|
this._executionResult = undefined;
|
|
95
|
+
this.messages = useT9n();
|
|
96
96
|
this.profile = undefined;
|
|
97
97
|
this.script = "";
|
|
98
98
|
this.testData = undefined;
|
|
@@ -103,13 +103,16 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
103
103
|
this.sideActionBarExpanded = false;
|
|
104
104
|
this.openedSidePanel = "none";
|
|
105
105
|
this.editorOptions = undefined;
|
|
106
|
-
this.editorInstance =
|
|
106
|
+
this.editorInstance = getSet(undefined, {
|
|
107
107
|
get: () => this._codeEditorElt?.editorInstance,
|
|
108
108
|
set: "ignore",
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
+
_messagesChanged() {
|
|
112
|
+
this._updateArcadeDefaults().catch(console.error);
|
|
113
|
+
}
|
|
111
114
|
_profileChanged() {
|
|
112
|
-
this.
|
|
115
|
+
this._updateArcadeDefaults().catch(console.error);
|
|
113
116
|
}
|
|
114
117
|
_testDataChanged() {
|
|
115
118
|
if (!this._showExecutionPanel) {
|
|
@@ -158,7 +161,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
158
161
|
return { type: "error", value: "Missing editor profile", error: null };
|
|
159
162
|
}
|
|
160
163
|
await this._componentReadyDefer.promise;
|
|
161
|
-
const script =
|
|
164
|
+
const script = this._codeEditorElt?.value;
|
|
162
165
|
return await executeScript(editorProfile.definition, script, this.testData);
|
|
163
166
|
}
|
|
164
167
|
/**
|
|
@@ -191,9 +194,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
191
194
|
// However, we need to setup the environment before the code editor is instantiated because
|
|
192
195
|
// we need to access the arcade language service to get the api library.
|
|
193
196
|
setupMonacoEnvironment(assetsPath);
|
|
194
|
-
await this.
|
|
195
|
-
// The profile has to be refreshed on locale change
|
|
196
|
-
this.manager.watch("messages", () => void this._updateEditorProfile().catch(console.error));
|
|
197
|
+
await this._updateArcadeDefaults();
|
|
197
198
|
}
|
|
198
199
|
async componentDidLoad() {
|
|
199
200
|
// Mark on component as ready.
|
|
@@ -202,7 +203,7 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
202
203
|
// Start listening to the validation diagnostics.
|
|
203
204
|
// We are doing this as late as possible
|
|
204
205
|
const diagnosticsService = await getArcadeDiagnosticService();
|
|
205
|
-
this._disposables.push(diagnosticsService.onDiagnosticsChange((event) => !this.
|
|
206
|
+
this._disposables.push(diagnosticsService.onDiagnosticsChange((event) => !this._preparingArcade && this.arcgisDiagnosticsChange.emit(event.diagnostics)));
|
|
206
207
|
// Get editor instance and add action
|
|
207
208
|
this.editorInstance?.addAction({
|
|
208
209
|
// An unique identifier for the action.
|
|
@@ -221,35 +222,31 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
221
222
|
}
|
|
222
223
|
disconnectedCallback() {
|
|
223
224
|
this.manager._disconnectedCallback();
|
|
224
|
-
arcadeDefaults.
|
|
225
|
-
arcadeDefaults.disposeEditorProfileForModel(this._modelId);
|
|
225
|
+
arcadeDefaults.disposeForModel(this._modelId);
|
|
226
226
|
while (this._disposables.length) {
|
|
227
227
|
this._disposables.pop()?.dispose();
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
// #endregion
|
|
231
231
|
// #region Private methods API
|
|
232
|
-
async
|
|
233
|
-
// The
|
|
234
|
-
//
|
|
235
|
-
|
|
236
|
-
this._preparingProfile = true;
|
|
232
|
+
async _updateArcadeDefaults() {
|
|
233
|
+
// The profile definition or the locale has changed.
|
|
234
|
+
// Ask the arcade defaults to prepare the profile for the model and to download the api library.
|
|
235
|
+
this._preparingArcade = true;
|
|
237
236
|
try {
|
|
238
|
-
// Set a new profile for the model using the profile definition and the locale.
|
|
239
237
|
await arcadeDefaults.setProfileForModel(this._modelId, this.profile, {
|
|
240
238
|
locale: this.messages._t9nLocale,
|
|
241
239
|
snippets: this.snippets,
|
|
242
240
|
});
|
|
243
|
-
// Get the corresponding editor profile for the model.
|
|
244
|
-
// The editor profile contains the specialized profile for the UI.
|
|
245
241
|
this._editorProfile = arcadeDefaults.getEditorProfileForModel(this._modelId);
|
|
242
|
+
this._apiLibrary = await arcadeDefaults.getApiLibrary(this._modelId);
|
|
246
243
|
}
|
|
247
244
|
catch {
|
|
248
245
|
this._editorProfile = undefined;
|
|
249
246
|
}
|
|
250
247
|
finally {
|
|
251
248
|
this._editorProfilePromise = Promise.resolve(this._editorProfile);
|
|
252
|
-
this.
|
|
249
|
+
this._preparingArcade = false;
|
|
253
250
|
}
|
|
254
251
|
}
|
|
255
252
|
// #endregion
|
|
@@ -258,17 +255,17 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
258
255
|
if (!this.testData) {
|
|
259
256
|
return null;
|
|
260
257
|
}
|
|
261
|
-
return (h("calcite-action-bar", { class: "main-action-bar", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { text: this.messages.run ?? "
|
|
258
|
+
return (h("calcite-action-bar", { class: "main-action-bar", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { text: this.messages.run ?? "", textEnabled: true, icon: "play", scale: "s", loading: this._preparingArcade, onClick: () => void this._executeScript().catch(console.error) }), this._executionResult ? (h("calcite-action", { text: this.messages.lastresults ?? "", active: this._showExecutionPanel, textEnabled: true, icon: "access-string-results", iconFlipRtl: true, scale: "s", onClick: this._toggleShowExecutionPanel })) : null)));
|
|
262
259
|
}
|
|
263
260
|
//#endregion
|
|
264
261
|
//#region Render Main Panel
|
|
265
262
|
renderMainPanel() {
|
|
266
|
-
return (h("arcgis-code-editor", { class: "flex-adjustable", language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId,
|
|
263
|
+
return (h("arcgis-code-editor", { class: "flex-adjustable", editorOptions: this.editorOptions, language: arcadeDefaults.languageId, value: this.script ?? "", modelId: this._modelId, onArcgisValueChange: this._onCodeEditorValueChange, ref: (e) => (this._codeEditorElt = e) }));
|
|
267
264
|
}
|
|
268
265
|
//#endregion
|
|
269
266
|
//#region Rendering the Action Bar
|
|
270
|
-
renderAction({ id, label, icon, active, panelName, onClick = this._toggleSidePanel, }) {
|
|
271
|
-
return (h(Fragment, null, h("calcite-action", { id: id, text: label, icon: icon, active: active, onClick: onClick, "data-panel-name": panelName }), !this.sideActionBarExpanded && (h("calcite-tooltip", {
|
|
267
|
+
renderAction({ id, label, icon, active, panelName, iconFlipRtl = false, onClick = this._toggleSidePanel, }) {
|
|
268
|
+
return (h(Fragment, null, h("calcite-action", { id: id, text: label, icon: icon, active: active, onClick: onClick, "data-panel-name": panelName, iconFlipRtl: iconFlipRtl }), !this.sideActionBarExpanded && (h("calcite-tooltip", { "reference-element": id }, h("span", null, label)))));
|
|
272
269
|
}
|
|
273
270
|
renderSideActionBar() {
|
|
274
271
|
if (this.hideSideBar) {
|
|
@@ -276,20 +273,20 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
276
273
|
}
|
|
277
274
|
return (h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h("calcite-action-group", null, this.renderAction({
|
|
278
275
|
id: "profile-variables-action",
|
|
279
|
-
label: this.messages.profilevariables ?? "
|
|
276
|
+
label: this.messages.profilevariables ?? "",
|
|
280
277
|
icon: "profile-variables",
|
|
281
278
|
active: this.openedSidePanel === "variables",
|
|
282
279
|
panelName: "variables",
|
|
283
280
|
}), this.renderAction({
|
|
284
281
|
id: "function-action",
|
|
285
|
-
label: this.messages.constantsandfunctions ?? "
|
|
282
|
+
label: this.messages.constantsandfunctions ?? "",
|
|
286
283
|
icon: "function",
|
|
287
284
|
active: this.openedSidePanel === "api",
|
|
288
285
|
panelName: "api",
|
|
289
286
|
}), this.suggestions?.length
|
|
290
287
|
? this.renderAction({
|
|
291
288
|
id: "suggestions-action",
|
|
292
|
-
label: this.messages.suggestions ?? "
|
|
289
|
+
label: this.messages.suggestions ?? "",
|
|
293
290
|
icon: "lightbulb",
|
|
294
291
|
active: this.openedSidePanel === "suggestions",
|
|
295
292
|
panelName: "suggestions",
|
|
@@ -298,10 +295,11 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
298
295
|
? null
|
|
299
296
|
: this.renderAction({
|
|
300
297
|
id: "developer-website-action",
|
|
301
|
-
label: this.messages.help ?? "
|
|
298
|
+
label: this.messages.help ?? "",
|
|
302
299
|
icon: "question",
|
|
303
300
|
active: false,
|
|
304
301
|
panelName: "none",
|
|
302
|
+
iconFlipRtl: true,
|
|
305
303
|
onClick: this._openArcadeHelp,
|
|
306
304
|
}))));
|
|
307
305
|
}
|
|
@@ -313,9 +311,9 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
313
311
|
}
|
|
314
312
|
switch (this.openedSidePanel) {
|
|
315
313
|
case "api":
|
|
316
|
-
return (h("arcgis-
|
|
314
|
+
return (h("arcgis-language-api-panel", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, apiLibrary: this._apiLibrary, hideDocumentationActions: this.hideDocumentationActions, onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
317
315
|
case "variables":
|
|
318
|
-
return (h("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this.
|
|
316
|
+
return (h("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, modelId: this._modelId, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
319
317
|
case "suggestions":
|
|
320
318
|
return (h("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
321
319
|
default:
|
|
@@ -333,11 +331,12 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
|
333
331
|
//#endregion
|
|
334
332
|
//#region Render
|
|
335
333
|
render() {
|
|
336
|
-
return (h(Host, { key: '
|
|
334
|
+
return (h(Host, { key: '024ff08c3853fc24aa904de8b498dc99219661be' }, this.renderMainActionBar(), h("div", { key: 'eae67c4446cc0f440008deffbdeef933fd48ee79', class: "flex-row flex-adjustable" }, h("div", { key: '7c508b4d7410ec6e4440e9946fbe3a9f5318b5c3', class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
|
|
337
335
|
}
|
|
338
336
|
static get assetsDirs() { return ["assets"]; }
|
|
339
337
|
get el() { return this; }
|
|
340
338
|
static get watchers() { return {
|
|
339
|
+
"messages": ["_messagesChanged"],
|
|
341
340
|
"profile": ["_profileChanged"],
|
|
342
341
|
"testData": ["_testDataChanged"],
|
|
343
342
|
"snippets": ["_snippetChanged"]
|
|
@@ -348,34 +347,34 @@ function defineCustomElement$1() {
|
|
|
348
347
|
if (typeof customElements === "undefined") {
|
|
349
348
|
return;
|
|
350
349
|
}
|
|
351
|
-
const components = ["arcgis-arcade-editor", "arcgis-arcade-
|
|
350
|
+
const components = ["arcgis-arcade-editor", "arcgis-arcade-results", "arcgis-arcade-suggestions", "arcgis-arcade-variables", "arcgis-code-editor", "arcgis-language-api-panel"];
|
|
352
351
|
components.forEach(tagName => { switch (tagName) {
|
|
353
352
|
case "arcgis-arcade-editor":
|
|
354
353
|
if (!customElements.get(tagName)) {
|
|
355
354
|
customElements.define(tagName, ArcgisArcadeEditor$1);
|
|
356
355
|
}
|
|
357
356
|
break;
|
|
358
|
-
case "arcgis-arcade-
|
|
357
|
+
case "arcgis-arcade-results":
|
|
359
358
|
if (!customElements.get(tagName)) {
|
|
360
359
|
defineCustomElement$6();
|
|
361
360
|
}
|
|
362
361
|
break;
|
|
363
|
-
case "arcgis-arcade-
|
|
362
|
+
case "arcgis-arcade-suggestions":
|
|
364
363
|
if (!customElements.get(tagName)) {
|
|
365
364
|
defineCustomElement$5();
|
|
366
365
|
}
|
|
367
366
|
break;
|
|
368
|
-
case "arcgis-arcade-
|
|
367
|
+
case "arcgis-arcade-variables":
|
|
369
368
|
if (!customElements.get(tagName)) {
|
|
370
369
|
defineCustomElement$4();
|
|
371
370
|
}
|
|
372
371
|
break;
|
|
373
|
-
case "arcgis-
|
|
372
|
+
case "arcgis-code-editor":
|
|
374
373
|
if (!customElements.get(tagName)) {
|
|
375
374
|
defineCustomElement$3();
|
|
376
375
|
}
|
|
377
376
|
break;
|
|
378
|
-
case "arcgis-
|
|
377
|
+
case "arcgis-language-api-panel":
|
|
379
378
|
if (!customElements.get(tagName)) {
|
|
380
379
|
defineCustomElement$2();
|
|
381
380
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeResults$1, d as defineCustomElement$1 } from './arcade-results.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeSuggestions$1, d as defineCustomElement$1 } from './arcade-suggestions.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeVariables$1, d as defineCustomElement$1 } from './arcade-variables.js';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
|
-
* See https://js.arcgis.com/4.
|
|
5
|
-
* v4.
|
|
4
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
5
|
+
* v4.31.0-next.10
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* Get the base path to where the package assets can be found.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
|
-
* See https://js.arcgis.com/4.
|
|
5
|
-
* v4.
|
|
4
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
5
|
+
* v4.31.0-next.10
|
|
6
6
|
*/
|
|
7
|
-
let resourceUrl = "https://js.arcgis.com/coding-components/
|
|
7
|
+
let resourceUrl = "https://js.arcgis.com/coding-components/next/";
|
|
8
8
|
export const getArcgisAssetPath = (path) => {
|
|
9
9
|
const assetUrl = new URL(path, resourceUrl);
|
|
10
10
|
return assetUrl.origin !== window.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisCodeEditor$1, d as defineCustomElement$1 } from './code-editor.js';
|
|
7
7
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ArcgisLanguageApiPanel extends Components.ArcgisLanguageApiPanel, HTMLElement {}
|
|
4
|
+
export const ArcgisLanguageApiPanel: {
|
|
5
|
+
prototype: ArcgisLanguageApiPanel;
|
|
6
|
+
new (): ArcgisLanguageApiPanel;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
|
+
*/
|
|
6
|
+
import { A as ArcgisLanguageApiPanel$1, d as defineCustomElement$1 } from './language-api-panel.js';
|
|
7
|
+
|
|
8
|
+
const ArcgisLanguageApiPanel = ArcgisLanguageApiPanel$1;
|
|
9
|
+
const defineCustomElement = defineCustomElement$1;
|
|
10
|
+
|
|
11
|
+
export { ArcgisLanguageApiPanel, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ArcgisSqlExpressionEditor extends Components.ArcgisSqlExpressionEditor, HTMLElement {}
|
|
4
|
+
export const ArcgisSqlExpressionEditor: {
|
|
5
|
+
prototype: ArcgisSqlExpressionEditor;
|
|
6
|
+
new (): ArcgisSqlExpressionEditor;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
|
+
*/
|
|
6
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
|
+
import { u as useControllerManager } from './chunk-3IUJHIAA.js';
|
|
8
|
+
import { g as generateGuid } from './index2.js';
|
|
9
|
+
import { s as sqlExprDefaults } from './sql-expr-defaults.js';
|
|
10
|
+
import { d as defineCustomElement$4 } from './code-editor.js';
|
|
11
|
+
import { d as defineCustomElement$3 } from './language-api-panel.js';
|
|
12
|
+
import { d as defineCustomElement$2 } from './sql-expression-fields.js';
|
|
13
|
+
import "@esri/calcite-components/dist/components/calcite-action-bar.js";
|
|
14
|
+
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
15
|
+
|
|
16
|
+
const sqlExpressionEditorCss = "arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";
|
|
17
|
+
const ArcgisSqlExpressionEditorStyle0 = sqlExpressionEditorCss;
|
|
18
|
+
|
|
19
|
+
const __cmpMeta = [0,"arcgis-sql-expression-editor",{"profile":[1040],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32]},undefined,{"profile":["_profileChanged"]}];
|
|
20
|
+
const SqlExpressionEditor = /*@__PURE__*/ proxyCustomElement(class SqlExpressionEditor extends HTMLElement {
|
|
21
|
+
connectedCallback() { this.manager._connectedCallback(); }
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.__registerHost();
|
|
25
|
+
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
26
|
+
this.manager = useControllerManager(this,forceUpdate);
|
|
27
|
+
// #endregion
|
|
28
|
+
// #region Private properties
|
|
29
|
+
this._modelId = generateGuid();
|
|
30
|
+
this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
|
|
31
|
+
this._preparing = false;
|
|
32
|
+
this._editorProfile = undefined;
|
|
33
|
+
this._activeAction = undefined;
|
|
34
|
+
this._apiLibrary = undefined;
|
|
35
|
+
this.profile = undefined;
|
|
36
|
+
}
|
|
37
|
+
_profileChanged() {
|
|
38
|
+
this._updateSqlExprDefaults().catch(console.error);
|
|
39
|
+
}
|
|
40
|
+
// #endregion
|
|
41
|
+
// #region Private methods API
|
|
42
|
+
async _updateSqlExprDefaults() {
|
|
43
|
+
this._preparing = true;
|
|
44
|
+
try {
|
|
45
|
+
await sqlExprDefaults.setProfileForModel(this._modelId, this.profile);
|
|
46
|
+
this._apiLibrary = await sqlExprDefaults.getApiLibrary(this._modelId);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
this._editorProfile = undefined;
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
// this._editorProfilePromise = Promise.resolve(this._editorProfile);
|
|
53
|
+
this._preparing = false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_setActiveAction(action) {
|
|
57
|
+
this._activeAction = action;
|
|
58
|
+
}
|
|
59
|
+
_handleActionClick(e) {
|
|
60
|
+
const action = e.target;
|
|
61
|
+
this._setActiveAction(action.dataset.panelName);
|
|
62
|
+
}
|
|
63
|
+
// #endregion
|
|
64
|
+
// #region Component lifecycle events
|
|
65
|
+
async componentWillLoad() {
|
|
66
|
+
await this._updateSqlExprDefaults().catch(console.error);
|
|
67
|
+
// The profile has to be refreshed on locale change
|
|
68
|
+
// this.manager.watch("messages", () => void this._updateEditorProfile().catch(console.error));
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
this.manager._disconnectedCallback();
|
|
72
|
+
sqlExprDefaults.disposeForModel(this._modelId);
|
|
73
|
+
}
|
|
74
|
+
// #endregion
|
|
75
|
+
render() {
|
|
76
|
+
return (h(Host, { key: '67f7ebf7a28a8ffc3fe967721389d45c4e2003a1' }, h("div", { key: 'b3bf4ec2a8d04105e97489593ccec95cd33237f0', class: "flex-row flex-adjustable" }, h("div", { key: 'fdac47e22baf64c72f786f9e09b637050f417f94', class: "flex-column flex-adjustable" }, h("arcgis-code-editor", { key: 'f4151dd39ec3523907cd907ebb7558e05bca9cc1', language: "arcgis-sql-expression", modelId: this._modelId, ref: (e) => (this._codeEditorElt = e) })), this._activeAction === "fields" && (h("arcgis-sql-expression-fields", { key: 'aa0e5d88429d4bf865b9adc506028efefec1a73a', class: "side-panel flex-panel border-inline-start", loading: this._preparing, modelId: this._modelId, "data-panel-name": "none", onArcgisFieldSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined) })), this._activeAction === "functions" && (h("arcgis-language-api-panel", { key: '7826dbb1b08894c6c6385806a3aef6cff77395d0', class: "side-panel flex-panel border-inline-start", onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined), loading: this._preparing, apiLibrary: this._apiLibrary, "data-panel-name": "none" })), h("calcite-action-bar", { key: 'ee618d666b70405495627a9d15238e8723c6f961', class: "side-action-bar border-inline-start", expanded: false, position: "end" }, h("calcite-action", { key: '2c828df5dded6347e13e59ba9e313824baa606ff', id: "fields-action", text: "Fields", icon: "profile-variables", active: this._activeAction === "fields", "data-panel-name": "fields",
|
|
77
|
+
// need to use an arrow function to automatically bind 'this'
|
|
78
|
+
onClick: (e) => this._handleActionClick(e) }), h("calcite-action", { key: 'eab785c5b14cadeb5047db1957134f5accfedc76', id: "functions-action", text: "Functions", icon: "function", active: this._activeAction === "functions", "data-panel-name": "functions", onClick: (e) => this._handleActionClick(e) })))));
|
|
79
|
+
}
|
|
80
|
+
static get assetsDirs() { return ["assets"]; }
|
|
81
|
+
get el() { return this; }
|
|
82
|
+
static get watchers() { return {
|
|
83
|
+
"profile": ["_profileChanged"]
|
|
84
|
+
}; }
|
|
85
|
+
static get style() { return ArcgisSqlExpressionEditorStyle0; }
|
|
86
|
+
}, __cmpMeta);
|
|
87
|
+
function defineCustomElement$1() {
|
|
88
|
+
if (typeof customElements === "undefined") {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const components = ["arcgis-sql-expression-editor", "arcgis-code-editor", "arcgis-language-api-panel", "arcgis-sql-expression-fields"];
|
|
92
|
+
components.forEach(tagName => { switch (tagName) {
|
|
93
|
+
case "arcgis-sql-expression-editor":
|
|
94
|
+
if (!customElements.get(tagName)) {
|
|
95
|
+
customElements.define(tagName, SqlExpressionEditor);
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case "arcgis-code-editor":
|
|
99
|
+
if (!customElements.get(tagName)) {
|
|
100
|
+
defineCustomElement$4();
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case "arcgis-language-api-panel":
|
|
104
|
+
if (!customElements.get(tagName)) {
|
|
105
|
+
defineCustomElement$3();
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case "arcgis-sql-expression-fields":
|
|
109
|
+
if (!customElements.get(tagName)) {
|
|
110
|
+
defineCustomElement$2();
|
|
111
|
+
}
|
|
112
|
+
break;
|
|
113
|
+
} });
|
|
114
|
+
}
|
|
115
|
+
defineCustomElement$1();
|
|
116
|
+
|
|
117
|
+
const ArcgisSqlExpressionEditor = SqlExpressionEditor;
|
|
118
|
+
const defineCustomElement = defineCustomElement$1;
|
|
119
|
+
|
|
120
|
+
export { ArcgisSqlExpressionEditor, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ArcgisSqlExpressionFields extends Components.ArcgisSqlExpressionFields, HTMLElement {}
|
|
4
|
+
export const ArcgisSqlExpressionFields: {
|
|
5
|
+
prototype: ArcgisSqlExpressionFields;
|
|
6
|
+
new (): ArcgisSqlExpressionFields;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
|
+
*/
|
|
6
|
+
import { S as SqlExpressionFields, d as defineCustomElement$1 } from './sql-expression-fields.js';
|
|
7
|
+
|
|
8
|
+
const ArcgisSqlExpressionFields = SqlExpressionFields;
|
|
9
|
+
const defineCustomElement = defineCustomElement$1;
|
|
10
|
+
|
|
11
|
+
export { ArcgisSqlExpressionFields, defineCustomElement };
|