@arcgis/coding-components 4.31.0-next.6 → 4.31.0-next.61

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 (218) hide show
  1. package/README.md +22 -3
  2. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  3. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +1 -1
  4. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +1 -1
  5. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +1 -1
  6. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +6 -6
  7. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +1 -1
  8. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +1 -1
  9. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +1 -1
  10. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +1 -1
  11. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +1 -1
  12. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +1 -1
  13. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +1 -1
  14. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +1 -1
  15. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +1 -1
  16. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +1 -1
  17. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +1 -1
  18. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +1 -1
  19. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +1 -1
  20. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +1 -1
  21. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +1 -1
  22. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +1 -1
  23. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +1 -1
  24. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +1 -1
  25. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +1 -1
  26. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +1 -1
  27. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +1 -1
  28. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +1 -1
  29. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +1 -1
  30. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +1 -1
  31. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +1 -1
  32. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +5 -5
  33. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +1 -1
  34. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +1 -1
  35. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +1 -1
  36. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +1 -1
  37. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.ca.json +2 -2
  38. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.de.json +1 -1
  39. package/dist/arcgis-coding-components/assets/arcade-results/t9n/arcade-results.t9n.he.json +1 -1
  40. package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.ca.json +1 -1
  41. package/dist/arcgis-coding-components/assets/arcade-variables/t9n/arcade-variables.t9n.it.json +1 -1
  42. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +3 -3
  43. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +460 -7
  44. package/dist/arcgis-coding-components/assets/language-api-panel/t9n/language-api-panel.t9n.ca.json +1 -1
  45. package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +30 -30
  46. package/dist/arcgis-coding-components/assets/sql-expression-editor/t9n/sql-expression-editor.t9n.en.json +4 -0
  47. package/dist/arcgis-coding-components/assets/sql-expression-fields/t9n/sql-expression-fields.t9n.en.json +4 -0
  48. package/dist/arcgis-coding-components/index.esm.js +2 -2
  49. package/dist/arcgis-coding-components/p-0cb4fef5.js +68 -0
  50. package/dist/arcgis-coding-components/p-210b84af.js +6 -0
  51. package/dist/arcgis-coding-components/{p-10cab8d9.js → p-38ac5715.js} +2 -2
  52. package/dist/arcgis-coding-components/{p-41c932b5.js → p-4926ce1a.js} +3 -3
  53. package/dist/arcgis-coding-components/p-5a153155.entry.js +6 -0
  54. package/dist/arcgis-coding-components/{p-38534c31.js → p-5ebbf307.js} +3 -3
  55. package/dist/arcgis-coding-components/{p-8c6a6176.js → p-64a223f6.js} +3 -3
  56. package/dist/arcgis-coding-components/p-67743b19.js +6 -0
  57. package/dist/arcgis-coding-components/p-81daa81b.entry.js +6 -0
  58. package/dist/arcgis-coding-components/{p-14ab3ed5.js → p-8becedb9.js} +1 -1
  59. package/dist/arcgis-coding-components/{p-2a7ef2fd.js → p-9327da9f.js} +2 -2
  60. package/dist/arcgis-coding-components/{p-e11999af.js → p-a95711a0.js} +2 -2
  61. package/dist/arcgis-coding-components/{p-19b4f0e9.js → p-b53816d4.js} +2 -2
  62. package/dist/arcgis-coding-components/{p-022df536.js → p-d1bfcb69.js} +1 -1
  63. package/dist/arcgis-coding-components/p-ec5b9ea3.entry.js +6 -0
  64. package/dist/arcgis-coding-components/p-eca30e5b.js +6 -0
  65. package/dist/arcgis-coding-components/p-eee3ff96.js +7 -0
  66. package/dist/arcgis-coding-components/p-f9d23ea0.js +6 -0
  67. package/dist/cjs/{app-globals-8991f48d.js → app-globals-f4c1e97c.js} +1 -1
  68. package/dist/cjs/arcade-defaults-ec32f7d1.js +350 -0
  69. package/dist/cjs/{arcade-mode-ee5f5a57.js → arcade-mode-532caf55.js} +18 -5
  70. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +59 -103
  71. package/dist/cjs/arcgis-coding-components.cjs.js +5 -5
  72. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +32 -11
  73. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +16 -10
  74. package/dist/cjs/{css-c0ad88d7.js → css-498723df.js} +1 -1
  75. package/dist/cjs/{cssMode-deeb6f90.js → cssMode-2def57fb.js} +2 -3
  76. package/dist/cjs/{html-be08d94a.js → html-54a71c36.js} +2 -3
  77. package/dist/cjs/{htmlMode-f5b8239a.js → htmlMode-3a79512a.js} +2 -3
  78. package/dist/cjs/{index-358de60d.js → index-8f53c170.js} +203 -156
  79. package/dist/cjs/index.cjs.js +4 -4
  80. package/dist/cjs/{javascript-37d3d13f.js → javascript-67d269fa.js} +3 -4
  81. package/dist/cjs/{jsonMode-12a2a091.js → jsonMode-46d9bccc.js} +2 -3
  82. package/dist/cjs/{language-defaults-base-1f082ad7.js → language-defaults-base-337abff1.js} +812 -1036
  83. package/dist/cjs/loader.cjs.js +4 -4
  84. package/dist/cjs/{sql-expr-defaults-dca57c68.js → sql-expr-defaults-c246fecf.js} +226 -75
  85. package/dist/cjs/sql-expr-mode-58361d32.js +480 -0
  86. package/dist/cjs/{tsMode-d33a7021.js → tsMode-0032d144.js} +2 -3
  87. package/dist/cjs/{typescript-f3be2ce7.js → typescript-e84c6b80.js} +2 -3
  88. package/dist/components/arcade-defaults.js +239 -4
  89. package/dist/components/arcade-mode.js +18 -4
  90. package/dist/components/arcade-results.js +3 -3
  91. package/dist/components/arcade-suggestions.js +2 -2
  92. package/dist/components/arcade-variables.js +2 -2
  93. package/dist/components/arcgis-arcade-editor.js +21 -13
  94. package/dist/components/arcgis-arcade-results.js +1 -1
  95. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  96. package/dist/components/arcgis-arcade-variables.js +1 -1
  97. package/dist/components/arcgis-assets.d.ts +26 -26
  98. package/dist/components/arcgis-assets.js +2 -2
  99. package/dist/components/arcgis-code-editor.js +1 -1
  100. package/dist/components/arcgis-language-api-panel.js +1 -1
  101. package/dist/components/arcgis-sql-expression-editor.js +33 -11
  102. package/dist/components/arcgis-sql-expression-fields.js +1 -1
  103. package/dist/components/{chunk-3IUJHIAA.js → chunk-WEX2VUZV.js} +87 -92
  104. package/dist/components/code-editor.js +17 -23
  105. package/dist/components/fields.js +4 -4
  106. package/dist/components/index.js +1 -1
  107. package/dist/components/index2.js +4 -4
  108. package/dist/components/language-api-panel.js +22 -4
  109. package/dist/components/language-defaults-base.js +61 -287
  110. package/dist/components/markdown.js +1 -1
  111. package/dist/components/sql-expr-defaults.js +77 -24
  112. package/dist/components/sql-expr-mode.js +294 -24950
  113. package/dist/components/sql-expression-fields.js +15 -8
  114. package/dist/components/useT9n.js +41 -2
  115. package/dist/components/utilities.js +1 -1
  116. package/dist/esm/{app-globals-3e4e0353.js → app-globals-fa265627.js} +1 -1
  117. package/dist/esm/arcade-defaults-337657fa.js +345 -0
  118. package/dist/esm/{arcade-mode-4a83348d.js → arcade-mode-a63523c8.js} +18 -5
  119. package/dist/esm/arcgis-arcade-editor_6.entry.js +55 -99
  120. package/dist/esm/arcgis-coding-components.js +6 -6
  121. package/dist/esm/arcgis-sql-expression-editor.entry.js +32 -11
  122. package/dist/esm/arcgis-sql-expression-fields.entry.js +16 -10
  123. package/dist/esm/{css-bad8d1c3.js → css-d85cb176.js} +1 -1
  124. package/dist/esm/{cssMode-68a5f601.js → cssMode-d79695ab.js} +2 -3
  125. package/dist/esm/{html-9b27df1a.js → html-16fb0022.js} +2 -3
  126. package/dist/esm/{htmlMode-361ad282.js → htmlMode-cb57ceed.js} +2 -3
  127. package/dist/esm/{index-8a552796.js → index-ebdb3a18.js} +203 -156
  128. package/dist/esm/index.js +4 -4
  129. package/dist/esm/{javascript-8004e14f.js → javascript-ae8e86d4.js} +3 -4
  130. package/dist/esm/{jsonMode-91a0be74.js → jsonMode-06c411fd.js} +2 -3
  131. package/dist/esm/{language-defaults-base-df906b3d.js → language-defaults-base-5dfd6f32.js} +809 -1036
  132. package/dist/esm/loader.js +5 -5
  133. package/dist/esm/{sql-expr-defaults-ae0be602.js → sql-expr-defaults-f324cf8f.js} +225 -74
  134. package/dist/esm/sql-expr-mode-f606957e.js +476 -0
  135. package/dist/esm/{tsMode-2756c213.js → tsMode-2114c9fd.js} +2 -3
  136. package/dist/esm/{typescript-1aaf3ddd.js → typescript-b771d29f.js} +2 -3
  137. package/dist/loader/cdn.js +2 -3
  138. package/dist/loader/index.cjs.js +2 -3
  139. package/dist/loader/index.d.ts +3 -0
  140. package/dist/loader/index.es2017.js +2 -3
  141. package/dist/loader/index.js +2 -3
  142. package/dist/types/components/arcade-editor/arcade-editor.d.ts +16 -5
  143. package/dist/types/components/code-editor/code-editor.d.ts +14 -4
  144. package/dist/types/components/language-api-panel/language-api-panel.d.ts +1 -0
  145. package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +31 -3
  146. package/dist/types/components/sql-expression-fields/sql-expression-fields.d.ts +17 -0
  147. package/dist/types/components.d.ts +40 -13
  148. package/dist/types/data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
  149. package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +8 -1
  150. package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +5 -1
  151. package/dist/types/stencil-public-runtime.d.ts +3 -10
  152. package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +1 -0
  153. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -0
  154. package/dist/types/utils/arcade-monaco/arcade-profile-strategy.d.ts +9 -0
  155. package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +6 -0
  156. package/dist/types/utils/fields.d.ts +2 -2
  157. package/dist/types/utils/profile/editor-profile.d.ts +7 -6
  158. package/dist/types/utils/profile/types.d.ts +28 -0
  159. package/dist/types/utils/profile/utils.d.ts +5 -1
  160. package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +56 -5
  161. package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +61 -0
  162. package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +1 -11
  163. package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +0 -1
  164. package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +18 -534
  165. package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +34 -1
  166. package/dist/types/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +30 -0
  167. package/dist/types/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +19 -0
  168. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -7
  169. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +73 -77
  170. package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +5 -6
  171. package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +8 -0
  172. package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +11 -8
  173. package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +13 -0
  174. package/dist/types/utils/sql-expr-monaco/types.d.ts +30 -28
  175. package/package.json +19 -19
  176. package/dist/arcgis-coding-components/p-1baf3624.entry.js +0 -6
  177. package/dist/arcgis-coding-components/p-8e61744c.js +0 -68
  178. package/dist/arcgis-coding-components/p-933de2b5.entry.js +0 -6
  179. package/dist/arcgis-coding-components/p-9dfc06ea.js +0 -6
  180. package/dist/arcgis-coding-components/p-a536144e.js +0 -6
  181. package/dist/arcgis-coding-components/p-cd67026d.js +0 -6
  182. package/dist/arcgis-coding-components/p-d7e83ea1.entry.js +0 -6
  183. package/dist/arcgis-coding-components/p-e055c041.js +0 -6
  184. package/dist/arcgis-coding-components/p-f1fab45e.js +0 -7
  185. package/dist/cjs/arcade-defaults-2d36c400.js +0 -116
  186. package/dist/cjs/sql-expr-mode-c644220d.js +0 -25135
  187. package/dist/esm/arcade-defaults-1adb5004.js +0 -111
  188. package/dist/esm/polyfills/core-js.js +0 -11
  189. package/dist/esm/polyfills/dom.js +0 -79
  190. package/dist/esm/polyfills/es5-html-element.js +0 -1
  191. package/dist/esm/polyfills/index.js +0 -34
  192. package/dist/esm/polyfills/system.js +0 -6
  193. package/dist/esm/sql-expr-mode-1821b2b9.js +0 -25132
  194. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
  195. package/dist/types/utils/profile/predefined-profile.d.ts +0 -4
  196. package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +0 -41
  197. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +0 -16
  198. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +0 -26
  199. package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +0 -37
  200. package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +0 -11
  201. package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +0 -122
  202. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +0 -5
  203. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +0 -18
  204. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +0 -6
  205. package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +0 -156
  206. package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +0 -150
  207. package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +0 -1397
  208. package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +0 -59
  209. package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +0 -295
  210. package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +0 -135
  211. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +0 -3
  212. package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +0 -2
  213. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +0 -0
  214. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/sql-expression-editor/sql-expression-editor.stories.d.ts +0 -0
  215. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +0 -0
  216. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -0
  217. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -0
  218. /package/dist/types/data/{actions-runner-1 → arcgis-web-compoments/actions-runner-1}/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -0
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.61
5
5
  */
