@arcgis/coding-components 4.31.0-next.11 → 4.31.0-next.13

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 (119) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +29 -7
  3. package/dist/arcgis-coding-components/index.esm.js +2 -2
  4. package/dist/arcgis-coding-components/{p-decda64c.js → p-0238f1c9.js} +1 -1
  5. package/dist/arcgis-coding-components/{p-4fcb5bf0.js → p-056c22f6.js} +2 -2
  6. package/dist/arcgis-coding-components/{p-cdc11558.js → p-30a27259.js} +1 -1
  7. package/dist/arcgis-coding-components/{p-2f2288de.js → p-46ee5802.js} +2 -2
  8. package/dist/arcgis-coding-components/{p-44052160.js → p-48800c64.js} +2 -2
  9. package/dist/arcgis-coding-components/{p-c28eef63.js → p-5f9d02cd.js} +2 -2
  10. package/dist/arcgis-coding-components/p-6b06bf1f.entry.js +6 -0
  11. package/dist/arcgis-coding-components/{p-eb99e7e7.entry.js → p-6dd5c8ac.entry.js} +2 -2
  12. package/dist/arcgis-coding-components/{p-47bb2fdc.entry.js → p-70be15ef.entry.js} +2 -2
  13. package/dist/arcgis-coding-components/{p-79e7d01c.js → p-7ce92237.js} +3 -3
  14. package/dist/arcgis-coding-components/p-7db90261.js +6 -0
  15. package/dist/arcgis-coding-components/{p-ef0c4126.js → p-817249dc.js} +2 -2
  16. package/dist/arcgis-coding-components/{p-af7ed920.js → p-9521dcf8.js} +9 -9
  17. package/dist/arcgis-coding-components/{p-21306a37.js → p-af89dfbf.js} +2 -2
  18. package/dist/arcgis-coding-components/{p-4050b5db.js → p-b3831336.js} +2 -2
  19. package/dist/arcgis-coding-components/{p-aedf8504.js → p-b7351b5a.js} +2 -2
  20. package/dist/arcgis-coding-components/{p-ca85726f.js → p-dc1f177d.js} +1 -1
  21. package/dist/arcgis-coding-components/p-e8f28ec2.js +6 -0
  22. package/dist/arcgis-coding-components/{p-2db85972.js → p-f6939275.js} +2 -2
  23. package/dist/cjs/{app-globals-d8d56a70.js → app-globals-5c2eb6c4.js} +1 -1
  24. package/dist/cjs/{arcade-defaults-b1300c3f.js → arcade-defaults-f0f15084.js} +4 -4
  25. package/dist/cjs/{arcade-language-features-5c4510c9.js → arcade-language-features-d1ca02a6.js} +2 -2
  26. package/dist/cjs/{arcade-mode-185370a7.js → arcade-mode-f16e383a.js} +3 -3
  27. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +7 -14
  28. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  29. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
  30. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
  31. package/dist/cjs/{css-0d91050a.js → css-f9c7e7cd.js} +1 -1
  32. package/dist/cjs/{cssMode-e8786e83.js → cssMode-22b5188b.js} +2 -2
  33. package/dist/cjs/{html-adbae3fd.js → html-35ace5ce.js} +2 -2
  34. package/dist/cjs/{htmlMode-608f8da7.js → htmlMode-03149da9.js} +2 -2
  35. package/dist/cjs/{index-1cf75f2d.js → index-168881c0.js} +1 -1
  36. package/dist/cjs/index.cjs.js +4 -4
  37. package/dist/cjs/{javascript-c8733e40.js → javascript-20775679.js} +3 -3
  38. package/dist/cjs/{jsonMode-98ec5315.js → jsonMode-74a5f024.js} +2 -2
  39. package/dist/cjs/{language-defaults-base-2b2f9d3e.js → language-defaults-base-9b48f557.js} +9 -9
  40. package/dist/cjs/loader.cjs.js +3 -3
  41. package/dist/cjs/{sql-expr-defaults-a1d5380d.js → sql-expr-defaults-7c0204a1.js} +26 -23
  42. package/dist/cjs/{sql-expr-mode-19618e11.js → sql-expr-mode-5d08be72.js} +19971 -20969
  43. package/dist/cjs/{tsMode-ed34ec8f.js → tsMode-8ed4166e.js} +2 -2
  44. package/dist/cjs/{typescript-c3d83864.js → typescript-821d6d32.js} +2 -2
  45. package/dist/components/arcade-defaults.js +1 -1
  46. package/dist/components/arcade-language-features.js +1 -1
  47. package/dist/components/arcade-mode.js +1 -1
  48. package/dist/components/arcade-results.js +2 -2
  49. package/dist/components/arcade-suggestions.js +2 -2
  50. package/dist/components/arcade-variables.js +2 -2
  51. package/dist/components/arcgis-arcade-editor.js +2 -2
  52. package/dist/components/arcgis-arcade-results.js +1 -1
  53. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  54. package/dist/components/arcgis-arcade-variables.js +1 -1
  55. package/dist/components/arcgis-assets.d.ts +1 -1
  56. package/dist/components/arcgis-assets.js +1 -1
  57. package/dist/components/arcgis-code-editor.js +1 -1
  58. package/dist/components/arcgis-language-api-panel.js +1 -1
  59. package/dist/components/arcgis-sql-expression-editor.js +2 -2
  60. package/dist/components/arcgis-sql-expression-fields.js +1 -1
  61. package/dist/components/{chunk-3IUJHIAA.js → chunk-2JTWBRMN.js} +2 -2
  62. package/dist/components/code-editor.js +7 -14
  63. package/dist/components/fields.js +1 -1
  64. package/dist/components/index.js +1 -1
  65. package/dist/components/index2.js +1 -1
  66. package/dist/components/language-api-panel.js +2 -2
  67. package/dist/components/language-defaults-base.js +1 -1
  68. package/dist/components/markdown.js +1 -1
  69. package/dist/components/sql-expr-defaults.js +24 -22
  70. package/dist/components/sql-expr-mode.js +19969 -20967
  71. package/dist/components/sql-expression-fields.js +2 -2
  72. package/dist/components/useT9n.js +2 -2
  73. package/dist/components/utilities.js +1 -1
  74. package/dist/esm/{app-globals-a48930ca.js → app-globals-b9f25e63.js} +1 -1
  75. package/dist/esm/{arcade-defaults-3ea67051.js → arcade-defaults-0b98d37c.js} +4 -4
  76. package/dist/esm/{arcade-language-features-8274cdc7.js → arcade-language-features-ca303d47.js} +2 -2
  77. package/dist/esm/{arcade-mode-c48c3fc6.js → arcade-mode-fca51be8.js} +3 -3
  78. package/dist/esm/arcgis-arcade-editor_6.entry.js +8 -15
  79. package/dist/esm/arcgis-coding-components.js +4 -4
  80. package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
  81. package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
  82. package/dist/esm/{css-4f85f426.js → css-ba350248.js} +1 -1
  83. package/dist/esm/{cssMode-d655f1b9.js → cssMode-d8267564.js} +2 -2
  84. package/dist/esm/{html-dd1552df.js → html-8ed39dee.js} +2 -2
  85. package/dist/esm/{htmlMode-0b7c2367.js → htmlMode-b26c455f.js} +2 -2
  86. package/dist/esm/{index-38d652b8.js → index-658e1601.js} +1 -1
  87. package/dist/esm/index.js +4 -4
  88. package/dist/esm/{javascript-ef70f152.js → javascript-a8c18cd8.js} +3 -3
  89. package/dist/esm/{jsonMode-a6ed58a5.js → jsonMode-1a25e1fd.js} +2 -2
  90. package/dist/esm/{language-defaults-base-77487def.js → language-defaults-base-8d2a6ab5.js} +9 -9
  91. package/dist/esm/loader.js +4 -4
  92. package/dist/esm/{sql-expr-defaults-54db53a8.js → sql-expr-defaults-02ec1eb4.js} +26 -24
  93. package/dist/esm/{sql-expr-mode-5c1d43ea.js → sql-expr-mode-6e9cd3f1.js} +19971 -20970
  94. package/dist/esm/{tsMode-fce6766b.js → tsMode-36db3afb.js} +2 -2
  95. package/dist/esm/{typescript-aed3d402.js → typescript-8ff4383d.js} +2 -2
  96. package/dist/loader/cdn.js +1 -1
  97. package/dist/loader/index.cjs.js +1 -1
  98. package/dist/loader/index.es2017.js +1 -1
  99. package/dist/loader/index.js +1 -1
  100. package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +45 -0
  101. package/dist/types/utils/sql-expr-monaco/sql-expr-contribution.d.ts +1 -11
  102. package/dist/types/utils/sql-expr-monaco/sql-expr-defaults.d.ts +0 -1
  103. package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +17 -39
  104. package/dist/types/utils/sql-expr-monaco/sql-expr-mode.d.ts +34 -1
  105. package/dist/types/utils/sql-expr-monaco/sql-expr-service-accessors.d.ts +19 -0
  106. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-diagnostic-adapter.d.ts +0 -7
  107. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +6 -5
  108. package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +3 -3
  109. package/dist/types/utils/sql-expr-monaco/sql-expr-worker-manager.d.ts +2 -0
  110. package/dist/types/utils/sql-expr-monaco/sql-expr.worker.d.ts +9 -6
  111. package/dist/types/utils/sql-expr-monaco/types.d.ts +4 -6
  112. package/package.json +10 -10
  113. package/dist/arcgis-coding-components/p-29b05690.entry.js +0 -6
  114. package/dist/arcgis-coding-components/p-e6442988.js +0 -6
  115. package/dist/arcgis-coding-components/p-fa824326.js +0 -6
  116. package/dist/types/utils/sql-expr-monaco/libraries/date/properties/index.d.ts +0 -59
  117. package/dist/types/utils/sql-expr-monaco/libraries/numeric/properties/index.d.ts +0 -295
  118. package/dist/types/utils/sql-expr-monaco/libraries/string/properties/index.d.ts +0 -135
  119. package/dist/types/utils/sql-expr-monaco/sql-expr-validation-adapter.d.ts +0 -3
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.11
4
+ * v4.31.0-next.13
5
5
  */
