@arcgis/coding-components 4.31.0-next.10 → 4.31.0-next.11
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.
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-da9431ba.js → p-21306a37.js} +2 -2
- package/dist/arcgis-coding-components/{p-f452d4b8.entry.js → p-29b05690.entry.js} +2 -2
- package/dist/arcgis-coding-components/p-2db85972.js +6 -0
- package/dist/arcgis-coding-components/{p-8196fa73.js → p-2f2288de.js} +2 -2
- package/dist/arcgis-coding-components/{p-923858b5.js → p-4050b5db.js} +2 -2
- package/dist/arcgis-coding-components/{p-960aa9dc.js → p-44052160.js} +2 -2
- package/dist/arcgis-coding-components/{p-767b17ee.entry.js → p-47bb2fdc.entry.js} +2 -2
- package/dist/arcgis-coding-components/p-4fcb5bf0.js +6 -0
- package/dist/arcgis-coding-components/{p-ad75160d.js → p-79e7d01c.js} +3 -3
- package/dist/arcgis-coding-components/{p-02cae55d.js → p-aedf8504.js} +3 -3
- package/dist/arcgis-coding-components/{p-790067b1.js → p-af7ed920.js} +12 -12
- package/dist/arcgis-coding-components/{p-6e28fd70.js → p-c28eef63.js} +2 -2
- package/dist/arcgis-coding-components/{p-22253750.js → p-ca85726f.js} +1 -1
- package/dist/arcgis-coding-components/{p-193ac44f.js → p-cdc11558.js} +1 -1
- package/dist/arcgis-coding-components/{p-8cf09bcc.js → p-decda64c.js} +1 -1
- package/dist/arcgis-coding-components/p-e6442988.js +6 -0
- package/dist/arcgis-coding-components/{p-4fc79a07.entry.js → p-eb99e7e7.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-ab78d6c4.js → p-ef0c4126.js} +3 -3
- package/dist/arcgis-coding-components/{p-025fda85.js → p-fa824326.js} +2 -2
- package/dist/cjs/{app-globals-bade840e.js → app-globals-d8d56a70.js} +1 -1
- package/dist/cjs/arcade-defaults-b1300c3f.js +349 -0
- package/dist/cjs/{arcade-language-features-747fb1da.js → arcade-language-features-5c4510c9.js} +2 -2
- package/dist/cjs/{arcade-mode-dce44622.js → arcade-mode-185370a7.js} +3 -4
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +6 -6
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-077ba0c5.js → css-0d91050a.js} +1 -1
- package/dist/cjs/{cssMode-7f2030db.js → cssMode-e8786e83.js} +2 -3
- package/dist/cjs/{html-e3a243e9.js → html-adbae3fd.js} +2 -3
- package/dist/cjs/{htmlMode-c273d6dc.js → htmlMode-608f8da7.js} +2 -3
- package/dist/cjs/{index-37a86ff4.js → index-1cf75f2d.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-7a33cca7.js → javascript-c8733e40.js} +3 -4
- package/dist/cjs/{jsonMode-6b4e0850.js → jsonMode-98ec5315.js} +2 -3
- package/dist/cjs/{language-defaults-base-b32cb091.js → language-defaults-base-2b2f9d3e.js} +800 -1024
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-8a5834f3.js → sql-expr-defaults-a1d5380d.js} +55 -4
- package/dist/cjs/{sql-expr-mode-a72a1f92.js → sql-expr-mode-19618e11.js} +5 -5
- package/dist/cjs/{tsMode-c2edcd57.js → tsMode-ed34ec8f.js} +2 -3
- package/dist/cjs/{typescript-c50c5516.js → typescript-c3d83864.js} +2 -3
- package/dist/components/arcade-defaults.js +238 -4
- package/dist/components/arcade-language-features.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +2 -2
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcade-variables.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-3IUJHIAA.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/language-defaults-base.js +47 -273
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +55 -4
- package/dist/components/sql-expr-mode.js +1 -1
- package/dist/components/sql-expression-fields.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-ed47e16d.js → app-globals-a48930ca.js} +1 -1
- package/dist/esm/arcade-defaults-3ea67051.js +344 -0
- package/dist/esm/{arcade-language-features-8edb3527.js → arcade-language-features-8274cdc7.js} +2 -2
- package/dist/esm/{arcade-mode-ad036f46.js → arcade-mode-c48c3fc6.js} +3 -4
- package/dist/esm/arcgis-arcade-editor_6.entry.js +6 -6
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-810518f1.js → css-4f85f426.js} +1 -1
- package/dist/esm/{cssMode-a7208024.js → cssMode-d655f1b9.js} +2 -3
- package/dist/esm/{html-e187d7d8.js → html-dd1552df.js} +2 -3
- package/dist/esm/{htmlMode-06b7bae2.js → htmlMode-0b7c2367.js} +2 -3
- package/dist/esm/{index-3743d31f.js → index-38d652b8.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-04a3f866.js → javascript-ef70f152.js} +3 -4
- package/dist/esm/{jsonMode-ee8bb2ea.js → jsonMode-a6ed58a5.js} +2 -3
- package/dist/esm/{language-defaults-base-52a397f5.js → language-defaults-base-77487def.js} +797 -1024
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-f7c2d5ef.js → sql-expr-defaults-54db53a8.js} +55 -4
- package/dist/esm/{sql-expr-mode-433b4a39.js → sql-expr-mode-5c1d43ea.js} +5 -5
- package/dist/esm/{tsMode-c80c462e.js → tsMode-fce6766b.js} +2 -3
- package/dist/esm/{typescript-a9b8caa7.js → typescript-aed3d402.js} +2 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/utils/arcade-monaco/arcade-profile-strategy.d.ts +9 -0
- package/dist/types/utils/fields.d.ts +2 -2
- package/dist/types/utils/profile/editor-profile.d.ts +7 -6
- package/dist/types/utils/profile/types.d.ts +3 -0
- package/dist/types/utils/profile/utils.d.ts +4 -0
- package/dist/types/utils/sql-expr-monaco/sql-expression-profile-strategy.d.ts +9 -0
- package/package.json +10 -10
- package/dist/arcgis-coding-components/p-50484a4f.js +0 -6
- package/dist/arcgis-coding-components/p-7164c348.js +0 -6
- package/dist/arcgis-coding-components/p-9956a574.js +0 -6
- package/dist/cjs/arcade-defaults-8b8d6c07.js +0 -116
- package/dist/esm/arcade-defaults-562fe19b.js +0 -111
- package/dist/types/utils/profile/predefined-profile.d.ts +0 -4
- package/dist/types/utils/sql-expr-profile/predefined-profile.d.ts +0 -2
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.10
|
|
5
|
-
*/
|
|
6
|
-
import { L as LanguageDefaultsBase, i as isPredefinedProfile, c as convertToEditorProfileDefinition, f as fetchT9nStringsBundle, E as EditorProfile, U as Uri } from './language-defaults-base-52a397f5.js';
|
|
7
|
-
import { g as getAssetPath } from './index-3743d31f.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Returns the arcade diagnostic service.
|
|
11
|
-
* Example:
|
|
12
|
-
* ```ts
|
|
13
|
-
* const diagnosticService = await getArcadeDiagnosticService();
|
|
14
|
-
* diagnosticService.onDidChangeDiagnostics(({uri, diaganostics }) => {
|
|
15
|
-
* // Filter the diagnostics for the uri of interest
|
|
16
|
-
* // Do something with the diagnostics
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
async function getArcadeDiagnosticService() {
|
|
21
|
-
const mode = await getMode();
|
|
22
|
-
return mode.getArcadeDiagnosticService();
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Returns the arcade worker for the model.
|
|
26
|
-
* Example:
|
|
27
|
-
* ```ts
|
|
28
|
-
* const arcadeWorker = await getArcadeWorker(model.uri);
|
|
29
|
-
* ```
|
|
30
|
-
* @returns arcade worker
|
|
31
|
-
*/
|
|
32
|
-
async function getArcadeWorker(uri) {
|
|
33
|
-
const mode = await getMode();
|
|
34
|
-
return await mode.getArcadeWorker(uri);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Request the arcade mode
|
|
38
|
-
* @returns arcade mode module
|
|
39
|
-
*/
|
|
40
|
-
async function getMode() {
|
|
41
|
-
return await import('./arcade-mode-ad036f46.js');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const arcadeLanguageId = "arcade";
|
|
45
|
-
class ArcadeLanguageServiceDefaults extends LanguageDefaultsBase {
|
|
46
|
-
constructor() {
|
|
47
|
-
super(...arguments);
|
|
48
|
-
this._languageId = arcadeLanguageId;
|
|
49
|
-
this._languageOptions = {};
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Create an EditorProfile for the given model id using the given definition and locale.
|
|
53
|
-
* The EditorProfile is used by the the Arcade Language service as well by the cosing components.
|
|
54
|
-
* The definition can be a pre-defined profile or an editor profile definition.
|
|
55
|
-
* If the locale is not provided then the 'en' locale is used.
|
|
56
|
-
* @param modelId The model id for which to create the context.
|
|
57
|
-
* @param definition The definition to use for the model context.
|
|
58
|
-
* @param locale The locale to use for the model context.
|
|
59
|
-
* @returns The EditorProfile for the model.
|
|
60
|
-
*/
|
|
61
|
-
async setProfileForModel(modelId, definition, apiContext = { locale: "en" }) {
|
|
62
|
-
// Convert pre-defined profile to a runtime profile
|
|
63
|
-
if (isPredefinedProfile(definition)) {
|
|
64
|
-
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
65
|
-
}
|
|
66
|
-
const profileStrings = await fetchT9nStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
67
|
-
if (!profileStrings) {
|
|
68
|
-
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
69
|
-
}
|
|
70
|
-
this.disposeForModel(modelId);
|
|
71
|
-
const key = this._getApiKey(modelId);
|
|
72
|
-
const editorProfile = new EditorProfile(definition, profileStrings);
|
|
73
|
-
this._profileMap.set(key, editorProfile);
|
|
74
|
-
const apiProfile = await editorProfile.toLSProfile();
|
|
75
|
-
this.updateApiContextForModel(modelId, {
|
|
76
|
-
locale: apiContext.locale,
|
|
77
|
-
profile: apiProfile,
|
|
78
|
-
snippets: apiContext.snippets,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Set or update the Arcade language service options.
|
|
83
|
-
* @param languageOptions The language options to set.
|
|
84
|
-
*/
|
|
85
|
-
setLanguageOptions(languageOptions = {}) {
|
|
86
|
-
// Check if options have actually changed.
|
|
87
|
-
// Avoid restarting the worker when no updates.
|
|
88
|
-
// Today we only have the 'assetsPath' as a property
|
|
89
|
-
if (this._languageOptions.assetsPath === languageOptions.assetsPath) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
this._languageOptions = { ...this._languageOptions, ...languageOptions };
|
|
93
|
-
this._onDidChange.fire(this);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Gets the API library for the given model id.
|
|
97
|
-
* @param modelId The model id for which to get the API library.
|
|
98
|
-
* @returns The API library for the model.
|
|
99
|
-
*/
|
|
100
|
-
async getApiLibrary(modelId) {
|
|
101
|
-
const uri = Uri.parse(modelId);
|
|
102
|
-
const worker = await getArcadeWorker(uri);
|
|
103
|
-
return await worker.getApiLibrary(this.getApiContextForModel(uri));
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const arcadeDefaults = new ArcadeLanguageServiceDefaults();
|
|
107
|
-
const arcade = {
|
|
108
|
-
setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export { arcade as a, arcadeDefaults as b, getMode as c, getArcadeDiagnosticService as g };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { FeatureDefinition, FeatureSetDefinition, IEditorProfileDefinition, IPredefinedProfile } from "./types";
|
|
2
|
-
export declare function isFeatureDefinition(item: unknown): item is FeatureDefinition;
|
|
3
|
-
export declare function isFeatureSetDefinition(item: unknown): item is FeatureSetDefinition;
|
|
4
|
-
export declare function convertToEditorProfileDefinition(predefinedProfile: IPredefinedProfile, locale?: string): Promise<IEditorProfileDefinition | undefined>;
|