@arcgis/coding-components 4.30.0-next.7 → 4.30.0-next.71
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-7d529ae0.js → p-063a025b.js} +3 -3
- package/dist/arcgis-coding-components/{p-1b2a100f.js → p-07f363ba.js} +1 -1
- package/dist/arcgis-coding-components/p-09be08b9.js +68 -0
- package/dist/arcgis-coding-components/{p-7d8a653c.js → p-40c7de90.js} +2 -2
- package/dist/arcgis-coding-components/p-78df1d2f.js +7 -0
- package/dist/arcgis-coding-components/{p-43ca4ff8.js → p-7a03c214.js} +2 -2
- package/dist/arcgis-coding-components/p-88548ea1.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-19e41297.js → p-93a07954.js} +2 -2
- package/dist/arcgis-coding-components/{p-3ad3b485.js → p-ab5bb57b.js} +3 -3
- package/dist/arcgis-coding-components/{p-d15b541d.js → p-c085a0af.js} +2 -2
- package/dist/arcgis-coding-components/{p-53a0b083.js → p-c301d376.js} +3 -3
- package/dist/arcgis-coding-components/{p-41f5c613.js → p-ca4f8a77.js} +2 -2
- package/dist/cjs/{arcade-defaults-85d2771a.js → arcade-defaults-d4681815.js} +620 -248
- package/dist/cjs/{arcade-mode-d675c5ea.js → arcade-mode-1bee51ae.js} +45 -51
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1560 -289
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-5e66f5d3.js → css-8c80bb2e.js} +1 -1
- package/dist/cjs/{cssMode-b94f6c97.js → cssMode-942065fb.js} +3 -3
- package/dist/cjs/{html-b264fb71.js → html-cabb489e.js} +3 -3
- package/dist/cjs/{htmlMode-14366ebc.js → htmlMode-915886ac.js} +3 -3
- package/dist/cjs/{index-6542b576.js → index-cd2104b5.js} +40 -4
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-40266757.js → javascript-3ae42af9.js} +4 -4
- package/dist/cjs/{jsonMode-241f2a4a.js → jsonMode-b6aa8f04.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tsMode-066b04bf.js → tsMode-7db5819d.js} +3 -3
- package/dist/cjs/{typescript-9ac6fd5a.js → typescript-457225f9.js} +3 -3
- package/dist/components/arcade-api.js +21 -32
- package/dist/components/arcade-contribution.js +72 -13
- package/dist/components/arcade-defaults.js +131 -149
- package/dist/components/arcade-mode.js +44 -50
- package/dist/components/arcade-results.js +47 -60
- package/dist/components/arcade-suggestions.js +23 -33
- package/dist/components/arcade-variables.js +22 -36
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +60 -150
- 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-63RMNUHL.js +1275 -0
- package/dist/components/code-editor.js +70 -78
- package/dist/components/fields.js +45 -45
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +389 -3
- package/dist/components/markdown.js +9 -11
- package/dist/components/useT9n.js +35 -0
- package/dist/components/utilities.js +3 -3
- package/dist/esm/{arcade-defaults-ef372fd5.js → arcade-defaults-0328d43a.js} +603 -235
- package/dist/esm/{arcade-mode-04d65df2.js → arcade-mode-30a3c186.js} +45 -51
- package/dist/esm/arcgis-arcade-api_6.entry.js +1560 -289
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-50e0f632.js → css-2a675679.js} +1 -1
- package/dist/esm/{cssMode-0740511f.js → cssMode-d741b7f4.js} +3 -3
- package/dist/esm/{html-9d2b157c.js → html-50d0ec6a.js} +3 -3
- package/dist/esm/{htmlMode-fd1c3eea.js → htmlMode-4cb80be7.js} +3 -3
- package/dist/esm/{index-7f8b9422.js → index-64f782ac.js} +40 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-014d6512.js → javascript-5607dae6.js} +4 -4
- package/dist/esm/{jsonMode-ccac7c7d.js → jsonMode-e9cfe47d.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{tsMode-cfa861b3.js → tsMode-1be1ce42.js} +3 -3
- package/dist/esm/{typescript-9c1ebeca.js → typescript-2d04f7b3.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/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/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 +27 -0
- package/dist/types/data/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 +11 -0
- package/dist/types/data/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 +6 -0
- package/dist/types/data/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 +9 -0
- package/dist/types/data/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 +9 -0
- package/dist/types/data/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 +19 -0
- package/dist/types/data/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 +6 -0
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +15 -13
- package/dist/types/utils/profile/utils.d.ts +1 -3
- package/package.json +21 -21
- package/dist/arcgis-coding-components/p-1927140d.js +0 -68
- package/dist/arcgis-coding-components/p-6aa84514.js +0 -7
- package/dist/arcgis-coding-components/p-c4f70a58.entry.js +0 -6
|
@@ -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.71
|
|
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-63RMNUHL.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,19 @@ 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)}";
|
|
32
33
|
|
|
34
|
+
const __cmpMeta = [1,"arcgis-arcade-suggestions",{"suggestions":[1040],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},undefined,{"suggestions":["suggestionsPropChanged"]}];
|
|
33
35
|
const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeSuggestions extends HTMLElement {
|
|
34
36
|
constructor() {
|
|
35
37
|
super();
|
|
36
38
|
this.__registerHost();
|
|
39
|
+
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
37
40
|
this.__attachShadow();
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
41
|
+
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
42
|
+
this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
|
|
43
|
+
this.manager = useControllerManager(this,forceUpdate);
|
|
44
|
+
this.messages = useT9n();
|
|
40
45
|
this._updateFilterValue = (e) => {
|
|
41
46
|
this._filterValue = e.target?.value ?? "";
|
|
42
47
|
};
|
|
@@ -48,7 +53,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
48
53
|
const keyEvent = e;
|
|
49
54
|
if (!keyEvent.key || keyEvent.key === "Enter") {
|
|
50
55
|
e.preventDefault();
|
|
51
|
-
this.
|
|
56
|
+
this.arcgisItemSelected.emit(item.code);
|
|
52
57
|
}
|
|
53
58
|
};
|
|
54
59
|
this._showSuggestionDetail = (e) => {
|
|
@@ -60,14 +65,11 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
60
65
|
this._selectedSuggestion = item;
|
|
61
66
|
};
|
|
62
67
|
this._emitClose = () => {
|
|
63
|
-
this.
|
|
68
|
+
this.arcgisClose.emit();
|
|
64
69
|
};
|
|
65
70
|
this._beforeBack = async () => {
|
|
66
71
|
this._selectedSuggestion = undefined;
|
|
67
72
|
};
|
|
68
|
-
this._lang = "";
|
|
69
|
-
this._t9nLocale = "";
|
|
70
|
-
this._t9nStrings = undefined;
|
|
71
73
|
this._selectedSuggestion = undefined;
|
|
72
74
|
this._filterValue = "";
|
|
73
75
|
this._colorizeStyle = "";
|
|
@@ -80,13 +82,11 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
80
82
|
// #region Component lifecycle events
|
|
81
83
|
async componentWillLoad() {
|
|
82
84
|
this._colorizeStyle = generateColorizeStyles();
|
|
83
|
-
this.
|
|
84
|
-
await B(this, getAssetPath("./assets"));
|
|
85
|
+
this._themeChangedListener = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
85
86
|
}
|
|
86
87
|
disconnectedCallback() {
|
|
87
88
|
this._flowObserver?.disconnect();
|
|
88
|
-
this.
|
|
89
|
-
q(this);
|
|
89
|
+
this._themeChangedListener?.dispose();
|
|
90
90
|
}
|
|
91
91
|
// #endregion
|
|
92
92
|
//#region Private Methods
|
|
@@ -104,7 +104,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
104
104
|
// When switching between flow the same reference is reused
|
|
105
105
|
this._flowObserver = new MutationObserver(() => {
|
|
106
106
|
// Get the last panel and try to set focus on the input element
|
|
107
|
-
|
|
107
|
+
setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
108
108
|
});
|
|
109
109
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
110
110
|
}
|
|
@@ -122,37 +122,27 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
|
|
|
122
122
|
renderSuggestionListItems(suggestions) {
|
|
123
123
|
suggestions = filterCollection(suggestions, "label", this._filterValue);
|
|
124
124
|
if (!suggestions.length) {
|
|
125
|
-
return h("div", { class: "notice-container" }, this.
|
|
125
|
+
return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
|
|
126
126
|
}
|
|
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.
|
|
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.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showSuggestionDetail, "data-item": suggestion }))));
|
|
128
128
|
}
|
|
129
129
|
renderSuggestionFlowItem() {
|
|
130
130
|
const suggestion = this._selectedSuggestion;
|
|
131
131
|
if (!suggestion) {
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
|
-
return (h("calcite-flow-item", { heading: this.
|
|
134
|
+
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
135
|
}
|
|
136
136
|
render() {
|
|
137
|
-
return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this.
|
|
137
|
+
return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this.messages.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), h("calcite-list", null, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
|
|
138
138
|
}
|
|
139
139
|
static get assetsDirs() { return ["assets"]; }
|
|
140
|
-
get
|
|
140
|
+
get el() { return this; }
|
|
141
141
|
static get watchers() { return {
|
|
142
142
|
"suggestions": ["suggestionsPropChanged"]
|
|
143
143
|
}; }
|
|
144
144
|
static get style() { return arcadeSuggestionsCss; }
|
|
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
|
+
}, __cmpMeta);
|
|
156
146
|
function defineCustomElement() {
|
|
157
147
|
if (typeof customElements === "undefined") {
|
|
158
148
|
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.71
|
|
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-63RMNUHL.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,25 @@ 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)}";
|
|
21
22
|
|
|
22
23
|
function stopEnterPropagation(e) {
|
|
23
24
|
if (e.key === "Enter") {
|
|
24
25
|
e.stopPropagation();
|
|
25
26
|
}
|
|
26
27
|
}
|
|
28
|
+
const __cmpMeta = [1,"arcgis-arcade-variables",{"loading":[1028],"modelId":[1025,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},undefined,{"modelId":["modelIdPropChanged"]}];
|
|
27
29
|
const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeVariables extends HTMLElement {
|
|
28
30
|
constructor() {
|
|
29
31
|
super();
|
|
30
32
|
this.__registerHost();
|
|
33
|
+
this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
|
|
31
34
|
this.__attachShadow();
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
35
|
+
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
36
|
+
this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
|
|
37
|
+
this.manager = useControllerManager(this,forceUpdate);
|
|
38
|
+
this.messages = useT9n();
|
|
34
39
|
this._updateFilterValue = (e) => {
|
|
35
40
|
this._filterValue = e.target.value;
|
|
36
41
|
};
|
|
@@ -39,7 +44,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
39
44
|
this._filterValue = "";
|
|
40
45
|
};
|
|
41
46
|
this._emitClose = () => {
|
|
42
|
-
this.
|
|
47
|
+
this.arcgisClose.emit();
|
|
43
48
|
};
|
|
44
49
|
this._backToTop = () => {
|
|
45
50
|
this._flowItemRenderers = [];
|
|
@@ -52,7 +57,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
52
57
|
const keyEvent = e;
|
|
53
58
|
if (!keyEvent.key || keyEvent.key === "Enter") {
|
|
54
59
|
e.preventDefault();
|
|
55
|
-
this.
|
|
60
|
+
this.arcgisItemSelected.emit(variable.snippet);
|
|
56
61
|
}
|
|
57
62
|
};
|
|
58
63
|
this._showCollectionPanel = (e) => {
|
|
@@ -63,9 +68,6 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
63
68
|
e.stopPropagation();
|
|
64
69
|
this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
|
|
65
70
|
};
|
|
66
|
-
this._lang = "";
|
|
67
|
-
this._t9nLocale = "";
|
|
68
|
-
this._t9nStrings = undefined;
|
|
69
71
|
this._mutationCounter = 1;
|
|
70
72
|
this._flowItemRenderers = [];
|
|
71
73
|
this._filterValue = "";
|
|
@@ -76,12 +78,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
76
78
|
this._flowItemRenderers = [];
|
|
77
79
|
}
|
|
78
80
|
//#endregion
|
|
79
|
-
// #region Component lifecycle events
|
|
80
|
-
async componentWillLoad() {
|
|
81
|
-
await B(this, getAssetPath("./assets"));
|
|
82
|
-
}
|
|
83
81
|
disconnectedCallback() {
|
|
84
|
-
q(this);
|
|
85
82
|
this._flowObserver?.disconnect();
|
|
86
83
|
}
|
|
87
84
|
// #endregion
|
|
@@ -106,7 +103,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
106
103
|
// When switching between flow the same reference is reused
|
|
107
104
|
this._flowObserver = new MutationObserver(() => {
|
|
108
105
|
// Get the last panel and try to set focus on the input element
|
|
109
|
-
|
|
106
|
+
setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
110
107
|
});
|
|
111
108
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
112
109
|
}
|
|
@@ -135,15 +132,15 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
135
132
|
});
|
|
136
133
|
loading = true;
|
|
137
134
|
}
|
|
138
|
-
return (h("calcite-flow-item", { heading: this.
|
|
135
|
+
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
136
|
};
|
|
140
137
|
}
|
|
141
138
|
renderEditorVariables(collection) {
|
|
142
139
|
// Filter the variables. Skip group, we will filter the children later on.
|
|
143
|
-
const filterExpression =
|
|
140
|
+
const filterExpression = createFilterExpression(this._filterValue);
|
|
144
141
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
145
142
|
if (!filteredVariables.length) {
|
|
146
|
-
return h("div", { class: "notice-container" }, this.
|
|
143
|
+
return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
|
|
147
144
|
}
|
|
148
145
|
return filteredVariables.map((variable) => this.renderEditorVariable(variable));
|
|
149
146
|
}
|
|
@@ -153,34 +150,23 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
|
|
|
153
150
|
// Group is a collection but we represent it differently
|
|
154
151
|
return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
|
|
155
152
|
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.
|
|
153
|
+
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
154
|
}
|
|
158
155
|
}
|
|
159
156
|
render() {
|
|
160
157
|
const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
|
|
161
158
|
if (!this.loading && !profile?.variables.length) {
|
|
162
|
-
return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.
|
|
159
|
+
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
160
|
}
|
|
164
161
|
return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
|
|
165
162
|
}
|
|
166
163
|
static get assetsDirs() { return ["assets"]; }
|
|
167
|
-
get
|
|
164
|
+
get el() { return this; }
|
|
168
165
|
static get watchers() { return {
|
|
169
166
|
"modelId": ["modelIdPropChanged"]
|
|
170
167
|
}; }
|
|
171
168
|
static get style() { return arcadeVariablesCss; }
|
|
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
|
+
}, __cmpMeta);
|
|
184
170
|
function defineCustomElement() {
|
|
185
171
|
if (typeof customElements === "undefined") {
|
|
186
172
|
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.71
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
|
|
7
7
|
|