6
- import { N as typescriptDefaults, M as monaco_editor_core_star } from './language-defaults-base-77487def.js';
6
+ import { N as typescriptDefaults, M as monaco_editor_core_star } from './language-defaults-base-8d2a6ab5.js';
7
7
 
8
8
  /*!-----------------------------------------------------------------------------
9
9
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.11
4
+ * v4.31.0-next.13
5
5
  */
6
- import { M as monaco_editor_core_star } from './language-defaults-base-77487def.js';
6
+ import { M as monaco_editor_core_star } from './language-defaults-base-8d2a6ab5.js';
7
7
 
8
8
  /*!-----------------------------------------------------------------------------
9
9
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.11
4
+ * v4.31.0-next.13
5
5
  */
6
6
  module.exports = require('../cjs/loader.cjs.js');
7
7
  module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.11
4
+ * v4.31.0-next.13
5
5
  */
6
6
  module.exports = require('../cjs/loader.cjs.js');
7
7
  module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.11
4
+ * v4.31.0-next.13
5
5
  */
6
6
  export * from '../esm/polyfills/index.js';
7
7
  export * from '../esm/loader.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.11
4
+ * v4.31.0-next.13
5
5
  */
6
6
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
7
7
  export * from '../esm/polyfills/index.js';
@@ -0,0 +1,45 @@
1
+ import type { MarkerSeverity } 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 sqlFunctionParamKeywords: {
36
+ CAST: string[];
37
+ EXTRACT: string[];
38
+ TRIM: string[];
39
+ };
40
+ export declare const MarkerType: {
41
+ Hint: MarkerSeverity.Hint;
42
+ Info: MarkerSeverity.Info;
43
+ Warning: MarkerSeverity.Warning;
44
+ Error: MarkerSeverity.Error;
45
+ };
@@ -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;
@@ -1,16 +1,27 @@
1
- import type { IRange, Position, editor, languages } from "monaco-editor";
1
+ import { editor } from "monaco-editor";
2
+ import type { IRange, Position, languages } from "monaco-editor";
2
3
  import type { SqlExprDefaults } from "./sql-expr-defaults";
