@arcgis/coding-components 4.30.0-next.10 → 4.30.0-next.102

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