@arcgis/coding-components 4.31.0-next.77 → 4.31.0-next.79
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/assets/code-editor/sql-expr.worker.js +188 -121
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-df6a6e92.js → p-107c8fe2.js} +2 -2
- package/dist/arcgis-coding-components/p-2247cf38.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-6447807e.js → p-240f7a13.js} +3 -3
- package/dist/arcgis-coding-components/{p-1ce37139.js → p-244dc397.js} +2 -2
- package/dist/arcgis-coding-components/{p-5cd53181.js → p-24e6454a.js} +1 -1
- package/dist/arcgis-coding-components/{p-3e8e339e.js → p-258c5771.js} +2 -2
- package/dist/arcgis-coding-components/{p-9877b739.js → p-286969f5.js} +10 -10
- package/dist/arcgis-coding-components/{p-6c970ef9.js → p-3ecc0989.js} +2 -2
- package/dist/arcgis-coding-components/{p-05cd1527.js → p-600fcb1b.js} +2 -2
- package/dist/arcgis-coding-components/p-6a5ea839.js +6 -0
- package/dist/arcgis-coding-components/p-6aa2333f.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-a8b3c7ff.js → p-6fddddee.js} +1 -1
- package/dist/arcgis-coding-components/{p-f8f31aee.entry.js → p-777a0f76.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-597365db.js → p-8da1aaa1.js} +1 -1
- package/dist/arcgis-coding-components/{p-5692bbc7.js → p-92fee4ab.js} +2 -2
- package/dist/arcgis-coding-components/{p-2759ba9d.js → p-94be4a7f.js} +2 -2
- package/dist/arcgis-coding-components/{p-8d832502.js → p-c4c66618.js} +2 -2
- package/dist/arcgis-coding-components/{p-f304a898.js → p-cd89f007.js} +2 -2
- package/dist/cjs/{app-globals-e36ff7b6.js → app-globals-4497f8e0.js} +1 -1
- package/dist/cjs/{arcade-defaults-7eb50451.js → arcade-defaults-82c1a665.js} +3 -3
- package/dist/cjs/{arcade-mode-ca4a9411.js → arcade-mode-f6538113.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +207 -157
- package/dist/cjs/arcgis-coding-components.cjs.js +4 -4
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +26 -7
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-bf7efcc6.js → css-758f43cd.js} +1 -1
- package/dist/cjs/{cssMode-3e6f7824.js → cssMode-cf3fef03.js} +3 -3
- package/dist/cjs/{html-d74edc5e.js → html-2da332c6.js} +3 -3
- package/dist/cjs/{htmlMode-55fb85d1.js → htmlMode-816efb27.js} +3 -3
- package/dist/cjs/{index-16caf224.js → index-05ceca06.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-0e468a0c.js → javascript-2572304a.js} +4 -4
- package/dist/cjs/{jsonMode-b61f2f13.js → jsonMode-7f1c339b.js} +3 -3
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{sql-expr-defaults-abca6c0e.js → sql-expr-defaults-8da1e20e.js} +13 -12
- package/dist/cjs/{sql-expr-mode-fd4c0094.js → sql-expr-mode-a54f0061.js} +7 -5
- package/dist/cjs/{tsMode-f517e713.js → tsMode-fa2cc8d9.js} +3 -3
- package/dist/cjs/{typescript-7a310fd3.js → typescript-62652114.js} +3 -3
- package/dist/cjs/{useT9n-4e9beec5.js → useT9n-93800da2.js} +3 -3
- package/dist/components/arcade-defaults.js +2 -2
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +8 -8
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.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-arcade-variables.d.ts → arcgis-editor-variables.d.ts} +4 -4
- package/dist/components/arcgis-editor-variables.js +11 -0
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +29 -10
- package/dist/components/arcgis-sql-expression-fields.js +103 -2
- package/dist/components/chunk-A4MUWALE.js +1 -1
- package/dist/components/code-editor.js +2 -2
- package/dist/components/{arcade-variables.js → editor-variables.js} +65 -16
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1347 -5
- package/dist/components/sql-expr-mode.js +6 -4
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-3fe7cb9f.js → app-globals-4d228c7f.js} +1 -1
- package/dist/esm/{arcade-defaults-dc90a65f.js → arcade-defaults-87dae5bb.js} +3 -3
- package/dist/esm/{arcade-mode-5580d9f3.js → arcade-mode-95d965cd.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +207 -157
- package/dist/esm/arcgis-coding-components.js +5 -5
- package/dist/esm/arcgis-sql-expression-editor.entry.js +26 -7
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-69a1774f.js → css-61df822a.js} +1 -1
- package/dist/esm/{cssMode-4fa18850.js → cssMode-854d0444.js} +3 -3
- package/dist/esm/{html-b7892d66.js → html-e212cff4.js} +3 -3
- package/dist/esm/{htmlMode-ab689485.js → htmlMode-62efd3ab.js} +3 -3
- package/dist/esm/{index-5df9a0d7.js → index-718a7ca6.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-a9a5f5d5.js → javascript-4536b286.js} +4 -4
- package/dist/esm/{jsonMode-d2251707.js → jsonMode-c27992b4.js} +3 -3
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{sql-expr-defaults-3a01e6ef.js → sql-expr-defaults-b95d538c.js} +14 -13
- package/dist/esm/{sql-expr-mode-6964367f.js → sql-expr-mode-e25cff46.js} +7 -5
- package/dist/esm/{tsMode-21f06c86.js → tsMode-c2a2a492.js} +3 -3
- package/dist/esm/{typescript-4ce4badc.js → typescript-fff5fb54.js} +3 -3
- package/dist/esm/{useT9n-c7e8c91e.js → useT9n-4f519849.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/components/{arcade-variables/arcade-variables.d.ts → editor-variables/editor-variables.d.ts} +25 -2
- package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +6 -0
- package/dist/types/components.d.ts +63 -53
- package/dist/types/utils/profile/editor-profile.d.ts +2 -1
- package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +1 -0
- package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +1 -1
- package/package.json +11 -11
- package/dist/arcgis-coding-components/p-6b6106c2.entry.js +0 -6
- package/dist/arcgis-coding-components/p-ac0c2b9a.js +0 -6
- package/dist/arcgis-coding-components/p-f18177dd.entry.js +0 -6
- package/dist/components/arcgis-arcade-variables.js +0 -11
- package/dist/components/language-defaults-base.js +0 -1352
- package/dist/components/sql-expression-fields.js +0 -109
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ar.json → editor-variables/t9n/editor-variables.t9n.ar.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.bg.json → editor-variables/t9n/editor-variables.t9n.bg.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.bs.json → editor-variables/t9n/editor-variables.t9n.bs.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ca.json → editor-variables/t9n/editor-variables.t9n.ca.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.cs.json → editor-variables/t9n/editor-variables.t9n.cs.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.da.json → editor-variables/t9n/editor-variables.t9n.da.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.de.json → editor-variables/t9n/editor-variables.t9n.de.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.el.json → editor-variables/t9n/editor-variables.t9n.el.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.en.json → editor-variables/t9n/editor-variables.t9n.en.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.es.json → editor-variables/t9n/editor-variables.t9n.es.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.et.json → editor-variables/t9n/editor-variables.t9n.et.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.fi.json → editor-variables/t9n/editor-variables.t9n.fi.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.fr.json → editor-variables/t9n/editor-variables.t9n.fr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.he.json → editor-variables/t9n/editor-variables.t9n.he.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.hr.json → editor-variables/t9n/editor-variables.t9n.hr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.hu.json → editor-variables/t9n/editor-variables.t9n.hu.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.id.json → editor-variables/t9n/editor-variables.t9n.id.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.it.json → editor-variables/t9n/editor-variables.t9n.it.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ja.json → editor-variables/t9n/editor-variables.t9n.ja.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ko.json → editor-variables/t9n/editor-variables.t9n.ko.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.lt.json → editor-variables/t9n/editor-variables.t9n.lt.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.lv.json → editor-variables/t9n/editor-variables.t9n.lv.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.nb.json → editor-variables/t9n/editor-variables.t9n.nb.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.nl.json → editor-variables/t9n/editor-variables.t9n.nl.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.pl.json → editor-variables/t9n/editor-variables.t9n.pl.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.pt-BR.json → editor-variables/t9n/editor-variables.t9n.pt-BR.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.pt-PT.json → editor-variables/t9n/editor-variables.t9n.pt-PT.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ro.json → editor-variables/t9n/editor-variables.t9n.ro.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ru.json → editor-variables/t9n/editor-variables.t9n.ru.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sk.json → editor-variables/t9n/editor-variables.t9n.sk.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sl.json → editor-variables/t9n/editor-variables.t9n.sl.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sr.json → editor-variables/t9n/editor-variables.t9n.sr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sv.json → editor-variables/t9n/editor-variables.t9n.sv.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.th.json → editor-variables/t9n/editor-variables.t9n.th.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.tr.json → editor-variables/t9n/editor-variables.t9n.tr.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.uk.json → editor-variables/t9n/editor-variables.t9n.uk.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.vi.json → editor-variables/t9n/editor-variables.t9n.vi.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.zh-CN.json → editor-variables/t9n/editor-variables.t9n.zh-CN.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.zh-HK.json → editor-variables/t9n/editor-variables.t9n.zh-HK.json} +0 -0
- /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.zh-TW.json → editor-variables/t9n/editor-variables.t9n.zh-TW.json} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
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.
|
|
4
|
+
* v4.31.0-next.79
|
|
5
5
|
*/
|
|
6
6
|
import { editor, languages, Emitter } from 'monaco-editor';
|
|
7
7
|
import { D as Deferred, u as debounce } from './index2.js';
|
|
8
|
-
import {
|
|
8
|
+
import { d as sqlExprDefaults } from './sql-expr-defaults.js';
|
|
9
9
|
|
|
10
10
|
// hold onto a promise that resolves when the worker is ready
|
|
11
11
|
let deferredWorker = new Deferred();
|
|
@@ -137,7 +137,6 @@ const sqlExprKeywords = [
|
|
|
137
137
|
"REAL",
|
|
138
138
|
"SECOND",
|
|
139
139
|
"SMALLINT",
|
|
140
|
-
"SUBSTRING",
|
|
141
140
|
"THEN",
|
|
142
141
|
"TIME",
|
|
143
142
|
"TIMESTAMP",
|
|
@@ -157,7 +156,6 @@ const sqlExprOperators = [
|
|
|
157
156
|
// Logical
|
|
158
157
|
"AND",
|
|
159
158
|
"BETWEEN",
|
|
160
|
-
"IN",
|
|
161
159
|
"LIKE",
|
|
162
160
|
"NOT",
|
|
163
161
|
"OR",
|
|
@@ -183,17 +181,21 @@ const sqlExprFunctions = [
|
|
|
183
181
|
"FLOOR",
|
|
184
182
|
"LOG",
|
|
185
183
|
"LOG10",
|
|
184
|
+
"MOD",
|
|
185
|
+
"NULLIF",
|
|
186
186
|
"POWER",
|
|
187
187
|
"ROUND",
|
|
188
188
|
"SIGN",
|
|
189
189
|
"SIN",
|
|
190
190
|
"TAN",
|
|
191
|
+
"TRUNCATE",
|
|
191
192
|
// String
|
|
192
193
|
"CHAR_LENGTH",
|
|
193
194
|
"COALESCE",
|
|
194
195
|
"CONCAT",
|
|
195
196
|
"LOWER",
|
|
196
197
|
"POSITION",
|
|
198
|
+
"SUBSTRING",
|
|
197
199
|
"TRIM",
|
|
198
200
|
"UPPER",
|
|
199
201
|
];
|
|
@@ -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.
|
|
4
|
+
* v4.31.0-next.79
|
|
5
5
|
*/
|
|
6
6
|
import { p as proxyExports, w as watch, C as Controller, s as setAmbientComponent } from './chunk-A4MUWALE.js';
|
|
7
7
|
import { p as startLocaleObserver, r as getElementLocales } from './index2.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
4
|
+
* v4.31.0-next.79
|
|
5
5
|
*/
|
|
6
|
-
import { m as main, f as fieldsToProfileValues, i as isPredefinedProfile, a as isFeatureSetCollectionDefinition, b as isFeatureSetDefinition, c as isFeatureDefinition, d as supportedLocales, L as LanguageDefaultsBase, e as fetchT9nStringsBundle, E as EditorProfile } from './sql-expr-defaults-
|
|
7
|
-
import { g as getAssetPath } from './index-
|
|
6
|
+
import { m as main, f as fieldsToProfileValues, i as isPredefinedProfile, a as isFeatureSetCollectionDefinition, b as isFeatureSetDefinition, c as isFeatureDefinition, d as supportedLocales, L as LanguageDefaultsBase, e as fetchT9nStringsBundle, E as EditorProfile } from './sql-expr-defaults-b95d538c.js';
|
|
7
|
+
import { g as getAssetPath } from './index-718a7ca6.js';
|
|
8
8
|
|
|
9
9
|
// #region convert editor profile to apiProfile
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
4
|
+
* v4.31.0-next.79
|
|
5
5
|
*/
|
|
6
|
-
import { m as main, h as editor, Q as MarkerSeverity, R as Range,
|
|
7
|
-
import './index-
|
|
6
|
+
import { m as main, h as editor, Q as MarkerSeverity, R as Range, x as languages, T as debounce, D as Deferred, V as Emitter } from './sql-expr-defaults-b95d538c.js';
|
|
7
|
+
import './index-718a7ca6.js';
|
|
8
8
|
|
|
9
9
|
var V={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},xe=["++","--"],Ge=["-","+","!","~"],Je=["=","/=","*=","%=","+=","-="],Qe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];xe.forEach(e=>U[e.length-1]?.push(e));Ge.forEach(e=>U[e.length-1]?.push(e));Qe.forEach(e=>U[e.length-1]?.push(e));Je.forEach(e=>U[e.length-1]?.push(e));Lt.forEach(e=>U[e.length-1]?.push(e));var lt=Object.values(f),pt=Object.values(V);pt.map(e=>({label:e,kind:main.exports.CompletionItemKind.Constant}));lt.map(e=>({label:e,kind:main.exports.CompletionItemKind.Keyword}));
|
|
10
10
|
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
4
|
+
* v4.31.0-next.79
|
|
5
5
|
*/
|
|
6
|
-
import { r as registerInstance, c as createEvent, g as getAssetPath, h, F as Fragment, H as Host, a as getElement } from './index-
|
|
7
|
-
import { g as importArcade, h as editor, j as isURL, k as hasSameOrigin, l as importRequest, D as Deferred, n as generateGuid, o as getElementTheme, K as KeyCode, p as setValuesInString, q as quoteString, r as supportedFields, t as generateTokensCSSForColorMap, S as StandaloneServices, I as IStandaloneThemeService, u as commonjsGlobal, v as setFocusOnElement, w as filterCollection, x as
|
|
8
|
-
import { u as useControllerManager, a as useT9n, g as getSet } from './useT9n-
|
|
9
|
-
import { b as arcadeDefaults } from './arcade-defaults-
|
|
6
|
+
import { r as registerInstance, c as createEvent, g as getAssetPath, h, F as Fragment, H as Host, a as getElement } from './index-718a7ca6.js';
|
|
7
|
+
import { g as importArcade, h as editor, j as isURL, k as hasSameOrigin, l as importRequest, D as Deferred, n as generateGuid, o as getElementTheme, K as KeyCode, p as setValuesInString, q as quoteString, r as supportedFields, t as generateTokensCSSForColorMap, S as StandaloneServices, I as IStandaloneThemeService, u as commonjsGlobal, v as setFocusOnElement, w as filterCollection, x as languages, y as sqlExprDefaults, R as Range, z as observeAncestorsMutation, U as Uri, A as KeyMod, B as createFilterExpression, C as addLTRMark } from './sql-expr-defaults-b95d538c.js';
|
|
8
|
+
import { u as useControllerManager, a as useT9n, g as getSet } from './useT9n-4f519849.js';
|
|
9
|
+
import { b as arcadeDefaults } from './arcade-defaults-87dae5bb.js';
|
|
10
10
|
|
|
11
11
|
const DevelopersWebSitePath = "https://developers.arcgis.com/arcade/";
|
|
12
12
|
const MaxArrayItems = 100;
|
|
@@ -363,7 +363,7 @@ async function getArcadeDiagnosticService() {
|
|
|
363
363
|
* @returns arcade mode module
|
|
364
364
|
*/
|
|
365
365
|
async function getMode$1() {
|
|
366
|
-
return await import('./arcade-mode-
|
|
366
|
+
return await import('./arcade-mode-95d965cd.js');
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}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}";
|
|
@@ -660,7 +660,7 @@ const ArcgisArcadeEditor = class {
|
|
|
660
660
|
case "api":
|
|
661
661
|
return (h("arcgis-language-api-panel", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, apiLibrary: this._apiLibrary, hideDocumentationActions: this.hideDocumentationActions, onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
662
662
|
case "variables":
|
|
663
|
-
return (h("arcgis-
|
|
663
|
+
return (h("arcgis-editor-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, modelId: this._modelId, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none", variable: this._editorProfile }));
|
|
664
664
|
case "suggestions":
|
|
665
665
|
return (h("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
|
|
666
666
|
default:
|
|
@@ -678,7 +678,7 @@ const ArcgisArcadeEditor = class {
|
|
|
678
678
|
//#endregion
|
|
679
679
|
//#region Render
|
|
680
680
|
render() {
|
|
681
|
-
return (h(Host, { key: '
|
|
681
|
+
return (h(Host, { key: '82573b59947bcd994ecd8735d367a69b4ce150cd' }, this.renderMainActionBar(), h("div", { key: '9b59e8c7dbb3f613e38eb77fc5e752bf18cdc059', class: "flex-row flex-adjustable" }, h("div", { key: '7f6972e8c7b43e6181f3f4581add686acb6d882d', class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
|
|
682
682
|
}
|
|
683
683
|
static get assetsDirs() { return ["assets"]; }
|
|
684
684
|
get el() { return getElement(this); }
|
|
@@ -3978,153 +3978,6 @@ const ArcgisArcadeSuggestions = class {
|
|
|
3978
3978
|
};
|
|
3979
3979
|
ArcgisArcadeSuggestions.style = ArcgisArcadeSuggestionsStyle0;
|
|
3980
3980
|
|
|
3981
|
-
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%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
3982
|
-
const ArcgisArcadeVariablesStyle0 = arcadeVariablesCss;
|
|
3983
|
-
|
|
3984
|
-
function stopEnterPropagation(e) {
|
|
3985
|
-
if (e.key === "Enter") {
|
|
3986
|
-
e.stopPropagation();
|
|
3987
|
-
}
|
|
3988
|
-
}
|
|
3989
|
-
const ArcgisArcadeVariables = class {
|
|
3990
|
-
constructor(hostRef) {
|
|
3991
|
-
registerInstance(this, hostRef);
|
|
3992
|
-
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
3993
|
-
this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
|
|
3994
|
-
this.manager = useControllerManager(this);
|
|
3995
|
-
this.messages = useT9n();
|
|
3996
|
-
this._updateFilterValue = (e) => {
|
|
3997
|
-
this._filterValue = e.target.value;
|
|
3998
|
-
};
|
|
3999
|
-
this._beforeBack = async () => {
|
|
4000
|
-
this.removeLastPanelRenderer();
|
|
4001
|
-
this._filterValue = "";
|
|
4002
|
-
};
|
|
4003
|
-
this._emitClose = () => {
|
|
4004
|
-
this.arcgisClose.emit();
|
|
4005
|
-
};
|
|
4006
|
-
this._backToTop = () => {
|
|
4007
|
-
this._flowItemRenderers = [];
|
|
4008
|
-
};
|
|
4009
|
-
this._emitItemSelected = (e) => {
|
|
4010
|
-
const variable = e.target?.["data-item"];
|
|
4011
|
-
if (!variable || variable.nonInteractive) {
|
|
4012
|
-
return;
|
|
4013
|
-
}
|
|
4014
|
-
const keyEvent = e;
|
|
4015
|
-
if (!keyEvent.key || keyEvent.key === "Enter") {
|
|
4016
|
-
e.preventDefault();
|
|
4017
|
-
this.arcgisItemSelected.emit(variable.snippet);
|
|
4018
|
-
}
|
|
4019
|
-
};
|
|
4020
|
-
this._showCollectionPanel = (e) => {
|
|
4021
|
-
const collectionVariable = e.target?.["data-item"];
|
|
4022
|
-
if (!collectionVariable) {
|
|
4023
|
-
return;
|
|
4024
|
-
}
|
|
4025
|
-
e.stopPropagation();
|
|
4026
|
-
this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
|
|
4027
|
-
};
|
|
4028
|
-
this._mutationCounter = 1;
|
|
4029
|
-
this._flowItemRenderers = [];
|
|
4030
|
-
this._filterValue = "";
|
|
4031
|
-
this.loading = false;
|
|
4032
|
-
this.modelId = undefined;
|
|
4033
|
-
}
|
|
4034
|
-
modelIdPropChanged() {
|
|
4035
|
-
this._flowItemRenderers = [];
|
|
4036
|
-
}
|
|
4037
|
-
//#endregion
|
|
4038
|
-
disconnectedCallback() {
|
|
4039
|
-
this._flowObserver?.disconnect();
|
|
4040
|
-
}
|
|
4041
|
-
// #endregion
|
|
4042
|
-
//#region Private Methods
|
|
4043
|
-
addPanelRenderer(panelRenderer) {
|
|
4044
|
-
this._flowItemRenderers = [...this._flowItemRenderers, panelRenderer];
|
|
4045
|
-
}
|
|
4046
|
-
removeLastPanelRenderer() {
|
|
4047
|
-
this._flowItemRenderers = this._flowItemRenderers.slice(0, -1);
|
|
4048
|
-
}
|
|
4049
|
-
flowFocusHandler(ref) {
|
|
4050
|
-
// When a flow is removed from the document then a null ref will be passed in
|
|
4051
|
-
if (!ref) {
|
|
4052
|
-
this._flowObserver?.disconnect();
|
|
4053
|
-
this._flowObserver = undefined;
|
|
4054
|
-
return;
|
|
4055
|
-
}
|
|
4056
|
-
if (this._flowObserver) {
|
|
4057
|
-
return;
|
|
4058
|
-
}
|
|
4059
|
-
// Observer panel added/removed and also observe the flow id
|
|
4060
|
-
// When switching between flow the same reference is reused
|
|
4061
|
-
this._flowObserver = new MutationObserver(() => {
|
|
4062
|
-
// Get the last panel and try to set focus on the input element
|
|
4063
|
-
setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4064
|
-
});
|
|
4065
|
-
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4066
|
-
}
|
|
4067
|
-
//#endregion
|
|
4068
|
-
//#region Renderers
|
|
4069
|
-
collectionBasedVariableRenderer(collection, topPanel = false) {
|
|
4070
|
-
// Returns a function to be added to the subpanel render collection
|
|
4071
|
-
return () => {
|
|
4072
|
-
if (!collection) {
|
|
4073
|
-
return null;
|
|
4074
|
-
}
|
|
4075
|
-
// If the collection actually exists then two options:
|
|
4076
|
-
// - the collection still need to be loaded
|
|
4077
|
-
// - the collection is ready
|
|
4078
|
-
let loading = this.loading;
|
|
4079
|
-
if (!loading && !collection.loaded) {
|
|
4080
|
-
// Request to load and update mutation counter when done
|
|
4081
|
-
collection
|
|
4082
|
-
.loadSource()
|
|
4083
|
-
.then(() => setTimeout(() => {
|
|
4084
|
-
this._mutationCounter += 1;
|
|
4085
|
-
}))
|
|
4086
|
-
.catch(() => {
|
|
4087
|
-
console.error("Error loading collection");
|
|
4088
|
-
loading = false;
|
|
4089
|
-
});
|
|
4090
|
-
loading = true;
|
|
4091
|
-
}
|
|
4092
|
-
return (h("calcite-flow-item", { heading: this.messages.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
|
|
4093
|
-
};
|
|
4094
|
-
}
|
|
4095
|
-
renderEditorVariables(collection) {
|
|
4096
|
-
// Filter the variables. Skip group, we will filter the children later on.
|
|
4097
|
-
const filterExpression = createFilterExpression(this._filterValue);
|
|
4098
|
-
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
4099
|
-
if (!filteredVariables.length) {
|
|
4100
|
-
return h("div", { class: "notice-container" }, this.messages.noitems);
|
|
4101
|
-
}
|
|
4102
|
-
return filteredVariables.map((variable) => this.renderEditorVariable(variable));
|
|
4103
|
-
}
|
|
4104
|
-
renderEditorVariable(variable) {
|
|
4105
|
-
switch (variable.type) {
|
|
4106
|
-
case "group":
|
|
4107
|
-
// Group is a collection but we represent it differently
|
|
4108
|
-
return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
|
|
4109
|
-
default:
|
|
4110
|
-
return (h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showCollectionPanel, onKeyPress: stopEnterPropagation, "data-item": variable })) : null, variable.icon ? h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
|
|
4111
|
-
}
|
|
4112
|
-
}
|
|
4113
|
-
render() {
|
|
4114
|
-
const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
|
|
4115
|
-
if (!this.loading && !profile?.variables.length) {
|
|
4116
|
-
return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage))));
|
|
4117
|
-
}
|
|
4118
|
-
return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
|
|
4119
|
-
}
|
|
4120
|
-
static get assetsDirs() { return ["assets"]; }
|
|
4121
|
-
get el() { return getElement(this); }
|
|
4122
|
-
static get watchers() { return {
|
|
4123
|
-
"modelId": ["modelIdPropChanged"]
|
|
4124
|
-
}; }
|
|
4125
|
-
};
|
|
4126
|
-
ArcgisArcadeVariables.style = ArcgisArcadeVariablesStyle0;
|
|
4127
|
-
|
|
4128
3981
|
// Register the language in Monaco
|
|
4129
3982
|
languages.register({
|
|
4130
3983
|
id: arcadeDefaults.languageId,
|
|
@@ -4158,7 +4011,7 @@ languages.onLanguage(arcadeDefaults.languageId, () => {
|
|
|
4158
4011
|
* @returns sql-expression mode module
|
|
4159
4012
|
*/
|
|
4160
4013
|
async function getMode() {
|
|
4161
|
-
return await import('./sql-expr-mode-
|
|
4014
|
+
return await import('./sql-expr-mode-e25cff46.js');
|
|
4162
4015
|
}
|
|
4163
4016
|
|
|
4164
4017
|
// Register the language in Monaco
|
|
@@ -4437,6 +4290,203 @@ const ArcgisCodeEditor = class {
|
|
|
4437
4290
|
};
|
|
4438
4291
|
ArcgisCodeEditor.style = ArcgisCodeEditorStyle0;
|
|
4439
4292
|
|
|
4293
|
+
const editorVariablesCss = ":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-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
4294
|
+
const ArcgisEditorVariablesStyle0 = editorVariablesCss;
|
|
4295
|
+
|
|
4296
|
+
function stopEnterPropagation(e) {
|
|
4297
|
+
if (e.key === "Enter") {
|
|
4298
|
+
e.stopPropagation();
|
|
4299
|
+
}
|
|
4300
|
+
}
|
|
4301
|
+
const ArcgisEditorVariables = class {
|
|
4302
|
+
constructor(hostRef) {
|
|
4303
|
+
registerInstance(this, hostRef);
|
|
4304
|
+
this.arcgisClose = createEvent(this, "arcgisClose", 3);
|
|
4305
|
+
this.arcgisItemSelected = createEvent(this, "arcgisItemSelected", 3);
|
|
4306
|
+
this.manager = useControllerManager(this);
|
|
4307
|
+
this.messages = useT9n();
|
|
4308
|
+
this._updateFilterValue = (e) => {
|
|
4309
|
+
this._filterValue = e.target.value;
|
|
4310
|
+
};
|
|
4311
|
+
this._beforeBack = async () => {
|
|
4312
|
+
this.removeLastPanelRenderer();
|
|
4313
|
+
this._filterValue = "";
|
|
4314
|
+
};
|
|
4315
|
+
this._emitClose = () => {
|
|
4316
|
+
this.arcgisClose.emit();
|
|
4317
|
+
};
|
|
4318
|
+
this._backToTop = () => {
|
|
4319
|
+
this._flowItemRenderers = [];
|
|
4320
|
+
};
|
|
4321
|
+
this._emitItemSelected = (e) => {
|
|
4322
|
+
const variable = e.target?.["data-item"];
|
|
4323
|
+
if (!variable || variable.nonInteractive) {
|
|
4324
|
+
return;
|
|
4325
|
+
}
|
|
4326
|
+
const keyEvent = e;
|
|
4327
|
+
if (!keyEvent.key || keyEvent.key === "Enter") {
|
|
4328
|
+
e.preventDefault();
|
|
4329
|
+
this.arcgisItemSelected.emit(variable.snippet);
|
|
4330
|
+
}
|
|
4331
|
+
};
|
|
4332
|
+
this._showCollectionPanel = (e) => {
|
|
4333
|
+
const collectionVariable = e.target?.["data-item"];
|
|
4334
|
+
if (!collectionVariable) {
|
|
4335
|
+
return;
|
|
4336
|
+
}
|
|
4337
|
+
e.stopPropagation();
|
|
4338
|
+
this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
|
|
4339
|
+
};
|
|
4340
|
+
this._mutationCounter = 1;
|
|
4341
|
+
this._flowItemRenderers = [];
|
|
4342
|
+
this._filterValue = "";
|
|
4343
|
+
this._mode = "profile";
|
|
4344
|
+
this.loading = false;
|
|
4345
|
+
this.modelId = undefined;
|
|
4346
|
+
this.variable = undefined;
|
|
4347
|
+
}
|
|
4348
|
+
modelIdPropChanged() {
|
|
4349
|
+
this._flowItemRenderers = [];
|
|
4350
|
+
}
|
|
4351
|
+
_variableChanged() {
|
|
4352
|
+
/**
|
|
4353
|
+
* Update the mode of the component. Either "featureSet" or "profile"
|
|
4354
|
+
* defaults to profile unless the variable is explicitly a featureSet
|
|
4355
|
+
*/
|
|
4356
|
+
this._mode = this.variable?.type === "featureSet" ? "featureSet" : "profile";
|
|
4357
|
+
}
|
|
4358
|
+
//#endregion
|
|
4359
|
+
disconnectedCallback() {
|
|
4360
|
+
this._flowObserver?.disconnect();
|
|
4361
|
+
}
|
|
4362
|
+
// #endregion
|
|
4363
|
+
// #region lifecycle methods
|
|
4364
|
+
componentWillLoad() {
|
|
4365
|
+
this._variableChanged();
|
|
4366
|
+
}
|
|
4367
|
+
// #endregion
|
|
4368
|
+
//#region Private Methods
|
|
4369
|
+
addPanelRenderer(panelRenderer) {
|
|
4370
|
+
this._flowItemRenderers = [...this._flowItemRenderers, panelRenderer];
|
|
4371
|
+
}
|
|
4372
|
+
removeLastPanelRenderer() {
|
|
4373
|
+
this._flowItemRenderers = this._flowItemRenderers.slice(0, -1);
|
|
4374
|
+
}
|
|
4375
|
+
_isMode(mode) {
|
|
4376
|
+
return this._mode === mode;
|
|
4377
|
+
}
|
|
4378
|
+
flowFocusHandler(ref) {
|
|
4379
|
+
// When a flow is removed from the document then a null ref will be passed in
|
|
4380
|
+
if (!ref) {
|
|
4381
|
+
this._flowObserver?.disconnect();
|
|
4382
|
+
this._flowObserver = undefined;
|
|
4383
|
+
return;
|
|
4384
|
+
}
|
|
4385
|
+
if (this._flowObserver) {
|
|
4386
|
+
return;
|
|
4387
|
+
}
|
|
4388
|
+
// Observer panel added/removed and also observe the flow id
|
|
4389
|
+
// When switching between flow the same reference is reused
|
|
4390
|
+
this._flowObserver = new MutationObserver(() => {
|
|
4391
|
+
// Get the last panel and try to set focus on the input element
|
|
4392
|
+
setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4393
|
+
});
|
|
4394
|
+
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4395
|
+
}
|
|
4396
|
+
_getHeadingForCollection(collection) {
|
|
4397
|
+
if (!collection) {
|
|
4398
|
+
return "";
|
|
4399
|
+
}
|
|
4400
|
+
switch (this._mode) {
|
|
4401
|
+
case "profile":
|
|
4402
|
+
return this.messages.profilevariables ?? "";
|
|
4403
|
+
case "featureSet":
|
|
4404
|
+
// In featureSet mode, we do not show "Profile Variables" as the heading
|
|
4405
|
+
// Instead, we show the label of the collection, i.e. the name of the layer
|
|
4406
|
+
return collection.variables[0]?.getLabel() ?? "";
|
|
4407
|
+
}
|
|
4408
|
+
}
|
|
4409
|
+
_getDescriptionForCollection(collection) {
|
|
4410
|
+
if (!collection) {
|
|
4411
|
+
return "";
|
|
4412
|
+
}
|
|
4413
|
+
switch (this._mode) {
|
|
4414
|
+
case "profile":
|
|
4415
|
+
return collection.breadcrumb;
|
|
4416
|
+
case "featureSet":
|
|
4417
|
+
return "";
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4420
|
+
//#endregion
|
|
4421
|
+
//#region Renderers
|
|
4422
|
+
collectionBasedVariableRenderer(collection, topPanel = false) {
|
|
4423
|
+
// Returns a function to be added to the subpanel render collection
|
|
4424
|
+
return () => {
|
|
4425
|
+
if (!collection) {
|
|
4426
|
+
return null;
|
|
4427
|
+
}
|
|
4428
|
+
// If the collection actually exists then two options:
|
|
4429
|
+
// - the collection still need to be loaded
|
|
4430
|
+
// - the collection is ready
|
|
4431
|
+
let loading = this.loading;
|
|
4432
|
+
if (!loading && !collection.loaded) {
|
|
4433
|
+
// Request to load and update mutation counter when done
|
|
4434
|
+
collection
|
|
4435
|
+
.loadSource()
|
|
4436
|
+
.then(() => setTimeout(() => {
|
|
4437
|
+
this._mutationCounter += 1;
|
|
4438
|
+
}))
|
|
4439
|
+
.catch(() => {
|
|
4440
|
+
console.error("Error loading collection");
|
|
4441
|
+
loading = false;
|
|
4442
|
+
});
|
|
4443
|
+
loading = true;
|
|
4444
|
+
}
|
|
4445
|
+
return (h("calcite-flow-item", { heading: this._getHeadingForCollection(collection), description: this._getDescriptionForCollection(collection), beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "", scale: "m",
|
|
4446
|
+
// do not show the back button if the top panel is already displayed or if we are in featureSet mode
|
|
4447
|
+
hidden: topPanel || this._isMode("featureSet"), icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
|
|
4448
|
+
};
|
|
4449
|
+
}
|
|
4450
|
+
renderEditorVariables(collection) {
|
|
4451
|
+
// Filter the variables. Skip group, we will filter the children later on.
|
|
4452
|
+
const filterExpression = createFilterExpression(this._filterValue);
|
|
4453
|
+
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
4454
|
+
if (!filteredVariables.length) {
|
|
4455
|
+
return h("div", { class: "notice-container" }, this.messages.noitems);
|
|
4456
|
+
}
|
|
4457
|
+
return filteredVariables.map((variable) => this.renderEditorVariable(variable));
|
|
4458
|
+
}
|
|
4459
|
+
renderEditorVariable(variable) {
|
|
4460
|
+
switch (variable.type) {
|
|
4461
|
+
case "group":
|
|
4462
|
+
/**
|
|
4463
|
+
* Skip the header variable if we are in featureSet mode.
|
|
4464
|
+
* The header variable represents the namespace used to access a value inside a variable, i.e. $layer or $feature
|
|
4465
|
+
*/
|
|
4466
|
+
if (this._isMode("featureSet") && variable.isHeader) {
|
|
4467
|
+
return;
|
|
4468
|
+
}
|
|
4469
|
+
// Group is a collection but we represent it differently
|
|
4470
|
+
return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
|
|
4471
|
+
default:
|
|
4472
|
+
return (h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showCollectionPanel, onKeyPress: stopEnterPropagation, "data-item": variable })) : null, variable.icon ? h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4475
|
+
render() {
|
|
4476
|
+
if (!this.loading && this.variable?.loaded && !this.variable?.variables.length) {
|
|
4477
|
+
return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage))));
|
|
4478
|
+
}
|
|
4479
|
+
return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(this.variable, true)(), this._flowItemRenderers.map((renderer) => renderer())));
|
|
4480
|
+
}
|
|
4481
|
+
static get assetsDirs() { return ["assets"]; }
|
|
4482
|
+
get el() { return getElement(this); }
|
|
4483
|
+
static get watchers() { return {
|
|
4484
|
+
"modelId": ["modelIdPropChanged"],
|
|
4485
|
+
"variable": ["_variableChanged"]
|
|
4486
|
+
}; }
|
|
4487
|
+
};
|
|
4488
|
+
ArcgisEditorVariables.style = ArcgisEditorVariablesStyle0;
|
|
4489
|
+
|
|
4440
4490
|
const languageApiPanelCss = ":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)}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
|
|
4441
4491
|
const ArcgisLanguageApiPanelStyle0 = languageApiPanelCss;
|
|
4442
4492
|
|
|
@@ -4579,4 +4629,4 @@ const ArcgisLanguageApiPanel = class {
|
|
|
4579
4629
|
};
|
|
4580
4630
|
ArcgisLanguageApiPanel.style = ArcgisLanguageApiPanelStyle0;
|
|
4581
4631
|
|
|
4582
|
-
export { ArcgisArcadeEditor as arcgis_arcade_editor, ArcgisArcadeResults as arcgis_arcade_results, ArcgisArcadeSuggestions as arcgis_arcade_suggestions,
|
|
4632
|
+
export { ArcgisArcadeEditor as arcgis_arcade_editor, ArcgisArcadeResults as arcgis_arcade_results, ArcgisArcadeSuggestions as arcgis_arcade_suggestions, ArcgisCodeEditor as arcgis_code_editor, ArcgisEditorVariables as arcgis_editor_variables, ArcgisLanguageApiPanel as arcgis_language_api_panel };
|
|
@@ -1,11 +1,11 @@
|
|
|
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.
|
|
4
|
+
* v4.31.0-next.79
|
|
5
5
|
*/
|
|
6
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
7
|
-
export { s as setNonce } from './index-
|
|
8
|
-
import { g as globalScripts } from './app-globals-
|
|
6
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-718a7ca6.js';
|
|
7
|
+
export { s as setNonce } from './index-718a7ca6.js';
|
|
8
|
+
import { g as globalScripts } from './app-globals-4d228c7f.js';
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -21,5 +21,5 @@ var patchBrowser = () => {
|
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(async (options) => {
|
|
23
23
|
await globalScripts();
|
|
24
|
-
return bootstrapLazy([["arcgis-
|
|
24
|
+
return bootstrapLazy([["arcgis-arcade-editor_6",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1025],"testData":[16],"suggestions":[16],"snippets":[16],"hideDocumentationActions":[4,"hide-documentation-actions"],"hideSideBar":[4,"hide-side-bar"],"sideActionBarExpanded":[1540,"side-action-bar-expanded"],"openedSidePanel":[1537,"opened-side-panel"],"editorOptions":[16],"editorInstance":[16],"_preparingArcade":[32],"_editorProfile":[32],"_apiLibrary":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"messages":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"updateThemeColors":[64]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"],"testData":["_testDataChanged"],"snippets":["_snippetChanged"]}],[1,"arcgis-arcade-results",{"loading":[4],"openedResultPanel":[1537,"opened-result-panel"],"result":[16],"consoleLogs":[16]}],[1,"arcgis-arcade-suggestions",{"suggestions":[16],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"suggestions":["suggestionsPropChanged"]}],[0,"arcgis-code-editor",{"value":[1],"language":[1],"modelId":[1,"model-id"],"editorOptions":[16],"editorInstance":[16],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]},null,{"language":["languagePropChange"],"modelId":["modelIdPropChange"],"editorOptions":["editorOptionsPropChange"]}],[1,"arcgis-editor-variables",{"loading":[4],"modelId":[1,"model-id"],"variable":[16],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32],"_mode":[32]},null,{"modelId":["modelIdPropChanged"],"variable":["_variableChanged"]}],[1,"arcgis-language-api-panel",{"hideDocumentationActions":[4,"hide-documentation-actions"],"loading":[4],"apiLibrary":[16],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"apiLibrary":["_apiLibraryChanged"]}]]],["arcgis-sql-expression-editor",[[0,"arcgis-sql-expression-editor",{"profile":[16],"script":[1025],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32],"messages":[32]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"]}]]],["arcgis-sql-expression-fields",[[1,"arcgis-sql-expression-fields",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}]]]], options);
|
|
25
25
|
});
|