3
- export declare const sqlFunctionParamKeywords: {
4
- CAST: string[];
5
- EXTRACT: string[];
6
- TRIM: string[];
7
- };
4
+ import type { ISqlExprWorkerAccessor } from "./types";
5
+ import type { SqlExprDiagnosticService } from "./sql-expr-mode";
8
6
  export declare class SqlExprCompletionProvider implements languages.CompletionItemProvider {
9
7
  private _defaults;
10
8
  private _sdkFunctions;
11
9
  constructor(_defaults: SqlExprDefaults);
12
10
  provideCompletionItems(model: editor.ITextModel, position: Position): Promise<languages.CompletionList | undefined>;
13
11
  }
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;
24
+ }
14
25
  export declare const sqlParenLessFunctions: string[];
15
26
  export declare const dataTypes: string[];
16
27
  export declare const getKeywords: (identifier: string) => string[] | undefined;
@@ -26,36 +37,3 @@ export declare const generateCompletionDocumentation: (description: string, exam
26
37
  code: string;
27
38
  description: string;
28
39
  }[]) => string;
29
- export declare enum ChildBearingProperties {
30
- ARGS = "args",
31
- CLAUSES = "clauses",
32
- ELSE = "else",
33
- END = "end",
34
- EXPR = "expr",
35
- LEFT = "left",
36
- OPERAND = "operand",
37
- QUALIFIER = "qualifier",
38
- RIGHT = "right",
39
- START = "start",
40
- VALUE = "value"
41
- }
42
- export declare enum ChildBearingNodeTypes {
43
- CASE_EXPRESSION = "case-expression",
44
- EXPRESSION_LIST = "expression-list",
45
- FUNCTION = "function",
46
- INTERVAL = "interval",
47
- INTERVAL_QUALIFIER = "interval-qualifier",
48
- WHEN_CLAUSE = "when-clause",
49
- UNARY_EXPRESSION = "unary-expression",
50
- BINARY_EXPRESSION = "binary-expression"
51
- }
52
- export declare const CHILD_BEARING_PROPERTIES: {
53
- readonly "case-expression": readonly [ChildBearingProperties.CLAUSES, ChildBearingProperties.OPERAND, ChildBearingProperties.ELSE];
54
- readonly "when-clause": readonly [ChildBearingProperties.OPERAND, ChildBearingProperties.VALUE];
55
- readonly "expression-list": readonly [ChildBearingProperties.VALUE];
56
- readonly "unary-expression": readonly [ChildBearingProperties.EXPR];
57
- readonly "binary-expression": readonly [ChildBearingProperties.LEFT, ChildBearingProperties.RIGHT];
58
- readonly function: readonly [ChildBearingProperties.ARGS];
59
- readonly interval: readonly [ChildBearingProperties.VALUE, ChildBearingProperties.QUALIFIER];
60
- readonly "interval-qualifier": readonly [ChildBearingProperties.START, ChildBearingProperties.END];
61
- };
@@ -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,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",
@@ -1,9 +1,10 @@
1
- import * as monaco from "monaco-editor";
1
+ import type { IRange, editor } from "monaco-editor";
2
2
  import type { SQLNode } from "./DependentFiles/WhereGrammar";
