@arcgis/coding-components 4.31.0-next.2 → 4.31.0-next.3

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 (152) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  3. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  4. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  5. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +11 -0
  6. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  7. package/dist/arcgis-coding-components/assets/sql-expression-editor/api/sql-expression-api.t9n.en.json +735 -0
  8. package/dist/arcgis-coding-components/index.esm.js +2 -2
  9. package/dist/arcgis-coding-components/p-0105cc95.js +6 -0
  10. package/dist/arcgis-coding-components/{p-9eced6fc.js → p-111ba641.js} +2 -2
  11. package/dist/arcgis-coding-components/p-3ca5ba95.entry.js +6 -0
  12. package/dist/arcgis-coding-components/{p-bb7e832e.js → p-42c8b545.js} +3 -3
  13. package/dist/arcgis-coding-components/{p-93a97573.js → p-4986aaf2.js} +3 -3
  14. package/dist/arcgis-coding-components/p-5e26a360.js +6 -0
  15. package/dist/arcgis-coding-components/{p-60c2a820.js → p-5eb82abf.js} +2 -2
  16. package/dist/arcgis-coding-components/{p-62ee6251.js → p-6554a853.js} +1 -1
  17. package/dist/arcgis-coding-components/{p-7984ea8e.js → p-7c6b3d40.js} +2 -2
  18. package/dist/arcgis-coding-components/{p-5ef7cce5.js → p-86106a9a.js} +1 -1
  19. package/dist/arcgis-coding-components/{p-03ea6cd7.js → p-8b4298d5.js} +3 -3
  20. package/dist/arcgis-coding-components/p-9132bc9c.entry.js +6 -0
  21. package/dist/arcgis-coding-components/{p-36fedc23.js → p-93d0e0cc.js} +10 -10
  22. package/dist/arcgis-coding-components/{p-e8211ffe.js → p-9c7e0089.js} +1 -1
  23. package/dist/arcgis-coding-components/p-b82e98f0.js +6 -0
  24. package/dist/arcgis-coding-components/{p-e7ee4d64.js → p-c4a5150e.js} +3 -3
  25. package/dist/arcgis-coding-components/p-d353f1ba.entry.js +6 -0
  26. package/dist/arcgis-coding-components/{p-0c6de9b3.js → p-fe6ccfe0.js} +2 -2
  27. package/dist/cjs/{app-globals-aee5f4b5.js → app-globals-92c5b499.js} +1 -1
  28. package/dist/cjs/arcade-defaults-34e82ff5.js +116 -0
  29. package/dist/cjs/{arcade-mode-b85ae7d4.js → arcade-mode-dfd66b4b.js} +62 -62
  30. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +177 -1491
  31. package/dist/cjs/arcgis-coding-components.cjs.js +4 -4
  32. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +81 -0
  33. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +80 -0
  34. package/dist/cjs/{css-7cc05f76.js → css-9b0053c3.js} +1 -1
  35. package/dist/cjs/{cssMode-2b0daeae.js → cssMode-62e53008.js} +4 -4
  36. package/dist/cjs/{html-f56911e1.js → html-3036e89e.js} +4 -4
  37. package/dist/cjs/{htmlMode-43eed674.js → htmlMode-c37eee42.js} +4 -4
  38. package/dist/cjs/{index-b34238a6.js → index-be6b2520.js} +9 -1
  39. package/dist/cjs/index.cjs.js +4 -3
  40. package/dist/cjs/{javascript-5115cb76.js → javascript-7276c023.js} +4 -4
  41. package/dist/cjs/{jsonMode-550dda36.js → jsonMode-baa295f0.js} +4 -4
  42. package/dist/cjs/{arcade-defaults-a8d8f8e2.js → language-defaults-base-5817af52.js} +61 -162
  43. package/dist/cjs/loader.cjs.js +4 -4
  44. package/dist/cjs/sql-expr-defaults-746bbc5f.js +1285 -0
  45. package/dist/cjs/sql-expr-mode-a9f1b697.js +25135 -0
  46. package/dist/cjs/{tsMode-336306a9.js → tsMode-36398912.js} +5 -5
  47. package/dist/cjs/{typescript-b395242f.js → typescript-608a420b.js} +4 -4
  48. package/dist/components/arcade-defaults.js +8 -1557
  49. package/dist/components/arcade-mode.js +2 -2
  50. package/dist/components/arcade-results.js +6 -4
  51. package/dist/components/arcade-suggestions.js +7 -5
  52. package/dist/components/arcade-variables.js +8 -6
  53. package/dist/components/arcgis-arcade-editor.js +33 -32
  54. package/dist/components/arcgis-arcade-results.js +1 -1
  55. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  56. package/dist/components/arcgis-arcade-variables.js +1 -1
  57. package/dist/components/arcgis-assets.d.ts +1 -1
  58. package/dist/components/arcgis-assets.js +1 -1
  59. package/dist/components/arcgis-code-editor.js +1 -1
  60. package/dist/components/arcgis-language-api-panel.js +1 -1
  61. package/dist/components/arcgis-sql-expression-editor.d.ts +11 -0
  62. package/dist/components/arcgis-sql-expression-editor.js +120 -0
  63. package/dist/components/arcgis-sql-expression-fields.d.ts +11 -0
  64. package/dist/components/arcgis-sql-expression-fields.js +11 -0
  65. package/dist/components/chunk-6TARY3NN.js +1159 -0
  66. package/dist/components/code-editor.js +41 -7
  67. package/dist/components/fields.js +2 -2
  68. package/dist/components/index.js +1 -1
  69. package/dist/components/index2.js +30 -22
  70. package/dist/components/language-api-panel.js +13 -40
  71. package/dist/components/language-defaults-base.js +1551 -0
  72. package/dist/components/markdown.js +1 -1
  73. package/dist/components/sql-expr-defaults.js +131 -0
  74. package/dist/components/sql-expr-mode.js +25132 -0
  75. package/dist/components/sql-expression-fields.js +102 -0
  76. package/dist/components/useT9n.js +45 -8
  77. package/dist/components/utilities.js +1 -1
  78. package/dist/esm/{app-globals-59faaf33.js → app-globals-5e178541.js} +1 -1
  79. package/dist/esm/arcade-defaults-6dac6b30.js +111 -0
  80. package/dist/esm/{arcade-mode-5d46035e.js → arcade-mode-02336ce9.js} +3 -3
  81. package/dist/esm/arcgis-arcade-editor_6.entry.js +124 -1438
  82. package/dist/esm/arcgis-coding-components.js +5 -5
  83. package/dist/esm/arcgis-sql-expression-editor.entry.js +77 -0
  84. package/dist/esm/arcgis-sql-expression-fields.entry.js +76 -0
  85. package/dist/esm/{css-e257dc49.js → css-e79f1ed1.js} +1 -1
  86. package/dist/esm/{cssMode-c11f7f40.js → cssMode-cd007d02.js} +3 -3
  87. package/dist/esm/{html-a6c37a99.js → html-d079d00d.js} +3 -3
  88. package/dist/esm/{htmlMode-1270bc7d.js → htmlMode-ff14e035.js} +3 -3
  89. package/dist/esm/{index-a970952c.js → index-88fc341d.js} +9 -1
  90. package/dist/esm/index.js +4 -3
  91. package/dist/esm/{javascript-ee179624.js → javascript-69f7c282.js} +4 -4
  92. package/dist/esm/{jsonMode-07502ccb.js → jsonMode-18ddadde.js} +3 -3
  93. package/dist/esm/{arcade-defaults-9eb28407.js → language-defaults-base-6687d11a.js} +55 -158
  94. package/dist/esm/loader.js +5 -5
  95. package/dist/esm/sql-expr-defaults-2cdfe08a.js +1279 -0
  96. package/dist/esm/sql-expr-mode-f10e5a43.js +25132 -0
  97. package/dist/esm/{tsMode-96749a12.js → tsMode-c2e5d33a.js} +3 -3
  98. package/dist/esm/{typescript-a3cf9881.js → typescript-a0fbebf0.js} +3 -3
  99. package/dist/loader/cdn.js +1 -1
  100. package/dist/loader/index.cjs.js +1 -1
  101. package/dist/loader/index.es2017.js +1 -1
  102. package/dist/loader/index.js +1 -1
  103. package/dist/types/components/arcade-editor/arcade-editor.d.ts +33 -8
  104. package/dist/types/components/arcade-results/arcade-results.d.ts +43 -1
  105. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +22 -1
  106. package/dist/types/components/arcade-variables/arcade-variables.d.ts +28 -1
  107. package/dist/types/components/code-editor/code-editor.d.ts +2 -1
  108. package/dist/types/components/language-api-panel/language-api-panel.d.ts +34 -8
  109. package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +24 -0
  110. package/dist/types/components/sql-expression-fields/sql-expression-fields.d.ts +32 -0
  111. package/dist/types/components.d.ts +85 -11
  112. package/dist/types/data/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 +13 -0
  113. package/dist/types/dependencies.d.ts +6 -10
  114. package/dist/types/utils/language-defaults-base.d.ts +2 -9
  115. package/dist/types/utils/profile/predefined-profile.d.ts +3 -1
  116. package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +41 -0
  117. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +16 -0
  118. package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +26 -0
  119. package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +37 -0
  120. package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +11 -0
  121. package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +122 -0
  122. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +5 -0
  123. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +18 -0
  124. package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +6 -0
  125. package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +156 -0
  126. package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +150 -0
  127. package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +1397 -0
  128. package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +59 -0
  129. package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +295 -0
  130. package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +135 -0
  131. package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +5 -0
  132. package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +11 -0
  133. package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +22 -0
  134. package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +540 -0
  135. package/dist/types/utils/sql-expr-monaco/sql-expr-language-syntax.d.ts +8 -0
  136. package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +10 -0
  137. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +3 -0
  138. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +41 -0
  139. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +99 -0
  140. package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +41 -0
  141. package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +15 -0
  142. package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +21 -0
  143. package/dist/types/utils/sql-expr-monaco/types.d.ts +91 -0
  144. package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +2 -0
  145. package/package.json +25 -20
  146. package/dist/arcgis-coding-components/p-81c37dab.entry.js +0 -6
  147. package/dist/components/chunk-IHYYRFLQ.js +0 -1363
  148. package/dist/types/components/arcade-editor/t9n-types.d.ts +0 -8
  149. package/dist/types/components/arcade-results/t9n-types.d.ts +0 -13
  150. package/dist/types/components/arcade-suggestions/t9n-types.d.ts +0 -6
  151. package/dist/types/components/arcade-variables/t9n-types.d.ts +0 -8
  152. package/dist/types/components/language-api-panel/t9n-types.d.ts +0 -8
