@arcgis/coding-components 4.30.0-next.4 → 4.30.0-next.41

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.
Files changed (133) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
  2. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  3. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  4. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  43. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
  44. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  45. package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
  46. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  47. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  48. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  49. package/dist/arcgis-coding-components/index.esm.js +2 -2
  50. package/dist/arcgis-coding-components/{p-25023832.js → p-1f57b2c8.js} +3 -3
  51. package/dist/arcgis-coding-components/{p-e88c0d1d.js → p-2656babc.js} +1 -1
  52. package/dist/arcgis-coding-components/p-41c0f095.js +7 -0
  53. package/dist/arcgis-coding-components/{p-08f272e7.js → p-4e83c7d9.js} +3 -3
  54. package/dist/arcgis-coding-components/p-55dffc4c.entry.js +6 -0
  55. package/dist/arcgis-coding-components/{p-78220a75.js → p-68167d79.js} +3 -3
  56. package/dist/arcgis-coding-components/{p-4d158786.js → p-6e9ee8e1.js} +2 -2
  57. package/dist/arcgis-coding-components/{p-b63557ba.js → p-7600673f.js} +2 -2
  58. package/dist/arcgis-coding-components/{p-73e2476b.js → p-8741dfa4.js} +2 -2
  59. package/dist/arcgis-coding-components/{p-cd9e95f9.js → p-9acb23cc.js} +2 -2
  60. package/dist/arcgis-coding-components/p-b3a3ab63.js +68 -0
  61. package/dist/arcgis-coding-components/{p-c7bb7c6a.js → p-ea30709a.js} +2 -2
  62. package/dist/cjs/{arcade-defaults-d41420df.js → arcade-defaults-acc3b5ac.js} +498 -172
  63. package/dist/cjs/{arcade-mode-55360f90.js → arcade-mode-af4f0fdf.js} +45 -51
  64. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1660 -234
  65. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  66. package/dist/cjs/{css-9a006c1a.js → css-c1dec897.js} +1 -1
  67. package/dist/cjs/{cssMode-c9458ea4.js → cssMode-8a51d0ec.js} +3 -3
  68. package/dist/cjs/{html-45d9defe.js → html-a26829c5.js} +3 -3
  69. package/dist/cjs/{htmlMode-1716753f.js → htmlMode-d59290f4.js} +3 -3
  70. package/dist/cjs/{index-25b044b5.js → index-f070b08e.js} +42 -4
  71. package/dist/cjs/index.cjs.js +3 -3
  72. package/dist/cjs/{javascript-9ce57501.js → javascript-836a3c78.js} +4 -4
  73. package/dist/cjs/{jsonMode-3945e8f7.js → jsonMode-2600ca0a.js} +3 -3
  74. package/dist/cjs/loader.cjs.js +3 -3
  75. package/dist/cjs/{tsMode-7eaeb36b.js → tsMode-b10eb9a7.js} +3 -3
  76. package/dist/cjs/{typescript-ec5da0c4.js → typescript-07dfd341.js} +3 -3
  77. package/dist/components/arcade-api.js +19 -31
  78. package/dist/components/arcade-contribution.js +71 -13
  79. package/dist/components/arcade-defaults.js +79 -74
  80. package/dist/components/arcade-mode.js +44 -50
  81. package/dist/components/arcade-results.js +46 -60
  82. package/dist/components/arcade-suggestions.js +19 -30
  83. package/dist/components/arcade-variables.js +20 -35
  84. package/dist/components/arcgis-arcade-api.js +1 -1
  85. package/dist/components/arcgis-arcade-editor.js +48 -140
  86. package/dist/components/arcgis-arcade-results.js +1 -1
  87. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  88. package/dist/components/arcgis-arcade-variables.js +1 -1
  89. package/dist/components/arcgis-assets.d.ts +1 -1
  90. package/dist/components/arcgis-assets.js +1 -1
  91. package/dist/components/arcgis-code-editor.js +1 -1
  92. package/dist/components/chunk-HXHHCYA6.js +1460 -0
  93. package/dist/components/code-editor.js +21 -18
  94. package/dist/components/fields.js +2 -66
  95. package/dist/components/index.js +1 -1
  96. package/dist/components/index2.js +388 -3
  97. package/dist/components/markdown.js +9 -11
  98. package/dist/components/utilities.js +3 -3
  99. package/dist/esm/{arcade-defaults-0bce2095.js → arcade-defaults-1f9c1af0.js} +485 -159
  100. package/dist/esm/{arcade-mode-57782d19.js → arcade-mode-c0bd49f2.js} +45 -51
  101. package/dist/esm/arcgis-arcade-api_6.entry.js +1660 -234
  102. package/dist/esm/arcgis-coding-components.js +4 -4
  103. package/dist/esm/{css-70f18054.js → css-1e20a73b.js} +1 -1
  104. package/dist/esm/{cssMode-488c3e86.js → cssMode-31dc7377.js} +3 -3
  105. package/dist/esm/{html-59102be0.js → html-f8a0ecfe.js} +3 -3
  106. package/dist/esm/{htmlMode-cfdd852e.js → htmlMode-71570d38.js} +3 -3
  107. package/dist/esm/{index-78a96626.js → index-0030b0f4.js} +42 -5
  108. package/dist/esm/index.js +3 -3
  109. package/dist/esm/{javascript-8ee5b791.js → javascript-bd547f0f.js} +4 -4
  110. package/dist/esm/{jsonMode-771e71b0.js → jsonMode-fc11c3fd.js} +3 -3
  111. package/dist/esm/loader.js +4 -4
  112. package/dist/esm/{tsMode-f95b693f.js → tsMode-201c99e8.js} +3 -3
  113. package/dist/esm/{typescript-055e39ac.js → typescript-51b03c89.js} +3 -3
  114. package/dist/loader/cdn.js +1 -1
  115. package/dist/loader/index.cjs.js +1 -1
  116. package/dist/loader/index.es2017.js +1 -1
  117. package/dist/loader/index.js +1 -1
  118. package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
  119. package/dist/types/components/arcade-editor/arcade-editor.d.ts +9 -6
  120. package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
  121. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +6 -7
  122. package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
  123. package/dist/types/components/code-editor/code-editor.d.ts +9 -1
  124. package/dist/types/components.d.ts +35 -24
  125. 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 +37 -0
  126. 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
  127. 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
  128. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  129. package/dist/types/utils/profile/types.d.ts +1 -1
  130. package/package.json +20 -19
  131. package/dist/arcgis-coding-components/p-04561935.entry.js +0 -6
  132. package/dist/arcgis-coding-components/p-871217d9.js +0 -68
  133. package/dist/arcgis-coding-components/p-c23d1605.js +0 -7