3
3
  import type { ArcGISFieldType, PeggyError, SqlExpressionLiteral, PeggyLocation } from "./types";
4
+ import type { ApiVariable } from "@arcgis/languages-api-utils";
4
5
  export interface ValidationSyntaxContext {
5
6
  token: string;
6
- range: monaco.IRange;
7
+ range: IRange;
7
8
  startDelimiter?: boolean;
8
9
  content?: ValidationSyntaxContext[];
9
10
  }
@@ -88,12 +89,12 @@ export declare const validOps: string[];
88
89
  export declare const relationalTypes: SqlExpressionLiteral[];
89
90
  export declare const qualifiers: TokenType[];
90
91
  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 identifyNodeReturnType: (node: SQLNode, fields: ApiVariable[]) => SqlExpressionLiteral | "time-only" | "unknown_function";
92
93
  export declare const isNumericType: (type: SqlExpressionLiteral) => boolean;
93
94
  export declare const formatListToString: (types: SqlExpressionLiteral[], delimiter: string) => string;
94
95
  export declare const formatType: (type: string) => string;
95
96
  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;
97
+ export declare const addNewMarker: (message: string, range: IRange | PeggyLocation, markers: editor.IMarkerData[], isNodeFormat?: boolean) => void;
98
+ export declare const validateTypeMatch: (node: SQLNode, expectedType: NodeReturnType, markers: editor.IMarkerData[], fields: ApiVariable[]) => void;
98
99
  export declare function isSyntaxError(error: PeggyError): boolean;
