@arcgis/coding-components 4.30.0-next.11 → 4.30.0-next.111

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 (188) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +2 -4
  3. package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
  4. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  5. package/dist/arcgis-coding-components/assets/arcade-api/t9n/arcade-api.t9n.ca.json +1 -1
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  43. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  44. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  45. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  46. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +3 -1
  47. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +3 -1
  48. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +3 -1
  49. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +8 -6
  50. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +3 -1
  51. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +3 -1
  52. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +3 -1
  53. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +3 -1
  54. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +3 -1
  55. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +3 -1
  56. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +3 -1
  57. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +3 -1
  58. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +3 -1
  59. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +3 -1
  60. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
  61. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +3 -1
  62. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +3 -1
  63. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
  64. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +3 -1
  65. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
  66. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
  67. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +3 -1
  68. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +3 -1
  69. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +3 -1
  70. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +3 -1
  71. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +3 -1
  72. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
  73. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +3 -1
  74. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +3 -1
  75. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +3 -1
  76. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +3 -1
  77. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +3 -1
  78. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +3 -1
  79. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +3 -1
  80. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +7 -5
  81. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +3 -1
  82. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +3 -1
  83. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +3 -1
  84. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +3 -1
  85. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.ca.json +2 -2
  86. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.de.json +1 -1
  87. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.he.json +1 -1
  88. package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.ca.json +1 -1
  89. package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.it.json +1 -1
  90. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +2 -2
  91. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  92. package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
  93. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  94. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  95. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  96. package/dist/arcgis-coding-components/index.esm.js +2 -2
  97. package/dist/arcgis-coding-components/p-25549f14.entry.js +6 -0
  98. package/dist/arcgis-coding-components/p-4998461e.js +6 -0
  99. package/dist/arcgis-coding-components/p-4d731512.js +6 -0
  100. package/dist/arcgis-coding-components/{p-2dc8c1c3.js → p-7d1a3e00.js} +1 -1
  101. package/dist/arcgis-coding-components/p-7f7b18b5.js +7 -0
  102. package/dist/arcgis-coding-components/{p-67e523f9.js → p-81b4a62f.js} +2 -2
  103. package/dist/arcgis-coding-components/p-82cacda2.js +68 -0
  104. package/dist/arcgis-coding-components/{p-fe7352bb.js → p-8e74e852.js} +3 -3
  105. package/dist/arcgis-coding-components/{p-b2a8cb09.js → p-91470a4a.js} +2 -2
  106. package/dist/arcgis-coding-components/{p-b8161e05.js → p-bc983f83.js} +2 -2
  107. package/dist/arcgis-coding-components/{p-ef12f153.js → p-c9ac7a16.js} +3 -3
  108. package/dist/arcgis-coding-components/{p-acb10a82.js → p-e1b11b78.js} +2 -2
  109. package/dist/arcgis-coding-components/{p-f74fe922.js → p-f5841047.js} +2 -2
  110. package/dist/cjs/app-globals-41c1f370.js +10 -0
  111. package/dist/cjs/{arcade-defaults-576ac87c.js → arcade-defaults-d6466b5a.js} +729 -289
  112. package/dist/cjs/{arcade-mode-255ab73e.js → arcade-mode-b9b8cb02.js} +78 -84
  113. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1613 -240
  114. package/dist/cjs/arcgis-coding-components.cjs.js +14 -12
  115. package/dist/cjs/{css-ed54e7c5.js → css-445635ef.js} +1 -1
  116. package/dist/cjs/{cssMode-953d135f.js → cssMode-afed37ca.js} +3 -3
  117. package/dist/cjs/{html-6885989e.js → html-04f96ede.js} +3 -3
  118. package/dist/cjs/{htmlMode-036d018f.js → htmlMode-30d3358f.js} +3 -3
  119. package/dist/cjs/index-202533e4.js +1303 -0
  120. package/dist/cjs/index.cjs.js +3 -3
  121. package/dist/cjs/{javascript-8937794f.js → javascript-0f0f9b7b.js} +4 -4
  122. package/dist/cjs/{jsonMode-679c7610.js → jsonMode-7ffc2346.js} +3 -3
  123. package/dist/cjs/loader.cjs.js +6 -4
  124. package/dist/cjs/{tsMode-ab115860.js → tsMode-885b55a1.js} +3 -3
  125. package/dist/cjs/{typescript-38fcedb8.js → typescript-c042efee.js} +3 -3
  126. package/dist/components/arcade-api.js +27 -34
  127. package/dist/components/arcade-contribution.js +10 -10
  128. package/dist/components/arcade-defaults.js +143 -161
  129. package/dist/components/arcade-mode.js +46 -52
  130. package/dist/components/arcade-results.js +51 -61
  131. package/dist/components/arcade-suggestions.js +27 -34
  132. package/dist/components/arcade-variables.js +26 -37
  133. package/dist/components/arcgis-arcade-api.js +1 -1
  134. package/dist/components/arcgis-arcade-editor.js +63 -89
  135. package/dist/components/arcgis-arcade-results.js +1 -1
  136. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  137. package/dist/components/arcgis-arcade-variables.js +1 -1
  138. package/dist/components/arcgis-assets.d.ts +1 -1
  139. package/dist/components/arcgis-assets.js +1 -1
  140. package/dist/components/arcgis-code-editor.js +1 -1
  141. package/dist/components/chunk-2CDDVOQU.js +1364 -0
  142. package/dist/components/code-editor.js +75 -80
  143. package/dist/components/fields.js +45 -45
  144. package/dist/components/index.js +1 -1
  145. package/dist/components/index2.js +394 -3
  146. package/dist/components/markdown.js +13 -27
  147. package/dist/components/useT9n.js +37 -0
  148. package/dist/components/utilities.js +3 -3
  149. package/dist/esm/app-globals-73ff8787.js +8 -0
  150. package/dist/esm/{arcade-defaults-75889e75.js → arcade-defaults-c6c41c52.js} +712 -275
  151. package/dist/esm/{arcade-mode-5b34a4b8.js → arcade-mode-3b59a8a3.js} +78 -84
  152. package/dist/esm/arcgis-arcade-api_6.entry.js +1613 -240
  153. package/dist/esm/arcgis-coding-components.js +15 -13
  154. package/dist/esm/{css-97016367.js → css-19fe388b.js} +1 -1
  155. package/dist/esm/{cssMode-9629ae8c.js → cssMode-18face1c.js} +3 -3
  156. package/dist/esm/{html-8663047e.js → html-f3314d3b.js} +3 -3
  157. package/dist/esm/{htmlMode-bebf5737.js → htmlMode-2796244f.js} +3 -3
  158. package/dist/esm/index-9e18ee96.js +1272 -0
  159. package/dist/esm/index.js +3 -3
  160. package/dist/esm/{javascript-b4989490.js → javascript-10ca6f91.js} +4 -4
  161. package/dist/esm/{jsonMode-b32620ba.js → jsonMode-9f05b287.js} +3 -3
  162. package/dist/esm/loader.js +7 -5
  163. package/dist/esm/{tsMode-a6cd5561.js → tsMode-17e9cd75.js} +3 -3
  164. package/dist/esm/{typescript-4fbf00a5.js → typescript-1416b690.js} +3 -3
  165. package/dist/loader/cdn.js +1 -1
  166. package/dist/loader/index.cjs.js +1 -1
  167. package/dist/loader/index.es2017.js +1 -1
  168. package/dist/loader/index.js +1 -1
  169. package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
  170. package/dist/types/components/arcade-editor/arcade-editor.d.ts +18 -12
  171. package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
  172. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +7 -8
  173. package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
  174. package/dist/types/components/code-editor/code-editor.d.ts +23 -13
  175. package/dist/types/components.d.ts +57 -35
  176. package/dist/types/controllers/useT9n.d.ts +1 -0
  177. 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 +10 -13
  178. 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
  179. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  180. package/dist/types/utils/profile/types.d.ts +40 -13
  181. package/dist/types/utils/profile/utils.d.ts +2 -4
  182. package/package.json +24 -24
  183. package/dist/arcgis-coding-components/p-2ccd9fd8.entry.js +0 -6
  184. package/dist/arcgis-coding-components/p-2d2b5e39.js +0 -7
  185. package/dist/arcgis-coding-components/p-7e1cb194.js +0 -68
  186. package/dist/arcgis-coding-components/p-9829e511.js +0 -6
  187. package/dist/cjs/index-2c5ded93.js +0 -1958
  188. package/dist/esm/index-b24a41ab.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.11