@@ -1,12 +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
4
+ * v4.30.0-next.41
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, 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 { B, q, W } from './index2.js';
9
+ import { u as useControllerManager, a as useT9n } from './chunk-HXHHCYA6.js';
10
+ import { k as setFocusOnElement } from './index2.js';
10
11
  import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
11
12
  import "@esri/calcite-components/dist/components/calcite-list-item.js";
12
13
  import "@esri/calcite-components/dist/components/calcite-action.js";
@@ -16,7 +17,6 @@ import "@esri/calcite-components/dist/components/calcite-block.js";
16
17
  import "@esri/calcite-components/dist/components/calcite-flow.js";
17
18
  import "@esri/calcite-components/dist/components/calcite-input.js";
18
19
  import "@esri/calcite-components/dist/components/calcite-list.js";
19
- import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
20
20
 
21
21
  function isSuggestionGroups(item) {
22
22
  if (!Array.isArray(item)) {
@@ -28,15 +28,19 @@ function isSuggestionGroups(item) {
28
28
  return Array.isArray(item[0].suggestions);
29
29
  }
30
30
 
31
- const arcadeSuggestionsCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);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-half)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}";
31
+ 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)}";
32
32
 
33
+ const __cmpMeta = [1,"arcgis-arcade-suggestions",{"suggestions":[1040],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},undefined,{"suggestions":["suggestionsPropChanged"]}];
33
34
  const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeSuggestions extends HTMLElement {
34
35
  constructor() {
35
36
  super();
36
37
  this.__registerHost();
38
+ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
37
39
  this.__attachShadow();
38
- this.close = createEvent(this, "close", 3);
39
- this.itemSelected = createEvent(this, "itemSelected", 3);
40
+ this.arcgisClose = createEvent(this, "arcgisClose", 3);
41
+ this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
42
+ this.manager = useControllerManager(this);
43
+ this.messages = useT9n();
40
44
  this._updateFilterValue = (e) => {
41
45
  this._filterValue = e.target?.value ?? "";
42
46
  };
@@ -48,7 +52,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
48
52
  const keyEvent = e;
49
53
  if (!keyEvent.key || keyEvent.key === "Enter") {
50
54
  e.preventDefault();
51
- this.itemSelected.emit(item.code);
55
+ this.arcgisItemSelected.emit(item.code);
52
56
  }
53
57
  };
54
58
  this._showSuggestionDetail = (e) => {
@@ -60,14 +64,11 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
60
64
  this._selectedSuggestion = item;
61
65
  };
62
66
  this._emitClose = () => {
63
- this.close.emit();
67
+ this.arcgisClose.emit();
64
68
  };
65
69
  this._beforeBack = async () => {
66
70
  this._selectedSuggestion = undefined;
67
71
  };
68
- this._lang = "";
69
- this._t9nLocale = "";
70
- this._t9nStrings = undefined;
71
72
  this._selectedSuggestion = undefined;
72
73
  this._filterValue = "";
73
74
  this._colorizeStyle = "";
@@ -81,12 +82,10 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
81
82
  async componentWillLoad() {
82
83
  this._colorizeStyle = generateColorizeStyles();
83
84
  this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
84
- await B(this, getAssetPath("./assets"));
85
85
  }
86
86
  disconnectedCallback() {
87
87
  this._flowObserver?.disconnect();
88
88
  this._themeChangedListner?.dispose();
89
- q(this);
90
89
  }
91
90
  // #endregion
92
91
  //#region Private Methods
@@ -104,7 +103,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
104
103
  // When switching between flow the same reference is reused
105
104
  this._flowObserver = new MutationObserver(() => {
106
105
  // Get the last panel and try to set focus on the input element
107
- W(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
106
+ setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
108
107
  });
109
108
  this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
110
109
  }
@@ -122,37 +121,27 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
122
121
  renderSuggestionListItems(suggestions) {
123
122
  suggestions = filterCollection(suggestions, "label", this._filterValue);
124
123
  if (!suggestions.length) {
125
- return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
124
+ return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
126
125
  }
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._t9nStrings?.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showSuggestionDetail, "data-item": suggestion }))));
126
+ 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
127
  }
