@arcgis/coding-components 4.30.0-next.10 → 4.30.0-next.102
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/LICENSE.md +1 -1
- package/README.md +2 -4
- package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +2 -0
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/editor.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/ts.worker.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-4d5f58aa.js → p-0e27884f.js} +2 -2
- package/dist/arcgis-coding-components/{p-b12b2a1b.js → p-231efbff.js} +2 -2
- package/dist/arcgis-coding-components/p-47e96d81.js +6 -0
- package/dist/arcgis-coding-components/{p-655e7a9e.js → p-5ba3777a.js} +2 -2
- package/dist/arcgis-coding-components/p-631bbbfb.js +6 -0
- package/dist/arcgis-coding-components/p-6539bce3.entry.js +6 -0
- package/dist/arcgis-coding-components/p-73947f7a.js +7 -0
- package/dist/arcgis-coding-components/{p-8ee18d5c.js → p-84b8c9be.js} +2 -2
- package/dist/arcgis-coding-components/{p-2dcffe0e.js → p-af5781fa.js} +2 -2
- package/dist/arcgis-coding-components/p-dc127e91.js +68 -0
- package/dist/arcgis-coding-components/{p-b4339ec6.js → p-dd7c0171.js} +3 -3
- package/dist/arcgis-coding-components/{p-87f8241f.js → p-de337f9b.js} +3 -3
- package/dist/arcgis-coding-components/{p-cb0f0e5f.js → p-ec38da7b.js} +1 -1
- package/dist/cjs/app-globals-a39a1193.js +10 -0
- package/dist/cjs/{arcade-defaults-38ad9b42.js → arcade-defaults-e23b311c.js} +729 -289
- package/dist/cjs/{arcade-mode-9581409d.js → arcade-mode-580faadf.js} +78 -84
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1611 -239
- package/dist/cjs/arcgis-coding-components.cjs.js +14 -12
- package/dist/cjs/{css-2fde7503.js → css-6d9d8b18.js} +1 -1
- package/dist/cjs/{cssMode-9815a287.js → cssMode-58ba7a48.js} +3 -3
- package/dist/cjs/{html-6caa7fc2.js → html-6babf2d9.js} +3 -3
- package/dist/cjs/{htmlMode-8d4e7d24.js → htmlMode-d3fcee1c.js} +3 -3
- package/dist/cjs/index-70d2e15c.js +1303 -0
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-15b22f67.js → javascript-68e357b7.js} +4 -4
- package/dist/cjs/{jsonMode-f21a8faa.js → jsonMode-17b6405b.js} +3 -3
- package/dist/cjs/loader.cjs.js +6 -4
- package/dist/cjs/{tsMode-a4452f18.js → tsMode-12306781.js} +3 -3
- package/dist/cjs/{typescript-77d49ecd.js → typescript-33e4c6bd.js} +3 -3
- package/dist/components/arcade-api.js +25 -34
- package/dist/components/arcade-contribution.js +10 -10
- package/dist/components/arcade-defaults.js +143 -161
- package/dist/components/arcade-mode.js +46 -52
- package/dist/components/arcade-results.js +49 -61
- package/dist/components/arcade-suggestions.js +25 -34
- package/dist/components/arcade-variables.js +24 -37
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +61 -89
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/chunk-IHYYRFLQ.js +1363 -0
- package/dist/components/code-editor.js +72 -79
- package/dist/components/fields.js +45 -45
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +394 -3
- package/dist/components/markdown.js +13 -27
- package/dist/components/useT9n.js +37 -0
- package/dist/components/utilities.js +3 -3
- package/dist/esm/app-globals-ad037f01.js +8 -0
- package/dist/esm/{arcade-defaults-978d373f.js → arcade-defaults-c440ab96.js} +712 -275
- package/dist/esm/{arcade-mode-8a50067b.js → arcade-mode-f87480eb.js} +78 -84
- package/dist/esm/arcgis-arcade-api_6.entry.js +1611 -239
- package/dist/esm/arcgis-coding-components.js +15 -13
- package/dist/esm/{css-adc1375f.js → css-3d022d97.js} +1 -1
- package/dist/esm/{cssMode-a292eee6.js → cssMode-cd620116.js} +3 -3
- package/dist/esm/{html-24d2d562.js → html-e2b7755a.js} +3 -3
- package/dist/esm/{htmlMode-f9eed34e.js → htmlMode-c60c352c.js} +3 -3
- package/dist/esm/index-9f13e665.js +1272 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-40f3fb5c.js → javascript-6edf9a3c.js} +4 -4
- package/dist/esm/{jsonMode-70770104.js → jsonMode-3d2d17ee.js} +3 -3
- package/dist/esm/loader.js +7 -5
- package/dist/esm/{tsMode-f797a97b.js → tsMode-7010932a.js} +3 -3
- package/dist/esm/{typescript-83c789e7.js → typescript-0a9a4b7a.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +18 -12
- package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +7 -8
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
- package/dist/types/components/code-editor/code-editor.d.ts +23 -13
- package/dist/types/components.d.ts +57 -35
- package/dist/types/controllers/useT9n.d.ts +1 -0
- package/dist/types/data/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/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +34 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +15 -0
- package/dist/types/data/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 +6 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +19 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +6 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +40 -13
- package/dist/types/utils/profile/utils.d.ts +2 -4
- package/package.json +24 -24
- package/dist/arcgis-coding-components/p-2db6d470.js +0 -7
- package/dist/arcgis-coding-components/p-5d7c80cf.entry.js +0 -6
- package/dist/arcgis-coding-components/p-63894999.js +0 -68
- package/dist/arcgis-coding-components/p-f39c5bc0.js +0 -6
- package/dist/cjs/index-c33ea685.js +0 -1958
- package/dist/esm/index-7dec16fc.js +0 -1927
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
|
|
8
8
|
import { f as filterCollection } from './utilities.js';
|
|
9
|
-
import {
|
|
9
|
+
import { u as useControllerManager } from './chunk-IHYYRFLQ.js';
|
|
10
|
+
import { e as setFocusOnElement } from './index2.js';
|
|
11
|
+
import { u as useT9n } from './useT9n.js';
|
|
10
12
|
import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
|
|
11
13
|
import "@esri/calcite-components/dist/components/calcite-list-item.js";
|
|
12
14
|
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
@@ -16,7 +18,6 @@ import "@esri/calcite-components/dist/components/calcite-block.js";
|
|
|
16
18
|
import "@esri/calcite-components/dist/components/calcite-flow.js";
|
|
17
19
|
import "@esri/calcite-components/dist/components/calcite-input.js";
|
|
18
20
|
import "@esri/calcite-components/dist/components/calcite-list.js";
|
|
19
|
-
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
20
21
|
|
|
21
22
|
function isSuggestionGroups(item) {
|
|
22
23
|
if (!Array.isArray(item)) {
|
|
@@ -28,15 +29,20 @@ function isSuggestionGroups(item) {
|
|
|
28
29
|
return Array.isArray(item[0].suggestions);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
const arcadeSuggestionsCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-
|
|
32
|
+
const arcadeSuggestionsCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-block p:first-of-type{margin-top:0}:host calcite-block code{font-family:var(--calcite-code-family)}:host calcite-block pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
33
|
+
const ArcgisArcadeSuggestionsStyle0 = arcadeSuggestionsCss;
|
|
32
34
|
|
|
35
|
+
const __cmpMeta = [1,"arcgis-arcade-suggestions",{"suggestions":[1040],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},undefined,{"suggestions":["suggestionsPropChanged"]}];
|
|
33
36
|
const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeSuggestions extends HTMLElement {
|
|
34
37
|
constructor() {
|
|
35
38
|
super();
|
|
36
39
|
this.__registerHost();
|
|
40
|
+
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
37
41
|
this.__attachShadow();
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
42
|
+
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
43
|
+
this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
|
|
44
|
+
this.manager = useControllerManager(this,forceUpdate);
|
|
45
|
+
this.messages = useT9n();
|
|
40
46
|
this._updateFilterValue = (e) => {
|
|
41
47
|
this._filterValue = e.target?.value ?? "";
|
|
42
48
|
};
|
|
@@ -48,7 +54,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
48
54
|
const keyEvent = e;
|
|
49
55
|
if (!keyEvent.key || keyEvent.key === "Enter") {
|
|
50
56
|
e.preventDefault();
|
|
51
|
-
this.
|
|
57
|
+
this.arcgisItemSelected.emit(item.code);
|
|
52
58
|
}
|
|
53
59
|
};
|
|
54
60
|
this._showSuggestionDetail = (e) => {
|
|
@@ -60,14 +66,11 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
60
66
|
this._selectedSuggestion = item;
|
|
61
67
|
};
|
|
62
68
|
this._emitClose = () => {
|
|
63
|
-
this.
|
|
69
|
+
this.arcgisClose.emit();
|
|
64
70
|
};
|
|
65
71
|
this._beforeBack = async () => {
|
|
66
72
|
this._selectedSuggestion = undefined;
|
|
67
73
|
};
|
|
68
|
-
this._lang = "";
|
|
69
|
-
this._t9nLocale = "";
|
|
70
|
-
this._t9nStrings = undefined;
|
|
71
74
|
this._selectedSuggestion = undefined;
|
|
72
75
|
this._filterValue = "";
|
|
73
76
|
this._colorizeStyle = "";
|
|
@@ -80,13 +83,11 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
80
83
|
// #region Component lifecycle events
|
|
81
84
|
async componentWillLoad() {
|
|
82
85
|
this._colorizeStyle = generateColorizeStyles();
|
|
83
|
-
this.
|
|
84
|
-
await B(this, getAssetPath("./assets"));
|
|
86
|
+
this._themeChangedListener = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
85
87
|
}
|
|
86
88
|
disconnectedCallback() {
|
|
87
89
|
this._flowObserver?.disconnect();
|
|
88
|
-
this.
|
|
89
|
-
q(this);
|
|
90
|
+
this._themeChangedListener?.dispose();
|
|
90
91
|
}
|
|
91
92
|
// #endregion
|
|
92
93
|
//#region Private Methods
|
|
@@ -104,7 +105,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
104
105
|
// When switching between flow the same reference is reused
|
|
105
106
|
this._flowObserver = new MutationObserver(() => {
|
|
106
107
|
// Get the last panel and try to set focus on the input element
|
|
107
|
-
|
|
108
|
+
setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
108
109
|
});
|
|
109
110
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
110
111
|
}
|
|
@@ -122,37 +123,27 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
122
123
|
renderSuggestionListItems(suggestions) {
|
|
123
124
|
suggestions = filterCollection(suggestions, "label", this._filterValue);
|
|
124
125
|
if (!suggestions.length) {
|
|
125
|
-
return h("div", { class: "notice-container" }, this.
|
|
126
|
+
return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
|
|
126
127
|
}
|
|
127
|
-
return suggestions.map((suggestion) => (h("calcite-list-item", { label: suggestion.label, description: suggestion.description, onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": suggestion }, h("calcite-action", { slot: "actions-end", text: this.
|
|
128
|
+
return suggestions.map((suggestion) => (h("calcite-list-item", { label: suggestion.label, description: suggestion.description, onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": suggestion }, h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showSuggestionDetail, "data-item": suggestion }))));
|
|
128
129
|
}
|
|
129
130
|
renderSuggestionFlowItem() {
|
|
130
131
|
const suggestion = this._selectedSuggestion;
|
|
131
132
|
if (!suggestion) {
|
|
132
133
|
return null;
|
|
133
134
|
}
|
|
134
|
-
return (h("calcite-flow-item", { heading: this.
|
|
135
|
+
return (h("calcite-flow-item", { heading: this.messages.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose, beforeBack: this._beforeBack }, h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelected, ref: (e) => void e?.setFocus(), "data-item": suggestion }, this.messages.insert), h("calcite-block", { open: true, heading: suggestion.label, description: suggestion.description }, h("div", { innerHTML: convertMarkdownString(suggestion.documentation) }), h("pre", null, h("code", { ref: (e) => e === undefined ? undefined : void colorizeCodeElement(e, suggestion.code).catch(console.error) })))));
|
|
135
136
|
}
|
|
136
137
|
render() {
|
|
137
|
-
return (h(Host,
|
|
138
|
+
return (h(Host, { key: '6707bd25af9f7121687352d99cd02646aec67b9e' }, h("style", { key: 'cbb41e7834f0a353b27cb21fd6cb3ee42dfa7d1f' }, this._colorizeStyle), h("calcite-flow", { key: 'b261c8f3d8dc7e1cf94c2596297509ebfea09d40', ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { key: '9faa9a146dc090e0dce0eb30748d57cbb449b2ee', heading: this.messages.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { key: '692b2a425ff4ca843485be5f90bc11fc385373a7', value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), h("calcite-list", { key: 'e23fdc3c39e98deb6d4c3268b48e0c289c8aefbf' }, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
|
|
138
139
|
}
|
|
139
140
|
static get assetsDirs() { return ["assets"]; }
|
|
140
|
-
get
|
|
141
|
+
get el() { return this; }
|
|
141
142
|
static get watchers() { return {
|
|
142
143
|
"suggestions": ["suggestionsPropChanged"]
|
|
143
144
|
}; }
|
|
144
|
-
static get style() { return
|
|
145
|
-
},
|
|
146
|
-
"suggestions": [16],
|
|
147
|
-
"_lang": [32],
|
|
148
|
-
"_t9nLocale": [32],
|
|
149
|
-
"_t9nStrings": [32],
|
|
150
|
-
"_selectedSuggestion": [32],
|
|
151
|
-
"_filterValue": [32],
|
|
152
|
-
"_colorizeStyle": [32]
|
|
153
|
-
}, undefined, {
|
|
154
|
-
"suggestions": ["suggestionsPropChanged"]
|
|
155
|
-
}]);
|
|
145
|
+
static get style() { return ArcgisArcadeSuggestionsStyle0; }
|
|
146
|
+
}, __cmpMeta);
|
|
156
147
|
function defineCustomElement() {
|
|
157
148
|
if (typeof customElements === "undefined") {
|
|
158
149
|
return;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
7
|
-
import {
|
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
|
|
7
|
+
import { u as useControllerManager } from './chunk-IHYYRFLQ.js';
|
|
8
|
+
import { e as setFocusOnElement, d as createFilterExpression } from './index2.js';
|
|
8
9
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
10
|
+
import { u as useT9n } from './useT9n.js';
|
|
9
11
|
import "@esri/calcite-components/dist/components/calcite-flow-item.js";
|
|
10
12
|
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
11
13
|
import "@esri/calcite-components/dist/components/calcite-input.js";
|
|
@@ -15,22 +17,26 @@ import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
|
|
|
15
17
|
import "@esri/calcite-components/dist/components/calcite-list-item.js";
|
|
16
18
|
import "@esri/calcite-components/dist/components/calcite-icon.js";
|
|
17
19
|
import "@esri/calcite-components/dist/components/calcite-flow.js";
|
|
18
|
-
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
19
20
|
|
|
20
|
-
const arcadeVariablesCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-
|
|
21
|
+
const arcadeVariablesCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
22
|
+
const ArcgisArcadeVariablesStyle0 = arcadeVariablesCss;
|
|
21
23
|
|
|
22
24
|
function stopEnterPropagation(e) {
|
|
23
25
|
if (e.key === "Enter") {
|
|
24
26
|
e.stopPropagation();
|
|
25
27
|
}
|
|
26
28
|
}
|
|
29
|
+
const __cmpMeta = [1,"arcgis-arcade-variables",{"loading":[1028],"modelId":[1025,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},undefined,{"modelId":["modelIdPropChanged"]}];
|
|
27
30
|
const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeVariables extends HTMLElement {
|
|
28
31
|
constructor() {
|
|
29
32
|
super();
|
|
30
33
|
this.__registerHost();
|
|
34
|
+
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
31
35
|
this.__attachShadow();
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
36
|
+
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
37
|
+
this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
|
|
38
|
+
this.manager = useControllerManager(this,forceUpdate);
|
|
39
|
+
this.messages = useT9n();
|
|
34
40
|
this._updateFilterValue = (e) => {
|
|
35
41
|
this._filterValue = e.target.value;
|
|
36
42
|
};
|
|
@@ -39,7 +45,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
39
45
|
this._filterValue = "";
|
|
40
46
|
};
|
|
41
47
|
this._emitClose = () => {
|
|
42
|
-
this.
|
|
48
|
+
this.arcgisClose.emit();
|
|
43
49
|
};
|
|
44
50
|
this._backToTop = () => {
|
|
45
51
|
this._flowItemRenderers = [];
|
|
@@ -52,7 +58,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
52
58
|
const keyEvent = e;
|
|
53
59
|
if (!keyEvent.key || keyEvent.key === "Enter") {
|
|
54
60
|
e.preventDefault();
|
|
55
|
-
this.
|
|
61
|
+
this.arcgisItemSelected.emit(variable.snippet);
|
|
56
62
|
}
|
|
57
63
|
};
|
|
58
64
|
this._showCollectionPanel = (e) => {
|
|
@@ -63,9 +69,6 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
63
69
|
e.stopPropagation();
|
|
64
70
|
this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
|
|
65
71
|
};
|
|
66
|
-
this._lang = "";
|
|
67
|
-
this._t9nLocale = "";
|
|
68
|
-
this._t9nStrings = undefined;
|
|
69
72
|
this._mutationCounter = 1;
|
|
70
73
|
this._flowItemRenderers = [];
|
|
71
74
|
this._filterValue = "";
|
|
@@ -76,12 +79,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
76
79
|
this._flowItemRenderers = [];
|
|
77
80
|
}
|
|
78
81
|
//#endregion
|
|
79
|
-
// #region Component lifecycle events
|
|
80
|
-
async componentWillLoad() {
|
|
81
|
-
await B(this, getAssetPath("./assets"));
|
|
82
|
-
}
|
|
83
82
|
disconnectedCallback() {
|
|
84
|
-
q(this);
|
|
85
83
|
this._flowObserver?.disconnect();
|
|
86
84
|
}
|
|
87
85
|
// #endregion
|
|
@@ -106,7 +104,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
106
104
|
// When switching between flow the same reference is reused
|
|
107
105
|
this._flowObserver = new MutationObserver(() => {
|
|
108
106
|
// Get the last panel and try to set focus on the input element
|
|
109
|
-
|
|
107
|
+
setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
110
108
|
});
|
|
111
109
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
112
110
|
}
|
|
@@ -135,15 +133,15 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
135
133
|
});
|
|
136
134
|
loading = true;
|
|
137
135
|
}
|
|
138
|
-
return (h("calcite-flow-item", { heading: this.
|
|
136
|
+
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 ?? "Back to top", 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 ?? "Loading" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
|
|
139
137
|
};
|
|
140
138
|
}
|
|
141
139
|
renderEditorVariables(collection) {
|
|
142
140
|
// Filter the variables. Skip group, we will filter the children later on.
|
|
143
|
-
const filterExpression =
|
|
141
|
+
const filterExpression = createFilterExpression(this._filterValue);
|
|
144
142
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
145
143
|
if (!filteredVariables.length) {
|
|
146
|
-
return h("div", { class: "notice-container" }, this.
|
|
144
|
+
return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
|
|
147
145
|
}
|
|
148
146
|
return filteredVariables.map((variable) => this.renderEditorVariable(variable));
|
|
149
147
|
}
|
|
@@ -153,34 +151,23 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
153
151
|
// Group is a collection but we represent it differently
|
|
154
152
|
return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
|
|
155
153
|
default:
|
|
156
|
-
return (h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (h("calcite-action", { slot: "actions-end", text: this.
|
|
154
|
+
return (h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showCollectionPanel, onKeyPress: stopEnterPropagation, "data-item": variable })) : null, variable.icon ? h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
render() {
|
|
160
158
|
const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
|
|
161
159
|
if (!this.loading && !profile?.variables.length) {
|
|
162
|
-
return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.
|
|
160
|
+
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
161
|
}
|
|
164
162
|
return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
|
|
165
163
|
}
|
|
166
164
|
static get assetsDirs() { return ["assets"]; }
|
|
167
|
-
get
|
|
165
|
+
get el() { return this; }
|
|
168
166
|
static get watchers() { return {
|
|
169
167
|
"modelId": ["modelIdPropChanged"]
|
|
170
168
|
}; }
|
|
171
|
-
static get style() { return
|
|
172
|
-
},
|
|
173
|
-
"loading": [4],
|
|
174
|
-
"modelId": [1, "model-id"],
|
|
175
|
-
"_lang": [32],
|
|
176
|
-
"_t9nLocale": [32],
|
|
177
|
-
"_t9nStrings": [32],
|
|
178
|
-
"_mutationCounter": [32],
|
|
179
|
-
"_flowItemRenderers": [32],
|
|
180
|
-
"_filterValue": [32]
|
|
181
|
-
}, undefined, {
|
|
182
|
-
"modelId": ["modelIdPropChanged"]
|
|
183
|
-
}]);
|
|
169
|
+
static get style() { return ArcgisArcadeVariablesStyle0; }
|
|
170
|
+
}, __cmpMeta);
|
|
184
171
|
function defineCustomElement() {
|
|
185
172
|
if (typeof customElements === "undefined") {
|
|
186
173
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.102
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
|
|
7
7
|
|