4
+ * v4.30.0-next.111
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 { B, q, W } from './index2.js';
9
+ import { u as useControllerManager } from './chunk-2CDDVOQU.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,21 @@ 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-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)}";
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 {
37
+ connectedCallback() { this.manager._connectedCallback(); }
34
38
  constructor() {
35
39
  super();
36
40
  this.__registerHost();
41
+ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
37
42
  this.__attachShadow();
38
- this.close = createEvent(this, "close", 3);
39
- this.itemSelected = createEvent(this, "itemSelected", 3);
43
+ this.arcgisClose = createEvent(this, "arcgisClose", 3);
44
+ this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
45
+ this.manager = useControllerManager(this,forceUpdate);
46
+ this.messages = useT9n();
40
47
  this._updateFilterValue = (e) => {
41
48
  this._filterValue = e.target?.value ?? "";
42
49
  };
@@ -48,7 +55,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
48
55
  const keyEvent = e;
49
56
  if (!keyEvent.key || keyEvent.key === "Enter") {
50
57
  e.preventDefault();
51
- this.itemSelected.emit(item.code);
58
+ this.arcgisItemSelected.emit(item.code);
52
59
  }
53
60
  };
54
61
  this._showSuggestionDetail = (e) => {
@@ -60,14 +67,11 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
60
67
  this._selectedSuggestion = item;
61
68
  };
62
69
  this._emitClose = () => {
63
- this.close.emit();
70
+ this.arcgisClose.emit();
64
71
  };
65
72
  this._beforeBack = async () => {
66
73
  this._selectedSuggestion = undefined;
67
74
  };
68
- this._lang = "";
69
- this._t9nLocale = "";
70
- this._t9nStrings = undefined;
71
75
  this._selectedSuggestion = undefined;
72
76
  this._filterValue = "";
73
77
  this._colorizeStyle = "";
@@ -80,13 +84,12 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
80
84
  // #region Component lifecycle events
81
85
  async componentWillLoad() {
82
86
  this._colorizeStyle = generateColorizeStyles();
83
- this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
84
- await B(this, getAssetPath("./assets"));
87
+ this._themeChangedListener = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
85
88
  }
86
89
  disconnectedCallback() {
90
+ this.manager._disconnectedCallback();
87
91
  this._flowObserver?.disconnect();
88
- this._themeChangedListner?.dispose();
89
- q(this);
92
+ this._themeChangedListener?.dispose();
90
93
  }
91
94
  // #endregion
92
95
  //#region Private Methods
@@ -104,7 +107,7 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
104
107
  // When switching between flow the same reference is reused
105
108
  this._flowObserver = new MutationObserver(() => {
106
109
  // Get the last panel and try to set focus on the input element
107
- W(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
110
+ setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
108
111
  });
109
112
  this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
110
113
  }
@@ -122,37 +125,27 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
122
125
  renderSuggestionListItems(suggestions) {
123
126
  suggestions = filterCollection(suggestions, "label", this._filterValue);
124
127
  if (!suggestions.length) {
125
- return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
128
+ return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
126
129
  }
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 }))));
130
+ 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
131
  }