129
128
  renderSuggestionFlowItem() {
130
129
  const suggestion = this._selectedSuggestion;
131
130
  if (!suggestion) {
132
131
  return null;
133
132
  }
134
- return (h("calcite-flow-item", { heading: this._t9nStrings?.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._t9nStrings?.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) })))));
133
+ 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
134
  }
136
135
  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._t9nStrings?.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())));
136
+ 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
137
  }
139
138
  static get assetsDirs() { return ["assets"]; }
140
- get _hostElement() { return this; }
139
+ get el() { return this; }
141
140
  static get watchers() { return {
142
141
  "suggestions": ["suggestionsPropChanged"]
143
142
  }; }
144
143
  static get style() { return arcadeSuggestionsCss; }
145
- }, [1, "arcgis-arcade-suggestions", {
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
- }]);
144
+ }, __cmpMeta);
156
145
  function defineCustomElement() {
157
146
  if (typeof customElements === "undefined") {
158
147
  return;
@@ -1,10 +1,11 @@
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
4
+ * v4.30.0-next.41
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
7
- import { B, q, W, K } from './index2.js';
7
+ import { u as useControllerManager, a as useT9n } from './chunk-HXHHCYA6.js';
8
+ import { k as setFocusOnElement, j as createFilterExpression } from './index2.js';
8
9
  import { b as arcadeDefaults } from './arcade-defaults.js';
9
10
  import "@esri/calcite-components/dist/components/calcite-flow-item.js";
10
11
  import "@esri/calcite-components/dist/components/calcite-action.js";
@@ -15,22 +16,25 @@ import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
15
16
  import "@esri/calcite-components/dist/components/calcite-list-item.js";
16
17
  import "@esri/calcite-components/dist/components/calcite-icon.js";
17
18
  import "@esri/calcite-components/dist/components/calcite-flow.js";
18
- import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
19
19
 
20
- const arcadeVariablesCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}";
20
+ 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%}";
21
21
 
22
22
  function stopEnterPropagation(e) {
23
23
  if (e.key === "Enter") {
24
24
  e.stopPropagation();
25
25
  }
26
26
  }
