@arcgis/coding-components 4.30.0-next.2 → 4.30.0-next.21
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.css +1 -1
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-758218e2.js → p-0e7b5896.js} +2 -2
- package/dist/arcgis-coding-components/{p-f3068c90.js → p-1451e0cc.js} +2 -2
- package/dist/arcgis-coding-components/{p-1f472679.js → p-192601ca.js} +2 -2
- package/dist/arcgis-coding-components/{p-e55a59ff.js → p-253f92ea.js} +2 -2
- package/dist/arcgis-coding-components/{p-1f933dba.js → p-5583b25d.js} +2 -2
- package/dist/arcgis-coding-components/{p-30e98420.js → p-81935687.js} +10 -10
- package/dist/arcgis-coding-components/{p-30100e82.js → p-a2190df0.js} +1 -1
- package/dist/arcgis-coding-components/{p-b22a71b8.js → p-a63eeed9.js} +1 -1
- package/dist/arcgis-coding-components/{p-c4b91917.js → p-b177db92.js} +3 -3
- package/dist/arcgis-coding-components/{p-8c6bf361.js → p-cb5166f2.js} +2 -2
- package/dist/arcgis-coding-components/{p-f0b811ba.entry.js → p-e8c2933f.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-fdf8d908.js → p-eb16cce2.js} +2 -2
- package/dist/cjs/{arcade-defaults-eb3968a5.js → arcade-defaults-9d57f506.js} +17 -22
- package/dist/cjs/{arcade-mode-5275cbeb.js → arcade-mode-9079b8e0.js} +5 -5
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +71 -74
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-bbfdb831.js → css-9aa4569b.js} +1 -1
- package/dist/cjs/{cssMode-f296c8f9.js → cssMode-6f57c416.js} +3 -3
- package/dist/cjs/{html-bc3c7f14.js → html-95d3a234.js} +3 -3
- package/dist/cjs/{htmlMode-651ef412.js → htmlMode-ebd8894d.js} +3 -3
- package/dist/cjs/{index-d28fe547.js → index-a3f52cf5.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-a30f18a4.js → javascript-1a01235b.js} +4 -4
- package/dist/cjs/{jsonMode-6861e18a.js → jsonMode-26ed7799.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tsMode-8b347861.js → tsMode-9cfeb9a5.js} +3 -3
- package/dist/cjs/{typescript-44b2647a.js → typescript-f9907455.js} +3 -3
- package/dist/components/arcade-api.js +3 -3
- package/dist/components/arcade-contribution.js +65 -6
- package/dist/components/arcade-defaults.js +2 -2
- package/dist/components/arcade-mode.js +3 -3
- package/dist/components/arcade-results.js +3 -3
- package/dist/components/arcade-suggestions.js +3 -3
- package/dist/components/arcade-variables.js +3 -3
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +5 -67
- 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 +35 -0
- package/dist/components/arcgis-assets.js +2 -2
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/code-editor.js +2 -2
- package/dist/components/fields.js +8 -13
- package/dist/components/index.d.ts +3 -18
- package/dist/components/index.js +2 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{arcade-defaults-631dc093.js → arcade-defaults-1577045c.js} +17 -22
- package/dist/esm/{arcade-mode-43856469.js → arcade-mode-ec8b7890.js} +5 -5
- package/dist/esm/arcgis-arcade-api_6.entry.js +71 -74
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-6b2305f7.js → css-6350c0f7.js} +1 -1
- package/dist/esm/{cssMode-4a41975b.js → cssMode-629b1349.js} +3 -3
- package/dist/esm/{html-b3b2f1bc.js → html-979016b0.js} +3 -3
- package/dist/esm/{htmlMode-cedfb87b.js → htmlMode-dd504dae.js} +3 -3
- package/dist/esm/{index-84f054b0.js → index-093931a1.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-2482aacb.js → javascript-7af48cb1.js} +4 -4
- package/dist/esm/{jsonMode-8afe11aa.js → jsonMode-eb6b41d1.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{tsMode-f4368447.js → tsMode-64deb000.js} +3 -3
- package/dist/esm/{typescript-40b2f5cb.js → typescript-c9b14542.js} +3 -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/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
- 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 +37 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +9 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +19 -0
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +6 -0
- package/package.json +14 -14
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, a as colorizedAllCodeElements } from './markdown.js';
|
|
@@ -20,9 +20,9 @@ import "@esri/calcite-components/dist/components/calcite-flow.js";
|
|
|
20
20
|
import "@esri/calcite-components/dist/components/calcite-input.js";
|
|
21
21
|
import "@esri/calcite-components/dist/components/calcite-loader.js";
|
|
22
22
|
import "@esri/calcite-components/dist/components/calcite-list.js";
|
|
23
|
-
import { getAssetPath } from "./arcgis-assets.js";
|
|
23
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
24
24
|
|
|
25
|
-
const arcadeApiCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-
|
|
25
|
+
const arcadeApiCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-block p:first-of-type{margin-top:0}:host calcite-block code{font-family:var(--calcite-code-family)}:host calcite-block pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}";
|
|
26
26
|
|
|
27
27
|
const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
|
-
import { languages } from 'monaco-editor';
|
|
6
|
+
import { editor, languages } from 'monaco-editor';
|
|
7
7
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
8
8
|
import { a as importRequest } from './fields.js';
|
|
9
9
|
import { i as ie, s as se } from './index2.js';
|
|
@@ -63,6 +63,66 @@ function setupMonacoEnvironment(assetsPath) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
const themeConfig = {
|
|
67
|
+
"arcade-light-theme": {
|
|
68
|
+
comment: "#606060",
|
|
69
|
+
constant: "#9809C8",
|
|
70
|
+
date: "#296389",
|
|
71
|
+
identifier: "#0000B3",
|
|
72
|
+
keyword: "#BF4900",
|
|
73
|
+
number: "#136D3D",
|
|
74
|
+
string: "#A31515"
|
|
75
|
+
},
|
|
76
|
+
"arcade-dark-theme": {
|
|
77
|
+
comment: "#BFBFBF",
|
|
78
|
+
constant: "#CDBAEA",
|
|
79
|
+
date: "#97A6CE",
|
|
80
|
+
identifier: "#9FD4F3",
|
|
81
|
+
keyword: "#EEAA5A",
|
|
82
|
+
number: "#AAD04B",
|
|
83
|
+
string: "#F2877B"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
function setupArcadeTheme() {
|
|
88
|
+
["light", "dark"].forEach((theme) => {
|
|
89
|
+
const base = theme === "light" ? "vs" : "vs-dark";
|
|
90
|
+
const colors = themeConfig[`arcade-${theme}-theme`];
|
|
91
|
+
// Defines the light and dark theme based on the calcite theme name
|
|
92
|
+
editor.defineTheme(base, {
|
|
93
|
+
base,
|
|
94
|
+
inherit: true,
|
|
95
|
+
rules: [
|
|
96
|
+
{ token: "comment.arc", foreground: colors.comment },
|
|
97
|
+
{ token: "constant.arc", foreground: colors.constant },
|
|
98
|
+
{ token: "keyword.arc", foreground: colors.keyword },
|
|
99
|
+
{ token: "identifier.arc", foreground: colors.identifier },
|
|
100
|
+
{ token: "number.arc", foreground: colors.number },
|
|
101
|
+
{ token: "string.arc", foreground: colors.string }
|
|
102
|
+
],
|
|
103
|
+
colors: {}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const monacoThemeKeys = ["comment", "keyword", "identifier", "string", "number", "constant"];
|
|
108
|
+
const colorRulesKeys = [...monacoThemeKeys, "date"];
|
|
109
|
+
function updateThemeColors(theme, colorRules) {
|
|
110
|
+
if (colorRules === undefined) {
|
|
111
|
+
setupArcadeTheme();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const base = theme === "light" ? "vs" : "vs-dark";
|
|
115
|
+
const rules = [];
|
|
116
|
+
monacoThemeKeys.forEach((key) => {
|
|
117
|
+
const foreground = colorRules[key];
|
|
118
|
+
if (!foreground) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
rules.push({ token: `${key}.arc`, foreground });
|
|
122
|
+
});
|
|
123
|
+
editor.defineTheme(base, { base, inherit: true, rules, colors: {} });
|
|
124
|
+
}
|
|
125
|
+
|
|
66
126
|
/**
|
|
67
127
|
* Returns the arcade diagnostic service.
|
|
68
128
|
* Example:
|
|
@@ -92,7 +152,7 @@ async function getArcadeWorker(uri) {
|
|
|
92
152
|
}
|
|
93
153
|
/**
|
|
94
154
|
* Request the arcade mode
|
|
95
|
-
* @returns mode
|
|
155
|
+
* @returns arcade mode module
|
|
96
156
|
*/
|
|
97
157
|
async function getMode() {
|
|
98
158
|
return await import('./arcade-mode.js');
|
|
@@ -106,9 +166,8 @@ languages.register({
|
|
|
106
166
|
});
|
|
107
167
|
// An event emitted when a language is first time needed
|
|
108
168
|
languages.onLanguage(arcadeDefaults.languageId, () => {
|
|
109
|
-
|
|
169
|
+
setupArcadeTheme();
|
|
110
170
|
arcadeDefaults.setLanguageOptions({ assetsPath: `${getAssetsPath() ?? "."}/arcade-language` });
|
|
111
|
-
// Async import the language mode
|
|
112
171
|
getMode()
|
|
113
172
|
.then((mode) => {
|
|
114
173
|
// Setup the language mode
|
|
@@ -119,4 +178,4 @@ languages.onLanguage(arcadeDefaults.languageId, () => {
|
|
|
119
178
|
});
|
|
120
179
|
});
|
|
121
180
|
|
|
122
|
-
export { getArcadeDiagnosticService as a, getArcadeWorker as g, setupMonacoEnvironment as s };
|
|
181
|
+
export { getArcadeDiagnosticService as a, colorRulesKeys as c, getArcadeWorker as g, setupMonacoEnvironment as s, updateThemeColors as u };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { Emitter, Uri } from 'monaco-editor';
|
|
7
7
|
import { InsertTextMode, InsertTextFormat, CompletionItemKind } from 'vscode-languageserver-types';
|
|
8
8
|
import { i as importLayersFeatureLayer, a as importRequest, s as supportedFields, n as newPortalPortalItem, b as newWebScene, c as newWebMap, f as fieldAlias, d as fieldTypeToIconName, e as fieldTypeToArcadeType } from './fields.js';
|
|
9
9
|
import { p as portalItemPageUrl } from './utilities.js';
|
|
10
10
|
import { e as ee, t as te, G, Z, E, v } from './index2.js';
|
|
11
|
-
import { getAssetPath } from "./arcgis-assets.js";
|
|
11
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
12
12
|
|
|
13
13
|
//#region core adapter fix
|
|
14
14
|
async function newFeatureLayer(definition) {
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { editor, MarkerSeverity, Range, languages, Emitter } from 'monaco-editor';
|
|
7
7
|
import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat } from 'vscode-languageserver-types';
|
|
@@ -140,8 +140,8 @@ const arcadeMonarchLanguage = {
|
|
|
140
140
|
// delimiter: after number because of .\d floats
|
|
141
141
|
[/[;,.]/u, "delimiter"],
|
|
142
142
|
// strings
|
|
143
|
-
[/"([^"\\]|\\.)*$/u, "string.invalid"],
|
|
144
|
-
[/'([^'\\]|\\.)*$/u, "string.invalid"],
|
|
143
|
+
[/"([^"\\]|\\.)*$/u, "string.invalid"],
|
|
144
|
+
[/'([^'\\]|\\.)*$/u, "string.invalid"],
|
|
145
145
|
[/"/u, "string", "@string_double"],
|
|
146
146
|
[/'/u, "string", "@string_single"],
|
|
147
147
|
[/`/u, "string", "@string_backtick"]
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as importArcade, s as supportedFields } from './fields.js';
|
|
@@ -15,7 +15,7 @@ import "@esri/calcite-components/dist/components/calcite-icon.js";
|
|
|
15
15
|
import "@esri/calcite-components/dist/components/calcite-action-bar.js";
|
|
16
16
|
import "@esri/calcite-components/dist/components/calcite-action-group.js";
|
|
17
17
|
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
18
|
-
import { getAssetPath } from "./arcgis-assets.js";
|
|
18
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
19
19
|
|
|
20
20
|
const DevelopersWebSitePath = "https://developers.arcgis.com/arcade/";
|
|
21
21
|
const MaxArrayItems = 100;
|
|
@@ -239,7 +239,7 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
const arcadeResultsCss = ":host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2)}:host .flex-adjustable{flex:1 1 auto;overflow:hidden}:host .flex-row{display:flex;flex-direction:row;overflow:hidden}:host .flex-column{display:flex;flex-direction:column;overflow:hidden}:host .y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}:host header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}:host .ltr-container{direction:ltr}:host calcite-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-
|
|
242
|
+
const arcadeResultsCss = ":host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2)}:host .flex-adjustable{flex:1 1 auto;overflow:hidden}:host .flex-row{display:flex;flex-direction:row;overflow:hidden}:host .flex-column{display:flex;flex-direction:column;overflow:hidden}:host .y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}:host header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}:host .ltr-container{direction:ltr}:host calcite-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}:host calcite-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}:host calcite-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}:host calcite-action-bar calcite-action-group:last-child{border-inline-end-width:0px}:host calcite-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .color-info{color:var(--calcite-color-status-info)}:host .color-error{color:var(--calcite-color-status-danger)}:host .color-success{color:var(--calcite-color-status-success)}:host [class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}:host .console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}:host .result-value-table table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap}:host .result-value-table table thead{background-color:var(--calcite-color-foreground-2)}:host .result-value-table table tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}:host .result-value-table table th,:host .result-value-table table td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs)}:host .result-value-table table th .string-value,:host .result-value-table table td .string-value{white-space:pre}:host .result-value-table table th{font-weight:var(--calcite-font-weight-medium)}:host .tree-item-label,:host .number-value,:host .string-value,:host .boolean-value{font-family:var(--calcite-code-family)}:host .tree-item-label,:host .value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}:host .dictionary-property{color:var(--arcgis-arcade-editor-identifier)}:host .number-value{color:var(--arcgis-arcade-editor-number)}:host .string-value{color:var(--arcgis-arcade-editor-string);white-space:pre-wrap}:host .constant-value{color:var(--arcgis-arcade-editor-constant)}:host .date-value{color:var(--arcgis-arcade-editor-date)}";
|
|
243
243
|
|
|
244
244
|
//#region Specialized Constants
|
|
245
245
|
const treeProps = {
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
|
|
@@ -16,7 +16,7 @@ import "@esri/calcite-components/dist/components/calcite-block.js";
|
|
|
16
16
|
import "@esri/calcite-components/dist/components/calcite-flow.js";
|
|
17
17
|
import "@esri/calcite-components/dist/components/calcite-input.js";
|
|
18
18
|
import "@esri/calcite-components/dist/components/calcite-list.js";
|
|
19
|
-
import { getAssetPath } from "./arcgis-assets.js";
|
|
19
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
20
20
|
|
|
21
21
|
function isSuggestionGroups(item) {
|
|
22
22
|
if (!Array.isArray(item)) {
|
|
@@ -28,7 +28,7 @@ function isSuggestionGroups(item) {
|
|
|
28
28
|
return Array.isArray(item[0].suggestions);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const arcadeSuggestionsCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-
|
|
31
|
+
const arcadeSuggestionsCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-block p:first-of-type{margin-top:0}:host calcite-block code{font-family:var(--calcite-code-family)}:host calcite-block pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}";
|
|
32
32
|
|
|
33
33
|
const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeSuggestions extends HTMLElement {
|
|
34
34
|
constructor() {
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
7
7
|
import { B, q, W, K } from './index2.js';
|
|
@@ -15,9 +15,9 @@ import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
|
|
|
15
15
|
import "@esri/calcite-components/dist/components/calcite-list-item.js";
|
|
16
16
|
import "@esri/calcite-components/dist/components/calcite-icon.js";
|
|
17
17
|
import "@esri/calcite-components/dist/components/calcite-flow.js";
|
|
18
|
-
import { getAssetPath } from "./arcgis-assets.js";
|
|
18
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
19
19
|
|
|
20
|
-
const arcadeVariablesCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-
|
|
20
|
+
const arcadeVariablesCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}";
|
|
21
21
|
|
|
22
22
|
function stopEnterPropagation(e) {
|
|
23
23
|
if (e.key === "Enter") {
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h as h$1, Fragment, Host } from '@stencil/core/internal/client';
|
|
7
|
-
import {
|
|
7
|
+
import { KeyCode } from 'monaco-editor';
|
|
8
8
|
import { e as executeScript, D as DevelopersWebSitePath, d as defineCustomElement$5 } from './arcade-results.js';
|
|
9
|
+
import { u as updateThemeColors, c as colorRulesKeys, s as setupMonacoEnvironment, a as getArcadeDiagnosticService } from './arcade-contribution.js';
|
|
9
10
|
import { h, U, k, B, q } from './index2.js';
|
|
10
|
-
import { s as setupMonacoEnvironment, a as getArcadeDiagnosticService } from './arcade-contribution.js';
|
|
11
11
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
12
12
|
import { d as defineCustomElement$6 } from './arcade-api.js';
|
|
13
13
|
import { d as defineCustomElement$4 } from './arcade-suggestions.js';
|
|
@@ -17,71 +17,10 @@ import "@esri/calcite-components/dist/components/calcite-action-bar.js";
|
|
|
17
17
|
import "@esri/calcite-components/dist/components/calcite-action-group.js";
|
|
18
18
|
import "@esri/calcite-components/dist/components/calcite-action.js";
|
|
19
19
|
import "@esri/calcite-components/dist/components/calcite-tooltip.js";
|
|
20
|
-
import { getAssetPath } from "./arcgis-assets.js";
|
|
20
|
+
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
21
21
|
|
|
22
|
-
const
|
|
23
|
-
"arcade-light-theme": {
|
|
24
|
-
comment: "#606060",
|
|
25
|
-
constant: "#9809C8",
|
|
26
|
-
date: "#296389",
|
|
27
|
-
identifier: "#0000B3",
|
|
28
|
-
keyword: "#BF4900",
|
|
29
|
-
number: "#136D3D",
|
|
30
|
-
string: "#A31515"
|
|
31
|
-
},
|
|
32
|
-
"arcade-dark-theme": {
|
|
33
|
-
comment: "#BFBFBF",
|
|
34
|
-
constant: "#CDBAEA",
|
|
35
|
-
date: "#97A6CE",
|
|
36
|
-
identifier: "#9FD4F3",
|
|
37
|
-
keyword: "#EEAA5A",
|
|
38
|
-
number: "#AAD04B",
|
|
39
|
-
string: "#F2877B"
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
function setupArcadeTheme() {
|
|
44
|
-
["light", "dark"].forEach((theme) => {
|
|
45
|
-
const base = theme === "light" ? "vs" : "vs-dark";
|
|
46
|
-
const colors = themeConfig[`arcade-${theme}-theme`];
|
|
47
|
-
// Defines the light and dark theme based on the calcite theme name
|
|
48
|
-
editor.defineTheme(base, {
|
|
49
|
-
base,
|
|
50
|
-
inherit: true,
|
|
51
|
-
rules: [
|
|
52
|
-
{ token: "comment.arc", foreground: colors.comment },
|
|
53
|
-
{ token: "constant.arc", foreground: colors.constant },
|
|
54
|
-
{ token: "keyword.arc", foreground: colors.keyword },
|
|
55
|
-
{ token: "identifier.arc", foreground: colors.identifier },
|
|
56
|
-
{ token: "number.arc", foreground: colors.number },
|
|
57
|
-
{ token: "string.arc", foreground: colors.string }
|
|
58
|
-
],
|
|
59
|
-
colors: {}
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
const monacoThemeKeys = ["comment", "keyword", "identifier", "string", "number", "constant"];
|
|
64
|
-
const colorRulesKeys = [...monacoThemeKeys, "date"];
|
|
65
|
-
function updateThemeColors(theme, colorRules) {
|
|
66
|
-
if (colorRules === undefined) {
|
|
67
|
-
setupArcadeTheme();
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const base = theme === "light" ? "vs" : "vs-dark";
|
|
71
|
-
const rules = [];
|
|
72
|
-
monacoThemeKeys.forEach((key) => {
|
|
73
|
-
const foreground = colorRules[key];
|
|
74
|
-
if (!foreground) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
rules.push({ token: `${key}.arc`, foreground });
|
|
78
|
-
});
|
|
79
|
-
editor.defineTheme(base, { base, inherit: true, rules, colors: {} });
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;height:100%;width:100%;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);background-color:var(--calcite-color-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:25%}arcgis-arcade-editor .side-panel{max-width:45%;width:600px}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}arcgis-arcade-editor arcgis-arcade-results{border-top:1px solid var(--calcite-color-border-3);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}arcgis-arcade-editor calcite-list-item-group calcite-list-item{margin-bottom:1px;box-shadow:0 1px 0 var(--calcite-color-border-3)}arcgis-arcade-editor calcite-list-item-group calcite-list-item:last-child{box-shadow:none}arcgis-arcade-editor calcite-list-item-group:last-child{margin-bottom:var(--calcite-spacing-1)}";
|
|
22
|
+
const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;height:100%;width:100%;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:25%}arcgis-arcade-editor .side-panel{max-width:45%;width:600px}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor arcgis-arcade-results{border-top:1px solid var(--calcite-color-border-3);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}arcgis-arcade-editor calcite-list-item-group calcite-list-item{margin-bottom:1px;box-shadow:0 1px 0 var(--calcite-color-border-3)}arcgis-arcade-editor calcite-list-item-group calcite-list-item:last-child{box-shadow:none}arcgis-arcade-editor calcite-list-item-group:last-child{margin-bottom:var(--calcite-spacing-xl)}";
|
|
83
23
|
|
|
84
|
-
setupArcadeTheme();
|
|
85
24
|
const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeEditor extends HTMLElement {
|
|
86
25
|
constructor() {
|
|
87
26
|
super();
|
|
@@ -330,7 +269,6 @@ const ArcgisArcadeEditor$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisArcade
|
|
|
330
269
|
if (this.hideSideBar) {
|
|
331
270
|
return null;
|
|
332
271
|
}
|
|
333
|
-
console.log("expanded", this.sideActionBarExpanded);
|
|
334
272
|
return (h$1("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, h$1("calcite-action-group", null, this.renderAction({
|
|
335
273
|
id: "profile-variables-action",
|
|
336
274
|
label: this._t9nStrings?.profilevariables ?? "Profile variables",
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeResults$1, d as defineCustomElement$1 } from './arcade-results.js';
|
|
7
7
|
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeSuggestions$1, d as defineCustomElement$1 } from './arcade-suggestions.js';
|
|
7
7
|
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisArcadeVariables$1, d as defineCustomElement$1 } from './arcade-variables.js';
|
|
7
7
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
|
+
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
5
|
+
* v4.30.0-next.21
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Get the base path to where the package assets can be found.
|
|
9
|
+
* By default, the package asset path is set to "https://js.arcgis.com/<simplified-package-name>/<released-verion>/".
|
|
10
|
+
* We are hosting our assets on a CDN (Content Delivery Network) to ensure fast and reliable access.
|
|
11
|
+
* It is CORS-enabled, so you can load the assets from any domain.
|
|
12
|
+
* Use "setArcgisAssetPath(path)" if the path needs to be customized.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getArcgisAssetPath: (path: string) => string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Used to manually set the base path where package assets can be found.
|
|
18
|
+
*
|
|
19
|
+
* By default, the package asset path is set to "https://js.arcgis.com/<simplified-package-name>/<released-verion>/".
|
|
20
|
+
* For example, "https://js.arcgis.com/map-components/4.29/".
|
|
21
|
+
* We are hosting our assets on a CDN (Content Delivery Network) to ensure fast and reliable access.
|
|
22
|
+
* It is CORS-enabled, so you can load the assets from any domain.
|
|
23
|
+
* This is the recommended way to load the assets and avoid bundling them with your application.
|
|
24
|
+
* It means that by default, you don't need to use "setArcgisAssetPath" since the path is already set.
|
|
25
|
+
*
|
|
26
|
+
* However, if you need to host the assets locally, you can use "setArcgisAssetPath" to set the base path.
|
|
27
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
28
|
+
* such as "setArcgisAssetPath(import.meta.url)". Other options include
|
|
29
|
+
* "setArcgisAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
30
|
+
* dynamically set the path at build time, such as "setArcgisAssetPath(process.env.ASSET_PATH)".
|
|
31
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
32
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
33
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
34
|
+
*/
|
|
35
|
+
export declare const setArcgisAssetPath: (path: string) => void;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
5
|
-
* v4.30.0-next.
|
|
5
|
+
* v4.30.0-next.21
|
|
6
6
|
*/
|
|
7
7
|
let resourceUrl = "https://js.arcgis.com/coding-components/next/";
|
|
8
|
-
export const
|
|
8
|
+
export const getArcgisAssetPath = (path) => {
|
|
9
9
|
const assetUrl = new URL(path, resourceUrl);
|
|
10
10
|
return assetUrl.origin !== window.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
11
11
|
};
|
|
@@ -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.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.21
|
|
5
5
|
*/
|
|
6
6
|
import { A as ArcgisCodeEditor$1, d as defineCustomElement$1 } from './code-editor.js';
|
|
7
7
|
|