129
132
  renderSuggestionFlowItem() {
130
133
  const suggestion = this._selectedSuggestion;
131
134
  if (!suggestion) {
132
135
  return null;
133
136
  }
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) })))));
137
+ 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
138
  }
136
139
  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())));
140
+ 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
141
  }
139
142
  static get assetsDirs() { return ["assets"]; }
140
- get _hostElement() { return this; }
143
+ get el() { return this; }
141
144
  static get watchers() { return {
142
145
  "suggestions": ["suggestionsPropChanged"]
143
146
  }; }
144
- 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
- }]);
147
+ static get style() { return ArcgisArcadeSuggestionsStyle0; }
148
+ }, __cmpMeta);
156
149
  function defineCustomElement() {
157
150
  if (typeof customElements === "undefined") {
158
151
  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.11
4
+ * v4.30.0-next.111
5
5
  */
6
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
7
- import { B, q, W, K } from './index2.js';
6
+ import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
7
+ import { u as useControllerManager } from './chunk-2CDDVOQU.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,27 @@ 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-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%}";
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 {
31
+ connectedCallback() { this.manager._connectedCallback(); }
28
32
  constructor() {
29
33
  super();
30
34
  this.__registerHost();
35
+ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
31
36
  this.__attachShadow();
32
- this.close = createEvent(this, "close", 3);
33
- this.itemSelected = createEvent(this, "itemSelected", 3);
37
+ this.arcgisClose = createEvent(this, "arcgisClose", 3);
38
+ this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
39
+ this.manager = useControllerManager(this,forceUpdate);
40
+ this.messages = useT9n();
34
41
  this._updateFilterValue = (e) => {
35
42
  this._filterValue = e.target.value;
36
43
  };
@@ -39,7 +46,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
39
46
  this._filterValue = "";
40
47
  };
41
48
  this._emitClose = () => {
42
- this.close.emit();
49
+ this.arcgisClose.emit();
43
50
  };
44
51
  this._backToTop = () => {
45
52
  this._flowItemRenderers = [];
@@ -52,7 +59,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
52
59
  const keyEvent = e;
53
60
  if (!keyEvent.key || keyEvent.key === "Enter") {
54
61
  e.preventDefault();
55
- this.itemSelected.emit(variable.snippet);
62
+ this.arcgisItemSelected.emit(variable.snippet);
56
63
  }
57
64
  };
58
65
  this._showCollectionPanel = (e) => {
@@ -63,9 +70,6 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
63
70
  e.stopPropagation();
64
71
  this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
65
72
  };
66
- this._lang = "";
67
- this._t9nLocale = "";
68
- this._t9nStrings = undefined;
69
73
  this._mutationCounter = 1;
70
74
  this._flowItemRenderers = [];
71
75
  this._filterValue = "";
@@ -76,12 +80,8 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
76
80
  this._flowItemRenderers = [];
77
81
  }
78
82
  //#endregion
79
- // #region Component lifecycle events
80
- async componentWillLoad() {
81
- await B(this, getAssetPath("./assets"));
82
- }
83
83
  disconnectedCallback() {
84
- q(this);
84
+ this.manager._disconnectedCallback();
85
85
  this._flowObserver?.disconnect();
86
86
  }
87
87
  // #endregion
@@ -106,7 +106,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
106
106
  // When switching between flow the same reference is reused
107
107
  this._flowObserver = new MutationObserver(() => {
108
108
  // Get the last panel and try to set focus on the input element
109
- W(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
109
+ setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
110
110
  });
111
111
  this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
112
112
  }
@@ -135,15 +135,15 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
135
135
  });