27
+ const __cmpMeta = [1,"arcgis-arcade-variables",{"loading":[1028],"modelId":[1025,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},undefined,{"modelId":["modelIdPropChanged"]}];
27
28
  const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeVariables extends HTMLElement {
28
29
  constructor() {
29
30
  super();
30
31
  this.__registerHost();
32
+ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
31
33
  this.__attachShadow();
32
- this.close = createEvent(this, "close", 3);
33
- this.itemSelected = createEvent(this, "itemSelected", 3);
34
+ this.arcgisClose = createEvent(this, "arcgisClose", 3);
35
+ this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
36
+ this.manager = useControllerManager(this);
37
+ this.messages = useT9n();
34
38
  this._updateFilterValue = (e) => {
35
39
  this._filterValue = e.target.value;
36
40
  };
@@ -39,7 +43,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
39
43
  this._filterValue = "";
40
44
  };
41
45
  this._emitClose = () => {
42
- this.close.emit();
46
+ this.arcgisClose.emit();
43
47
  };
44
48
  this._backToTop = () => {
45
49
  this._flowItemRenderers = [];
@@ -52,7 +56,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
52
56
  const keyEvent = e;
53
57
  if (!keyEvent.key || keyEvent.key === "Enter") {
54
58
  e.preventDefault();
55
- this.itemSelected.emit(variable.snippet);
59
+ this.arcgisItemSelected.emit(variable.snippet);
56
60
  }
57
61
  };
58
62
  this._showCollectionPanel = (e) => {
@@ -63,9 +67,6 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
63
67
  e.stopPropagation();
64
68
  this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
65
69
  };
66
- this._lang = "";
67
- this._t9nLocale = "";
68
- this._t9nStrings = undefined;
69
70
  this._mutationCounter = 1;
70
71
  this._flowItemRenderers = [];
71
72
  this._filterValue = "";
@@ -76,12 +77,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
76
77
  this._flowItemRenderers = [];
77
78
  }
78
79
  //#endregion
79
- // #region Component lifecycle events
80
- async componentWillLoad() {
81
- await B(this, getAssetPath("./assets"));
82
- }
83
80
  disconnectedCallback() {
84
- q(this);
85
81
  this._flowObserver?.disconnect();
86
82
  }
87
83
  // #endregion
@@ -106,7 +102,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
106
102
  // When switching between flow the same reference is reused
107
103
  this._flowObserver = new MutationObserver(() => {
108
104
  // Get the last panel and try to set focus on the input element
109
- W(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
105
+ setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
110
106
  });
111
107
  this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
112
108
  }
@@ -135,15 +131,15 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
135
131
  });
136
132
  loading = true;
137
133
  }
138
- return (h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this._t9nStrings?.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._t9nStrings?.loading ?? "Loading" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
134
+ 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
135
  };
140
136
  }
141
137
  renderEditorVariables(collection) {
142
138
  // Filter the variables. Skip group, we will filter the children later on.
143
- const filterExpression = K(this._filterValue);
139
+ const filterExpression = createFilterExpression(this._filterValue);
144
140
  const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
145
141
  if (!filteredVariables.length) {
146
- return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
142
+ return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
147
143
  }
148
144
  return filteredVariables.map((variable) => this.renderEditorVariable(variable));
149
145
  }
@@ -153,34 +149,23 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
153
149
  // Group is a collection but we represent it differently
154
150
  return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
155
151
  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._t9nStrings?.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));
152
+ 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
153
  }
158
154
  }
159
155
  render() {
160
156
  const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
161
157
  if (!this.loading && !profile?.variables.length) {
162
- return (h("calcite-flow", null, h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this._t9nStrings?.noprofilevariablesmessage ?? ""))));
158
+ 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
159
  }
164
160
  return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
165
161
  }
166
162
  static get assetsDirs() { return ["assets"]; }
167
- get _hostElement() { return this; }
163
+ get el() { return this; }
168
164
  static get watchers() { return {
169
165
  "modelId": ["modelIdPropChanged"]
170
166
  }; }
171
167
  static get style() { return arcadeVariablesCss; }
172
- }, [1, "arcgis-arcade-variables", {
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
- }]);
168
+ }, __cmpMeta);
184
169
  function defineCustomElement() {
185
170
  if (typeof customElements === "undefined") {
186
171
  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
4
+ * v4.30.0-next.41
5
5
  */
6
6
  import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
7
7