@@ -0,0 +1,540 @@
1
+ import type { IRange, Position, editor, languages } from "monaco-editor";
2
+ import { standardizedFunctions } from "./DependentFiles/standardizedFunctions";
3
+ import type { SqlExprDefaults } from "./sql-expr-defaults";
4
+ export declare class SqlExprCompletionProvider implements languages.CompletionItemProvider {
5
+ private _defaults;
6
+ constructor(_defaults: SqlExprDefaults);
7
+ provideCompletionItems(model: editor.ITextModel, position: Position): Promise<languages.CompletionList | undefined>;
8
+ }
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"
530
+ }
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
+ };
@@ -0,0 +1,8 @@
1
+ import * as monaco from "monaco-editor";
2
+ /**
3
+ * This file is mostly ported from https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/sql/sql.ts
4
+ */
5
+ import IMonarchLanguage = monaco.languages.IMonarchLanguage;
6
+ import LanguageConfiguration = monaco.languages.LanguageConfiguration;
7
+ export declare const sqlExprLanguageConfig: LanguageConfiguration;
8
+ export declare const sqlExprLanguageSyntax: IMonarchLanguage;
@@ -0,0 +1,10 @@
1
+ import type { Uri } from "monaco-editor";
2
+ import type { ISqlExprWorker } from "./types";
3
+ import { type SqlExprDefaults } from "./sql-expr-defaults";
4
+ /**
5
+ * Returns the sql-expression worker for the model uris.
6
+ * @param uris The model uris for which to get the worker.
7
+ * @returns The sql-expression worker.
8
+ */
9
+ export declare function getSqlExprWorker(...uris: Uri[]): Promise<ISqlExprWorker>;
10
+ export declare function setupMode(defaults: SqlExprDefaults): void;
@@ -0,0 +1,3 @@
1
+ import { editor } from "monaco-editor";
2
+ import type { SqlExprDefaults } from "./sql-expr-defaults";
3
+ export default function sqlExprValidation(model: editor.ITextModel | null, defaults: SqlExprDefaults): Promise<void>;
@@ -0,0 +1,41 @@
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
+ export declare enum ValidationDiagnosticCodes {
9
+ ExpectedDateTimeValue = "ExpectedDateTimeValue",
10
+ ExpectedNumericalLiteral = "ExpectedNumericalLiteral",
11
+ ExpectedToken = "ExpectedToken",
12
+ FunctionNotSupported = "FunctionNotSupported",
13
+ IncompatibleListDataType = "IncompatibleListDataType",
14
+ IncorrectArgumentLength = "IncorrectArgumentLength",
15
+ IncorrectCastParameters = "IncorrectCastParameters",
16
+ IncorrectExtractParameters = "IncorrectExtractParameters",
17
+ IncorrectSubstringParameters = "IncorrectSubstringParameters",
18
+ IncorrectTrimParameters = "IncorrectTrimParameters",
19
+ InvalidElseClause = "InvalidElseClause",
20
+ InvalidThenClause = "InvalidThenClause",
21
+ InvalidEndOnWhen = "InvalidEndOnWhen",
22
+ InvalidTrimCharacter = "InvalidTrimCharacter",
23
+ MismatchedTypes = "MismatchedTypes",
24
+ MissingValueInCaseClause = "MissingValueInCaseClause",
25
+ NotCallable = "NotCallable",
26
+ TypeNotAssignable = "TypeNotAssignable",
27
+ UnexpectedEnd = "UnexpectedEnd.",
28
+ UnexpectedIdentifier = "UnexpectedIdentifier",
29
+ UnexpectedNumber = "UnexpectedNumber",
30
+ UnexpectedTextLiteral = "UnexpectedTextLiteral",
31
+ UnexpectedToken = "UnexpectedToken",
32
+ UnknownField = "UnknownField",
33
+ UnsupportedOperator = "UnsupportedOperator",
34
+ UnsupportedSyntax = "UnsupportedSyntax",
35
+ InvalidIntervalQualifier = "InvalidIntervalQualifier",
36
+ EmptyCaseExpression = "EmptyCaseExpression"
37
+ }
38
+ export declare const DiagnosticMessages: {
39
+ [key in ValidationDiagnosticCodes]: string;
40
+ };
41
+ export declare const getDiagnosticMessage: (diagnosticCode: ValidationDiagnosticCodes, replacements?: Record<string, number | string>) => string;
@@ -0,0 +1,99 @@
1
+ import * as monaco from "monaco-editor";
2
+ import type { SQLNode } from "./DependentFiles/WhereGrammar";
3
+ import type { ArcGISFieldType, PeggyError, SqlExpressionLiteral, PeggyLocation } from "./types";
4
+ export interface ValidationSyntaxContext {
5
+ token: string;
6
+ range: monaco.IRange;
7
+ startDelimiter?: boolean;
8
+ content?: ValidationSyntaxContext[];
9
+ }
10
+ export declare enum TokenType {
11
+ Single = "SINGLE",
12
+ EmptyField = "EMPTY_FIELD",
13
+ Error = "ERROR",
14
+ Field = "FIELD",
15
+ KeywordIn = "IN",
16
+ KeywordNotIn = "NOT IN",
17
+ KeywordBetween = "BETWEEN",
18
+ KeywordNotBetween = "NOT BETWEEN",
19
+ List = "LIST",
20
+ Negation = "NOT",
21
+ Number = "NUMBER",
22
+ Operator = "OPERATOR",
23
+ Parentheses = "PARENTHESES",
24
+ String = "STRING",
25
+ Unknown = "UNKNOWN"
26
+ }
27
+ export declare enum Token {
28
+ Case = "CASE",
29
+ CaseElse = "ELSE",
30
+ CaseThen = "THEN",
31
+ CaseWhen = "WHEN",
32
+ Comma = ",",
33
+ DoubleQuote = "\"",
34
+ Empty = "",
35
+ End = "END",
36
+ Interval = "INTERVAL",
37
+ LeftParentheses = "(",
38
+ NewLine = "\n",
39
+ RightParentheses = ")",
40
+ SingleQuote = "'",
41
+ WhiteSpace = " "
42
+ }
43
+ export declare enum BinaryOperator {
44
+ And = "AND",
45
+ Or = "OR",
46
+ Is = "IS",
47
+ IsNot = "ISNOT",
48
+ In = "IN",
49
+ NotIn = "NOT IN",
50
+ Between = "BETWEEN",
51
+ NotBetween = "NOTBETWEEN",
52
+ Like = "LIKE",
53
+ NotLike = "NOT LIKE",
54
+ NotEquals = "<>",
55
+ LessThan = "<",
56
+ GreaterThan = ">",
57
+ GreaterThanEqual = ">=",
58
+ LessThanEqual = "<=",
59
+ Equal = "=",
60
+ Multiply = "*",
61
+ Subtract = "-",
62
+ Add = "+",
63
+ Divide = "/",
64
+ Concatenate = "||"
65
+ }
66
+ export declare enum NodeReturnType {
67
+ Boolean = "BOOLEAN",
68
+ Double = "DOUBLE",
69
+ ExpressionList = "EXPRESSION-LIST",
70
+ Float = "FLOAT",
71
+ Integer = "INTEGER",
72
+ Null = "NULL",
73
+ Number = "NUMBER",
74
+ Real = "REAL",
75
+ String = "STRING",
76
+ SmallInt = "SMALLINT",
77
+ UnknownFunction = "UNKNOWN_FUNCTION"
78
+ }
79
+ export declare enum CallableExpressionResponse {
80
+ Function = "FUNCTION",
81
+ ExpressionList = "EXPRESSION_LIST",
82
+ Success = "SUCCESS",
83
+ NonCallable = "NON_CALLABLE"
84
+ }
85
+ export declare const tokenizationRegex: RegExp;
86
+ export declare const isValidIntervalValue: RegExp;
87
+ export declare const validOps: string[];
88
+ export declare const relationalTypes: SqlExpressionLiteral[];
89
+ export declare const qualifiers: TokenType[];
90
+ export declare function convertArcgisTypeToSqlReturnType(arcgisType: ArcGISFieldType): SqlExpressionLiteral;
91
+ export declare const identifyNodeReturnType: (node: SQLNode, fields: __esri.FeatureLayer["fields"]) => SqlExpressionLiteral | "time-only" | "unknown_function";
92
+ export declare const isNumericType: (type: SqlExpressionLiteral) => boolean;
93
+ export declare const formatListToString: (types: SqlExpressionLiteral[], delimiter: string) => string;
94
+ export declare const formatType: (type: string) => string;
95
+ export declare const getValueFromNode: (node: SQLNode) => number | string;
96
+ export declare const addNewMarker: (message: string, range: monaco.IRange | PeggyLocation, markers: monaco.editor.IMarkerData[], isNodeFormat?: boolean) => void;
97
+ export declare const validateTypeMatch: (node: SQLNode, expectedType: NodeReturnType, markers: monaco.editor.IMarkerData[], fields: __esri.FeatureLayer["fields"]) => void;
98
+ export declare function isSyntaxError(error: PeggyError): boolean;
99
+ export declare function formatSyntaxError(error: PeggyError): string;