@arcgis/coding-components 4.33.0-next.33 → 4.33.0-next.35
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/{LO4Y2B7S.js → 26LCDWBM.js} +2 -2
- package/dist/arcgis-coding-components/{LO4Y2B7S.js.LEGAL.txt → 26LCDWBM.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{3SXBMBHD.js → 2EOQVL7G.js} +2 -2
- package/dist/arcgis-coding-components/{CCY4FT6N.js.LEGAL.txt → 2EOQVL7G.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{I7LKNAQK.js → 2OT2AYGU.js} +2 -2
- package/dist/arcgis-coding-components/{CDQHTB6C.js.LEGAL.txt → 2OT2AYGU.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{KRHZZD3V.js → 36TDKEKU.js} +144 -144
- package/dist/arcgis-coding-components/{KRHZZD3V.js.LEGAL.txt → 36TDKEKU.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{IOF673A3.js → 3UIRAVDV.js} +2 -2
- package/dist/arcgis-coding-components/{CRM5DQLU.js.LEGAL.txt → 3UIRAVDV.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/43CGKCFH.js +4 -0
- package/dist/arcgis-coding-components/{DQ7LF5TA.js.LEGAL.txt → 43CGKCFH.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{44GSK3NX.js → 4XRWFCKW.js} +2 -2
- package/dist/arcgis-coding-components/{44GSK3NX.js.LEGAL.txt → 4XRWFCKW.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{P4YUZWRH.js → AZ7MA2XH.js} +2 -2
- package/dist/arcgis-coding-components/{5W3AABSL.js → B2MJQSKA.js} +3 -3
- package/dist/arcgis-coding-components/{5W3AABSL.js.LEGAL.txt → B2MJQSKA.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/E54DLEVM.js +4 -0
- package/dist/arcgis-coding-components/{3SXBMBHD.js.LEGAL.txt → E54DLEVM.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{5LTSTETT.js → EP3BB6QR.js} +2 -2
- package/dist/arcgis-coding-components/{5LTSTETT.js.LEGAL.txt → EP3BB6QR.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{XIEWNBFF.js → EXUXVKDF.js} +1 -1
- package/dist/arcgis-coding-components/{MAL2J7TO.js → F6K6SBSU.js} +2 -2
- package/dist/arcgis-coding-components/{MAL2J7TO.js.LEGAL.txt → F6K6SBSU.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{ZUTUSAUL.js → FZHXVUON.js} +1 -1
- package/dist/arcgis-coding-components/H44OSOXZ.js +4 -0
- package/dist/arcgis-coding-components/H44OSOXZ.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/HDL5ZFEU.js +4 -0
- package/dist/arcgis-coding-components/HDL5ZFEU.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{3CUMDTVA.js → ITLSKDT4.js} +2 -2
- package/dist/arcgis-coding-components/{3CUMDTVA.js.LEGAL.txt → ITLSKDT4.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{Q5QIZTFG.js → ITPOJCWP.js} +2 -2
- package/dist/arcgis-coding-components/ITPOJCWP.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/J2F2YHAA.js +8 -0
- package/dist/arcgis-coding-components/J2F2YHAA.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{YH5RDJPU.js → JHX26BAM.js} +2 -2
- package/dist/arcgis-coding-components/JHX26BAM.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{GMGT3LLK.js → MDVLREK7.js} +2 -2
- package/dist/arcgis-coding-components/{GMGT3LLK.js.LEGAL.txt → MDVLREK7.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{FDHKVNLS.js → MLWW2NAL.js} +2 -2
- package/dist/arcgis-coding-components/MLWW2NAL.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{IAUPJHHB.js → NQEA7NSZ.js} +2 -2
- package/dist/arcgis-coding-components/{IAUPJHHB.js.LEGAL.txt → NQEA7NSZ.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{KZ24IRIU.js → OZM46O5Z.js} +2 -2
- package/dist/arcgis-coding-components/{KZ24IRIU.js.LEGAL.txt → OZM46O5Z.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/PESMFBGS.js +4 -0
- package/dist/arcgis-coding-components/PESMFBGS.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/Q3H6TANV.js +12 -0
- package/dist/arcgis-coding-components/Q3H6TANV.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{IZ4RJ7JZ.js → QEGWU42Q.js} +4 -5
- package/dist/arcgis-coding-components/QEGWU42Q.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/RGLPRMQV.js +4 -0
- package/dist/arcgis-coding-components/RGLPRMQV.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{77W6CWRA.js → UIRW6E65.js} +3 -3
- package/dist/arcgis-coding-components/{77W6CWRA.js.LEGAL.txt → UIRW6E65.js.LEGAL.txt} +9 -9
- package/dist/arcgis-coding-components/{CS4F6YSG.js → UY5PDPIU.js} +2 -2
- package/dist/arcgis-coding-components/{CS4F6YSG.js.LEGAL.txt → UY5PDPIU.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/VFBMAPZR.js +4 -0
- package/dist/arcgis-coding-components/YLJPFMFN.js +4 -0
- package/dist/arcgis-coding-components/YLJPFMFN.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{VMUIMKV6.js → YOO3FF45.js} +1 -1
- package/dist/arcgis-coding-components/ZC7TNA5S.js +4 -0
- package/dist/arcgis-coding-components/ZQKLY73H.js +4 -0
- package/dist/arcgis-coding-components/ZQKLY73H.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js.LEGAL.txt +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +14 -14
- package/dist/arcgis-coding-components/assets/code-editor/css.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/sql-expr.worker.js +44 -2003
- package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
- package/dist/chunks/arcade-defaults.js +13 -13
- package/dist/chunks/arcade-executor.js +23 -23
- package/dist/chunks/arcade-mode.js +2 -2
- package/dist/chunks/arcade-service-accessors.js +10 -10
- package/dist/chunks/fields.js +3 -3
- package/dist/chunks/language-defaults-base.js +68 -72
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +7 -7
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +2 -2
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/sql-expr-monaco/sql-expr-defaults.d.ts +3 -3
- package/package.json +7 -7
- package/dist/arcgis-coding-components/CCY4FT6N.js +0 -5
- package/dist/arcgis-coding-components/CDQHTB6C.js +0 -13
- package/dist/arcgis-coding-components/CRM5DQLU.js +0 -9
- package/dist/arcgis-coding-components/DQ7LF5TA.js +0 -5
- package/dist/arcgis-coding-components/EQD2C23X.js +0 -5
- package/dist/arcgis-coding-components/EQD2C23X.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/FDHKVNLS.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/I7LKNAQK.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/IOF673A3.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/IS3YBPV2.js +0 -5
- package/dist/arcgis-coding-components/IS3YBPV2.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/IZ4RJ7JZ.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/LHJZ4NUP.js +0 -5
- package/dist/arcgis-coding-components/LHJZ4NUP.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/Q5QIZTFG.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/TKCOE4XB.js +0 -4
- package/dist/arcgis-coding-components/TPQXUKQA.js +0 -5
- package/dist/arcgis-coding-components/TPQXUKQA.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/XSGNOZEO.js +0 -5
- package/dist/arcgis-coding-components/XSGNOZEO.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/XXEDPYTB.js +0 -4
- package/dist/arcgis-coding-components/XXEDPYTB.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/YH5RDJPU.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/YUCTM6SW.js +0 -4
- /package/dist/arcgis-coding-components/{P4YUZWRH.js.LEGAL.txt → AZ7MA2XH.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{VMUIMKV6.js.LEGAL.txt → EXUXVKDF.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{XIEWNBFF.js.LEGAL.txt → FZHXVUON.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{TKCOE4XB.js.LEGAL.txt → VFBMAPZR.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{YUCTM6SW.js.LEGAL.txt → YOO3FF45.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{ZUTUSAUL.js.LEGAL.txt → ZC7TNA5S.js.LEGAL.txt} +0 -0
|
@@ -8,7 +8,7 @@ import { createRef as d, ref as p } from "lit-html/directives/ref.js";
|
|
|
8
8
|
import { css as h } from "@lit/reactive-element/css-tag.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
11
|
-
v4.33.0-next.
|
|
11
|
+
v4.33.0-next.35 */
|
|
12
12
|
const g = h`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}}}`;
|
|
13
13
|
class f extends s {
|
|
14
14
|
constructor() {
|
|
@@ -7,7 +7,7 @@ import { u as m } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as d } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
10
|
-
v4.33.0-next.
|
|
10
|
+
v4.33.0-next.35 */
|
|
11
11
|
const h = d`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
12
12
|
class f extends r {
|
|
13
13
|
constructor() {
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "4.33.0-next.
|
|
4
|
+
"version": "4.33.0-next.35",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
6
|
-
v4.33.0-next.
|
|
6
|
+
v4.33.0-next.35 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as e } from "./chunks/runtime.js";
|
|
|
2
2
|
import { makeDefineCustomElements as i } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
5
|
-
v4.33.0-next.
|
|
5
|
+
v4.33.0-next.35 */
|
|
6
6
|
const o = i(e, {
|
|
7
7
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
|
8
8
|
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
2
|
import { IEditorProfileDefinition, IPredefinedProfile } from '../profile/types';
|
|
3
3
|
import { Uri } from 'monaco-editor';
|
|
4
4
|
import { LanguageDefaultsBase } from '../language-defaults-base';
|
|
@@ -6,8 +6,8 @@ declare class SqlExprDefaults extends LanguageDefaultsBase {
|
|
|
6
6
|
protected _languageId: string;
|
|
7
7
|
private _layerMap;
|
|
8
8
|
constructor();
|
|
9
|
-
updateFeatureLayerForModel(modelId: Uri | string, layer: FeatureLayer): void;
|
|
10
|
-
getFeatureLayerForModel(modelId: Uri | string): FeatureLayer | undefined;
|
|
9
|
+
updateFeatureLayerForModel(modelId: Uri | string, layer: __esri.FeatureLayer): void;
|
|
10
|
+
getFeatureLayerForModel(modelId: Uri | string): __esri.FeatureLayer | undefined;
|
|
11
11
|
setProfileForModel(modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
|
|
12
12
|
locale: string;
|
|
13
13
|
}): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.35",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
],
|
|
38
38
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@arcgis/arcade-languageservice": "4.33.0-next.
|
|
41
|
-
"@arcgis/components-controllers": "4.33.0-next.
|
|
42
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
43
|
-
"@arcgis/core-adapter": "4.33.0-next.
|
|
44
|
-
"@arcgis/languages-api-utils": "4.33.0-next.
|
|
45
|
-
"@arcgis/lumina": "4.33.0-next.
|
|
40
|
+
"@arcgis/arcade-languageservice": "4.33.0-next.35",
|
|
41
|
+
"@arcgis/components-controllers": "4.33.0-next.35",
|
|
42
|
+
"@arcgis/components-utils": "4.33.0-next.35",
|
|
43
|
+
"@arcgis/core-adapter": "4.33.0-next.35",
|
|
44
|
+
"@arcgis/languages-api-utils": "4.33.0-next.35",
|
|
45
|
+
"@arcgis/lumina": "4.33.0-next.35",
|
|
46
46
|
"monaco-editor": "^0.52.0",
|
|
47
47
|
"tslib": "^2.7.0",
|
|
48
48
|
"vscode-languageserver-types": "^3.17.5"
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
var _0,_1,_2,_3,_4,_5,_6,_7,$$=$arcgis.t(([u])=>{var T="https://developers.arcgis.com/arcade/",k=100,C=100;function v(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.featureset.support.FeatureSet"}function g(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Feature"}function b(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Dictionary"}function w(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.geometry.")}function R(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph")}function h(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Portal"}function j(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Attachment"}function A(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.arcadedate"}function D(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.dateonly"}function F(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.timeonly"}function S(e){return!!e&&typeof e=="object"&&"length"in e&&typeof e.length=="function"&&"get"in e&&typeof e.get=="function"&&"toArray"in e&&typeof e.toArray=="function"&&"_elements"in e&&Array.isArray(e._elements)}function Z(e){return e==null?{type:"null"}:Array.isArray(e)?{type:"array",value:e}:S(e)?{type:"array",value:e.toArray()}:e instanceof Date?{type:"date",value:e}:typeof e=="string"?{type:"text",value:e}:typeof e=="number"?{type:"number",value:e}:typeof e=="boolean"?{type:"boolean",value:e}:typeof e!="object"?{type:"unknown"}:A(e)?{type:"date",value:e}:D(e)?{type:"dateOnly",value:e}:F(e)?{type:"time",value:e}:j(e)?{type:"attachment",value:e}:h(e)?{type:"portal",value:e}:v(e)?{type:"featureSet",value:e,features:[],iterator:null}:g(e)?{type:"feature",value:e}:b(e)?{type:"dictionary",value:e}:w(e)?{type:"geometry",value:e}:R(e)?{type:"knowledgeGraph",value:e}:{type:"unknown"}}function E(e,r="en"){return e.value instanceof Date?new Intl.DateTimeFormat(r,{dateStyle:"medium",timeStyle:"long"}).format(e.value):e.value.toDateTime().setLocale(r).toFormat(e.value.isUnknownTimeZone?"FF":"FF ZZZZZ")}function G(e){return e.value.toString()}function B(e){return e.value.toString()}async function x(e,r="system"){let a=Z(e);return a.type!=="featureSet"||(await a.value.load(),a.iterator=a.value.iterator({aborted:!1}),a.features=await a.iterator.nextBatchAsArcadeFeatures(C,r)??[]),a}async function I(e,r,a,s){let l=new Date;s??=()=>{};try{let o=performance.now(),n=e?.variables??[],d=await u.createArcadeExecutor(r??"",{variables:n}),c=performance.now(),{profileVariableInstances:y,spatialReference:p,timeZone:i}=a,f={spatialReference:p,timeZone:i,rawOutput:!0,console:s},m=await d.executeAsync(y,f),t=await x(m,i);return t.timeStamp=l,t.compilationTime=c-o,t.executionTime=performance.now()-c,t}catch(o){let n="Unknown Error";return o instanceof Error&&(n=o.message),{type:"error",value:n,error:o,timeStamp:l,compilationTime:0,executionTime:0}}}_0=T;_1=k;_2=C;_3=Z;_4=E;_5=G;_6=B;_7=I},"arcade")
|
|
5
|
-
export{$$,_0 as a,_1 as b,_2 as c,_3 as d,_4 as e,_5 as f,_6 as g,_7 as h}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{b as K,c as f,d as y,e as m}from"./VMUIMKV6.js";import{a as q,b as z,c as H,d as _}from"./XXEDPYTB.js";import{b as R,c as B}from"./77W6CWRA.js";import{x as O}from"./5W3AABSL.js";import{l as G,p as A,q as U,t as S,u as P}from"./XIEWNBFF.js";import{Gl as $,Pl as V}from"./KRHZZD3V.js";var _0,_1,_2,_3,_4,_5,_6,$$=$arcgis.t(([v,be,ge,we,Ce])=>{async function X(t,e){try{let i=await t,r=new Map,n=new Map,o=[],s=fe(e);return i.forEach(u=>{let l=[];u.items.forEach(a=>ye(l,n,r,s,a)),l.length&&o.push({...u,items:l})}),{categories:o,functionDefinitions:r,constantDefinitions:n}}catch(i){return console.error(i),{categories:[],functionDefinitions:new Map,constantDefinitions:new Map}}}function fe(t){let{profile:{apiVersion:e,bundles:i,hiddenApiItems:r=[]}={}}=t,n=Y(e),o=Array.isArray(i)&&i.length>0?new Set(["core",...i]):void 0;return s=>_e(n,s.sinceVersion)&&(!o||o.has(s.bundle))&&!r.includes(s.name)}function ye(t,e,i,r,n){if(Array.isArray(n)){n.forEach(o=>Q(t,i,r,o));return}n.type==="constant"?me(t,e,r,n):Q(t,i,r,n)}function Q(t,e,i,r){if(!i(r))return;r.disableDocumentation||t.push(r);let{completion:{label:n}}=r,o=n.toLowerCase(),s=e.get(o);s||(s={type:"functionDefinition",key:o,overloads:[]},e.set(o,s)),s.overloads.push(r)}function me(t,e,i,r){if(!i(r))return;t.push(r);let{completion:{label:n}}=r,o=n.toLowerCase();e.set(o,r);let[s,u]=r.completion.label.split(".");if(!u)return;let l=s.toLowerCase(),a=e.get(l);a||(a={type:"namespace",key:l,members:[],completion:{label:s,detail:s,insertText:s,insertTextMode:m.adjustIndentation,insertTextFormat:y.PlainText,kind:f.Enum}},e.set(l,a));let h=structuredClone(r);h.name=u,h.completion.label=u,h.completion.insertText=u,h.completion.kind=f.Constant,a.members.push(h),a.completion.documentation=a.members.reduce((d,W)=>(d.value=`${d.value}${d.value?`
|
|
5
|
-
|
|
6
|
-
`:""}**${W.completion.label}**: ${W.description}`,d),{kind:K.Markdown,value:""})}function Y(t){if(!t||typeof t!="string")return null;let e=t.split(".").map(n=>Number.parseInt(n));if(e.some(Number.isNaN))return console.error("Invalid API version string",t),null;let[i,r]=e.slice(0,2);return{major:i,minor:r}}function _e(t,e){if(!t)return!0;let i=Y(e);return i?t.major>i.major?!1:t.minor===void 0||i.minor===void 0?!0:i.minor<=t.minor:!0}function se(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&x(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function De(t){return!!t&&typeof t=="object"&&"allLayers"in t&&"allTables"in t&&typeof t.allLayers=="object"&&typeof t.allTables=="object"}function oe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&(t.declaredClass==="esri.Map"||t.declaredClass==="esri.WebMap"||t.declaredClass==="esri.WebScene")}function Se(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function ae(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function le(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function x(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function I(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function ve(t){return I(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function Xe(t){return I(t)||x(t)||le(t)}function Ye(t){return I(t)||x(t)||le(t)}function Ze(t){return ae(t)||oe(t)||ve(t)}function Z(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function L(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function Fe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function Je(t){return!!t&&typeof t=="object"&&"id"in t&&typeof t.id=="string"&&"definitions"in t&&typeof t.definitions=="object"&&!Array.isArray(t.definitions)}function F(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function Te(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function pe(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function j(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function J(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function b(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function Me(t){return b(t)&&"subtypes"in t}function xe(t){return!!t&&typeof t=="object"&&"portalItem"in t}function Ie(t){return pe(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function Ae(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function Pe(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}async function ce(t){if(!t)return null;let e;return x(t)?e=t:e=new v(t),Pe(e)&&await e.load(),e}async function $e(t){t+="/layers";let e=await be(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=ee(e.data?.layers,i),n=ee(e.data?.tables,i);return{layers:r,tables:n}}function ee(t,e){return t?t.filter(i=>{switch(i.type){case"Feature Layer":case"Oriented Imagery Layer":case"Catalog Layer":case"Table":return(i.capabilities?i.capabilities.toLowerCase().split(",").map(r=>r.trim()):[]).includes(e);default:return!1}}):[]}async function Ve(t,e){let i=new v({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function ue(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(b(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(j(t)){if(e.name===t.typeIdField)return-1;if(i.name===t.typeIdField)return 1}return e.name.localeCompare(i.name,"en",{sensitivity:"base"})}}function te(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Le=/^[a-z_$][a-z0-9_$]*$/giu;function he(t,e=!0){return t.match(Le)?`${e?".":""}${t}`:`["${t}"]`}function de(t,e){return t?`${t}${he(e)}`:e}function ie(t){return xe(t)?t.portalItem:null}function et(t,e,i=!1){let r=e,n=[],o=[];return H(t).forEach(s=>{r&&(r+=`
|
|
7
|
-
|
|
8
|
-
`),r+=`**${s.name}** (${s.alias})
|
|
9
|
-
${s.type}`,s.description&&(r+=`
|
|
10
|
-
'${s.description}`);let u=z(s),l=he(s.name,!1),a=_(s);if(n.push({name:s.name,description:a,type:u,completion:{label:s.name,detail:a,insertText:l,insertTextMode:m.asIs,insertTextFormat:y.PlainText,kind:f.Field}}),i){if(!s.alias||s.alias.toLowerCase()===s.name.toLowerCase())return;let h=`**${s.alias}**
|
|
11
|
-
${s.type}`;s.description&&(h+=`
|
|
12
|
-
'${s.description}`),o.push({name:s.alias,description:s.name,type:u,completion:{label:s.alias,detail:s.name,insertText:l,insertTextMode:m.asIs,insertTextFormat:y.PlainText,kind:f.Field,documentation:{kind:"markdown",value:h}}})}}),[[...n,...o],r]}var T=class{constructor(e,i,r){this._profile=e,this._label=i,this.description=r,this.filterDescription=!1}getLabel(){return this._label==null?"":typeof this._label=="string"?U(this._label):A(this._profile?.intlStrings[this._label.code],this._label.formatValues)}getDescription(){return this.description==null?"":typeof this.description=="string"?this.description:A(this._profile?.intlStrings[this.description.code],this.description.formatValues)}passFilter(e){return!e||e.test(this.getLabel())?!0:this.filterDescription&&e.test(this.getDescription())}},g=class extends T{constructor(e){super(e.profile,e.label,e.description??e.declaration?.description),this.declaration=e.declaration??{},this.name=e.declaration?.name??"",this.snippet=e.snippet??"",this.nonInteractive=e.nonInteractive??!1,this.filterDescription=e.filterDescription??!1,this.icon=e.icon}},p=class extends g{constructor(e){super(e),this.type="text",this.isCollection=!1,this.type=e.declaration?.type??"text"}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},E=class extends g{constructor(e){super(e),this.type="array",this.isCollection=!1,this.elementType=e.declaration?.elementType??{type:"number",name:"number"}}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,elementType:this.elementType,name:"",...this.declaration}}},w=class extends g{constructor(e,i){super(i),this.owner=e,this.isCollection=!0,this._loaded=!0,this.variables=[]}get breadcrumb(){if(this.owner){let e=this.owner.breadcrumb;return e?`${e} / ${this.name}`:this.name}return this.name}get loaded(){return this._loaded}get informationUrl(){return null}get informationType(){return""}},c=class extends T{constructor(e,i,r=[],n=!1){super(e,i),this.variables=r,this.isHeader=n,this.type="group",this.isCollection=!0}passFilter(){return!0}},C=class t extends w{constructor(e,i){super(e,i),this.type="dictionary",this.dictionaryVariables=[],this.loadPropertyDeclarations(i.declaration?.properties),this.snippet&&this.dictionaryVariables.length&&(this.variables=[new c(this._profile,this.snippet,this.dictionaryVariables)])}async loadSource(){}loadPropertyDeclarations(e){this.dictionaryVariables=this.createVariableInstances(e),this.variables=this.dictionaryVariables}createVariableInstances(e){if(!Array.isArray(e))return[];let i=[];return e.forEach(r=>{let n=this.createVariableInstance(r);n&&i.push(n)}),i}createVariableInstance(e){let i=de(this.snippet,e.name);switch(e.type){case"number":case"text":case"boolean":case"date":case"dateOnly":case"time":case"geometry":case"knowledgeGraph":return new p({profile:this._profile,declaration:e,label:i,snippet:i});case"feature":return new k(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"featureSet":return new D(this,{profile:this._profile,declaration:e,label:i,snippet:i},[new p({profile:this._profile,label:i,description:"",snippet:i})]);case"featureSetCollection":return new N(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"dictionary":return new t(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"array":return new E({profile:this._profile,declaration:e,label:i,snippet:i});default:return console.error("Editor profile: Invalid profile variable",e),null}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,properties:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},M=class extends w{constructor(e,i,r){super(e,i),this.relationshipsProperties=r,this._source=null,this._loaded=!1,this._definition=i.declaration?.definition}get title(){return F(this._source)?this._source.title??"":""}get url(){return Te(this._source)?this._source.url??"":""}get informationUrl(){return!this.loaded||!this.url?null:pe(this._source)?`${this.url}/${this._source.layerId}`:this.url}get informationType(){return this._profile?.intlStrings.layer??"layer"}async loadSource(){return S(this._loadPromise)&&P(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}_getValueSnippet(e){return this.type==="feature"?de(this.snippet,e.name):e.name}_getSubtypeOrDomainNameSnippet(e){return this.type!=="feature"?null:b(this._source)&&e.name===this._source.subtypeField?`SubtypeName(${this.snippet})`:`DomainName(${this.snippet}, "${e.name}")`}_getFieldProperty(e){let i=this._getDomainDictionary(e);if(i)return i;let r=this._getValueSnippet(e);return new p({profile:this._profile,label:r,description:_(e),snippet:r,icon:q(e),filterDescription:!0})}_getDomainDictionary(e){return J(this._source)?b(this._source)&&this._source.subtypeField?this._getSubtypeDomainDictionary(e):j(this._source)&&this._source.typeIdField?this._getFeatureTypeDomainDictionary(e):this._getFieldDomainDictionary(e):null}_getSubtypeDomainDictionary(e){if(!b(this._source))return null;if(!Me(this._source))return e.name===this._source.subtypeField?null:this._getFieldDomainDictionary(e);if(e.name===this._source.subtypeField){let n=this._createDomainDictionary(e);return n.icon="subtype",n.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes,e)),n}if(te(this._source.subtypes,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.subtypes,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFeatureTypeDomainDictionary(e){if(!j(this._source))return null;if(e.name===this._source.typeIdField){let n=this._createDomainDictionary(e);return n.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types,e)),n}if(te(this._source.types,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.types,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFieldDomainDictionary(e){if(!J(this._source))return null;let i=this._source.getFieldDomain(e.name);if(!L(i))return null;let r=this._getCodedValueDomainGroup(i,{code:"domainvalues"}),n=this._createDomainDictionary(e);return n.variables.push(r),n}_getTypeOrSubtypeDomainGroup(e,i){if(L(i.domain))return this._getCodedValueDomainGroup(i.domain,{code:"subtypes"});let r=e?.map(n=>{let o=Z(n)?n.code:n.id;return new p({profile:this._profile,label:`${o}`,description:n.name,snippet:`"${o}"`})})??[];return new c(this._profile,{code:"subtypes"},r)}_getCodedValueDomainGroup(e,i){let r=e.codedValues.map(n=>new p({profile:this._profile,label:`${n.code}`,description:n.name,snippet:`"${n.code}"`,filterDescription:!0}));return new c(this._profile,i,r)}_getDomainValuesGroup(e,i){let r=[];return!e||e.length===0||(e.forEach(n=>{let o=n.domains?.[i.name];if(!o||Fe(o)||!L(o))return;let s=_(i),u=this._getCodedValueDomainGroup(o,{code:"domainvaluesfortypeformat",formatValues:{fieldName:s,typeName:n.name}}),l=Z(n)?n.code:n.id,a=`${l}`,h=`"${l}""`,d=new C(this,{profile:this._profile,label:a,snippet:h,description:n.name,declaration:{name:s}});d.variables=[u],r.push(d)}),!r.length)?null:new c(this._profile,{code:"domainvaluesbysubtypes"},r)}_createDomainDictionary(e){let i=this._getValueSnippet(e),r=_(e),n=new C(this,{profile:this._profile,label:i,description:r,snippet:i,icon:"form-dropdown",declaration:{name:e.name}}),o=new c(this._profile,r,[new p({profile:this._profile,label:i,description:"",snippet:i})]);n.variables=[o];let s=this._getSubtypeOrDomainNameSnippet(e);return s&&o.variables.push(new p({profile:this._profile,label:s,description:"",snippet:s})),n}async _getRelationshipsProperty(){if(!this.relationshipsProperties?.exposeRelationships||!this._profile?.supportFeatureSetFunctions)return null;let e=this._source;if(!Ie(e))return null;let i=new c(this._profile,{code:"relationships"}),r=await Promise.all(e.relationships?.map(async n=>{let o=await Ve(e,n);if(!se(o)||n.relatedTableId===this.relationshipsProperties?.sourceTableId)return null;let s=`FeatureSetByRelationshipName(${this.snippet}, "${n.name}")`;return new D(this,{profile:this._profile,declaration:{definition:o},label:o.title,description:"",nonInteractive:!0},[new p({profile:this._profile,label:s,description:"",snippet:s})],{exposeRelationships:!0,sourceTableId:e.layerId})})??[]);return i.variables=r.filter(S),i.variables.length?i:null}},k=class extends M{constructor(e,i){super(e,i,{exposeRelationships:!0}),this.type="feature"}get title(){return F(this._source)?this._source.title??"":{code:"feature"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await ce(this._definition),!this._source)throw new Error("Invalid definition");let e=F(this._source)?this._source.title??"":"";this.variables.push(new c(this._profile,e,[new p({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new c(this._profile,{code:"values"});if(this.variables.push(i),Ae(this._source)&&!this._source.isTable){let n=`Geometry(${this.snippet})`,o=new p({profile:this._profile,declaration:{name:n},label:n,description:"Geometry",snippet:n,icon:"shapes",filterDescription:!0});i.variables.push(o)}this._source.fields.sort(ue(this._source)).forEach(n=>{i.variables.push(this._getFieldProperty(n))});let r=await this._getRelationshipsProperty();r&&this.variables.push(r)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},D=class extends M{constructor(e,i,r=[],n){super(e,i,n),this.featureSetSnippets=r,this.type="featureSet"}get title(){return F(this._source)?this._source.title??"":{code:"featureset"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await ce(this._definition),!this._source)throw new Error("Invalid definition");this.variables.push(new c(this._profile,this.title,this.featureSetSnippets,!0));let e=new c(this._profile,{code:"fields"});this.variables.push(e),e.variables=this._source.fields.sort(ue(this._source)).map(r=>this._getFieldProperty(r));let i=await this._getRelationshipsProperty();i&&this.variables.push(i)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},N=class extends w{constructor(e,i){super(e,i),this.type="featureSetCollection",this._featureSetCollections=null,this._loaded=!1,this._definition=i.declaration?.definition}get informationUrl(){return!this.loaded||!this._featureSetCollections?null:typeof this._featureSetCollections.source!="string"?R(ie(this._featureSetCollections.source)):null}get informationType(){if(!this.loaded||!this._featureSetCollections)return"";if(typeof this._featureSetCollections.source=="string")return this._profile?.intlStrings.featureservice??"featureservice";switch(this._featureSetCollections.source.declaredClass){case"esri.WebMap":return this._profile?.intlStrings.webmap??"webmap";case"esri.WebScene":return this._profile?.intlStrings.webscene??"webscene";default:return this._profile?.intlStrings.map??"map"}}async loadSource(){return S(this._loadPromise)&&P(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}async _loadSource(){if(this.loaded)return this._featureSetCollections;try{if(this._featureSetCollections=await this._featureSetCollectionsFromDefinition(),!this._featureSetCollections)throw new Error("Invalid definition");let e=typeof this._featureSetCollections.source=="string"?{code:this._featureSetCollections.source.endsWith("FeatureServer")?"featureservice":"mapservice"}:{code:"webmapformat",formatValues:{webMapTitle:ie(this._featureSetCollections.source)?.title||"Untitled map"}},i=new c(this._profile,e,[new p({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]),r=new c(this._profile,{code:"layers"},this._featureSetCollections.layers),n=new c(this._profile,{code:"tables"},this._featureSetCollections.tables);this.variables.push(i,r,n)}catch(e){console.error("Error with definition",e,this._definition),this._featureSetCollections=null}finally{this._loaded=!0}return this._featureSetCollections}async _featureSetCollectionsFromDefinition(){return this._definition?oe(this._definition)?await this._featureSetCollectionFromMap(this._definition):I(this._definition)?await this._featureSetCollectionFromUrl(this._definition.url):ae(this._definition)?await this._featureSetCollectionFromPortalItem(this._definition.portalItem):null:null}async _featureSetCollectionFromMap(e){return Se(e)&&await e.loadAll(),await Promise.all(e.tables.map(async i=>await i.load())),{layers:this._convertWebMapLayersToVariables(e.layers),tables:this._convertWebMapLayersToVariables(e.tables,!0),source:e}}async _featureSetCollectionFromPortalItem(e){let i=new ge(e);switch(await i.load(),i.type){case"Web Map":{let r=new we({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Web Scene":{let r=new Ce({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Feature Service":return await this._featureSetCollectionFromUrl(i.url);default:return console.error("Unsupported portal item",e),null}}async _featureSetCollectionFromUrl(e){let i=e?.replace(/\/featureserver\/[0-9]*/iu,"/FeatureServer");if(i=i?.replace(/\/mapserver\/[0-9]*/iu,"/MapServer"),i=i?.split("?")[0],!i)return null;let r=await $e(i),n=Promise.all(r.layers.map(async l=>{let a=new v({url:`${i}/${l.id}`});return await a.load(),this._createFeatureSetVariable(a)})),o=Promise.all(r.tables.map(async l=>{let a=new v({url:`${i}/${l.id}`});return await a.load(),this._createFeatureSetVariable(a)})),[s,u]=await Promise.all([n,o]);return{layers:s,tables:u,source:i}}_convertWebMapLayersToVariables(e,i=!1){let r=[];return e.toArray().reverse().forEach(n=>{if(se(n)){r.push(this._createFeatureSetVariable(n,!0));return}if(De(n)){let o=i?this._convertWebMapLayersToVariables(n.allTables,!0):this._convertWebMapLayersToVariables(n.allLayers);r.push(...o)}}),r}_createFeatureSetVariable(e,i=!1){return new D(this,{profile:this._profile,declaration:{name:e.title??"",definition:e},label:i?e.title:e.sourceJSON.name??e.title,description:"",nonInteractive:!0},this._makeFeatureSetSnippets(e,i))}_makeFeatureSetSnippets(e,i=!1){if(!this._profile?.supportFeatureSetFunctions)return[];if(i){let r=`FeatureSetById(${this.snippet}, "${e.id}")`,n=`FeatureSetByName(${this.snippet}, "${e.title}")`;return[new p({profile:this._profile,label:r,description:"",snippet:r}),new p({profile:this._profile,label:n,description:"",snippet:n})]}else{let r=`FeatureSetById(${this.snippet}, "${e.layerId}")`;return[new p({profile:this._profile,label:r,description:"",snippet:r})]}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},re=class extends C{constructor(e,i,r="en"){super(void 0,{profile:null,declaration:{properties:[]}}),this.definition=e,this.intlStrings=i,this.locale=r,this.variables=[],this._profile=this,this.loadPropertyDeclarations(e?.variables)}get supportFeatureSetFunctions(){return this.definition?.bundles?.includes("data-access")??!1}toEditorProfileDefinition(){return{...this.definition,variables:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},je={locale:"en"},ne=class{constructor(e,i){this.languageId=e,this._apiConfig=i,this._onDidChange=new $,this._modelToProfileMap=new Map,this._modelToApiContextMap=new Map,this._localeToApiLibraryPromiseMap=new Map,this._onModelContextDidChange=new $,this._onDidModelContextChangeTimeout=-1,this.workerHost={getApiLibrary:async r=>await this.getApiLibrary(r)},B().then(r=>{r.onWillDisposeModel(n=>{this.disposeForModel(n.uri)})})}_fireModelContextDidChange(e){this._onDidModelContextChangeTimeout===-1&&(this._onDidModelContextChangeTimeout=window.setTimeout(()=>{this._onDidModelContextChangeTimeout=-1,this._onModelContextDidChange.fire(e)},0))}_getApiKey(e){return V.isUri(e)||(e=V.parse(e)),e.toString()}get onDidChange(){return this._onDidChange.event}disposeForModel(e){let i=this._getApiKey(e);this._modelToProfileMap.delete(i),this._modelToApiContextMap.delete(i)&&this._fireModelContextDidChange(i)}getEditorProfileForModel(e){return this._modelToProfileMap.get(this._getApiKey(e))}getApiContextForModel(e){return this._modelToApiContextMap.get(this._getApiKey(e))??je}updateApiContextForModel(e,i){let r=this._getApiKey(e),n=this._modelToApiContextMap.get(r)??{};this._modelToApiContextMap.set(r,{...n,...i}),this._fireModelContextDidChange(r)}get onModelContextDidChange(){return this._onModelContextDidChange.event}async getApiLibraryForModel(e){let i=this.getApiContextForModel(e),r=this.getApiLibrary(i.locale??"en");return(await X(r,i)).categories}async fetchApiLibrary(e){try{let{apiPath:i,apiPrefix:r}=this._apiConfig,n=O(`${i}/${r}${e}.json`),o=await fetch(n);return o.ok?await o.json():[]}catch{return[]}}async getApiLibrary(e){let i=G(e);return this._localeToApiLibraryPromiseMap.has(i)||this._localeToApiLibraryPromiseMap.set(i,this.fetchApiLibrary(i)),await this._localeToApiLibraryPromiseMap.get(i)??[]}};_0=Xe;_1=Ye;_2=Ze;_3=Je;_4=et;_5=re;_6=ne},"layers/FeatureLayer","request","portal/PortalItem","WebMap","WebScene")
|
|
13
|
-
export{$$,_0 as a,_1 as b,_2 as c,_3 as d,_4 as e,_5 as f,_6 as g}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{$$ as _0,a as v,b as T,c as M,d as m,e as j,f as A,g as F}from"./CDQHTB6C.js";import{c as f,d,e as l}from"./VMUIMKV6.js";import{x as u}from"./5W3AABSL.js";import{i as h,j as g,w as k,x}from"./XIEWNBFF.js";var _1,_2,_3,_4,$$=$arcgis.t(([I])=>{function L(){return!!window.MonacoEnvironment?.getWorkerUrl}var V=new Map;function G(e){L()||(window.MonacoEnvironment={getWorker:async(n,t)=>{let a=V.get(t)??`${e}/code-editor/editor.worker.js`;switch(t){case"json":a=`${e}/code-editor/json.worker.js`;break;case"css":a=`${e}/code-editor/css.worker.js`;break;case"html":a=`${e}/code-editor/html.worker.js`;break;case"typescript":case"javascript":a=`${e}/code-editor/ts.worker.js`;break;case"arcade":a=`${e}/code-editor/arcade.worker.js`;break;case"arcgis-sql-expression":a=`${e}/code-editor/sql-expr.worker.js`;break}if(!x(a)||k(a,globalThis.location.href,!0))return new Worker(a,{name:t});let r=await I(a,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([r.data],{type:"text/javascript"})))}})}async function z(){return(await E()).getArcadeDiagnosticService()}async function E(){return await import("./FDHKVNLS.js")}async function D(e){let{apiVersion:n,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),r=await $(e.dictionaryVariables);return{apiVersion:n,bundles:t,variables:r,hiddenApiItems:a?.map(i=>i.toLowerCase())}}async function $(e,n=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await U(t,n);case"feature":return await C(t,n);default:return S(t,n)}}))}function S(e,n){let{name:t,type:a}=e,r=e.getDescription();return{name:t,description:r,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:l.asIs,insertTextFormat:d.PlainText,kind:n,documentation:{kind:"markdown",value:r}}}}async function C(e,n){let t=await e.loadSource(),{name:a}=e,r=e.getDescription(),i={label:a,detail:a,insertText:a,insertTextMode:l.asIs,insertTextFormat:d.PlainText,kind:n},s={name:a,description:r,type:"dictionary",properties:[],completion:i};if(!t)return s;let[o,c]=j(t.fields,r,!0);return s.properties=o,i.documentation={kind:"markdown",value:c},s}async function U(e,n){let{name:t,dictionaryVariables:a}=e,r=e.getDescription(),i=a.reduce((s,o)=>{s!==""&&(s+=`
|
|
5
|
-
|
|
6
|
-
`),s+=`**${o.name}**
|
|
7
|
-
${o.type}`;let c=o.getDescription();return c&&(s+=`
|
|
8
|
-
${c}`),s},r);return{name:t,description:r,type:"dictionary",properties:await $(a,f.Field),completion:{label:t,detail:t,insertText:t,insertTextMode:l.asIs,insertTextFormat:d.PlainText,kind:n,documentation:{kind:"markdown",value:i}}}}async function y(e="en"){let n=P.get(e);if(n)return n;if(!h.has(e))return await y("en");try{let t=await fetch(u(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));return t.ok?W(e,await t.json()):e==="en"?null:await y("en")}catch{return null}}var P=new Map;function W(e,n){let t=new Map;return n.forEach(a=>{t.set(a.id,a)}),P.set(e,t),t}async function R(e,n="en"){return(await y(n))?.get(e)??null}function q(e){return!!e&&typeof e=="object"&&"additionalVariables"in e&&Array.isArray(e.additionalVariables)}function K(e){return e?.map(w)}function w(e){switch(e.type){case"dictionary":return{...e,type:e.type,properties:K(e.properties)};case"array":return{...e,type:e.type,elementType:{type:"number",name:"number"}};default:return{...e,type:e.type}}}async function O(e,n="en"){if(!m(e))return;let t=await R(e.id,n);if(!t)return;let a={bundles:[...t.bundles],variables:[],hiddenApiItems:e.hiddenApiItems?.map(r=>r.toLowerCase())};return t.variables.forEach(r=>{if(e.disabledVariables?.includes(r.name))return;let i=e.definitions[r.name];switch(r.type){case"dictionary":return a.variables.push(w({...r,type:r.type,properties:Array.isArray(i)?[...i]:r.properties}));case"feature":case"voxel":return v(i)?a.variables.push({...r,type:"feature",definition:i}):void 0;case"featureSet":return T(i)?a.variables.push({...r,type:r.type,definition:i}):void 0;case"featureSetCollection":return M(i)?a.variables.push({...r,type:r.type,definition:i}):void 0;default:return a.variables.push(w(r))}}),q(e)&&a.variables.push(...e.additionalVariables??[]),a}var b=class extends F{constructor(){super("arcade",{apiPath:"./assets/arcade-language/api",apiPrefix:"arcade-api.t9n."})}async setProfileForModel(n,t,a={locale:"en"}){m(t)&&(t=await O(t,a.locale));let r=await g(a.locale,u("./assets/editor-profile/t9n"),"messages.");if(!r)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(n);let i=this._getApiKey(n),s=new A(t,r);this._modelToProfileMap.set(i,s);let o=await D(s);this.updateApiContextForModel(n,{locale:a.locale,profile:o,snippets:a.snippets})}},p=new b,Y={setProfileForModel:p.setProfileForModel.bind(p),getApiLibraryForModel:p.getApiLibraryForModel.bind(p)};_1=G;_2=z;_3=E;_4=p},"request",_0)
|
|
9
|
-
export{$$,_1 as a,_2 as b,_3 as c,_4 as d}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{a as D}from"./I7LKNAQK.js";import{$$ as _0,a as M}from"./TPQXUKQA.js";import{$$ as _1}from"./CDQHTB6C.js";import"./VMUIMKV6.js";import"./XXEDPYTB.js";import"./77W6CWRA.js";import"./LO4Y2B7S.js";import{e as y,f as p,g as F,i as S,j as x,k as R,m as g,n as u,o as V,p as E,q as v,r as $,s as L,w as P}from"./5W3AABSL.js";import"./XIEWNBFF.js";import"./KRHZZD3V.js";import"./ZUTUSAUL.js";var _2,$$=$arcgis.t(_=>{var q=(a,i,t)=>{let d=new Map;for(let e=i;e<=t;e++)d.set(a[e],e);return d},_=x(class extends R{constructor(a){if(super(a),a.type!==S.CHILD)throw Error("repeat() can only be used in text expressions")}dt(a,i,t){let d;t===void 0?t=i:i!==void 0&&(d=i);let e=[],n=[],o=0;for(let m of a)e[o]=d?d(m,o):o,n[o]=t(m,o),o++;return{values:n,keys:e}}render(a,i,t){return this.dt(a,i,t).values}update(a,[i,t,d]){let e=E(a),{values:n,keys:o}=this.dt(i,t,d);if(!Array.isArray(e))return this.ut=o,n;let m=this.ut??=[],h=[],b,I,s=0,c=e.length-1,l=0,r=n.length-1;for(;s<=c&&l<=r;)if(e[s]===null)s++;else if(e[c]===null)c--;else if(m[s]===o[l])h[l]=u(e[s],n[l]),s++,l++;else if(m[c]===o[r])h[r]=u(e[c],n[r]),c--,r--;else if(m[s]===o[r])h[r]=u(e[s],n[r]),g(a,h[r+1],e[s]),s++,r--;else if(m[c]===o[l])h[l]=u(e[c],n[l]),g(a,e[s],e[c]),c--,l++;else if(b===void 0&&(b=q(o,l,r),I=q(m,s,c)),b.has(m[s]))if(b.has(m[c])){let f=I.get(o[l]),w=f!==void 0?e[f]:null;if(w===null){let k=g(a,e[s]);u(k,n[l]),h[l]=k}else h[l]=u(w,n[l]),g(a,e[s],w),e[f]=null;l++}else v(e[c]),c--;else v(e[s]),s++;for(;l<=r;){let f=g(a,h[r+1]);u(f,n[l]),h[l++]=f}for(;s<=c;){let f=e[s++];f!==null&&v(f)}return this.ut=o,V(a,h),F}});var A=y`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,C=class extends L{constructor(){super(...arguments),this.messages=D(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=$({bubbles:!1}),this.arcgisFieldSelected=$({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=A}willUpdate(i){i.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(i){if(i.target instanceof HTMLElement)switch(i.target.tagName.toLowerCase()){case"calcite-list-item":{let t=i.target.value;this.arcgisFieldSelected.emit(t??"");break}case"calcite-action":i.stopPropagation();break}}_handleSelectDomain(i){let t=i.target.value;this.arcgisFieldSelected.emit(t?`'${t}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let i=M.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!i?p`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:p`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${_(i.fields,t=>t.name,t=>p`<calcite-list-item @click=${this._handleSelectField} .label=${t.name} .description=${t.alias??""} .value=${t.name}>${t.domain&&p`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let d=t.domain;d?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>p`<calcite-flow-item closable .heading=${this.messages.domainvalues??""} .description=${t.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${_(d.codedValues,e=>e.code,e=>p`<calcite-list-item @click=${this._handleSelectDomain} .label=${e.name} .description=${String(e.code)} .value=${String(e.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(t=>t())}</calcite-flow>`}};P("arcgis-sql-expression-fields",C);_2=C},_0,_1)
|
|
5
|
-
export{$$,_2 as SqlExpressionFields}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{a as h,b as g}from"./TKCOE4XB.js";import{a as p}from"./I7LKNAQK.js";import{$$ as _0,a}from"./TPQXUKQA.js";import{$$ as _1}from"./CDQHTB6C.js";import"./VMUIMKV6.js";import"./XXEDPYTB.js";import"./77W6CWRA.js";import"./LO4Y2B7S.js";import{b as r,e as n,f as e,r as c,s as d,w as l}from"./5W3AABSL.js";import{h as s}from"./XIEWNBFF.js";import"./KRHZZD3V.js";import"./ZUTUSAUL.js";var _2,$$=$arcgis.t(_=>{var f=n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}}}`,o=class extends d{constructor(){super(...arguments),this._codeEditorElt=h(),this.messages=p(),this._modelId=s(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.arcgisScriptChange=c({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5}}static{this.shadowRootOptions=r}static{this.styles=f}async load(){await this._updateEditorProfile().catch(console.error)}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await a.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=a.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let t=i.target;this._setActiveAction(t.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(console.error)}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(console.error)}async _updateApiLibrary(){this._apiLibrary=await a.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,t=a.getEditorProfileForModel(this._modelId);return t?.variables?.length&&t?.variables?.[0]?.type!=="featureSet"?console.error("encountered unexpected editor profile"):i=t?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return e`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor></div>${this._activeAction==="fields"&&!this.hideSideBar&&e`<arcgis-editor-variables .variable=${i} class="side-panel flex-panel border-inline-start" .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${()=>this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>`||""}${this._activeAction==="functions"&&!this.hideSideBar&&e`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions></arcgis-language-api-panel>`||""}${!this.hideSideBar&&e`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</div>`}};l("arcgis-sql-expression-editor",o);_2=o},_0,_1)
|
|
5
|
-
export{$$,_2 as ArcgisSqlExpressionEditor}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{$$ as _0,a as d}from"./TPQXUKQA.js";import{$$ as _1}from"./CDQHTB6C.js";import"./VMUIMKV6.js";import"./XXEDPYTB.js";import{c as u}from"./77W6CWRA.js";import"./LO4Y2B7S.js";import"./5W3AABSL.js";import{a as E,v as k}from"./XIEWNBFF.js";import{Gl as w,Sl as g,kk as R}from"./KRHZZD3V.js";import"./ZUTUSAUL.js";var _2,_3,_4,$$=$arcgis.t(_=>{R();var m=new E,h=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,m=new E),this._client=null}static async waitForWorker(){return await m.promise}async _getClientProxy(){let e=await u();if(!this._client){let{languageId:t}=this._defaults;this._worker=e.createWebWorker({moduleId:"SqlExprWorker",label:t,createData:{languageId:t},host:this._defaults.workerHost}),m.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let t=await this._getClientProxy();return await this._worker?.withSyncedResources(e),t}},L=["AND","AS","BOTH","CASE","CAST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DAY","ELSE","END","ESCAPE","FALSE","FLOAT","FOR","FROM","HOUR","IN","INT","INTEGER","INTERVAL","LEADING","LIKE","MINUTE","MONTH","POSITION","REAL","SECOND","SMALLINT","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRIM","TRUE","VARCHAR","WHEN","WITH","YEAR","ZONE"],b=["AND","BETWEEN","LIKE","NOT","OR","IS","NULL"],M=["CAST","EXTRACT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","ABS","ACOS","ASIN","ATAN","CEILING","COS","FLOOR","LOG","LOG10","MOD","NULLIF","POWER","ROUND","SIGN","SIN","TAN","TRUNCATE","CHAR_LENGTH","COALESCE","CONCAT","LOWER","POSITION","SUBSTRING","TRIM","UPPER"],O={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},D={defaultToken:"",tokenPostfix:".arcgis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:L,operators:b,builtinFunctions:M,builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}},_=class{constructor(e,t){this._worker=e,this._defaults=t}async provideCompletionItems(e,t){try{let o=await this._worker(e.uri),r=e.getWordUntilPosition(t),n={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:r.startColumn,endColumn:r.endColumn},c=this._defaults.getApiContextForModel(e.uri);return await o.doComplete(e.uri.toString(),n,t,c)}catch(o){return console.error(o),{suggestions:[]}}}},I=class{constructor(e,t,{defaults:o,diagnosticService:r}){this._languageId=e,this._worker=t,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=r,this._defaults=o,u().then(n=>{let c=i=>{let s=i.getLanguageId();if(s!==this._languageId)return;let l=k(()=>{this._doValidate(i,s).catch(A=>{throw A})}),f=i.onDidChangeContent(l),S=i.onDidChangeAttached(l);this._modelListeners.set(i.uri.toString(),[f,S]),this._doValidate(i,s).catch(console.error)},p=i=>{let s=i.uri.toString();n.setModelMarkers(i,this._languageId,[]);let l=this._modelListeners.get(s);if(l){for(;l.length;)l.pop()?.dispose();this._modelListeners.delete(s)}};this._disposables.push(n.onDidCreateModel(c)),this._disposables.push(n.onWillDisposeModel(i=>p(i))),this._disposables.push(n.onDidChangeModelLanguage(i=>{p(i.model),c(i.model)})),this._disposables.push(o.onDidChange(()=>{n.getModels().forEach(i=>{i.getLanguageId()===this._languageId&&(p(i),c(i))})})),this._disposables.push(o.onModelContextDidChange(i=>{n.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&s.uri.toString()===i&&this._doValidate(s,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(i=>i.forEach(s=>s.dispose())),this._modelListeners.clear()}}),n.getModels().forEach(c)})}async _doValidate(e,t){let o=await u();if(e.isAttachedToEditor())try{let r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),c=await r.doValidation(e.uri.toString(),n);this._diagnosticsService.fireDiagnosticsChange(e.uri,c),o.setModelMarkers(e,t,c)}catch(r){console.error(r)}}},C;async function v(...a){return await h.waitForWorker(),await new Promise((e,t)=>{if(!C){t(new Error("sql expression worker not registered!"));return}e(C(...a))})}var T=class{constructor(){this._onDiagnosticsChange=new w}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}},N=new T;function q(){return N}function G(a){let e=new h(a),t=async(...r)=>await e.getLanguageServiceWorker(...r);C=t,g.setMonarchTokensProvider(d.languageId,D),g.setLanguageConfiguration(d.languageId,O);let o=new _(t,d);g.registerCompletionItemProvider(d.languageId,o),new I(a.languageId,t,{defaults:a,diagnosticService:N})}_2=q;_3=v;_4=G},_0,_1)
|
|
5
|
-
export{$$,_2 as getSqlExprDiagnosticService,_3 as getSqlExprWorker,_4 as setupMode}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{$$ as _0,b as u,c as f,d as v,e as k,f as S,g as T}from"./CCY4FT6N.js";import{a as M}from"./I7LKNAQK.js";import{c as P}from"./XXEDPYTB.js";import{e as y,f as e,r as $,s as x,t as p,u as d,w}from"./5W3AABSL.js";import{n as m,p as n}from"./XIEWNBFF.js";import"./ZUTUSAUL.js";var _1,$$=$arcgis.t(_=>{var L=y`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[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)}.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)}.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;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,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);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,a={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:l=>l.currentTarget.selectedItems.forEach(t=>t.selected=!1)},r={onClick:l=>{let t=l.currentTarget;t.expanded=!t.expanded}};function o(l){return e`<span class="dictionary-property">${l}</span><span>: </span>`}function C(l,t=!1){return e`<calcite-tree slot=${(t?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(l.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`}function R(l,t=!1){return e`<calcite-tree slot=${(t?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${o("type")}${l.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${o("value")}<span class="string-value">${JSON.stringify(l,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`}function h(l){switch(l.type){case"unknown":case"null":return e`<span class="constant-value">${l.type}</span>`;case"text":return e`<span class="string-value">${m(l.value)}</span>`;case"number":return e`<span class="number-value">${l.value.toString()}</span>`;case"boolean":return e`<span class="constant-value">${l.value.toString()}</span>`;case"date":return e`<span class="date-value">${k(l)}</span>`;case"dateOnly":return e`<span class="string-value">${m(S(l))}</span>`;case"time":return e`<span class="string-value">${m(T(l))}</span>`;default:return null}}function A(l){let t=P(l.value.fields);return e`<table><thead><tr>${t.map(i=>e`<th>${i.name}</th>`)}</tr></thead><tbody>${l.features.map(i=>e`<tr>${t.map(c=>{try{let s=v(i.field(c.name));return e`<td>${h(s)}</td>`}catch{return e`<td></td>`}})}</tr>`)}</tbody></table>`}var b=class extends x{constructor(){super(...arguments),this.messages=M(),this.openedResultPanel="output",this.arcgisClose=$({bubbles:!1}),this.arcgisOpenedResultPanelChange=$({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=L}updateResultPanel(t){this.openedResultPanel=t,this.arcgisOpenedResultPanelChange.emit(t)}_switchResultPanel(t){if(!t.target)return;let i=t.target?.dataset.panelName;i&&this.updateResultPanel(i)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:e`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(t=>e`<p>${t}</p>`):e`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let t=this.result?.type==="error"?"color-error":"color-success";return e`<calcite-list label=results>${this.result?e`<calcite-list-item .label=${n(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${p(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${n(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${p(t)}></calcite-icon></calcite-list-item><calcite-list-item .label=${n(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${p(t)}></calcite-icon></calcite-list-item>`:e`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return e`<div class="result-value-simple flex-adjustable">${n(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return e`<div class="result-value-simple ltr-container">${h(this.result)}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return e`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span>${h(this.result)}</div>`;case"array":{let t=(this.result.value??[]).slice(0,u);return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.renderArrayHeader(this.result)}</div>${this.renderArrayTree(t,!0)}</calcite-tree-item></calcite-tree></div>`}case"geometry":return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${R(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"attachment":return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${C(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return e`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${this.renderDictionaryTree(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return e`<div class="result-value-table ltr-container">${this.renderFeatureSetLabel(this.result)}${A(this.result)}</div>`;case"knowledgeGraph":return e`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span><span class="string-value">${this.result.value.url}</span></div>`;default:return e`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}renderArrayHeader(t){let i=t.value??[],c=Math.max(i.length-u,0);return e`<span>${`${t.type}(${i.length??0})`}</span>${c>0?e`<span> ${n(this.messages.showingfirstitemsformat,{count:u.toString()})}</span>`:null}`}renderArrayTree(t,i=!1){return e`<calcite-tree slot=${(i?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${t.map((c,s)=>{let g=v(c);return this.renderTreeItem(g,s,!i)})}</calcite-tree>`}renderDictionaryTree(t,i=!1){let c=t.geometry?.();return e`<calcite-tree slot=${(i?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${t.keys().map(s=>{let g=v(t.field(s));return this.renderTreeItem(g,s)})}${c?this.renderTreeItem({type:"geometry",value:c},"geometry"):null}</calcite-tree>`}renderTreeItem(t,i,c=!1){switch(t.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return e`<calcite-tree-item><div class="tree-item-label">${o(i)}${h(t)}</div></calcite-tree-item>`;case"array":{let s=(t.value??[]).slice(0,u);return e`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}${this.renderArrayHeader(t)}</div>${this.renderArrayTree(s,!0)}</calcite-tree-item>`}case"geometry":return e`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}<span>${t.type}</span></div>${R(t.value,!0)}</calcite-tree-item>`;case"attachment":return e`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}<span>${t.type}</span></div>${C(t.value,!0)}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return e`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}<span>${t.type}</span></div>${this.renderDictionaryTree(t.value,!0)}</calcite-tree-item>`;default:return null}}renderFeatureSetLabel(t){return e`<div class="value-type"><span>${t.type}:</span>${t.features.length>=f?e`<span> ${n(this.messages.showingfirstitemsformat,{count:f.toString()})}</span>`:null}</div>`}render(){return e`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?e`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:e`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};w("arcgis-arcade-results",b);_1=b},_0)
|
|
5
|
-
export{$$,_1 as ArcgisArcadeResults}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{h as c,i as A,j as d,k as _,l as v}from"./5W3AABSL.js";var o=(t,s)=>{let e=t._$AN;if(e===void 0)return!1;for(let i of e)i._$AO?.(s,!1),o(i,s);return!0},n=t=>{let s,e;do{if((s=t._$AM)===void 0)break;e=s._$AN,e.delete(t),t=s}while(e?.size===0)},$=t=>{for(let s;s=t._$AM;t=s){let e=s._$AN;if(e===void 0)s._$AN=e=new Set;else if(e.has(t))break;e.add(t),m(s)}};function p(t){this._$AN!==void 0?(n(this),this._$AM=t,$(this)):this._$AM=t}function u(t,s=!1,e=0){let i=this._$AH,f=this._$AN;if(f!==void 0&&f.size!==0)if(s)if(Array.isArray(i))for(let h=e;h<i.length;h++)o(i[h],!1),n(i[h]);else i!=null&&(o(i,!1),n(i));else o(this,t)}var m=t=>{t.type==A.CHILD&&(t._$AP??=u,t._$AQ??=p)},r=class extends _{constructor(){super(...arguments),this._$AN=void 0}_$AT(s,e,i){super._$AT(s,e,i),$(this),this.isConnected=s._$AU}_$AO(s,e=!0){s!==this.isConnected&&(this.isConnected=s,s?this.reconnected?.():this.disconnected?.()),e&&(o(this,s),n(this))}setValue(s){if(v(this.t))this.t._$AI(s,this);else{let e=[...this.t._$AH];e[this.i]=s,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}};var M=()=>new l,l=class{},a=new WeakMap,T=d(class extends r{render(t){return c}update(t,[s]){let e=s!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=s,this.ht=t.options?.host,this.rt(this.ct=t.element)),c}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){let s=this.ht??globalThis,e=a.get(s);e===void 0&&(e=new WeakMap,a.set(s,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return typeof this.Y=="function"?a.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{M as a,T as b};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{$$ as _0,b,d,e as g,f as F,g as M}from"./CDQHTB6C.js";import{c as m,d as y,e as h}from"./VMUIMKV6.js";import{x as f}from"./5W3AABSL.js";import{j as u}from"./XIEWNBFF.js";var _1,$$=$arcgis.t(_=>{var A=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?w(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:s}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:s?.map(r=>r.toLowerCase())}};function w(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},s={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return s;let[r,l]=g(t.fields,i);return s.properties=r,a.documentation={kind:"markdown",value:l},s}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await u(t.locale,f("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let s=this._getApiKey(e),r=new F(i,a);this._modelToProfileMap.set(s,r);let l=A(r);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};_1=n},_0)
|
|
5
|
-
export{$$,_1 as a}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{$$ as _0,a as f,h as c}from"./CCY4FT6N.js";import{a as E,b as S}from"./TKCOE4XB.js";import{a as w}from"./I7LKNAQK.js";import{$$ as _1,a as v,b as P,d as s}from"./CRM5DQLU.js";import{$$ as _2}from"./CDQHTB6C.js";import"./VMUIMKV6.js";import"./XXEDPYTB.js";import"./77W6CWRA.js";import"./LO4Y2B7S.js";import{b as g,e as u,f as t,h as n,r,s as _,w as m,x}from"./5W3AABSL.js";import{a as h,h as p}from"./XIEWNBFF.js";import{Hl as b,kk as D}from"./KRHZZD3V.js";import"./ZUTUSAUL.js";var _3,$$=$arcgis.t(_=>{D();var C=d=>{if(!d.toString().includes("calcite-flow-item"))throw new Error("Renderer must return a JSX node that starts with <calcite-flow-item>");return!0},R=u`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}}`,l=class extends _{constructor(){super(...arguments),this._codeEditorElt=E(),this._componentReadyDefer=new h,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=w(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(f,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0}}static{this.shadowRootOptions=g}static{this.styles=R}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await c(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=x("./assets");v(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await P();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await c(i.definition,a,e,o=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,o],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[b.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${S(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:a,active:o,panelName:$,iconFlipRtl:A=!1,onClick:y=this._toggleSidePanel}){return t`<calcite-action id=${e??n} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${o} @click=${y} data-panel-name=${$??n} .iconFlipRtl=${A}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.customPanels?.map(e=>this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;switch(this.openedSidePanel){case"api":return t`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-language-api-panel>`;case"variables":return t`<arcgis-editor-variables class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile}></arcgis-editor-variables>`;case"suggestions":return t`<arcgis-arcade-suggestions class="side-panel flex-panel border-inline-start" .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`;case"none":return null}let e=this.customPanels?.find(i=>i.id===this.openedSidePanel);if(e){let i=!!e?.useFlows;return t`<calcite-flow class="side-panel flex-panel border-inline-start">${i&&C(e.renderer)?e.renderer({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this)}):t`<calcite-flow-item .heading=${e.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${e.description}>${e.renderer({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this)})}</calcite-flow-item>`}</calcite-flow>`}return null}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};m("arcgis-arcade-editor",l);_3=l},_0,_1,_2)
|
|
5
|
-
export{$$,_3 as ArcgisArcadeEditor}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
function a(e){switch(e.type){case"oid":return"key";case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"global-id":case"guid":return"key";case"string":return"string";case"date":return"date-time";case"date-only":return"calendar";case"time-only":return"clock";case"timestamp-offset":return"time-zone";default:return"cube"}}function s(e){switch(e.type){case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"oid":return"number";case"global-id":case"guid":case"string":return"text";case"date":return"date";case"date-only":return"dateOnly";case"time-only":return"time";default:return"text"}}function n(e){return(e??[]).filter(t=>{switch(t.type){case"string":case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"date":case"date-only":case"time-only":case"timestamp-offset":case"oid":case"guid":case"global-id":return!0;default:return!1}})}function r(e){return e.alias||e.name}export{a,s as b,n as c,r as d};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.33 */
|
|
4
|
-
import{a,b}from"./KZ24IRIU.js";import"./KRHZZD3V.js";import"./ZUTUSAUL.js";export{a as conf,b as language};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|