6
- import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
7
- import { u as useControllerManager } from './chunk-3IUJHIAA.js';
6
+ import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
7
+ import { u as useControllerManager } from './chunk-WEX2VUZV.js';
8
8
  import { g as generateGuid } from './index2.js';
9
9
  import { s as sqlExprDefaults } from './sql-expr-defaults.js';
10
+ import { u as useT9n } from './useT9n.js';
10
11
  import { d as defineCustomElement$4 } from './code-editor.js';
11
12
  import { d as defineCustomElement$3 } from './language-api-panel.js';
12
13
  import { d as defineCustomElement$2 } from './sql-expression-fields.js';
@@ -16,34 +17,49 @@ import "@esri/calcite-components/dist/components/calcite-action.js";
16
17
  const sqlExpressionEditorCss = "arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";
17
18
  const ArcgisSqlExpressionEditorStyle0 = sqlExpressionEditorCss;
18
19
 
19
- const __cmpMeta = [0,"arcgis-sql-expression-editor",{"profile":[1040],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32]},undefined,{"profile":["_profileChanged"]}];
20
+ const __cmpMeta = [0,"arcgis-sql-expression-editor",{"profile":[1040],"script":[1025],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32],"messages":[32]},undefined,{"messages":["_messagesChanged"],"profile":["_profileChanged"]}];
20
21
  const SqlExpressionEditor = /*@__PURE__*/ proxyCustomElement(class SqlExpressionEditor extends HTMLElement {
21
22
  connectedCallback() { this.manager._connectedCallback(); }
22
23
  constructor() {
23
24
  super();
24
25
  this.__registerHost();
25
26
  this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
27
+ this.arcgisScriptChange = createEvent(this, "arcgisScriptChange", 3);
26
28
  this.manager = useControllerManager(this,forceUpdate);
27
29
  // #endregion
28
30
  // #region Private properties
29
31
  this._modelId = generateGuid();
30
32
  this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
33
+ this._updateApiLibrary = async () => {
34
+ this._apiLibrary = await sqlExprDefaults.getApiLibrary(this._modelId);
35
+ };
36
+ this._onCodeEditorValueChange = (e) => {
37
+ e.stopPropagation();
38
+ this.script = e.detail;
39
+ this.arcgisScriptChange.emit(e.detail);
40
+ };
31
41
  this._preparing = false;
32
42
  this._editorProfile = undefined;
33
43
  this._activeAction = undefined;
34
44
  this._apiLibrary = undefined;
45
+ this.messages = useT9n();
35
46
  this.profile = undefined;
47
+ this.script = "";
48
+ }
49
+ async _messagesChanged() {
50
+ await this._updateEditorProfile().catch(console.error);
51
+ await this._updateApiLibrary().catch(console.error);
36
52
  }
37
- _profileChanged() {
38
- this._updateSqlExprDefaults().catch(console.error);
53
+ async _profileChanged() {
54
+ await this._updateEditorProfile().catch(console.error);
55
+ await this._updateApiLibrary().catch(console.error);
39
56
  }
40
57
  // #endregion
41
58
  // #region Private methods API
42
- async _updateSqlExprDefaults() {
59
+ async _updateEditorProfile() {
43
60
  this._preparing = true;
44
61
  try {
45
62
  await sqlExprDefaults.setProfileForModel(this._modelId, this.profile);
46
- this._apiLibrary = await sqlExprDefaults.getApiLibrary(this._modelId);
47
63
  }
48
64
  catch {
49
65
  this._editorProfile = undefined;
@@ -63,23 +79,29 @@ this.constructor.__registerControllers = ()=>__cmpMeta[2]??{};
63
79
  // #endregion
64
80
  // #region Component lifecycle events
65
81
  async componentWillLoad() {
66
- await this._updateSqlExprDefaults().catch(console.error);
82
+ await this._updateEditorProfile().catch(console.error);
67
83
  // The profile has to be refreshed on locale change
68
84
  // this.manager.watch("messages", () => void this._updateEditorProfile().catch(console.error));
69
85
  }
86
+ async componentDidLoad() {
87
+ // We do updateApiLibrary in componentDidLoad because we need to wait until code editor
88
+ // is rendered for worker to register and allow for fetching the sdk
89
+ await this._updateApiLibrary();
90
+ }
70
91
  disconnectedCallback() {
71
92
  this.manager._disconnectedCallback();
72
93
  sqlExprDefaults.disposeForModel(this._modelId);
73
94
  }
74
95
  // #endregion
75
96
  render() {
76
- return (h(Host, { key: '67f7ebf7a28a8ffc3fe967721389d45c4e2003a1' }, h("div", { key: 'b3bf4ec2a8d04105e97489593ccec95cd33237f0', class: "flex-row flex-adjustable" }, h("div", { key: 'fdac47e22baf64c72f786f9e09b637050f417f94', class: "flex-column flex-adjustable" }, h("arcgis-code-editor", { key: 'f4151dd39ec3523907cd907ebb7558e05bca9cc1', language: "arcgis-sql-expression", modelId: this._modelId, ref: (e) => (this._codeEditorElt = e) })), this._activeAction === "fields" && (h("arcgis-sql-expression-fields", { key: 'aa0e5d88429d4bf865b9adc506028efefec1a73a', class: "side-panel flex-panel border-inline-start", loading: this._preparing, modelId: this._modelId, "data-panel-name": "none", onArcgisFieldSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined) })), this._activeAction === "functions" && (h("arcgis-language-api-panel", { key: '7826dbb1b08894c6c6385806a3aef6cff77395d0', class: "side-panel flex-panel border-inline-start", onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined), loading: this._preparing, apiLibrary: this._apiLibrary, "data-panel-name": "none" })), h("calcite-action-bar", { key: 'ee618d666b70405495627a9d15238e8723c6f961', class: "side-action-bar border-inline-start", expanded: false, position: "end" }, h("calcite-action", { key: '2c828df5dded6347e13e59ba9e313824baa606ff', id: "fields-action", text: "Fields", icon: "profile-variables", active: this._activeAction === "fields", "data-panel-name": "fields",
97
+ return (h(Host, { key: '63348b6e3e5aa7544203c5ec7270db7827c6f3ed' }, h("div", { key: '203ed656208717c877c540ed5c49fc12338d6b15', class: "flex-row flex-adjustable" }, h("div", { key: '4dfe400bbc9ab74ef86c4115ceeabbcb41913427', class: "flex-column flex-adjustable" }, h("arcgis-code-editor", { key: 'dfc9e247b39d2d9901ac911e147d993897809954', language: "arcgis-sql-expression", modelId: this._modelId, ref: (e) => (this._codeEditorElt = e), value: this.script ?? "", onArcgisValueChange: this._onCodeEditorValueChange })), this._activeAction === "fields" && (h("arcgis-sql-expression-fields", { key: 'b5a5516264aae278f3feec00a5e20e2d0855024d', class: "side-panel flex-panel border-inline-start", loading: this._preparing, modelId: this._modelId, "data-panel-name": "none", onArcgisFieldSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined) })), this._activeAction === "functions" && (h("arcgis-language-api-panel", { key: '6da236e289e8bcdadc27cadece6e1fb34c55b1da', class: "side-panel flex-panel border-inline-start", onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined), loading: this._preparing, apiLibrary: this._apiLibrary, "data-panel-name": "none" })), h("calcite-action-bar", { key: '91549ebac7e78165b911e5def1141010032dfa43', class: "side-action-bar border-inline-start", expanded: false, position: "end" }, h("calcite-action", { key: '32211e3b4e8db0530a047ba6c22234d15e504e17', id: "fields-action", text: this.messages.fields ?? "Fields", icon: "profile-variables", active: this._activeAction === "fields", "data-panel-name": "fields",
77
98
  // need to use an arrow function to automatically bind 'this'
78
- onClick: (e) => this._handleActionClick(e) }), h("calcite-action", { key: 'eab785c5b14cadeb5047db1957134f5accfedc76', id: "functions-action", text: "Functions", icon: "function", active: this._activeAction === "functions", "data-panel-name": "functions", onClick: (e) => this._handleActionClick(e) })))));
99
+ onClick: (e) => this._handleActionClick(e) }), h("calcite-action", { key: '3c308d994b45c67df76414580d881a082333d2f8', id: "functions-action", text: this.messages.functions ?? "Functions", icon: "function", active: this._activeAction === "functions", "data-panel-name": "functions", onClick: (e) => this._handleActionClick(e) })))));
79
100
  }
80
101
  static get assetsDirs() { return ["assets"]; }
81
102
  get el() { return this; }
82
103
  static get watchers() { return {
104
+ "messages": ["_messagesChanged"],
83
105
  "profile": ["_profileChanged"]
84
106
  }; }
85
107
  static get style() { return ArcgisSqlExpressionEditorStyle0; }
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.61
5
5
  */
6
6
  import { S as SqlExpressionFields, d as defineCustomElement$1 } from './sql-expression-fields.js';
7
7
 
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.6
4
+ * v4.31.0-next.61
5
5
  */
6
6
  import { a as isNotUndefined, D as Deferred, k as safeAsyncCall, l as devToolsAwareTimeout, m as safeCall } from './index2.js';
7
7
 
@@ -15,7 +15,7 @@ function retrieveComponentMembers(component, isLit) {
15
15
  ([name, descriptor]) => descriptor.noAccessor ? void 0 : [
16
16
  name,
17
17
  [
18
- (descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ : descriptor.type === Number ? 2 /* Number */ : descriptor.type === Boolean ? 4 /* Boolean */ : 1 /* String */)
18
+ (descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ : 16 /* Unknown */)
19
19
  ]
20
20
  ]
21
21
  ).filter(isNotUndefined)
@@ -145,6 +145,7 @@ var shouldBypass = {
145
145
  };
146
146
  var elementToInstance = /* @__PURE__ */ new WeakMap();
147
147
  var _a;
148
+ _a = controllerSymbol;
148
149
  var Controller = class {
149
150
  constructor(component) {
150
151
  this._callbacks = {
@@ -160,8 +161,8 @@ var Controller = class {
160
161
  this._ready = new Deferred();
161
162
  this._lifecycleCleanups = [];
162
163
  this.connectedCalled = false;
163
- this.willLoadCalled = false;
164
- this.didLoadCalled = false;
164
+ this._loadCalled = false;
165
+ this.loadedCalled = false;
165
166
  this[_a] = true;
166
167
  this.ready = this._ready.promise;
167
168
  /*
@@ -193,12 +194,12 @@ var Controller = class {
193
194
  if (!connectedWillStillHappen && !this.connectedCalled) {
194
195
  this.triggerConnected();
195
196
  }
196
- const loadWillStillHappen = !manager.willLoadCalled;
197
+ const loadWillStillHappen = !manager._loadCalled;
197
198
  if (loadWillStillHappen) {
198
199
  return;
199
200
  }
200
201
  this.triggerLoad().then(() => {
201
- const loadedWillStillHappen = !manager.didLoadCalled;
202
+ const loadedWillStillHappen = !manager.loadedCalled;
202
203
  if (loadedWillStillHappen) {
203
204
  return;
204
205
  }
@@ -340,10 +341,10 @@ var Controller = class {
340
341
  }
341
342
  /** @internal */
342
343
  async triggerLoad() {
343
- if (this.willLoadCalled) {
344
+ if (this._loadCalled) {
344
345
  return;
345
346
  }
346
- this.willLoadCalled = true;
347
+ this._loadCalled = true;
347
348
  const genericController = this;
348
349
  if (genericController.hostLoad) {
349
350
  await safeAsyncCall(genericController.hostLoad, genericController);
@@ -355,7 +356,7 @@ var Controller = class {
355
356
  }
356
357
  /** @internal */
357
358
  triggerLoaded() {
358
- if (this.didLoadCalled) {
359
+ if (this.loadedCalled) {
359
360
  return;
360
361
  }
361
362
  const genericController = this;
@@ -363,7 +364,7 @@ var Controller = class {
363
364
  safeCall(genericController.hostLoaded, genericController);
364
365
  }
365
366
  this._callbacks.hostLoaded.forEach(safeCall);
366
- this.didLoadCalled = true;
367
+ this.loadedCalled = true;
367
368
  }
368
369
  /** @internal */
369
370
  triggerUpdate(changedProperties) {
@@ -410,7 +411,6 @@ var Controller = class {
410
411
  });
411
412
  }
412
413
  };
413
- _a = controllerSymbol;
414
414
  function callUpdate(callback) {
415
415
  safeCall(callback, void 0, this);
416
416
  }
@@ -419,9 +419,9 @@ function makeProvisionalValue(base) {
419
419
  if (typeof base !== "object" && typeof base !== "function" || base === null) {
420
420
  return base;
421
421
  }
422
- const proxy2 = new Proxy(base, {
422
+ const proxy = new Proxy(base, {
423
423
  get(target, prop, receiver) {
424
- if (cyclical.has(prop) && prop in target && target[prop] === proxy2) {
424
+ if (cyclical.has(prop) && prop in target && target[prop] === proxy) {
425
425
  return void 0;
426
426
  }
427
427
  if (prop in target || prop in Promise.prototype || typeof prop === "symbol") {
@@ -433,7 +433,7 @@ function makeProvisionalValue(base) {
433
433
  return Reflect.set(target, prop, newValue, receiver);
434
434
  }
435
435
  });
436
- return proxy2;
436
+ return proxy;
437
437
  }
438
438
  var cyclical = /* @__PURE__ */ new Set(["exports", "_exports"]);
439
439
  function toControllerHost(component) {
@@ -500,14 +500,35 @@ function watch(component, property, callback) {
500
500
  var ComponentInternals = class {
501
501
  constructor(component) {
502
502
  /**
503
- * When watchers are set, set then into `allWatchers`. When watchers are read
504
- * in the setter, read from `enabledWatchers`.
505
- * On connectedCallback(), controller manager does `enabledWatchers=allWatchers`.
506
- * Reasoning:
503
+ * When watchers are set, they are set into `allWatchers`. When watchers are
504
+ * read in the setter, they are read from `enabledWatchers`.
505
+ *
506
+ * In Stencil, on connectedCallback(), controller manager does
507
+ * `enabledWatchers=allWatchers`. Reasoning:
507
508
  * - This disables watchers until connected callback (matches behavior of
508
509
  * Stencil's watchers)
509
- * - This removes in the setter to check if watchers were enabled already or
510
- * not (as getters/setters are hot path, and should be streamlined)
510
+ * - This removes the need for a check in the setter for whether the watchers
511
+ * were enabled already or not (as getters/setters are hot path, and should
512
+ * be streamlined)
513
+ *
514
+ * In Lit, we set enabledWatchers to allWatchers in the constructor.
515
+ * Reasoning:
516
+ * - While in Stencil all user provided properties are either set before the
517
+ * component constructor (this is possible since Stencil's props store is
518
+ * externalized) or after connectedCallback, in Lit the properties may be
519
+ * set by attributeChangedCallback before connectedCallback. Thus, we need
520
+ * to enable watchers even before connectedCallback.
521
+ * - This means, that a watcher set for some prop before your component got
522
+ * a chance to set the default value will trigger the watcher when the
523
+ * default value is set - but, that is inline with Lit's willUpdate behavior
524
+ * of triggering for default values AND, the only way to set a watcher
525
+ * before default value is if you called watcher inside a controller. For
526
+ * now, there are no controllers written outside of arcgis-map-components
527
+ * package, so I was able to verify that this change would have no
528
+ * negative impact.
529
+ *
530
+ * In either way, I plan to remove watchers from controllers once Stencil
531
+ * support is removed.
511
532
  */
512
533
  this.enabledWatchers = {};
513
534
  this.allWatchers = {};
@@ -585,7 +606,10 @@ var ComponentInternals = class {
585
606
  _getSetProxy(prototype, name2, type) {
586
607
  const component = this.component;
587
608
  const propType = getMemberType(component, name2);
588
- const descriptor = Object.getOwnPropertyDescriptor(prototype, name2);
609
+ let descriptor;
610
+ do {
611
+ descriptor = Object.getOwnPropertyDescriptor(prototype, name2);
612
+ } while (!descriptor && (prototype = Object.getPrototypeOf(prototype)));
589
613
  if (!descriptor) {
590
614
  return void 0;
591
615
  }
@@ -593,11 +617,11 @@ var ComponentInternals = class {
593
617
  const originalSet = descriptor.set;
594
618
  const isGetterAlreadyOverwritten = customAccessor in originalGet;
595
619
  const isSetterAlreadyOverwritten = customAccessor in originalSet;
596
- const shouldOverwriteGet = !isGetterAlreadyOverwritten;
597
- const shouldOverwriteSet = !isSetterAlreadyOverwritten;
598
- if (!shouldOverwriteGet && !shouldOverwriteSet) {
620
+ if (isGetterAlreadyOverwritten && isSetterAlreadyOverwritten) {
599
621
  return;
600
622
  }
623
+ const shouldOverwriteGet = !isGetterAlreadyOverwritten;
624
+ const shouldOverwriteSet = !isSetterAlreadyOverwritten;
601
625
  const finalGetter = shouldOverwriteGet ? function getter() {
602
626
  let value = originalGet.call(this);
603
627
  const component2 = elementToInstance.get(this);
@@ -619,10 +643,20 @@ var ComponentInternals = class {
619
643
  originalSet.call(this, rawNewValue);
620
644
  return;
621
645
  }
622
- let newValue = component2.manager.isLit ? rawNewValue : parsePropertyValue(rawNewValue, propType);
646
+ let newValue = component2.manager.isLit ? (
647
+ /*
648
+ * Cast `null` to `undefined`. Reasons:
649
+ * - component can declare properties simply using
650
+ * `@property() name?: string;` and get accurate typings,
651
+ * without being forced to use
652
+ * `@property() name?: string | Nil;`.
653
+ * - simplifies checks in the code and thus reduces bugs
654
+ */
655
+ rawNewValue ?? void 0
656
+ ) : parsePropertyValue(rawNewValue, propType);
623
657
  const internals = component2.manager.internals;
624
658
  if (newValue === oldValue) {
625
- originalSet.call(this, rawNewValue);
659
+ originalSet.call(this, newValue);
626
660
  } else {
627
661
  const setters = shouldBypass.setter ? emptyArray : internals.setters[name2] ?? emptyArray;
628
662
  for (let i = 0; i < setters.length; i++) {
@@ -683,7 +717,7 @@ var ControllerManager = class extends GenericController {
683
717
  const controllers = /* @__PURE__ */ new Set();
684
718
  function addController(controller) {
685
719
  controllers.add(controller);
686
- if (isLit && !(controllerSymbol in controller) && component.el.isConnected) {
720
+ if (!(controllerSymbol in controller) && component.renderRoot && component.el.isConnected) {
687
721
  controller.hostConnected?.();
688
722
  }
689
723
  }
@@ -710,9 +744,6 @@ var ControllerManager = class extends GenericController {
710
744
  this._controllers = controllers;
711
745
  this.exports = void 0;
712
746
  this.hasDestroy = autoDestroyDisabledPropName in this.component && typeof this.component.destroy === "function";
713
- if (this.hasDestroy) {
714
- watch(component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
715
- }
716
747
  this._bindLifecycleMethods();
717
748
  const internals = this.internals;
718
749
  Object.keys(internals.members).forEach((name2) => {
@@ -720,7 +751,9 @@ var ControllerManager = class extends GenericController {
720
751
  internals.accessorSetter[name2] = defaultGetterSetter;
721
752
  internals.getSetProxy(name2);
722
753
  });
723
- if (!isLit) {
754
+ if (isLit) {
755
+ this.internals.enabledWatchers = this.internals.allWatchers;
756
+ } else {
724
757
  Object.defineProperty(component, "updateComplete", {
725
758
  get: async () => await this._updatePromise.promise
726
759
  });
@@ -737,13 +770,13 @@ var ControllerManager = class extends GenericController {
737
770
  const isStencilDistBuild = component.el === component;
738
771
  this._originalLifecycles = {
739
772
  // These component's callbacks will be called by Lit, so we don't have to
740
- connectedCallback: isLit || isStencilDistBuild ? void 0 : component.connectedCallback,
741
- disconnectedCallback: isLit || isStencilDistBuild ? void 0 : component.disconnectedCallback,
742
- componentWillLoad: isLit ? void 0 : component.componentWillLoad,
743
- componentDidLoad: isLit ? void 0 : component.componentDidLoad,
744
- componentWillUpdate: isLit ? void 0 : component.componentWillUpdate,
745
- componentDidUpdate: isLit ? void 0 : component.componentDidUpdate,
746
- destroy: component.destroy
773
+ _connectedCallback: isLit || isStencilDistBuild ? void 0 : component.connectedCallback,
774
+ _disconnectedCallback: isLit || isStencilDistBuild ? void 0 : component.disconnectedCallback,
775
+ _load: isLit ? component.load : component.componentWillLoad,
776
+ _loaded: isLit ? component.loaded : component.componentDidLoad,
777
+ _willUpdate: isLit ? void 0 : component.componentWillUpdate,
778
+ _updated: isLit ? void 0 : component.componentDidUpdate,
779
+ _destroy: component.destroy
747
780
  };
748
781
  const hostConnected = this._connectedCallback.bind(this);
749
782
  const hostDisconnected = this._disconnectedCallback.bind(this);
@@ -792,7 +825,7 @@ var ControllerManager = class extends GenericController {
792
825
  keyTrackResolve();
793
826
  internals.enableReadonly?.();
794
827
  this._controllers.forEach(callConnected);
795
- this._originalLifecycles.connectedCallback?.call(this.component);
828
+ this._originalLifecycles._connectedCallback?.call(this.component);
796
829
  }
797
830
  /** @internal */
798
831
  _disconnectedCallback() {
@@ -800,7 +833,7 @@ var ControllerManager = class extends GenericController {
800
833
  return;
801
834
  }
802
835
  this._controllers.forEach(callDisconnected);
803
- this._originalLifecycles.disconnectedCallback?.call(this.component);
836
+ this._originalLifecycles._disconnectedCallback?.call(this.component);
804
837
  if (this.hasDestroy) {
805
838
  this._setAutoDestroyTimeout();
806
839
  }
@@ -818,22 +851,25 @@ var ControllerManager = class extends GenericController {
818
851
  }
819
852
  }
820
853
  await Promise.allSettled(Array.from(this._controllers, callLoad, integrations));
821
- await this._originalLifecycles.componentWillLoad?.call(this.component);
854
+ await this._originalLifecycles._load?.call(this.component);
855
+ if (this.hasDestroy) {
856
+ watch(this.component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
857
+ }
822
858
  }
823
859
  /** @internal */
824
860
  _loaded() {
825
861
  this._controllers.forEach(callLoaded);
826
- this._originalLifecycles.componentDidLoad?.call(this.component);
862
+ this._originalLifecycles._loaded?.call(this.component);
827
863
  }
828
864
  _update() {
829
865
  const changedProperties = this.component.changedProperties;
830
866
  this._controllers.forEach(callUpdate2, changedProperties);
831
- void this._originalLifecycles.componentWillUpdate?.call(this.component);
867
+ this._originalLifecycles._willUpdate?.call(this.component);
832
868
  }
833
869
  _updated() {
834
870
  const maybeLitComponent = this.component;
835
871
  this._controllers.forEach(callUpdated, maybeLitComponent.changedProperties);
836
- this._originalLifecycles.componentDidUpdate?.call(this.component);
872
+ this._originalLifecycles._updated?.call(this.component);
837
873
  if (this.isLit) {
838
874
  maybeLitComponent.changedProperties = /* @__PURE__ */ new Map();
839
875
  } else {
@@ -858,13 +894,13 @@ var ControllerManager = class extends GenericController {
858
894
  this.destroyed = true;
859
895
  this._controllers.forEach(callDestroy);
860
896
  this._controllers.clear();
861
- await this._originalLifecycles.destroy?.call(this.component);
897
+ await this._originalLifecycles._destroy?.call(this.component);
862
898
  }
863
899
  _setAutoDestroyTimeout() {
900
+ if (this._autoDestroyTimeout !== void 0) {
901
+ clearTimeout(this._autoDestroyTimeout);
902
+ }
864
903
  if (!this.component.el.isConnected && !this.component.autoDestroyDisabled) {
865
- if (this._autoDestroyTimeout !== void 0) {
866
- clearTimeout(this._autoDestroyTimeout);
867
- }
868
904
  const destroy = () => void this.destroy().catch(console.error);
869
905
  {
870
906
  this._autoDestroyTimeout = devToolsAwareTimeout(destroy, autoDestroyOnDisconnectTimeout);
@@ -946,7 +982,7 @@ function trackKey(hostsCandidates, onResolved, defaultValue) {
946
982
  const resolved = (resolution) => {
947
983
  leftToResolve -= 1;
948
984
  if (resolution !== void 0) {
949
- leftToResolve = 0;
985
+ leftToResolve = Math.min(leftToResolve, 0);
950
986
  }
951
987
  if (leftToResolve === 0) {
952
988
  onResolved(resolution);
@@ -995,8 +1031,7 @@ function getSet(defaultValue, getSet2) {
995
1031
  const genericComponent = component;
996
1032
  const value = genericComponent[name2];
997
1033
  const isStencilHotReload = "production" !== "production" ;
998
- const initialSet = getSet2.initialSet ?? true;
999
- if (value != null && value !== defaultValue && typeof getSet2.set === "function" && initialSet && !isStencilHotReload) {
1034
+ if (value != null && value !== defaultValue && typeof getSet2.set === "function" && !isStencilHotReload) {
1000
1035
  const newValue = getSet2.set(value, defaultValue, name2);
1001
1036
  if (newValue !== value) {
1002
1037
  if (manager.isLit) {
@@ -1111,44 +1146,4 @@ function setProxy(controller, { host, key, isReactive: assignedToProp }, initial
1111
1146
  });
1112
1147
  }
1113
1148
 
1114
- // src/functional.ts
1115
- var makeController = (constructor) => proxy(void 0, constructor);
1116
- var FunctionalController = class extends Controller {
1117
- constructor(component, constructor) {
1118
- super(component);
1119
- const originalExports = this.exports;
1120
- try {
1121
- setAmbientComponent(this.component);
1122
- const value = constructor(this.component, this);
1123
- const constructorChangedExports = this.exports !== originalExports;
1124
- if (value instanceof Promise) {
1125
- if (!constructorChangedExports) {
1126
- this.setProvisionalExports(value);
1127
- }
1128
- const resolved = value.then((result) => {
1129
- this.exports = result;
1130
- super.catchUpLifecycle();
1131
- }).catch((error) => {
1132
- this._ready.reject(error);
1133
- console.error(error);
1134
- });
1135
- this.onLoad(async () => await resolved);
1136
- } else {
1137
- if (!constructorChangedExports || value !== void 0) {
1138
- this.exports = value;
1139
- }
1140
- queueMicrotask(() => super.catchUpLifecycle());
1141
- }
1142
- } catch (error) {
1143
- this._ready.reject(error);
1144
- console.error(error);
1145
- }
1146
- }
1147
- /** Noop - will be called in the constructor instead */
1148
- catchUpLifecycle() {
1149
- return;
1150
- }
1151
- };
1152
- var proxy = proxyExports(FunctionalController);
1153
-
1154
- export { getSet as g, makeController as m, useControllerManager as u, watch as w };
1149
+ export { Controller as C, getSet as g, proxyExports as p, setAmbientComponent as s, useControllerManager as u, watch as w };