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

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-0dfb0b51.js +6 -0
  50. package/dist/arcgis-coding-components/p-15ab1669.entry.js +6 -0
  51. package/dist/arcgis-coding-components/{p-41c932b5.js → p-2ce01944.js} +3 -3
  52. package/dist/arcgis-coding-components/p-324d3441.js +6 -0
  53. package/dist/arcgis-coding-components/{p-022df536.js → p-32f69143.js} +1 -1
  54. package/dist/arcgis-coding-components/p-48a82879.js +7 -0
  55. package/dist/arcgis-coding-components/p-49d247b3.js +68 -0
  56. package/dist/arcgis-coding-components/p-4aacb744.js +6 -0
  57. package/dist/arcgis-coding-components/p-65666d7d.entry.js +6 -0
  58. package/dist/arcgis-coding-components/{p-19b4f0e9.js → p-b67f1c54.js} +2 -2
  59. package/dist/arcgis-coding-components/{p-14ab3ed5.js → p-bd510fac.js} +1 -1
  60. package/dist/arcgis-coding-components/{p-10cab8d9.js → p-c02b5cb7.js} +2 -2
  61. package/dist/arcgis-coding-components/{p-e11999af.js → p-c79a1a66.js} +2 -2
  62. package/dist/arcgis-coding-components/{p-38534c31.js → p-d339d7c5.js} +3 -3
  63. package/dist/arcgis-coding-components/p-d39b4fa7.entry.js +6 -0
  64. package/dist/arcgis-coding-components/{p-8c6a6176.js → p-d3e821fe.js} +3 -3
  65. package/dist/arcgis-coding-components/p-ee4ad3e1.js +6 -0
  66. package/dist/arcgis-coding-components/{p-2a7ef2fd.js → p-f8728f4d.js} +2 -2
  67. package/dist/cjs/{app-globals-8991f48d.js → app-globals-2c78c6b1.js} +1 -1
  68. package/dist/cjs/arcade-defaults-8f210819.js +350 -0
  69. package/dist/cjs/{arcade-mode-ee5f5a57.js → arcade-mode-ba7da99f.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-7588aae5.js} +1 -1
  75. package/dist/cjs/{cssMode-deeb6f90.js → cssMode-0be00954.js} +2 -3
  76. package/dist/cjs/{html-be08d94a.js → html-310c2662.js} +2 -3
  77. package/dist/cjs/{htmlMode-f5b8239a.js → htmlMode-30d8e99b.js} +2 -3
  78. package/dist/cjs/{index-358de60d.js → index-cba76501.js} +203 -156
  79. package/dist/cjs/index.cjs.js +4 -4
  80. package/dist/cjs/{javascript-37d3d13f.js → javascript-2094999f.js} +3 -4
  81. package/dist/cjs/{jsonMode-12a2a091.js → jsonMode-389bdf05.js} +2 -3
  82. package/dist/cjs/{language-defaults-base-1f082ad7.js → language-defaults-base-7cb3bee2.js} +812 -1036
  83. package/dist/cjs/loader.cjs.js +4 -4
  84. package/dist/cjs/{sql-expr-defaults-dca57c68.js → sql-expr-defaults-50a75e9d.js} +226 -75
  85. package/dist/cjs/sql-expr-mode-0b3d7972.js +480 -0
  86. package/dist/cjs/{tsMode-d33a7021.js → tsMode-1ef47d68.js} +2 -3
  87. package/dist/cjs/{typescript-f3be2ce7.js → typescript-e19c8c21.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-ad05b915.js} +1 -1
  117. package/dist/esm/arcade-defaults-84c53fa5.js +345 -0
  118. package/dist/esm/{arcade-mode-4a83348d.js → arcade-mode-6fbd4168.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-9731ed75.js} +1 -1
  124. package/dist/esm/{cssMode-68a5f601.js → cssMode-6a20bb2b.js} +2 -3
  125. package/dist/esm/{html-9b27df1a.js → html-b32a642f.js} +2 -3
  126. package/dist/esm/{htmlMode-361ad282.js → htmlMode-e39916d3.js} +2 -3
  127. package/dist/esm/{index-8a552796.js → index-3c00d77e.js} +203 -156
  128. package/dist/esm/index.js +4 -4
  129. package/dist/esm/{javascript-8004e14f.js → javascript-e3306e60.js} +3 -4
  130. package/dist/esm/{jsonMode-91a0be74.js → jsonMode-2ba190f8.js} +2 -3
  131. package/dist/esm/{language-defaults-base-df906b3d.js → language-defaults-base-9d97d855.js} +809 -1036
  132. package/dist/esm/loader.js +5 -5
  133. package/dist/esm/{sql-expr-defaults-ae0be602.js → sql-expr-defaults-49ca931c.js} +225 -74
  134. package/dist/esm/sql-expr-mode-b1ab06a1.js +476 -0
  135. package/dist/esm/{tsMode-2756c213.js → tsMode-6fe69b0a.js} +2 -3
  136. package/dist/esm/{typescript-1aaf3ddd.js → typescript-d757eb0b.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,4 +1,4 @@
1
- import type { ComponentInterface, VNode } from "../../stencil-public-runtime";
1
+ import type { ComponentInterface, EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  import type { ControllerManager } from "@arcgis/components-controllers";
3
3
  import type { EditorProfile } from "../../utils/profile/editor-profile";
4
4
  import type { IPredefinedProfile } from "../../components";
@@ -12,13 +12,41 @@ export declare class SqlExpressionEditor implements ComponentInterface {
12
12
  _editorProfile: EditorProfile | undefined;
13
13
  _activeAction: "fields" | "functions" | undefined;
14
14
  _apiLibrary: ApiCategory[] | undefined;
15
+ messages: {
16
+ _lang: string;
17
+ _t9nLocale: "id" | "en" | "el" | "ar" | "bg" | "bs" | "ca" | "cs" | "da" | "de" | "es" | "et" | "fi" | "fr" | "he" | "hr" | "hu" | "it" | "ja" | "ko" | "lt" | "lv" | "nl" | "nb" | "pl" | "pt-BR" | "pt-PT" | "ro" | "ru" | "sk" | "sl" | "sr" | "sv" | "th" | "tr" | "uk" | "vi" | "zh-CN" | "zh-HK" | "zh-TW";
18
+ _loading: boolean;
19
+ _overrides: {
20
+ fields?: string | undefined;
21
+ functions?: string | undefined;
22
+ };
23
+ _original?: {
24
+ fields: string;
25
+ functions: string;
26
+ } | undefined;
27
+ } & Partial<{
28
+ fields: string;
29
+ functions: string;
30
+ }>;
31
+ _messagesChanged(): Promise<void>;
15
32
  profile: IPredefinedProfile | undefined;
16
- _profileChanged(): void;
17
- private _updateSqlExprDefaults;
33
+ _profileChanged(): Promise<void>;
34
+ /**
35
+ * The sql expression script. Use this property to define or update the script.
36
+ */
37
+ script: string;
38
+ private _updateEditorProfile;
18
39
  private _setActiveAction;
19
40
  private _handleActionClick;
20
41
  private _insertAsSnippet;
42
+ private _updateApiLibrary;
43
+ private _onCodeEditorValueChange;
21
44
  componentWillLoad(): Promise<void>;
45
+ componentDidLoad(): Promise<void>;
22
46
  disconnectedCallback(): void;
47
+ /**
48
+ * Emitted when the script string has changed.
49
+ */
50
+ arcgisScriptChange: EventEmitter<string>;
23
51
  render(): VNode;
24
52
  }
@@ -4,6 +4,22 @@ import { type ComponentInterface, type EventEmitter, type VNode } from "../../st
4
4
  export declare class SqlExpressionFields implements ComponentInterface {
5
5
  manager: ControllerManager<this>;
6
6
  private _flowObserver?;
7
+ messages: {
8
+ _lang: string;
9
+ _t9nLocale: "id" | "en" | "el" | "ar" | "bg" | "bs" | "ca" | "cs" | "da" | "de" | "es" | "et" | "fi" | "fr" | "he" | "hr" | "hu" | "it" | "ja" | "ko" | "lt" | "lv" | "nl" | "nb" | "pl" | "pt-BR" | "pt-PT" | "ro" | "ru" | "sk" | "sl" | "sr" | "sv" | "th" | "tr" | "uk" | "vi" | "zh-CN" | "zh-HK" | "zh-TW";
10
+ _loading: boolean;
11
+ _overrides: {
12
+ availablefields?: string | undefined;
13
+ domainvalues?: string | undefined;
14
+ };
15
+ _original?: {
16
+ availablefields: string;
17
+ domainvalues: string;
18
+ } | undefined;
19
+ } & Partial<{
20
+ availablefields: string;
21
+ domainvalues: string;
22
+ }>;
7
23
  el: HTMLDivElement;
8
24
  _mutationCounter: number;
9
25
  _flowItemRenderers: (() => VNode)[];
@@ -27,6 +43,7 @@ export declare class SqlExpressionFields implements ComponentInterface {
27
43
  arcgisFieldSelected: EventEmitter<string>;
28
44
  disconnectedCallback(): void;
29
45
  private _handleSelectField;
46
+ private _handleSelectDomain;
30
47
  private _emitClose;
31
48
  render(): VNode;
32
49
  }
@@ -26,12 +26,12 @@ export { IPredefinedProfile as IPredefinedProfile1 } from "./components";
26
26
  export namespace Components {
27
27
  interface ArcgisArcadeEditor {
28
28
  /**
29
- * The instance of the Monaco Editor.
29
+ * The instance of the Monaco Editor after the component has been rendered. To determine when a component is rendered, you can use componentOnReady() method. The method returns a Promise that resolves after the component rendered for the first time.
30
30
  * @readonly
31
31
  */
32
32
  "editorInstance": editor.IStandaloneCodeEditor | undefined;
33
33
  /**
34
- * The options for the editor (see Monaco Editor options documentation for more details).
34
+ * Options to update on the editor. For example: ```json { "fontSize": 18 } ``` To get the full list of available options, see the Monaco Editor options documentation for more details.
35
35
  */
36
36
  "editorOptions": (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
37
37
  /**
@@ -127,10 +127,14 @@ export namespace Components {
127
127
  }
128
128
  interface ArcgisCodeEditor {
129
129
  /**
130
- * The instance of the Monaco Editor.
130
+ * The instance of the Monaco Editor after the component has been rendered. To determine when a component is rendered, you can use componentOnReady() method. The method returns a Promise that resolves after the component rendered for the first time.
131
131
  * @readonly
132
132
  */
133
133
  "editorInstance": editor.IStandaloneCodeEditor | undefined;
134
+ /**
135
+ * Options to update on the editor. For example: ```json { "fontSize": 18 } ``` To get the full list of options set on the editor, use the editorInstance property and see Monaco Editor options documentation for more details.
136
+ */
137
+ "editorOptions": (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
134
138
  /**
135
139
  * @deprecated Use `editorInstance` property instead.
136
140
  */
@@ -159,10 +163,6 @@ export namespace Components {
159
163
  * A unique identifier for the model. The unique identifier is sometimes used by language defaults to store model metadata. For example, with arcade, the model id is used to store the arcade profile and other metadata. The unique identifier is especially useful when there are multiple editors on the same page.
160
164
  */
161
165
  "modelId": string;
162
- /**
163
- * The options for the editor (see Monaco Editor options documentation for more details).
164
- */
165
- "options": (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
166
166
  /**
167
167
  * Sets the focus on the editor.
168
168
  * @returns
@@ -193,6 +193,10 @@ export namespace Components {
193
193
  }
194
194
  interface ArcgisSqlExpressionEditor {
195
195
  "profile": IPredefinedProfile1 | undefined;
196
+ /**
197
+ * The sql expression script. Use this property to define or update the script.
198
+ */
199
+ "script": string;
196
200
  }
197
201
  interface ArcgisSqlExpressionFields {
198
202
  /**
@@ -229,6 +233,10 @@ export interface ArcgisLanguageApiPanelCustomEvent<T> extends CustomEvent<T> {
229
233
  detail: T;
230
234
  target: HTMLArcgisLanguageApiPanelElement;
231
235
  }
236
+ export interface ArcgisSqlExpressionEditorCustomEvent<T> extends CustomEvent<T> {
237
+ detail: T;
238
+ target: HTMLArcgisSqlExpressionEditorElement;
239
+ }
232
240
  export interface ArcgisSqlExpressionFieldsCustomEvent<T> extends CustomEvent<T> {
233
241
  detail: T;
234
242
  target: HTMLArcgisSqlExpressionFieldsElement;
@@ -345,7 +353,18 @@ declare global {
345
353
  prototype: HTMLArcgisLanguageApiPanelElement;
346
354
  new (): HTMLArcgisLanguageApiPanelElement;
347
355
  };
356
+ interface HTMLArcgisSqlExpressionEditorElementEventMap {
357
+ "arcgisScriptChange": string;
358
+ }
348
359
  interface HTMLArcgisSqlExpressionEditorElement extends Components.ArcgisSqlExpressionEditor, HTMLStencilElement {
360
+ addEventListener<K extends keyof HTMLArcgisSqlExpressionEditorElementEventMap>(type: K, listener: (this: HTMLArcgisSqlExpressionEditorElement, ev: ArcgisSqlExpressionEditorCustomEvent<HTMLArcgisSqlExpressionEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
361
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
362
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
363
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
364
+ removeEventListener<K extends keyof HTMLArcgisSqlExpressionEditorElementEventMap>(type: K, listener: (this: HTMLArcgisSqlExpressionEditorElement, ev: ArcgisSqlExpressionEditorCustomEvent<HTMLArcgisSqlExpressionEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
365
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
366
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
367
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
349
368
  }
350
369
  var HTMLArcgisSqlExpressionEditorElement: {
351
370
  prototype: HTMLArcgisSqlExpressionEditorElement;
@@ -383,7 +402,7 @@ declare global {
383
402
  declare namespace LocalJSX {
384
403
  interface ArcgisArcadeEditor {
385
404
  /**
386
- * The options for the editor (see Monaco Editor options documentation for more details).
405
+ * Options to update on the editor. For example: ```json { "fontSize": 18 } ``` To get the full list of available options, see the Monaco Editor options documentation for more details.
387
406
  */
388
407
  "editorOptions"?: (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
389
408
  /**
@@ -491,10 +510,14 @@ declare namespace LocalJSX {
491
510
  }
492
511
  interface ArcgisCodeEditor {
493
512
  /**
494
- * The instance of the Monaco Editor.
513
+ * The instance of the Monaco Editor after the component has been rendered. To determine when a component is rendered, you can use componentOnReady() method. The method returns a Promise that resolves after the component rendered for the first time.
495
514
  * @readonly
496
515
  */
497
516
  "editorInstance"?: editor.IStandaloneCodeEditor | undefined;
517
+ /**
518
+ * Options to update on the editor. For example: ```json { "fontSize": 18 } ``` To get the full list of options set on the editor, use the editorInstance property and see Monaco Editor options documentation for more details.
519
+ */
520
+ "editorOptions"?: (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
498
521
  /**
499
522
  * The language for the editor. Currently supported language: arcade, arcgis-sql-expression, json, css, html, javascript, typescript, and text.
500
523
  */
@@ -514,10 +537,6 @@ declare namespace LocalJSX {
514
537
  * Emitted when the value has changed (script, code, css, json, etc.)
515
538
  */
516
539
  "onArcgisValueChange"?: (event: ArcgisCodeEditorCustomEvent<string>) => void;
517
- /**
518
- * The options for the editor (see Monaco Editor options documentation for more details).
519
- */
520
- "options"?: (editor.IEditorOptions & editor.IGlobalEditorOptions) | undefined;
521
540
  /**
522
541
  * The initial value for the editor. The value is the script, code, css, json, etc.
523
542
  */
@@ -546,7 +565,15 @@ declare namespace LocalJSX {
546
565
  "onArcgisItemSelected"?: (event: ArcgisLanguageApiPanelCustomEvent<string>) => void;
547
566
  }
548
567
  interface ArcgisSqlExpressionEditor {
568
+ /**
569
+ * Emitted when the script string has changed.
570
+ */
571
+ "onArcgisScriptChange"?: (event: ArcgisSqlExpressionEditorCustomEvent<string>) => void;
549
572
  "profile"?: IPredefinedProfile1 | undefined;
573
+ /**
574
+ * The sql expression script. Use this property to define or update the script.
575
+ */
576
+ "script"?: string;
550
577
  }
551
578
  interface ArcgisSqlExpressionFields {
552
579
  /**
@@ -0,0 +1,3 @@
1
+ import type { Config } from "../../../../../../../../../../stencil-public-runtime";
2
+ declare const config: Config;
3
+ export { config };
@@ -1,6 +1,8 @@
1
1
  import type { Meta, StoryObj } from "@storybook/web-components";
2
2
  import type { Components } from "../../../src/components";
3
+ import type { LayerItemPopupProfileConfiguration } from "./editorContext";
3
4
  import { type PopupProfileConfiguration } from "./editorContext";
5
+ import type { BundleType } from "@arcgis/arcade-languageservice";
4
6
  declare const meta: Meta<Components.ArcgisArcadeEditor>;
5
7
  export default meta;
6
8
  interface PopupProfileAdditionalArgs {
@@ -8,8 +10,13 @@ interface PopupProfileAdditionalArgs {
8
10
  }
9
11
  type PopupProfileStoryType = Components.ArcgisArcadeEditor & PopupProfileAdditionalArgs;
10
12
  export declare const PopupProfileStory: StoryObj<PopupProfileStoryType>;
13
+ interface SLPopupProfileAdditionalArgs {
14
+ configuration: LayerItemPopupProfileConfiguration;
15
+ }
16
+ type SLPopupProfileStoryType = Components.ArcgisArcadeEditor & SLPopupProfileAdditionalArgs;
17
+ export declare const SLPopupProfileStory: StoryObj<SLPopupProfileStoryType>;
11
18
  export declare const HideItemsCustomProfileStory: StoryObj<Components.ArcgisArcadeEditor & {
12
- bundles?: string[];
19
+ bundles?: BundleType[];
13
20
  hiddenApiItems: string[];
14
21
  }>;
15
22
  export declare const HideItemsPredefinedProfileStory: StoryObj<Components.ArcgisArcadeEditor & {
@@ -1,6 +1,7 @@
1
1
  import type { Components } from "../../../src/components";
2
+ type PortalKeyType = "devext" | "qaext" | "www";
2
3
  export interface PopupProfileConfiguration {
3
- portalKey: "devext" | "qaext" | "www";
4
+ portalKey: PortalKeyType;
4
5
  itemId: string;
5
6
  layerId: string;
6
7
  subtypeCode?: number;
@@ -9,3 +10,6 @@ export interface PopupProfileConfiguration {
9
10
  }
10
11
  export type PopupProfileEditorContext = Partial<Pick<Components.ArcgisArcadeEditor, "profile" | "testData">>;
11
12
  export declare function getPopupProfileEditorContext({ portalKey, itemId, layerId, timeZone, subtypeCode, sublayerId, }: PopupProfileConfiguration): Promise<PopupProfileEditorContext>;
13
+ export type LayerItemPopupProfileConfiguration = Pick<PopupProfileConfiguration, "layerId" | "portalKey">;
14
+ export declare function getPopupProfileEditorContextForLayerItem({ portalKey, layerId }: LayerItemPopupProfileConfiguration, createTestData?: boolean): Promise<PopupProfileEditorContext>;
15
+ export {};
@@ -768,6 +768,7 @@ export declare namespace JSXBase {
768
768
  hrefLang?: string;
769
769
  hreflang?: string;
770
770
  media?: string;
771
+ ping?: string;
771
772
  rel?: string;
772
773
  target?: string;
773
774
  referrerPolicy?: ReferrerPolicy;
@@ -794,7 +795,6 @@ export declare namespace JSXBase {
794
795
  cite?: string;
795
796
  }
796
797
  interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
797
- autoFocus?: boolean;
798
798
  disabled?: boolean;
799
799
  form?: string;
800
800
  formAction?: string;
@@ -921,8 +921,6 @@ export declare namespace JSXBase {
921
921
  autocapitalize?: string;
922
922
  autoComplete?: string;
923
923
  autocomplete?: string;
924
- autoFocus?: boolean;
925
- autofocus?: boolean | string;
926
924
  capture?: string;
927
925
  checked?: boolean;
928
926
  crossOrigin?: string;
@@ -979,8 +977,6 @@ export declare namespace JSXBase {
979
977
  popoverTarget?: string;
980
978
  }
981
979
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
982
- autoFocus?: boolean;
983
- autofocus?: boolean | string;
984
980
  challenge?: string;
985
981
  disabled?: boolean;
986
982
  form?: string;
@@ -993,7 +989,6 @@ export declare namespace JSXBase {
993
989
  interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
994
990
  form?: string;
995
991
  htmlFor?: string;
996
- htmlfor?: string;
997
992
  }
998
993
  interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
999
994
  value?: string | string[] | number;
@@ -1104,7 +1099,6 @@ export declare namespace JSXBase {
1104
1099
  interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
1105
1100
  form?: string;
1106
1101
  htmlFor?: string;
1107
- htmlfor?: string;
1108
1102
  name?: string;
1109
1103
  }
1110
1104
  interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -1129,7 +1123,6 @@ export declare namespace JSXBase {
1129
1123
  type?: string;
1130
1124
  }
1131
1125
  interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
1132
- autoFocus?: boolean;
1133
1126
  disabled?: boolean;
1134
1127
  form?: string;
1135
1128
  multiple?: boolean;
@@ -1164,8 +1157,6 @@ export declare namespace JSXBase {
1164
1157
  interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
1165
1158
  autoComplete?: string;
1166
1159
  autocomplete?: string;
1167
- autoFocus?: boolean;
1168
- autofocus?: boolean | string;
1169
1160
  cols?: number;
1170
1161
  disabled?: boolean;
1171
1162
  form?: string;
@@ -1218,6 +1209,8 @@ export declare namespace JSXBase {
1218
1209
  interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
1219
1210
  innerHTML?: string;
1220
1211
  accessKey?: string;
1212
+ autoFocus?: boolean;
1213
+ autofocus?: boolean | string;
1221
1214
  class?: string | {
1222
1215
  [className: string]: boolean;
1223
1216
  };
@@ -37,5 +37,6 @@ export declare const arcade: {
37
37
  locale: string;
38
38
  snippets?: ApiSnippet[];
39
39
  }) => Promise<void>;
40
+ getApiLibrary: (modelId: string) => Promise<ApiCategory[]>;
40
41
  };
41
42
  export type { ArcadeLanguageServiceDefaults };
@@ -19,6 +19,7 @@ export declare class DiagnosticsAdapter {
19
19
  dispose(): void;
20
20
  private _doValidate;
21
21
  }
22
+ export declare function toCompletionItemKind(kind: number | undefined): languages.CompletionItemKind;
22
23
  export declare class CompletionProvider implements languages.CompletionItemProvider {
23
24
  private _worker;
24
25
  private _defaults;
@@ -0,0 +1,9 @@
1
+ import type { ApiProfile } from "@arcgis/arcade-languageservice";
2
+ import type { EditorProfile } from "../profile/editor-profile";
3
+ import type { IPredefinedProfile, IEditorProfileDefinition } from "../profile/types";
4
+ /**
5
+ * Converts an editor profile to an api profile.
6
+ * The api profile is an optimized version of the editor profile designed for minimal data transfer between the main thread and the worker.
7
+ */
8
+ export declare function arcadeEditorToApiProfile(editorProfile: EditorProfile): Promise<ApiProfile>;
9
+ export declare function convertToEditorProfileDefinition(predefinedProfile: IPredefinedProfile, locale?: string): Promise<IEditorProfileDefinition | undefined>;
@@ -1,4 +1,5 @@
1
1
  import type { Uri } from "monaco-editor";
2
+ import { editor } from "monaco-editor";
2
3
  import type { IArcadeWorker } from "./types";
3
4
  import type { ArcadeLanguageServiceDefaults } from "./arcade-defaults";
4
5
  /**
@@ -12,6 +13,11 @@ export declare class WorkerManager {
12
13
  constructor(_defaults: ArcadeLanguageServiceDefaults);
13
14
  dispose(): void;
14
15
  stopWorker(): void;
16
+ /**
17
+ * Wait for the worker to be ready.
18
+ * @returns A promise that resolves when the worker is ready.
19
+ */
20
+ static waitForWorker(): Promise<editor.MonacoWebWorker<IArcadeWorker>>;
15
21
  private _getClientProxy;
16
22
  getLanguageServiceWorker(...resources: Uri[]): Promise<IArcadeWorker>;
17
23
  }
@@ -4,8 +4,8 @@ import type { ApiValueVariableType } from "@arcgis/arcade-languageservice";
4
4
  */
5
5
  export declare function fieldTypeToIconName(field: __esri.Field): string;
6
6
  /**
7
- * Returns the Arcade type for the given field.
7
+ * Returns the ApiValueVariable type for the given field.
8
8
  */
9
- export declare function fieldTypeToArcadeType(field: __esri.Field): ApiValueVariableType;
9
+ export declare function fieldTypeToApiValueVarType(field: __esri.Field): ApiValueVariableType;
10
10
  export declare function supportedFields(fields: __esri.Field[] | null | undefined): __esri.Field[];
11
11
  export declare function fieldAlias(field: __esri.Field): string;
@@ -1,5 +1,6 @@
1
- import type { ApiVariableType, ApiProfile } from "@arcgis/arcade-languageservice";
1
+ import type { ApiVariableType } from "@arcgis/arcade-languageservice";
2
2
  import type * as types from "./types";
3
+ import type { ApiValueVariable } from "@arcgis/languages-api-utils";
3
4
  /**
4
5
  * FeatureSetCollection interface. Used in Arcade expressions to represent Web Maps
5
6
  * or Feature Services.
@@ -21,6 +22,10 @@ interface IFeatureSetCollections {
21
22
  */
22
23
  source: __esri.Map | __esri.WebMap | __esri.WebScene | string;
23
24
  }
25
+ /**
26
+ * converts fields to profile values and calculates the feature completion description all in one iteration
27
+ */
28
+ export declare function fieldsToProfileValues(fields: __esri.Field[], initialFeatureCompletionDescription: string, includeAliases?: boolean): [ApiValueVariable[], string];
24
29
  type ProfileItemType = ApiVariableType | "group";
25
30
  export type EditorVariable = ArrayVariable | DictionaryVariable | FeatureSetCollectionVariable | FeatureSetVariable | FeatureVariable | ValueVariable;
26
31
  interface ConstructorProperties<T> {
@@ -200,7 +205,7 @@ export declare class FeatureSetVariable extends SourceBasedVariable {
200
205
  constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IProfileFeatureSet>, featureSetSnippets?: ValueVariable[], relationshipProps?: IRelationshipsProperties);
201
206
  get title(): types.IIntlString | string;
202
207
  protected _loadSource(): Promise<types.SupportedSource | null>;
203
- toProfileVariableDefinition(): types.IProfileVariable;
208
+ toProfileVariableDefinition(): types.IProfileFeatureSet;
204
209
  }
205
210
  export declare class FeatureSetCollectionVariable extends CollectionBasedVariable {
206
211
  type: "featureSetCollection";
@@ -239,10 +244,6 @@ export declare class EditorProfile extends DictionaryVariable {
239
244
  * Returns true if the profile supports feature set functions for snippets.
240
245
  */
241
246
  get supportFeatureSetFunctions(): boolean;
242
- /**
243
- * Returns the language service profile. It is different than the editor profile as it is optimized for Monaco.
244
- */
245
- toLSProfile(): Promise<ApiProfile>;
246
247
  /**
247
248
  * Returns the EditorProfile as a json. The EditorProfile may have been updated. This function allows to
248
249
  * get the new json representing mutations.
@@ -222,6 +222,31 @@ export type IUrlCapableSource = Pick<__esri.FeatureLayer, "url">;
222
222
  * Layer that supports layer id.
223
223
  */
224
224
  export type ILayerIdCapableSource = Pick<__esri.FeatureLayer, "layerId">;
225
+ /**
226
+ * Layer that supports queryFeatures
227
+ */
228
+ export interface IFeatureLayerLikeInstance extends IFieldsDefinition, ITitleCapableSource {
229
+ /**
230
+ * The declared class of the layer.
231
+ */
232
+ declaredClass: string;
233
+ /**
234
+ * The unique ID assigned to the layer.
235
+ */
236
+ id: string;
237
+ /**
238
+ * The layer ID, or layer index, of a Feature Service layer.
239
+ */
240
+ layerId: number;
241
+ /**
242
+ * Executes a Query against the feature service and returns a Promise to a FeatureSet.
243
+ */
244
+ queryFeatures: (query?: __esri.Query | __esri.QueryProperties) => Promise<__esri.FeatureSet>;
245
+ /**
246
+ * The service's metadata JSON exposed by the ArcGIS REST API.
247
+ */
248
+ sourceJSON?: any;
249
+ }
225
250
  /**
226
251
  * Layer that supports field domains.
227
252
  */
@@ -291,3 +316,6 @@ export interface LayerInfo {
291
316
  type: string;
292
317
  capabilities?: string;
293
318
  }
319
+ export interface IExtendedPredefinedProfile extends IPredefinedProfile {
320
+ additionalVariables?: IProfileVariable[];
321
+ }
@@ -1,5 +1,6 @@
1
1
  import type * as types from "./types";
2
- export declare function isQueryableLayerInstance(item: unknown): item is __esri.FeatureLayer;
2
+ import type { FeatureDefinition, FeatureSetCollectionDefinition, FeatureSetDefinition } from "./types";
3
+ export declare function isFeatureLayerLikeInstance(item: unknown): item is types.IFeatureLayerLikeInstance;
3
4
  export declare function isGroupLayerCapable(item: unknown): item is types.IGroupLayerCapable;
4
5
  export declare function isMapInstance(item: unknown): item is __esri.Map;
5
6
  export declare function isLoadAllCapable(item: unknown): item is types.ILoadAllCapable;
@@ -8,6 +9,9 @@ export declare function isFeatureLayerItemDefinition(item: unknown): item is typ
8
9
  export declare function isFieldsDefinition(item: unknown): item is types.IFieldsDefinition;
9
10
  export declare function isUrlDefinition(item: unknown): item is types.IUrlDefinition;
10
11
  export declare function isSupportedServiceUrlDefinition(item: unknown): item is types.IUrlDefinition;
12
+ export declare function isFeatureDefinition(item: unknown): item is FeatureDefinition;
13
+ export declare function isFeatureSetDefinition(item: unknown): item is FeatureSetDefinition;
14
+ export declare function isFeatureSetCollectionDefinition(item: unknown): item is FeatureSetCollectionDefinition;
11
15
  export declare function isSubtypeInstance(item: unknown): item is __esri.Subtype;
12
16
  export declare function isCodedValueDomainInstance(item: unknown): item is __esri.CodedValueDomain;
13
17
  export declare function isInheritedDomainInstance(item: unknown): item is __esri.InheritedDomain;
@@ -1,5 +1,56 @@
1
- import * as monaco from "monaco-editor";
2
- export declare function sqlExpressionCompletion(range: monaco.IRange, model: monaco.editor.ITextModel, position: monaco.Position): monaco.languages.CompletionItem[];
3
- /** source */
4
- export declare const sqlBinOps: string[];
5
- export declare function generateCompletionItems(layer: __esri.FeatureLayer, range: monaco.IRange): Record<"fieldsCompletion" | "sqlBinOpsCompletion" | "sqlDataTypeCompletion" | "sqlFunctionCompletion" | "sqlKeywordsCompletion", monaco.languages.CompletionItem[]>;
1
+ /**
2
+ * @remarks This module is only intended to be loaded within the SQL expression worker.
3
+ */
4
+ import type { IRange, Position, languages } from "monaco-editor";
5
+ import type { ApiDatabase, ApiVariable } from "@arcgis/languages-api-utils";
6
+ import type { ICompletionContext } from "./types";
7
+ /**
8
+ * Class used for sql expression completion
9
+ */
10
+ export declare class SqlExpressionCompletion {
11
+ private _sdkFunctions;
12
+ private _fields;
13
+ constructor(sdkLibrary: ApiDatabase, fields: ApiVariable[]);
14
+ getCompletions(range: IRange, modelContent: string, position: Position): Promise<languages.CompletionItem[]>;
15
+ /**
16
+ * traverses the tree to find the node that contains the current position
17
+ * @param node The current node to traverse
18
+ * @param position The current position
19
+ */
20
+ traverse(node: __esri.SQLNode, completionContext: ICompletionContext): void;
21
+ /**
22
+ * gets completions by finding the context of the current node and suggesting completions based on that context
23
+ */
24
+ private _getCompletions;
25
+ /**
26
+ * utilizes peggy's error handling to provide suggestions for the user.
27
+ */
28
+ private handleParserFailure;
29
+ /**
30
+ * gets completions based on the function node
31
+ * @param context the context root of the current node, see {@link identifyContextRoot}
32
+ * @param slotPosition the position of the current node in the context root, see {@link getSlotPosition}
33
+ * @param completionContext the completion context
34
+ */
35
+ private _getCompletionsFromFunction;
36
+ /**
37
+ * checks if the position is within the current node
38
+ * @param node The current node to check
39
+ * @param position The current position
40
+ * @returns boolean
41
+ */
42
+ private _isPositionWithinNode;
43
+ private _suggestFields;
44
+ private _suggestFunctions;
45
+ private _suggestDataTypes;
46
+ private _suggestDatePeriods;
47
+ private _suggestTrimParts;
48
+ private _suggestDateLiterals;
49
+ private _suggestExpressions;
50
+ private _suggestNull;
51
+ /**
52
+ * looks at the node and finds any children attached to it. If there are children, it will traverse them.
53
+ * @param node The current node to traverse
54
+ */
55
+ private _traverseChildren;
56
+ }
@@ -0,0 +1,61 @@
1
+ import type { MarkerSeverity, languages } from "monaco-editor";
2
+ export declare enum ChildBearingProperties {
3
+ ARGS = "args",
4
+ CLAUSES = "clauses",
5
+ ELSE = "else",
6
+ END = "end",
7
+ EXPR = "expr",
8
+ LEFT = "left",
9
+ OPERAND = "operand",
10
+ QUALIFIER = "qualifier",
11
+ RIGHT = "right",
12
+ START = "start",
13
+ VALUE = "value"
14
+ }
15
+ export declare enum ChildBearingNodeTypes {
16
+ CASE_EXPRESSION = "case-expression",
17
+ EXPRESSION_LIST = "expression-list",
18
+ FUNCTION = "function",
19
+ INTERVAL = "interval",
20
+ INTERVAL_QUALIFIER = "interval-qualifier",
21
+ WHEN_CLAUSE = "when-clause",
22
+ UNARY_EXPRESSION = "unary-expression",
23
+ BINARY_EXPRESSION = "binary-expression"
24
+ }
25
+ export declare const CHILD_BEARING_PROPERTIES: {
26
+ readonly "case-expression": readonly [ChildBearingProperties.CLAUSES, ChildBearingProperties.OPERAND, ChildBearingProperties.ELSE];
27
+ readonly "when-clause": readonly [ChildBearingProperties.OPERAND, ChildBearingProperties.VALUE];
28
+ readonly "expression-list": readonly [ChildBearingProperties.VALUE];
29
+ readonly "unary-expression": readonly [ChildBearingProperties.EXPR];
30
+ readonly "binary-expression": readonly [ChildBearingProperties.LEFT, ChildBearingProperties.RIGHT];
31
+ readonly function: readonly [ChildBearingProperties.ARGS];
32
+ readonly interval: readonly [ChildBearingProperties.VALUE, ChildBearingProperties.QUALIFIER];
33
+ readonly "interval-qualifier": readonly [ChildBearingProperties.START, ChildBearingProperties.END];
34
+ };
35
+ export declare const MarkerType: {
36
+ Hint: MarkerSeverity.Hint;
37
+ Info: MarkerSeverity.Info;
38
+ Warning: MarkerSeverity.Warning;
39
+ Error: MarkerSeverity.Error;
40
+ };
41
+ export declare const InsertTextRules: {
42
+ InsertAsSnippet: languages.CompletionItemInsertTextRule.InsertAsSnippet;
43
+ };
44
+ export declare const CompletionItemKind: {
45
+ Function: languages.CompletionItemKind.Function;
46
+ Keyword: languages.CompletionItemKind.Keyword;
47
+ Operator: languages.CompletionItemKind.Operator;
48
+ Variable: languages.CompletionItemKind.Variable;
49
+ Field: languages.CompletionItemKind.Field;
50
+ Reference: languages.CompletionItemKind.Reference;
51
+ };
52
+ type UppercaseUnion<T extends string> = T extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${UppercaseUnion<Rest>}` : T;
53
+ export declare const castDataTypesDict: Record<__esri.DataTypeNode["value"]["type"], UppercaseUnion<__esri.DataTypeNode["value"]["type"]>>;
54
+ export declare const castDataTypes: UppercaseUnion<__esri.DataTypeNode["value"]["type"]>[];
55
+ export declare const datePeriods: string[];
56
+ export declare const dateLiterals: string[];
57
+ export declare const trimKeywords: string[];
58
+ export declare const sqlExprKeywords: string[];
59
+ export declare const sqlExprOperators: string[];
60
+ export declare const sqlExprFunctions: readonly ["CAST", "EXTRACT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "ABS", "ACOS", "ASIN", "ATAN", "CEILING", "COS", "FLOOR", "LOG", "LOG10", "POWER", "ROUND", "SIGN", "SIN", "TAN", "CHAR_LENGTH", "COALESCE", "CONCAT", "LOWER", "POSITION", "TRIM", "UPPER"];
61
+ export {};
@@ -1,11 +1 @@
1
- import { type Uri } from "monaco-editor";
2
- import type { ISqlExprWorker } from "./types";
3
- /**
4
- * Returns the sql-expression worker for the model.
5
- * Example:
6
- * ```ts
7
- * const sqlExpressionWorker = await getSqlExpressionWorker(model.uri);
8
- * ```
9
- * @returns sql-expression worker
10
- */
11
- export declare function getSqlExprWorker(uri: Uri): Promise<ISqlExprWorker>;
1
+ export {};
@@ -7,7 +7,6 @@ declare class SqlExprDefaults extends LanguageDefaultsBase {
7
7
  protected _languageId: string;
8
8
  protected _languageOptions: {};
9
9
  private _layerMap;
10
- private _apiService;
11
10
  updateFeatureLayerForModel(modelId: Uri | string, layer: FeatureLayer): void;
12
11
  setLanguageOptions(languageOptions: {
13
12
  assetsPath?: string | undefined;