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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) 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/sql-expr.worker.js +446 -7
  43. package/dist/arcgis-coding-components/assets/language-api-panel/t9n/language-api-panel.t9n.ca.json +1 -1
  44. package/dist/arcgis-coding-components/index.esm.js +2 -2
  45. package/dist/arcgis-coding-components/{p-b23a3f4e.entry.js → p-1da63080.entry.js} +2 -2
  46. package/dist/arcgis-coding-components/p-1e1caadf.js +7 -0
  47. package/dist/arcgis-coding-components/{p-736d890c.js → p-4cc71357.js} +3 -3
  48. package/dist/arcgis-coding-components/p-51b2fc72.js +6 -0
  49. package/dist/arcgis-coding-components/{p-4e56f8ae.js → p-5c89b15d.js} +1 -1
  50. package/dist/arcgis-coding-components/{p-5e173b51.entry.js → p-5f567b03.entry.js} +2 -2
  51. package/dist/arcgis-coding-components/{p-a256ee9c.js → p-64bbd36c.js} +12 -12
  52. package/dist/arcgis-coding-components/{p-8d67b196.js → p-71191013.js} +3 -3
  53. package/dist/arcgis-coding-components/{p-86625411.js → p-83b29033.js} +2 -2
  54. package/dist/arcgis-coding-components/p-909bbd87.entry.js +6 -0
  55. package/dist/arcgis-coding-components/p-9413c464.js +6 -0
  56. package/dist/arcgis-coding-components/p-9bb6dd26.js +6 -0
  57. package/dist/arcgis-coding-components/{p-ab0f6db7.js → p-ba1ec66d.js} +3 -3
  58. package/dist/arcgis-coding-components/p-bb851fa6.js +6 -0
  59. package/dist/arcgis-coding-components/{p-b570d7af.js → p-bd267380.js} +2 -2
  60. package/dist/arcgis-coding-components/{p-5da03560.js → p-d597b9ea.js} +1 -1
  61. package/dist/arcgis-coding-components/{p-26c67f7c.js → p-e1c8570a.js} +2 -2
  62. package/dist/arcgis-coding-components/{p-8e93417c.js → p-f4af9e3a.js} +2 -2
  63. package/dist/cjs/{app-globals-209c2310.js → app-globals-5b428a6f.js} +1 -1
  64. package/dist/cjs/arcade-defaults-c88dcbd9.js +349 -0
  65. package/dist/cjs/{arcade-mode-f2c3951e.js → arcade-mode-a369164c.js} +3 -3
  66. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +20 -26
  67. package/dist/cjs/arcgis-coding-components.cjs.js +5 -5
  68. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
  69. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
  70. package/dist/cjs/{css-bbd000cd.js → css-db73fa85.js} +1 -1
  71. package/dist/cjs/{cssMode-ad163e66.js → cssMode-714f53d0.js} +2 -3
  72. package/dist/cjs/{html-5c67b9d0.js → html-881afd14.js} +2 -3
  73. package/dist/cjs/{htmlMode-e32a97bd.js → htmlMode-d513ae10.js} +2 -3
  74. package/dist/cjs/{index-8b891c40.js → index-fd58ccf1.js} +43 -15
  75. package/dist/cjs/index.cjs.js +4 -4
  76. package/dist/cjs/{javascript-e159fa2f.js → javascript-8ea0cace.js} +3 -4
  77. package/dist/cjs/{jsonMode-5c107443.js → jsonMode-345b67b0.js} +2 -3
  78. package/dist/cjs/{language-defaults-base-4300e691.js → language-defaults-base-cd5a367b.js} +822 -1062
  79. package/dist/cjs/loader.cjs.js +4 -4
  80. package/dist/cjs/{sql-expr-defaults-783d9c24.js → sql-expr-defaults-5ab67e9d.js} +114 -52
  81. package/dist/cjs/sql-expr-mode-aaf5cadf.js +467 -0
  82. package/dist/cjs/{tsMode-83c4587f.js → tsMode-085f051d.js} +2 -3
  83. package/dist/cjs/{typescript-f6ca5d84.js → typescript-3adfcc8d.js} +2 -3
  84. package/dist/components/arcade-defaults.js +238 -4
  85. package/dist/components/arcade-mode.js +2 -1
  86. package/dist/components/arcade-results.js +3 -3
  87. package/dist/components/arcade-suggestions.js +2 -2
  88. package/dist/components/arcade-variables.js +2 -2
  89. package/dist/components/arcgis-arcade-editor.js +7 -6
  90. package/dist/components/arcgis-arcade-results.js +1 -1
  91. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  92. package/dist/components/arcgis-arcade-variables.js +1 -1
  93. package/dist/components/arcgis-assets.d.ts +26 -26
  94. package/dist/components/arcgis-assets.js +2 -2
  95. package/dist/components/arcgis-code-editor.js +1 -1
  96. package/dist/components/arcgis-language-api-panel.js +1 -1
  97. package/dist/components/arcgis-sql-expression-editor.js +2 -2
  98. package/dist/components/arcgis-sql-expression-fields.js +1 -1
  99. package/dist/components/{chunk-6TARY3NN.js → chunk-ZZIYM65N.js} +38 -30
  100. package/dist/components/code-editor.js +16 -23
  101. package/dist/components/fields.js +4 -4
  102. package/dist/components/index.js +1 -1
  103. package/dist/components/index2.js +2 -2
  104. package/dist/components/language-api-panel.js +2 -2
  105. package/dist/components/language-defaults-base.js +81 -323
  106. package/dist/components/markdown.js +1 -1
  107. package/dist/components/sql-expr-defaults.js +77 -24
  108. package/dist/components/sql-expr-mode.js +282 -24951
  109. package/dist/components/sql-expression-fields.js +2 -2
  110. package/dist/components/useT9n.js +2 -2
  111. package/dist/components/utilities.js +1 -1
  112. package/dist/esm/{app-globals-60a61d0d.js → app-globals-9b5f37f3.js} +1 -1
  113. package/dist/esm/arcade-defaults-23d01109.js +344 -0
  114. package/dist/esm/{arcade-mode-7e6764ac.js → arcade-mode-30a9597a.js} +3 -3
  115. package/dist/esm/arcgis-arcade-editor_6.entry.js +21 -27
  116. package/dist/esm/arcgis-coding-components.js +6 -6
  117. package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
  118. package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
  119. package/dist/esm/{css-7d75b7ca.js → css-442d4a5a.js} +1 -1
  120. package/dist/esm/{cssMode-95305ae2.js → cssMode-8833e7da.js} +2 -3
  121. package/dist/esm/{html-84fc596c.js → html-1adb92d5.js} +2 -3
  122. package/dist/esm/{htmlMode-c961f619.js → htmlMode-d45f4634.js} +2 -3
  123. package/dist/esm/{index-1c1754c0.js → index-d9b2b45b.js} +43 -15
  124. package/dist/esm/index.js +4 -4
  125. package/dist/esm/{javascript-0aa4505f.js → javascript-5bf60fbf.js} +3 -4
  126. package/dist/esm/{jsonMode-86b234eb.js → jsonMode-cba63cda.js} +2 -3
  127. package/dist/esm/{language-defaults-base-949fa7fb.js → language-defaults-base-49508cc9.js} +819 -1062
  128. package/dist/esm/loader.js +5 -5
  129. package/dist/esm/{sql-expr-defaults-f2f50289.js → sql-expr-defaults-ba682a85.js} +114 -53
  130. package/dist/esm/sql-expr-mode-5da1d4c8.js +463 -0
  131. package/dist/esm/{tsMode-ee945c40.js → tsMode-23360d7b.js} +2 -3
  132. package/dist/esm/{typescript-8bd2bb48.js → typescript-d1e4a590.js} +2 -3
  133. package/dist/loader/cdn.js +2 -3
  134. package/dist/loader/index.cjs.js +2 -3
  135. package/dist/loader/index.es2017.js +2 -3
  136. package/dist/loader/index.js +2 -3
  137. package/dist/types/components/arcade-editor/arcade-editor.d.ts +13 -3
  138. package/dist/types/components/arcade-results/arcade-results.d.ts +1 -1
  139. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +1 -1
  140. package/dist/types/components/arcade-variables/arcade-variables.d.ts +1 -1
  141. package/dist/types/components/code-editor/code-editor.d.ts +14 -4
  142. package/dist/types/components/language-api-panel/language-api-panel.d.ts +1 -1
  143. package/dist/types/components.d.ts +13 -13
  144. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +8 -1
  145. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +5 -1
  146. package/dist/types/stencil-public-runtime.d.ts +3 -8
  147. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -0
  148. package/dist/types/utils/arcade-monaco/arcade-profile-strategy.d.ts +9 -0
  149. package/dist/types/utils/fields.d.ts +2 -2
  150. package/dist/types/utils/profile/editor-profile.d.ts +7 -6
  151. package/dist/types/utils/profile/types.d.ts +53 -65
  152. package/dist/types/utils/profile/utils.d.ts +9 -8
  153. package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +56 -5
  154. package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +61 -0
  155. package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +1 -11
  156. package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +0 -1
  157. package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +18 -534
  158. package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +34 -1
  159. package/dist/types/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +30 -0
  160. package/dist/types/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +19 -0
  161. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -7
  162. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +73 -77
  163. package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +5 -6
  164. package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +2 -0
  165. package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +11 -8
  166. package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +13 -0
  167. package/dist/types/utils/sql-expr-monaco/types.d.ts +30 -28
  168. package/package.json +19 -19
  169. package/dist/arcgis-coding-components/p-103bdac3.js +0 -6
  170. package/dist/arcgis-coding-components/p-2d14950e.js +0 -7
  171. package/dist/arcgis-coding-components/p-374b59c1.js +0 -6
  172. package/dist/arcgis-coding-components/p-a36c357f.js +0 -6
  173. package/dist/arcgis-coding-components/p-de5cabbb.js +0 -6
  174. package/dist/arcgis-coding-components/p-e6cac921.entry.js +0 -6
  175. package/dist/cjs/arcade-defaults-ee308e3a.js +0 -116
  176. package/dist/cjs/sql-expr-mode-6cac37ed.js +0 -25135
  177. package/dist/esm/arcade-defaults-b1a5f013.js +0 -111
  178. package/dist/esm/polyfills/core-js.js +0 -11
  179. package/dist/esm/polyfills/dom.js +0 -79
  180. package/dist/esm/polyfills/es5-html-element.js +0 -1
  181. package/dist/esm/polyfills/index.js +0 -34
  182. package/dist/esm/polyfills/system.js +0 -6
  183. package/dist/esm/sql-expr-mode-14c94be3.js +0 -25132
  184. package/dist/types/utils/profile/predefined-profile.d.ts +0 -4
  185. package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +0 -41
  186. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +0 -16
  187. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +0 -26
  188. package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +0 -37
  189. package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +0 -11
  190. package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +0 -122
  191. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +0 -5
  192. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +0 -18
  193. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +0 -6
  194. package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +0 -156
  195. package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +0 -150
  196. package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +0 -1397
  197. package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +0 -59
  198. package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +0 -295
  199. package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +0 -135
  200. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +0 -3
  201. package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +0 -2