136
136
  loading = true;
137
137
  }
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)))));
138
+ return (h("calcite-flow-item", { heading: this.messages.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "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
139
  };
140
140
  }
141
141
  renderEditorVariables(collection) {
142
142
  // Filter the variables. Skip group, we will filter the children later on.
143
- const filterExpression = K(this._filterValue);
143
+ const filterExpression = createFilterExpression(this._filterValue);
144
144
  const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
145
145
  if (!filteredVariables.length) {
146
- return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
146
+ return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
147
147
  }
148
148
  return filteredVariables.map((variable) => this.renderEditorVariable(variable));
149
149
  }
@@ -153,34 +153,23 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
153
153
  // Group is a collection but we represent it differently
154
154
  return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
155
155
  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));
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.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
157
  }
158
158
  }
159
159
  render() {
160
160
  const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
161
161
  if (!this.loading && !profile?.variables.length) {
162
- return (h("calcite-flow", null, h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this._t9nStrings?.noprofilevariablesmessage ?? ""))));
162
+ return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage ?? ""))));
163
163
  }
164
164
  return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
165
165
  }
166
166
  static get assetsDirs() { return ["assets"]; }
167
- get _hostElement() { return this; }
167
+ get el() { return this; }
168
168
  static get watchers() { return {
169
169
  "modelId": ["modelIdPropChanged"]
170
170
  }; }
171
- 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
- }]);
171
+ static get style() { return ArcgisArcadeVariablesStyle0; }
172
+ }, __cmpMeta);
184
173
  function defineCustomElement() {
185
174
  if (typeof customElements === "undefined") {
186
175
  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.11
4
+ * v4.30.0-next.111
5
5
  */
6
6
  import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
7
7