99
100
  export declare function formatSyntaxError(error: PeggyError): string;
@@ -1,12 +1,12 @@
1
1
  import type { SQLNode } from "./DependentFiles/WhereGrammar";
2
2
  import type { editor } from "monaco-editor";
3
- import type { ApiCategory } from "@arcgis/languages-api-utils";
3
+ import type { ApiCategory, ApiContext } from "@arcgis/languages-api-utils";
4
4
  export declare class SQLExpressionValidation {
5
- private layer;
6
5
  private callStack;
7
6
  private _sdkFunctions;
7
+ private _fields;
8
8
  markers: editor.IMarkerData[];
9
- constructor(layer: __esri.FeatureLayer, sdkLibrary: ApiCategory[]);
9
+ constructor(sdkLibrary: ApiCategory[], _apiContext: ApiContext);
10
10
  /**
11
11
  * validates the SQL Expression by generating an AST and traversing it
12
12
  * @param modelContent The SQL Expression to validate
@@ -8,7 +8,9 @@ export declare class SqlExprWorkerManager {
8
8
  private _defaults;
9
9
  private _worker;
10
10
  private _client;
11
+ private _configChangeListener;
11
12
  constructor(_defaults: SqlExprDefaults);
13
+ dispose(): void;
12
14
  stopWorker(): void;
13
15
  private _getClientProxy;
14
16
  getLanguageServiceWorker(...resources: Uri[]): Promise<ISqlExprWorker>;
@@ -1,10 +1,11 @@
1
- import { type languages, type worker } from "monaco-editor";
1
+ import type { languages, worker, editor } from "monaco-editor";
2
2
  import type { ISqlExprWorker } from "./types";
3
- type TodoFixMe = any;
4
- type Diagnostic = TodoFixMe;
3
+ import type { ApiCategory, ApiContext } from "@arcgis/languages-api-utils";
5
4
  interface IWorkerData {
6
5
  languageId: string;
7
- languageOptions?: TodoFixMe;
6
+ languageOptions?: {
7
+ assetsPath?: string;
8
+ };
8
9
  }
9
10
  /**
10
11
  * The ArcGIS SQL Expression Web Worker is leveraging the Arcade Language Service to provide the editor functionalities.
@@ -13,9 +14,11 @@ interface IWorkerData {
13
14
  export declare class SqlExprWorker implements ISqlExprWorker {
14
15
  private _ctx;
15
16
  private _languageId;
16
- constructor(_ctx: worker.IWorkerContext, { languageId }: IWorkerData);
17
- doValidation(modelId: string): Promise<Diagnostic[]>;
17
+ private _apiService;
18
+ constructor(_ctx: worker.IWorkerContext, { languageId, languageOptions }: IWorkerData);
19
+ doValidation(modelId: string, context: ApiContext): Promise<editor.IMarkerData[]>;
18
20
  doComplete(modelId: string): Promise<languages.CompletionList>;
21
+ getApiLibrary(context: ApiContext): Promise<ApiCategory[]>;
19
22
  private _getTextDocument;
20
23
  }
21
24
  export {};
@@ -1,13 +1,12 @@
1
- import type { Thenable, Uri, languages } from "monaco-editor";
1
+ import type { Thenable, Uri, languages, editor } from "monaco-editor";
2
2
  import type { Position } from "vscode-languageserver-types";
3
3
  import type { PeggySyntaxError, FileRange } from "./PeggyGrammar/sql92grammar";
4
4
  import type { DataTypeNode, SQLNode } from "./DependentFiles/WhereGrammar";
5
- import type { ApiContext } from "@arcgis/languages-api-utils";
6
- type TodoFixMe = any;
7
- type Diagnostic = TodoFixMe;
5
+ import type { ApiCategory, ApiContext } from "@arcgis/languages-api-utils";
8
6
  export interface ISqlExprWorker {
9
- doValidation: (modelId: string, context: ApiContext) => Thenable<Diagnostic[]>;
7
+ doValidation: (modelId: string, context: ApiContext) => Thenable<editor.IMarkerData[]>;
10
8
  doComplete: (modelId: string, position: Position) => Thenable<languages.CompletionList>;
9
+ getApiLibrary: (context: ApiContext) => Thenable<ApiCategory[]>;
11
10
  }
12
11
  export type ISqlExprWorkerAccessor = (...more: Uri[]) => Thenable<ISqlExprWorker>;
13
12
  export interface ApiContextType {
@@ -88,4 +87,3 @@ export type ArcGISFieldType =
88
87
  __esri.Field["type"];
89
88
  export type PeggyError = PeggySyntaxError;
90
89
  export type PeggyLocation = FileRange;
91
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/coding-components",
3
- "version": "4.31.0-next.11",
3
+ "version": "4.31.0-next.13",
4
4
  "description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -49,20 +49,20 @@
49
49
  "generate": "stencil generate"
50
50
  },
51
51
  "dependencies": {
52
- "@arcgis/arcade-languageservice": "4.31.0-next.11",
53
- "@arcgis/components-controllers": "4.31.0-next.11",
54
- "@arcgis/components-utils": "4.31.0-next.11",
55
- "@arcgis/languages-api-utils": "4.31.0-next.11",
52
+ "@arcgis/arcade-languageservice": "4.31.0-next.13",
53
+ "@arcgis/components-controllers": "4.31.0-next.13",
54
+ "@arcgis/components-utils": "4.31.0-next.13",
55
+ "@arcgis/languages-api-utils": "4.31.0-next.13",
56
56
  "@stencil/core": "4.17.1",
57
57
  "monaco-editor": "0.45.0",
58
58
  "vscode-languageserver-types": "^3.17.5"
59
59
  },
60
60
  "devDependencies": {
61
- "@arcgis/components-plugins": "4.31.0-next.11",
61
+ "@arcgis/components-plugins": "4.31.0-next.13",
62
62
  "@arcgis/core": ">=4.31.0-next <4.32",
63
- "@arcgis/core-adapter": "4.31.0-next.11",
64
- "@arcgis/storybook-utils": "4.31.0-next.11",
65
- "@arcgis/typescript-config": "4.31.0-next.11",
63
+ "@arcgis/core-adapter": "4.31.0-next.13",
64
+ "@arcgis/storybook-utils": "4.31.0-next.13",
65
+ "@arcgis/typescript-config": "4.31.0-next.13",
66
66
  "@esri/calcite-components": "^2.8.0",
67
67
  "@stencil/angular-output-target": "0.8.4",
68
68
  "@stencil/react-output-target": "0.5.3",
@@ -102,5 +102,5 @@
102
102
  "@arcgis/core": ">=4.31.0-next <4.32",
103
103
  "@esri/calcite-components": "^2.8.0"
104
104
  },
105
- "gitHead": "5490d4870ed02b53f0fd6d1f611b207be818d9ac"
105
+ "gitHead": "70bd9982100406c37f23e281411c01b2176f0ff2"
106
106
  }