@@ -1,540 +1,24 @@
1
- import type { IRange, Position, editor, languages } from "monaco-editor";
2
- import { standardizedFunctions } from "./DependentFiles/standardizedFunctions";
1
+ import { editor } from "monaco-editor";
2
+ import type { Position, languages } from "monaco-editor";
3
3
  import type { SqlExprDefaults } from "./sql-expr-defaults";
4
+ import type { ISqlExprWorkerAccessor } from "./types";
5
+ import type { SqlExprDiagnosticService } from "./sql-expr-mode";
4
6
  export declare class SqlExprCompletionProvider implements languages.CompletionItemProvider {
7
+ private _worker;
5
8
  private _defaults;
6
- constructor(_defaults: SqlExprDefaults);
9
+ constructor(_worker: ISqlExprWorkerAccessor, _defaults: SqlExprDefaults);
7
10
  provideCompletionItems(model: editor.ITextModel, position: Position): Promise<languages.CompletionList | undefined>;
8
11
  }
9
- export declare const apiFunctions: {
10
- char_length: {
11
- description: string;
12
- parameters: {
13
- name: string;
14
- type: string;
15
- description: string;
16
- }[];
17
- returnValue: string;
18
- examples: {
19
- description: string;
20
- code: string;
21
- }[];
22
- snippet: string;
23
- name: string;
24
- bundle: string;
25
- };
26
- coalesce: {
27
- description: string;
28
- parameters: {
29
- name: string;
30
- type: string[];
31
- description: string;
32
- }[];
33
- returnValue: string[];
34
- examples: {
35
- description: string;
36
- code: string;
37
- }[];
38
- snippet: string;
39
- name: string;
40
- bundle: string;
41
- };
42
- concat: {
43
- description: string;
44
- parameters: {
45
- name: string;
46
- type: string;
47
- description: string;
48
- }[];
49
- returnValue: string;
50
- examples: {
51
- description: string;
52
- code: string;
53
- }[];
54
- snippet: string;
55
- name: string;
56
- bundle: string;
57
- };
58
- lower: {
59
- description: string;
60
- parameters: {
61
- name: string;
62
- type: string;
63
- description: string;
64
- }[];
65
- returnValue: string;
66
- examples: {
67
- description: string;
68
- code: string;
69
- }[];
70
- snippet: string;
71
- name: string;
72
- bundle: string;
73
- };
74
- position: {
75
- description: string;
76
- parameters: {
77
- name: string;
78
- type: string;
79
- description: string;
80
- }[];
81
- returnValue: string;
82
- examples: {
83
- description: string;
84
- code: string;
85
- }[];
86
- snippet: string;
87
- name: string;
88
- bundle: string;
89
- };
90
- substring: {
91
- description: string;
92
- parameters: {
93
- name: string;
94
- type: string;
95
- description: string;
96
- }[];
97
- returnValue: string;
98
- examples: {
99
- description: string;
100
- code: string;
101
- }[];
102
- snippet: string;
103
- name: string;
104
- bundle: string;
105
- }[];
106
- trim: {
107
- description: string;
108
- parameters: ({
109
- name: string;
110
- type: string[];
111
- description: string;
112
- } | {
113
- name: string;
114
- type: string;
115
- description: string;
116
- })[];
117
- returnValue: string;
118
- examples: {
119
- description: string;
120
- code: string;
121
- }[];
122
- snippet: string;
123
- name: string;
124
- bundle: string;
125
- };
126
- upper: {
127
- description: string;
128
- parameters: {
129
- name: string;
130
- type: string;
131
- description: string;
132
- }[];
133
- returnValue: string;
134
- examples: {
135
- description: string;
136
- code: string;
137
- }[];
138
- snippet: string;
139
- name: string;
140
- bundle: string;
141
- };
142
- abs: {
143
- description: string;
144
- parameters: {
145
- name: string;
146
- type: string;
147
- description: string;
148
- }[];
149
- returnValue: string;
150
- examples: {
151
- description: string;
152
- code: string;
153
- }[];
154
- snippet: string;
155
- name: string;
156
- bundle: string;
157
- };
158
- acos: {
159
- description: string;
160
- parameters: {
161
- name: string;
162
- type: string;
163
- description: string;
164
- }[];
165
- returnValue: string;
166
- examples: {
167
- description: string;
168
- code: string;
169
- }[];
170
- snippet: string;
171
- name: string;
172
- bundle: string;
173
- };
174
- asin: {
175
- description: string;
176
- parameters: {
177
- name: string;
178
- type: string;
179
- description: string;
180
- }[];
181
- returnValue: string;
182
- examples: {
183
- description: string;
184
- code: string;
185
- }[];
186
- snippet: string;
187
- name: string;
188
- bundle: string;
189
- };
190
- atan: {
191
- description: string;
192
- parameters: {
193
- name: string;
194
- type: string;
195
- description: string;
196
- }[];
197
- returnValue: string;
198
- examples: {
199
- description: string;
200
- code: string;
201
- }[];
202
- snippet: string;
203
- name: string;
204
- bundle: string;
205
- };
206
- cast: {
207
- description: string;
208
- parameters: ({
209
- name: string;
210
- type: string;
211
- description: string;
212
- } | {
213
- name: string;
214
- type: string[];
215
- description: string;
216
- })[];
217
- returnValue: string[];
218
- examples: {
219
- description: string;
220
- code: string;
221
- }[];
222
- snippet: string;
223
- name: string;
224
- bundle: string;
225
- };
226
- ceiling: {
227
- description: string;
228
- parameters: {
229
- name: string;
230
- type: string;
231
- description: string;
232
- }[];
233
- returnValue: string;
234
- examples: {
235
- description: string;
236
- code: string;
237
- }[];
238
- snippet: string;
239
- name: string;
240
- bundle: string;
241
- };
242
- cos: {
243
- description: string;
244
- parameters: {
245
- name: string;
246
- type: string;
247
- description: string;
248
- }[];
249
- returnValue: string;
250
- examples: {
251
- description: string;
252
- code: string;
253
- }[];
254
- snippet: string;
255
- name: string;
256
- bundle: string;
257
- };
258
- floor: {
259
- description: string;
260
- parameters: {
261
- name: string;
262
- type: string;
263
- description: string;
264
- }[];
265
- returnValue: string;
266
- examples: {
267
- description: string;
268
- code: string;
269
- }[];
270
- snippet: string;
271
- name: string;
272
- bundle: string;
273
- };
274
- log: {
275
- description: string;
276
- parameters: {
277
- name: string;
278
- type: string;
279
- description: string;
280
- }[];
281
- returnValue: string;
282
- examples: {
283
- description: string;
284
- code: string;
285
- }[];
286
- snippet: string;
287
- name: string;
288
- bundle: string;
289
- };
290
- log10: {
291
- description: string;
292
- parameters: {
293
- name: string;
294
- type: string;
295
- description: string;
296
- }[];
297
- returnValue: string;
298
- examples: {
299
- description: string;
300
- code: string;
301
- }[];
302
- snippet: string;
303
- name: string;
304
- bundle: string;
305
- };
306
- mod: {
307
- description: string;
308
- parameters: {
309
- name: string;
310
- type: string;
311
- description: string;
312
- }[];
313
- returnValue: string;
314
- examples: {
315
- description: string;
316
- code: string;
317
- }[];
318
- snippet: string;
319
- name: string;
320
- bundle: string;
321
- };
322
- nullif: {
323
- description: string;
324
- parameters: {
325
- name: string;
326
- type: string[];
327
- description: string;
328
- }[];
329
- returnValue: string[];
330
- examples: {
331
- description: string;
332
- code: string;
333
- }[];
334
- snippet: string;
335
- name: string;
336
- bundle: string;
337
- };
338
- power: {
339
- description: string;
340
- parameters: {
341
- name: string;
342
- type: string;
343
- description: string;
344
- }[];
345
- returnValue: string;
346
- examples: {
347
- description: string;
348
- code: string;
349
- }[];
350
- snippet: string;
351
- name: string;
352
- bundle: string;
353
- };
354
- round: {
355
- description: string;
356
- parameters: {
357
- name: string;
358
- type: string;
359
- description: string;
360
- }[];
361
- returnValue: string;
362
- examples: {
363
- description: string;
364
- code: string;
365
- }[];
366
- snippet: string;
367
- name: string;
368
- bundle: string;
369
- };
370
- sign: {
371
- description: string;
372
- parameters: {
373
- name: string;
374
- type: string;
375
- description: string;
376
- }[];
377
- returnValue: string;
378
- examples: {
379
- description: string;
380
- code: string;
381
- }[];
382
- snippet: string;
383
- name: string;
384
- bundle: string;
385
- };
386
- sin: {
387
- description: string;
388
- parameters: {
389
- name: string;
390
- type: string;
391
- description: string;
392
- }[];
393
- returnValue: string;
394
- examples: {
395
- description: string;
396
- code: string;
397
- }[];
398
- snippet: string;
399
- name: string;
400
- bundle: string;
401
- };
402
- tan: {
403
- description: string;
404
- parameters: {
405
- name: string;
406
- type: string;
407
- description: string;
408
- }[];
409
- returnValue: string;
410
- examples: {
411
- description: string;
412
- code: string;
413
- }[];
414
- snippet: string;
415
- name: string;
416
- bundle: string;
417
- };
418
- truncate: {
419
- description: string;
420
- parameters: {
421
- name: string;
422
- type: string;
423
- description: string;
424
- }[];
425
- returnValue: string;
426
- examples: {
427
- description: string;
428
- code: string;
429
- }[];
430
- snippet: string;
431
- name: string;
432
- bundle: string;
433
- };
434
- current_date: {
435
- description: string;
436
- parameters: never[];
437
- returnValue: string;
438
- examples: {
439
- description: string;
440
- code: string;
441
- }[];
442
- snippet: string[];
443
- name: string;
444
- bundle: string;
445
- };
446
- current_time: {
447
- description: string;
448
- parameters: never[];
449
- returnValue: string;
450
- examples: {
451
- description: string;
452
- code: string;
453
- }[];
454
- snippet: string[];
455
- name: string;
456
- bundle: string;
457
- };
458
- current_timestamp: {
459
- description: string;
460
- parameters: never[];
461
- returnValue: string;
462
- examples: {
463
- description: string;
464
- code: string;
465
- }[];
466
- snippet: string[];
467
- name: string;
468
- bundle: string;
469
- };
470
- extract: {
471
- description: string;
472
- parameters: ({
473
- name: string;
474
- type: string[];
475
- description: string;
476
- } | {
477
- name: string;
478
- type: string;
479
- description: string;
480
- })[];
481
- returnValue: string;
482
- examples: {
483
- description: string;
484
- code: string;
485
- }[];
486
- snippet: string;
487
- name: string;
488
- bundle: string;
489
- };
490
- };
491
- export declare const sqlParenLessFunctions: string[];
492
- export declare const sqlFunctions: string[];
493
- export declare const dataTypes: string[];
494
- export declare const getKeywords: (identifier: string) => string[] | undefined;
495
- export declare const getDelimiterPosition: (index: number, node: any, model: editor.ITextModel, lastIndex: number) => IRange;
496
- export declare const isSqlParenLessFunction: (word: string) => boolean;
497
- export declare const getCursorWithinRange: (position: Position, startPos: IRange, endPos: IRange) => boolean[];
498
- export declare const generateTypeDescription: (name: string, parameters: {
499
- description: string;
500
- name: string;
501
- type: string[] | string;
502
- }[], returnType: string[] | string) => string;
503
- export declare const generateCompletionDocumentation: (description: string, examples: {
504
- code: string;
505
- description: string;
506
- }[]) => string;
507
- export declare function getFunction(functionName: string): (typeof standardizedFunctions)[keyof typeof standardizedFunctions];
508
- export declare enum ChildBearingProperties {
509
- ARGS = "args",
510
- CLAUSES = "clauses",
511
- ELSE = "else",
512
- END = "end",
513
- EXPR = "expr",
514
- LEFT = "left",
515
- OPERAND = "operand",
516
- QUALIFIER = "qualifier",
517
- RIGHT = "right",
518
- START = "start",
519
- VALUE = "value"
520
- }
521
- export declare enum ChildBearingNodeTypes {
522
- CASE_EXPRESSION = "case-expression",
523
- EXPRESSION_LIST = "expression-list",
524
- FUNCTION = "function",
525
- INTERVAL = "interval",
526
- INTERVAL_QUALIFIER = "interval-qualifier",
527
- WHEN_CLAUSE = "when-clause",
528
- UNARY_EXPRESSION = "unary-expression",
529
- BINARY_EXPRESSION = "binary-expression"
12
+ export declare class SqlExprDiagnosticsAdapter {
13
+ private _languageId;
14
+ private _worker;
15
+ private _disposables;
16
+ private _listener;
17
+ private _diagnosticsService;
18
+ private _defaults;
19
+ constructor(_languageId: string, _worker: ISqlExprWorkerAccessor, { defaults, diagnosticService, }: {
20
+ defaults: SqlExprDefaults;
21
+ diagnosticService: SqlExprDiagnosticService;
22
+ });
23
+ private _doValidate;
530
24
  }
531
- export declare const CHILD_BEARING_PROPERTIES: {
532
- readonly "case-expression": readonly [ChildBearingProperties.CLAUSES, ChildBearingProperties.OPERAND, ChildBearingProperties.ELSE];
533
- readonly "when-clause": readonly [ChildBearingProperties.OPERAND, ChildBearingProperties.VALUE];
534
- readonly "expression-list": readonly [ChildBearingProperties.VALUE];
535
- readonly "unary-expression": readonly [ChildBearingProperties.EXPR];
536
- readonly "binary-expression": readonly [ChildBearingProperties.LEFT, ChildBearingProperties.RIGHT];
537
- readonly function: readonly [ChildBearingProperties.ARGS];
538
- readonly interval: readonly [ChildBearingProperties.VALUE, ChildBearingProperties.QUALIFIER];
539
- readonly "interval-qualifier": readonly [ChildBearingProperties.START, ChildBearingProperties.END];
540
- };
@@ -1,4 +1,4 @@
1
- import type { Uri } from "monaco-editor";
1
+ import type { IEvent, Uri, editor } from "monaco-editor";
2
2
  import type { ISqlExprWorker } from "./types";
3
3
  import { type SqlExprDefaults } from "./sql-expr-defaults";
4
4
  /**
@@ -7,4 +7,37 @@ import { type SqlExprDefaults } from "./sql-expr-defaults";
7
7
  * @returns The sql-expression worker.
8
8
  */
9
9
  export declare function getSqlExprWorker(...uris: Uri[]): Promise<ISqlExprWorker>;
10
+ export interface ISqlExprDiagnosticEvent {
11
+ /**
12
+ * The uri of the model for which the diagnostics changed.
13
+ */
14
+ uri: Uri;
15
+ /**
16
+ * The diagnostics for the model.
17
+ */
18
+ diagnostics: editor.IMarkerData[];
19
+ }
20
+ export interface ISqlExprDiagnosticService {
21
+ onDiagnosticsChange: IEvent<ISqlExprDiagnosticEvent>;
22
+ }
23
+ declare class SqlExprDiagnosticService implements ISqlExprDiagnosticService {
24
+ private _onDiagnosticsChange;
25
+ /**
26
+ * An event to signal changes to the diagnostics.
27
+ * The event value is the uri string and the diagnostics.
28
+ */
29
+ get onDiagnosticsChange(): IEvent<ISqlExprDiagnosticEvent>;
30
+ /**
31
+ * Fires the diagnostics change event.
32
+ * @param uri The uri of the model for which the diagnostics changed.
33
+ * @param diagnostics The diagnostics for the model.
34
+ */
35
+ fireDiagnosticsChange(uri: Uri, diagnostics: editor.IMarkerData[]): void;
36
+ }
37
+ export type { SqlExprDiagnosticService };
38
+ /**
39
+ *
40
+ * @returns The Sql Expression Diagnostic Service.
41
+ */
42
+ export declare function getSqlExprDiagnosticService(): ISqlExprDiagnosticService;
10
43
  export declare function setupMode(defaults: SqlExprDefaults): void;
@@ -0,0 +1,30 @@
1
+ import { ChildBearingProperties } from "./sql-expr-constants";
2
+ export declare function isSqlSyntaxError(err: unknown): err is __esri.SQLSyntaxError;
3
+ export declare function isUnexpectedTokenError(error: __esri.SQLSyntaxError): boolean;
4
+ export declare function getExpectedTokens(error: __esri.SQLSyntaxError): string[] | undefined;
5
+ export declare function formatSyntaxError(error: __esri.SQLSyntaxError): string;
6
+ type ExpectedLiteral = {
7
+ category: "functions" | "keywords" | "operators";
8
+ text: string;
9
+ };
10
+ /**
11
+ * parses the error from the parser and returns the expected literals, used to provide suggestions.
12
+ * it will only return literals that do not contain special characters or numbers.
13
+ */
14
+ export declare function getExpectedLiterals(error: __esri.SQLSyntaxError): ExpectedLiteral[];
15
+ export declare const callerIndexAt = -2;
16
+ /**
17
+ * returns the slot position of the node in the context root
18
+ * @param node the node we want to find the slot position for
19
+ * @param contextRoot the context root of the node, see {@link identifyContextRoot}
20
+ */
21
+ export declare function getSlotPosition(node: __esri.SQLNode, contextRoot: __esri.SQLNode): ChildBearingProperties | number;
22
+ /**
23
+ * Identifies the context root of the searchNode in the searchTree. The context root is the first "non-terminal" node within the node's parent context (searchTree).
24
+ * see {@link terminalTypes} for the list of terminal types.
25
+ * @param searchNode the node we want to find the context root for
26
+ * @param searchTree all the nodes contained in the searchNode's parent context
27
+ * @returns The context root of the searchNode
28
+ */
29
+ export declare function identifyContextRoot(searchNode: __esri.SQLNode, searchTree: __esri.SQLNode[]): __esri.SQLNode;
30
+ export {};
@@ -0,0 +1,19 @@
1
+ import type * as sqlExprModeModule from "./sql-expr-mode";
2
+ import type { ISqlExprWorker } from "./types";
3
+ import type { Uri } from "monaco-editor";
4
+ type SqlExprModeType = typeof sqlExprModeModule;
5
+ /**
6
+ * Returns the sql-expression worker for the model.
7
+ * Example:
8
+ * ```ts
9
+ * const sqlExpressionWorker = await getSqlExpressionWorker(model.uri);
10
+ * ```
11
+ * @returns sql-expression worker
12
+ */
13
+ export declare function getSqlExprWorker(uri: Uri): Promise<ISqlExprWorker>;
14
+ /**
15
+ * Request the sql-expression mode
16
+ * @returns sql-expression mode module
17
+ */
18
+ export declare function getMode(): Promise<SqlExprModeType>;
19
+ export {};
@@ -1,10 +1,3 @@
1
- import * as monaco from "monaco-editor";
2
- export declare const MarkerType: {
3
- Hint: monaco.MarkerSeverity;
4
- Info: monaco.MarkerSeverity;
5
- Warning: monaco.MarkerSeverity;
6
- Error: monaco.MarkerSeverity;
7
- };
8
1
  export declare enum ValidationDiagnosticCodes {
9
2
  ExpectedDateTimeValue = "ExpectedDateTimeValue",
10
3
  ExpectedNumericalLiteral = "ExpectedNumericalLiteral",