@arcgis/coding-components 4.30.0-next.1 → 4.30.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.en.json +2 -0
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-68bd0d31.js → p-2db6d470.js} +1 -1
- package/dist/arcgis-coding-components/{p-4aab897b.js → p-2dcffe0e.js} +3 -3
- package/dist/arcgis-coding-components/{p-c5c082c2.js → p-4d5f58aa.js} +3 -3
- package/dist/arcgis-coding-components/p-5d7c80cf.entry.js +6 -0
- package/dist/arcgis-coding-components/{p-bad6d07f.js → p-63894999.js} +10 -10
- package/dist/arcgis-coding-components/{p-5050b8e6.js → p-655e7a9e.js} +2 -2
- package/dist/arcgis-coding-components/{p-9556a8c6.js → p-87f8241f.js} +2 -2
- package/dist/arcgis-coding-components/{p-2c66cecd.js → p-8ee18d5c.js} +2 -2
- package/dist/arcgis-coding-components/{p-0ecfaaf8.js → p-b12b2a1b.js} +2 -2
- package/dist/arcgis-coding-components/{p-01d806ab.js → p-b4339ec6.js} +2 -2
- package/dist/arcgis-coding-components/{p-3162633c.js → p-cb0f0e5f.js} +1 -1
- package/dist/arcgis-coding-components/{p-26cb350b.js → p-f39c5bc0.js} +2 -2
- package/dist/cjs/{arcade-defaults-337189cc.js → arcade-defaults-38ad9b42.js} +42 -17
- package/dist/cjs/{arcade-mode-3b9ec201.js → arcade-mode-9581409d.js} +5 -5
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +77 -87
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/{css-9d93d685.js → css-2fde7503.js} +1 -1
- package/dist/cjs/{cssMode-cf97e01f.js → cssMode-9815a287.js} +3 -3
- package/dist/cjs/{html-9bbb2b9f.js → html-6caa7fc2.js} +3 -3
- package/dist/cjs/{htmlMode-29fbfd01.js → htmlMode-8d4e7d24.js} +3 -3
- package/dist/cjs/{index-b66d3898.js → index-c33ea685.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-ea7308ab.js → javascript-15b22f67.js} +4 -4
- package/dist/cjs/{jsonMode-25c548e6.js → jsonMode-f21a8faa.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tsMode-c54b0496.js → tsMode-a4452f18.js} +3 -3
- package/dist/cjs/{typescript-89d35abd.js → typescript-77d49ecd.js} +3 -3
- package/dist/components/arcade-api.js +2 -2
- package/dist/components/arcade-contribution.js +65 -6
- package/dist/components/arcade-defaults.js +34 -9
- package/dist/components/arcade-mode.js +3 -3
- package/dist/components/arcade-results.js +2 -2
- package/dist/components/arcade-suggestions.js +2 -2
- package/dist/components/arcade-variables.js +2 -2
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +9 -78
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +35 -0
- package/dist/components/arcgis-assets.js +3 -3
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/code-editor.js +8 -8
- package/dist/components/fields.js +1 -1
- package/dist/components/index.d.ts +3 -18
- package/dist/components/index.js +2 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{arcade-defaults-80ab7068.js → arcade-defaults-978d373f.js} +42 -17
- package/dist/esm/{arcade-mode-145e7a14.js → arcade-mode-8a50067b.js} +5 -5
- package/dist/esm/arcgis-arcade-api_6.entry.js +77 -87
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/{css-d2e6a792.js → css-adc1375f.js} +1 -1
- package/dist/esm/{cssMode-6d9545da.js → cssMode-a292eee6.js} +3 -3
- package/dist/esm/{html-0af5dfb9.js → html-24d2d562.js} +3 -3
- package/dist/esm/{htmlMode-7006edc4.js → htmlMode-f9eed34e.js} +3 -3
- package/dist/esm/{index-a2b632a0.js → index-7dec16fc.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-89b3eeb2.js → javascript-40f3fb5c.js} +4 -4
- package/dist/esm/{jsonMode-a3501a18.js → jsonMode-70770104.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{tsMode-29dad6cb.js → tsMode-f797a97b.js} +3 -3
- package/dist/esm/{typescript-6f3a39e0.js → typescript-83c789e7.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +3 -3
- package/dist/types/components/code-editor/code-editor.d.ts +3 -3
- package/dist/types/utils/profile/editor-profile.d.ts +1 -1
- package/dist/types/utils/profile/types.d.ts +1 -1
- package/dist/types/utils/profile/utils.d.ts +4 -1
- package/package.json +10 -10
- package/dist/arcgis-coding-components/p-0f15d754.entry.js +0 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import{conf as e,language as t}from"./p-
|
|
6
|
+
import{conf as e,language as t}from"./p-b12b2a1b.js";import"./p-63894999.js";import"./p-2db6d470.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import{t}from"./p-
|
|
6
|
+
import{t}from"./p-63894999.js";import"./p-2db6d470.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import{u as t,t as e}from"./p-
|
|
6
|
+
import{u as t,t as e}from"./p-63894999.js";import"./p-2db6d470.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import{t as e}from"./p-
|
|
6
|
+
import{t as e}from"./p-63894999.js";import"./p-2db6d470.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import{t}from"./p-
|
|
6
|
+
import{t}from"./p-63894999.js";import"./p-2db6d470.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import{v as e,e as t,M as s,R as n,l as r,w as i,E as o}from"./p-bad6d07f.js";import"./p-68bd0d31.js";var a=[[],[],[]];["++","--"].forEach((e=>a[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>a[e.length-1]?.push(e))),["||","&&"].forEach((e=>a[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>a[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>a[e.length-1]?.push(e)));var c=Object.values({Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.CompletionItemKind.Constant}))),c.map((t=>({label:t,kind:e.CompletionItemKind.Keyword})));const u={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},l={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:c.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class g{constructor(e,s,{defaults:n,diagnosticsService:r}){this._languageId=e,this._worker=s,this._disposables=[],this._listener=new Map,this._diagnosticsService=r,this._defaults=n;const o=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(s)),this._doValidate(e,t).catch(console.error)},a=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const n=this._listener.get(s);n&&(n.dispose(),this._listener.delete(s))};this._disposables.push(t.onDidCreateModel(o)),this._disposables.push(t.onWillDisposeModel((e=>{a(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{a(e.model),o(e.model)}))),this._disposables.push(n.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(a(e),o(e))}))}))),this._disposables.push(n.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),t.getModels().forEach(o)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const n=await this._worker(e.uri),r=this._defaults.getApiContextForModel(e.uri),i=await n.doValidation(e.uri.toString(),r),o=i.map((e=>{return{severity:p((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,o)}catch(e){console.error(e)}}}function p(t){switch(t){case e.DiagnosticSeverity.Error:return s.Error;case e.DiagnosticSeverity.Warning:return s.Warning;case e.DiagnosticSeverity.Information:return s.Info;case e.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function d(e){return new n(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function h(e){return{range:d(e.range),text:e.newText}}function m(t){const s=r.CompletionItemKind;switch(t){case e.CompletionItemKind.Text:return s.Text;case e.CompletionItemKind.Method:return s.Method;case e.CompletionItemKind.Function:return s.Function;case e.CompletionItemKind.Constructor:return s.Constructor;case e.CompletionItemKind.Field:return s.Field;case e.CompletionItemKind.Variable:return s.Variable;case e.CompletionItemKind.Class:return s.Class;case e.CompletionItemKind.Interface:return s.Interface;case e.CompletionItemKind.Module:return s.Module;case e.CompletionItemKind.Property:return s.Property;case e.CompletionItemKind.Unit:return s.Unit;case e.CompletionItemKind.Value:return s.Value;case e.CompletionItemKind.Enum:return s.Enum;case e.CompletionItemKind.Keyword:return s.Keyword;case e.CompletionItemKind.Snippet:return s.Snippet;case e.CompletionItemKind.Color:return s.Color;case e.CompletionItemKind.File:return s.File;case e.CompletionItemKind.Reference:return s.Reference;case e.CompletionItemKind.Folder:return s.Folder;case e.CompletionItemKind.EnumMember:return s.EnumMember;case e.CompletionItemKind.Constant:return s.Constant;case e.CompletionItemKind.Struct:return s.Struct;case e.CompletionItemKind.Event:return s.Event;case e.CompletionItemKind.Operator:return s.Operator;case e.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class x{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),o=this._defaults.getApiContextForModel(t.uri),a=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),o),c=t.getWordUntilPosition(s),u=new n(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=a.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:m(t.kind)};var n;return t.textEdit&&(s.range=void 0!==(n=t.textEdit).insert&&void 0!==n.replace?{insert:d(t.textEdit.insert),replace:d(t.textEdit.replace)}:d(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(h)),t.insertTextFormat===e.InsertTextFormat.Snippet&&(s.insertTextRules=r.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:a.isIncomplete,suggestions:l}}}class f{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:d(e.range),text:e.newText})))}}class b{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),this._client=null}async _getClientProxy(){if(!this._client){const{languageId:e,languageOptions:s}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e,languageOptions:s}}),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let k;async function w(...e){return await new Promise(((t,s)=>{k?t(k(...e)):s(new Error("TypeScript not registered!"))}))}const y=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function v(){return y}function C(e){const t=new b(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);k=s,r.setMonarchTokensProvider(e.languageId,l),r.setLanguageConfiguration(e.languageId,u),r.registerCompletionItemProvider(e.languageId,new x(s,e)),r.registerDocumentFormattingEditProvider(e.languageId,new f(s,e)),new g(e.languageId,s,{defaults:e,diagnosticsService:y})}export{v as getArcadeDiagnosticService,w as getArcadeWorker,C as setupMode}
|
|
6
|
+
import{v as e,e as t,M as s,R as n,l as r,w as i,E as o}from"./p-63894999.js";import"./p-2db6d470.js";var a=[[],[],[]];["++","--"].forEach((e=>a[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>a[e.length-1]?.push(e))),["||","&&"].forEach((e=>a[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>a[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>a[e.length-1]?.push(e)));var c=Object.values({Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.CompletionItemKind.Constant}))),c.map((t=>({label:t,kind:e.CompletionItemKind.Keyword})));const u={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},l={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:c.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class g{constructor(e,s,{defaults:n,diagnosticsService:r}){this._languageId=e,this._worker=s,this._disposables=[],this._listener=new Map,this._diagnosticsService=r,this._defaults=n;const o=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(s)),this._doValidate(e,t).catch(console.error)},a=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const n=this._listener.get(s);n&&(n.dispose(),this._listener.delete(s))};this._disposables.push(t.onDidCreateModel(o)),this._disposables.push(t.onWillDisposeModel((e=>{a(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{a(e.model),o(e.model)}))),this._disposables.push(n.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(a(e),o(e))}))}))),this._disposables.push(n.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),t.getModels().forEach(o)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const n=await this._worker(e.uri),r=this._defaults.getApiContextForModel(e.uri),i=await n.doValidation(e.uri.toString(),r),o=i.map((e=>{return{severity:p((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,o)}catch(e){console.error(e)}}}function p(t){switch(t){case e.DiagnosticSeverity.Error:return s.Error;case e.DiagnosticSeverity.Warning:return s.Warning;case e.DiagnosticSeverity.Information:return s.Info;case e.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function d(e){return new n(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function h(e){return{range:d(e.range),text:e.newText}}function m(t){const s=r.CompletionItemKind;switch(t){case e.CompletionItemKind.Text:return s.Text;case e.CompletionItemKind.Method:return s.Method;case e.CompletionItemKind.Function:return s.Function;case e.CompletionItemKind.Constructor:return s.Constructor;case e.CompletionItemKind.Field:return s.Field;case e.CompletionItemKind.Variable:return s.Variable;case e.CompletionItemKind.Class:return s.Class;case e.CompletionItemKind.Interface:return s.Interface;case e.CompletionItemKind.Module:return s.Module;case e.CompletionItemKind.Property:return s.Property;case e.CompletionItemKind.Unit:return s.Unit;case e.CompletionItemKind.Value:return s.Value;case e.CompletionItemKind.Enum:return s.Enum;case e.CompletionItemKind.Keyword:return s.Keyword;case e.CompletionItemKind.Snippet:return s.Snippet;case e.CompletionItemKind.Color:return s.Color;case e.CompletionItemKind.File:return s.File;case e.CompletionItemKind.Reference:return s.Reference;case e.CompletionItemKind.Folder:return s.Folder;case e.CompletionItemKind.EnumMember:return s.EnumMember;case e.CompletionItemKind.Constant:return s.Constant;case e.CompletionItemKind.Struct:return s.Struct;case e.CompletionItemKind.Event:return s.Event;case e.CompletionItemKind.Operator:return s.Operator;case e.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class x{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),o=this._defaults.getApiContextForModel(t.uri),a=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),o),c=t.getWordUntilPosition(s),u=new n(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=a.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:m(t.kind)};var n;return t.textEdit&&(s.range=void 0!==(n=t.textEdit).insert&&void 0!==n.replace?{insert:d(t.textEdit.insert),replace:d(t.textEdit.replace)}:d(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(h)),t.insertTextFormat===e.InsertTextFormat.Snippet&&(s.insertTextRules=r.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:a.isIncomplete,suggestions:l}}}class f{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:d(e.range),text:e.newText})))}}class k{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),this._client=null}async _getClientProxy(){if(!this._client){const{languageId:e,languageOptions:s}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e,languageOptions:s}}),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let b;async function w(...e){return await new Promise(((t,s)=>{b?t(b(...e)):s(new Error("TypeScript not registered!"))}))}const y=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function v(){return y}function C(e){const t=new k(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);b=s,r.setMonarchTokensProvider(e.languageId,l),r.setLanguageConfiguration(e.languageId,u),r.registerCompletionItemProvider(e.languageId,new x(s,e)),r.registerDocumentFormattingEditProvider(e.languageId,new f(s,e)),new g(e.languageId,s,{defaults:e,diagnosticsService:y})}export{v as getArcadeDiagnosticService,w as getArcadeWorker,C as setupMode}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-c33ea685.js');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
11
11
|
if (e && e.__esModule) return e;
|
|
@@ -120544,7 +120544,7 @@ registerLanguage({
|
|
|
120544
120544
|
mimetypes: ["text/css"],
|
|
120545
120545
|
loader: () => {
|
|
120546
120546
|
{
|
|
120547
|
-
return Promise.resolve().then(function () { return require('./css-
|
|
120547
|
+
return Promise.resolve().then(function () { return require('./css-2fde7503.js'); });
|
|
120548
120548
|
}
|
|
120549
120549
|
}
|
|
120550
120550
|
});
|
|
@@ -120562,7 +120562,7 @@ registerLanguage({
|
|
|
120562
120562
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
120563
120563
|
loader: () => {
|
|
120564
120564
|
{
|
|
120565
|
-
return Promise.resolve().then(function () { return require('./html-
|
|
120565
|
+
return Promise.resolve().then(function () { return require('./html-6caa7fc2.js'); });
|
|
120566
120566
|
}
|
|
120567
120567
|
}
|
|
120568
120568
|
});
|
|
@@ -120582,7 +120582,7 @@ registerLanguage({
|
|
|
120582
120582
|
mimetypes: ["text/javascript"],
|
|
120583
120583
|
loader: () => {
|
|
120584
120584
|
{
|
|
120585
|
-
return Promise.resolve().then(function () { return require('./javascript-
|
|
120585
|
+
return Promise.resolve().then(function () { return require('./javascript-15b22f67.js'); });
|
|
120586
120586
|
}
|
|
120587
120587
|
}
|
|
120588
120588
|
});
|
|
@@ -120600,7 +120600,7 @@ registerLanguage({
|
|
|
120600
120600
|
mimetypes: ["text/typescript"],
|
|
120601
120601
|
loader: () => {
|
|
120602
120602
|
{
|
|
120603
|
-
return Promise.resolve().then(function () { return require('./typescript-
|
|
120603
|
+
return Promise.resolve().then(function () { return require('./typescript-77d49ecd.js'); });
|
|
120604
120604
|
}
|
|
120605
120605
|
}
|
|
120606
120606
|
});
|
|
@@ -120721,7 +120721,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
120721
120721
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
120722
120722
|
function getMode$3() {
|
|
120723
120723
|
{
|
|
120724
|
-
return Promise.resolve().then(function () { return require('./cssMode-
|
|
120724
|
+
return Promise.resolve().then(function () { return require('./cssMode-9815a287.js'); });
|
|
120725
120725
|
}
|
|
120726
120726
|
}
|
|
120727
120727
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -120846,7 +120846,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
120846
120846
|
};
|
|
120847
120847
|
function getMode$2() {
|
|
120848
120848
|
{
|
|
120849
|
-
return Promise.resolve().then(function () { return require('./htmlMode-
|
|
120849
|
+
return Promise.resolve().then(function () { return require('./htmlMode-8d4e7d24.js'); });
|
|
120850
120850
|
}
|
|
120851
120851
|
}
|
|
120852
120852
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -120948,7 +120948,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
120948
120948
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
120949
120949
|
function getMode$1() {
|
|
120950
120950
|
{
|
|
120951
|
-
return Promise.resolve().then(function () { return require('./jsonMode-
|
|
120951
|
+
return Promise.resolve().then(function () { return require('./jsonMode-f21a8faa.js'); });
|
|
120952
120952
|
}
|
|
120953
120953
|
}
|
|
120954
120954
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -121217,7 +121217,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
121217
121217
|
};
|
|
121218
121218
|
function getMode() {
|
|
121219
121219
|
{
|
|
121220
|
-
return Promise.resolve().then(function () { return require('./tsMode-
|
|
121220
|
+
return Promise.resolve().then(function () { return require('./tsMode-a4452f18.js'); });
|
|
121221
121221
|
}
|
|
121222
121222
|
}
|
|
121223
121223
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -169062,7 +169062,18 @@ function isMapInstance(item) {
|
|
|
169062
169062
|
typeof item === "object" &&
|
|
169063
169063
|
"declaredClass" in item &&
|
|
169064
169064
|
typeof item.declaredClass === "string" &&
|
|
169065
|
-
(item.declaredClass === "esri.
|
|
169065
|
+
(item.declaredClass === "esri.Map" ||
|
|
169066
|
+
item.declaredClass === "esri.WebMap" ||
|
|
169067
|
+
item.declaredClass === "esri.WebScene"));
|
|
169068
|
+
}
|
|
169069
|
+
function isWebMapInstance(item) {
|
|
169070
|
+
return item.declaredClass === "esri.WebMap";
|
|
169071
|
+
}
|
|
169072
|
+
function isWebSceneInstance(item) {
|
|
169073
|
+
return item.declaredClass === "esri.WebScene";
|
|
169074
|
+
}
|
|
169075
|
+
function isLoadableMapInstance(item) {
|
|
169076
|
+
return item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene";
|
|
169066
169077
|
}
|
|
169067
169078
|
function isPortalItemDefinition(item) {
|
|
169068
169079
|
return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
|
|
@@ -169363,6 +169374,12 @@ function assembleMemberExpression(obj, prop) {
|
|
|
169363
169374
|
}
|
|
169364
169375
|
return `${obj}${getMemberExpressionProperty(prop)}`;
|
|
169365
169376
|
}
|
|
169377
|
+
function getMapPortalItem(map) {
|
|
169378
|
+
if (isWebMapInstance(map) || isWebSceneInstance(map)) {
|
|
169379
|
+
return map.portalItem;
|
|
169380
|
+
}
|
|
169381
|
+
return null;
|
|
169382
|
+
}
|
|
169366
169383
|
//#endregion
|
|
169367
169384
|
//#region Editor Profile to Language Service Profile functions
|
|
169368
169385
|
async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
|
|
@@ -170198,7 +170215,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170198
170215
|
return null;
|
|
170199
170216
|
}
|
|
170200
170217
|
if (typeof this._featureSetCollections.source !== "string") {
|
|
170201
|
-
return portalItemPageUrl(this._featureSetCollections.source
|
|
170218
|
+
return portalItemPageUrl(getMapPortalItem(this._featureSetCollections.source));
|
|
170202
170219
|
}
|
|
170203
170220
|
// const firstLayer = this._featureSetCollection.layers[0] ?? this._featureSetCollection.tables[0];
|
|
170204
170221
|
// if (!firstLayer) {
|
|
@@ -170210,10 +170227,16 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170210
170227
|
if (!this.loaded || !this._featureSetCollections) {
|
|
170211
170228
|
return "";
|
|
170212
170229
|
}
|
|
170213
|
-
if (typeof this._featureSetCollections.source
|
|
170230
|
+
if (typeof this._featureSetCollections.source === "string") {
|
|
170231
|
+
return this._profile?.intlStrings.featureservice ?? "featureservice";
|
|
170232
|
+
}
|
|
170233
|
+
if (isWebSceneInstance(this._featureSetCollections.source)) {
|
|
170234
|
+
return this._profile?.intlStrings.webscene ?? "webscene";
|
|
170235
|
+
}
|
|
170236
|
+
if (isWebMapInstance(this._featureSetCollections.source)) {
|
|
170214
170237
|
return this._profile?.intlStrings.webmap ?? "webmap";
|
|
170215
170238
|
}
|
|
170216
|
-
return this._profile?.intlStrings.
|
|
170239
|
+
return this._profile?.intlStrings.map ?? "map";
|
|
170217
170240
|
}
|
|
170218
170241
|
async loadSource() {
|
|
170219
170242
|
if (ee(this._loadPromise) && te(this._loadPromise)) {
|
|
@@ -170237,7 +170260,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170237
170260
|
: {
|
|
170238
170261
|
code: "webmapformat",
|
|
170239
170262
|
formatValues: {
|
|
170240
|
-
webMapTitle: this._featureSetCollections.source
|
|
170263
|
+
webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map"
|
|
170241
170264
|
}
|
|
170242
170265
|
};
|
|
170243
170266
|
const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
|
|
@@ -170284,8 +170307,10 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
170284
170307
|
return null;
|
|
170285
170308
|
}
|
|
170286
170309
|
async _featureSetCollectionFromMap(map) {
|
|
170287
|
-
|
|
170288
|
-
|
|
170310
|
+
if (isLoadableMapInstance(map)) {
|
|
170311
|
+
// Make sure the map is loaded
|
|
170312
|
+
await map.loadAll();
|
|
170313
|
+
}
|
|
170289
170314
|
// Until jsapi fix a bug we have to load the table separately
|
|
170290
170315
|
await Promise.all(map.tables.map(async (t) => (await t.load())));
|
|
170291
170316
|
return {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
9
|
-
require('./index-
|
|
8
|
+
const arcadeDefaults = require('./arcade-defaults-38ad9b42.js');
|
|
9
|
+
require('./index-c33ea685.js');
|
|
10
10
|
|
|
11
11
|
var j={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Fe=["++","--"],Qe=["-","+","!","~"],Ze=["=","/=","*=","%=","+=","-="],Xe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Fe.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Xe.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ht=Object.values(f),dt=Object.values(j);dt.map(t=>({label:t,kind:arcadeDefaults.main.CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:arcadeDefaults.main.CompletionItemKind.Keyword}));
|
|
12
12
|
|
|
@@ -141,8 +141,8 @@ const arcadeMonarchLanguage = {
|
|
|
141
141
|
// delimiter: after number because of .\d floats
|
|
142
142
|
[/[;,.]/u, "delimiter"],
|
|
143
143
|
// strings
|
|
144
|
-
[/"([^"\\]|\\.)*$/u, "string.invalid"],
|
|
145
|
-
[/'([^'\\]|\\.)*$/u, "string.invalid"],
|
|
144
|
+
[/"([^"\\]|\\.)*$/u, "string.invalid"],
|
|
145
|
+
[/'([^'\\]|\\.)*$/u, "string.invalid"],
|
|
146
146
|
[/"/u, "string", "@string_double"],
|
|
147
147
|
[/'/u, "string", "@string_single"],
|
|
148
148
|
[/`/u, "string", "@string_backtick"]
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
11
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
10
|
+
const index = require('./index-c33ea685.js');
|
|
11
|
+
const arcadeDefaults = require('./arcade-defaults-38ad9b42.js');
|
|
12
12
|
|
|
13
13
|
async function colorizeCode(code) {
|
|
14
14
|
return await arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
|
|
@@ -2996,6 +2996,66 @@ function setupMonacoEnvironment(assetsPath) {
|
|
|
2996
2996
|
};
|
|
2997
2997
|
}
|
|
2998
2998
|
|
|
2999
|
+
const themeConfig = {
|
|
3000
|
+
"arcade-light-theme": {
|
|
3001
|
+
comment: "#606060",
|
|
3002
|
+
constant: "#9809C8",
|
|
3003
|
+
date: "#296389",
|
|
3004
|
+
identifier: "#0000B3",
|
|
3005
|
+
keyword: "#BF4900",
|
|
3006
|
+
number: "#136D3D",
|
|
3007
|
+
string: "#A31515"
|
|
3008
|
+
},
|
|
3009
|
+
"arcade-dark-theme": {
|
|
3010
|
+
comment: "#BFBFBF",
|
|
3011
|
+
constant: "#CDBAEA",
|
|
3012
|
+
date: "#97A6CE",
|
|
3013
|
+
identifier: "#9FD4F3",
|
|
3014
|
+
keyword: "#EEAA5A",
|
|
3015
|
+
number: "#AAD04B",
|
|
3016
|
+
string: "#F2877B"
|
|
3017
|
+
}
|
|
3018
|
+
};
|
|
3019
|
+
|
|
3020
|
+
function setupArcadeTheme() {
|
|
3021
|
+
["light", "dark"].forEach((theme) => {
|
|
3022
|
+
const base = theme === "light" ? "vs" : "vs-dark";
|
|
3023
|
+
const colors = themeConfig[`arcade-${theme}-theme`];
|
|
3024
|
+
// Defines the light and dark theme based on the calcite theme name
|
|
3025
|
+
arcadeDefaults.editor.defineTheme(base, {
|
|
3026
|
+
base,
|
|
3027
|
+
inherit: true,
|
|
3028
|
+
rules: [
|
|
3029
|
+
{ token: "comment.arc", foreground: colors.comment },
|
|
3030
|
+
{ token: "constant.arc", foreground: colors.constant },
|
|
3031
|
+
{ token: "keyword.arc", foreground: colors.keyword },
|
|
3032
|
+
{ token: "identifier.arc", foreground: colors.identifier },
|
|
3033
|
+
{ token: "number.arc", foreground: colors.number },
|
|
3034
|
+
{ token: "string.arc", foreground: colors.string }
|
|
3035
|
+
],
|
|
3036
|
+
colors: {}
|
|
3037
|
+
});
|
|
3038
|
+
});
|
|
3039
|
+
}
|
|
3040
|
+
const monacoThemeKeys = ["comment", "keyword", "identifier", "string", "number", "constant"];
|
|
3041
|
+
const colorRulesKeys = [...monacoThemeKeys, "date"];
|
|
3042
|
+
function updateThemeColors(theme, colorRules) {
|
|
3043
|
+
if (colorRules === undefined) {
|
|
3044
|
+
setupArcadeTheme();
|
|
3045
|
+
return;
|
|
3046
|
+
}
|
|
3047
|
+
const base = theme === "light" ? "vs" : "vs-dark";
|
|
3048
|
+
const rules = [];
|
|
3049
|
+
monacoThemeKeys.forEach((key) => {
|
|
3050
|
+
const foreground = colorRules[key];
|
|
3051
|
+
if (!foreground) {
|
|
3052
|
+
return;
|
|
3053
|
+
}
|
|
3054
|
+
rules.push({ token: `${key}.arc`, foreground });
|
|
3055
|
+
});
|
|
3056
|
+
arcadeDefaults.editor.defineTheme(base, { base, inherit: true, rules, colors: {} });
|
|
3057
|
+
}
|
|
3058
|
+
|
|
2999
3059
|
/**
|
|
3000
3060
|
* Returns the arcade diagnostic service.
|
|
3001
3061
|
* Example:
|
|
@@ -3025,10 +3085,10 @@ async function getArcadeWorker(uri) {
|
|
|
3025
3085
|
}
|
|
3026
3086
|
/**
|
|
3027
3087
|
* Request the arcade mode
|
|
3028
|
-
* @returns mode
|
|
3088
|
+
* @returns arcade mode module
|
|
3029
3089
|
*/
|
|
3030
3090
|
async function getMode() {
|
|
3031
|
-
return await Promise.resolve().then(function () { return require('./arcade-mode-
|
|
3091
|
+
return await Promise.resolve().then(function () { return require('./arcade-mode-9581409d.js'); });
|
|
3032
3092
|
}
|
|
3033
3093
|
// Register the language in Monaco
|
|
3034
3094
|
arcadeDefaults.languages.register({
|
|
@@ -3039,9 +3099,8 @@ arcadeDefaults.languages.register({
|
|
|
3039
3099
|
});
|
|
3040
3100
|
// An event emitted when a language is first time needed
|
|
3041
3101
|
arcadeDefaults.languages.onLanguage(arcadeDefaults.arcadeDefaults.languageId, () => {
|
|
3042
|
-
|
|
3102
|
+
setupArcadeTheme();
|
|
3043
3103
|
arcadeDefaults.arcadeDefaults.setLanguageOptions({ assetsPath: `${getAssetsPath() ?? "."}/arcade-language` });
|
|
3044
|
-
// Async import the language mode
|
|
3045
3104
|
getMode()
|
|
3046
3105
|
.then((mode) => {
|
|
3047
3106
|
// Setup the language mode
|
|
@@ -3427,69 +3486,8 @@ async function executeScript(editorProfile, script, testContext, console) {
|
|
|
3427
3486
|
}
|
|
3428
3487
|
}
|
|
3429
3488
|
|
|
3430
|
-
const themeConfig = {
|
|
3431
|
-
"arcade-light-theme": {
|
|
3432
|
-
comment: "#606060",
|
|
3433
|
-
constant: "#9809C8",
|
|
3434
|
-
date: "#296389",
|
|
3435
|
-
identifier: "#0000B3",
|
|
3436
|
-
keyword: "#BF4900",
|
|
3437
|
-
number: "#136D3D",
|
|
3438
|
-
string: "#A31515"
|
|
3439
|
-
},
|
|
3440
|
-
"arcade-dark-theme": {
|
|
3441
|
-
comment: "#BFBFBF",
|
|
3442
|
-
constant: "#CDBAEA",
|
|
3443
|
-
date: "#97A6CE",
|
|
3444
|
-
identifier: "#9FD4F3",
|
|
3445
|
-
keyword: "#EEAA5A",
|
|
3446
|
-
number: "#AAD04B",
|
|
3447
|
-
string: "#F2877B"
|
|
3448
|
-
}
|
|
3449
|
-
};
|
|
3450
|
-
|
|
3451
|
-
function setupArcadeTheme() {
|
|
3452
|
-
["light", "dark"].forEach((theme) => {
|
|
3453
|
-
const base = theme === "light" ? "vs" : "vs-dark";
|
|
3454
|
-
const colors = themeConfig[`arcade-${theme}-theme`];
|
|
3455
|
-
// Defines the light and dark theme based on the calcite theme name
|
|
3456
|
-
arcadeDefaults.editor.defineTheme(base, {
|
|
3457
|
-
base,
|
|
3458
|
-
inherit: true,
|
|
3459
|
-
rules: [
|
|
3460
|
-
{ token: "comment.arc", foreground: colors.comment },
|
|
3461
|
-
{ token: "constant.arc", foreground: colors.constant },
|
|
3462
|
-
{ token: "keyword.arc", foreground: colors.keyword },
|
|
3463
|
-
{ token: "identifier.arc", foreground: colors.identifier },
|
|
3464
|
-
{ token: "number.arc", foreground: colors.number },
|
|
3465
|
-
{ token: "string.arc", foreground: colors.string }
|
|
3466
|
-
],
|
|
3467
|
-
colors: {}
|
|
3468
|
-
});
|
|
3469
|
-
});
|
|
3470
|
-
}
|
|
3471
|
-
const monacoThemeKeys = ["comment", "keyword", "identifier", "string", "number", "constant"];
|
|
3472
|
-
const colorRulesKeys = [...monacoThemeKeys, "date"];
|
|
3473
|
-
function updateThemeColors(theme, colorRules) {
|
|
3474
|
-
if (colorRules === undefined) {
|
|
3475
|
-
setupArcadeTheme();
|
|
3476
|
-
return;
|
|
3477
|
-
}
|
|
3478
|
-
const base = theme === "light" ? "vs" : "vs-dark";
|
|
3479
|
-
const rules = [];
|
|
3480
|
-
monacoThemeKeys.forEach((key) => {
|
|
3481
|
-
const foreground = colorRules[key];
|
|
3482
|
-
if (!foreground) {
|
|
3483
|
-
return;
|
|
3484
|
-
}
|
|
3485
|
-
rules.push({ token: `${key}.arc`, foreground });
|
|
3486
|
-
});
|
|
3487
|
-
arcadeDefaults.editor.defineTheme(base, { base, inherit: true, rules, colors: {} });
|
|
3488
|
-
}
|
|
3489
|
-
|
|
3490
3489
|
const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;height:100%;width:100%;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);background-color:var(--calcite-color-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:25%}arcgis-arcade-editor .side-panel{max-width:45%;width:600px}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}arcgis-arcade-editor arcgis-arcade-results{border-top:1px solid var(--calcite-color-border-3);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}arcgis-arcade-editor calcite-list-item-group calcite-list-item{margin-bottom:1px;box-shadow:0 1px 0 var(--calcite-color-border-3)}arcgis-arcade-editor calcite-list-item-group calcite-list-item:last-child{box-shadow:none}arcgis-arcade-editor calcite-list-item-group:last-child{margin-bottom:var(--calcite-spacing-1)}";
|
|
3491
3490
|
|
|
3492
|
-
setupArcadeTheme();
|
|
3493
3491
|
const ArcgisArcadeEditor = class {
|
|
3494
3492
|
constructor(hostRef) {
|
|
3495
3493
|
index.registerInstance(this, hostRef);
|
|
@@ -3567,23 +3565,16 @@ const ArcgisArcadeEditor = class {
|
|
|
3567
3565
|
this.openedSidePanel = "none";
|
|
3568
3566
|
this.editorOptions = undefined;
|
|
3569
3567
|
}
|
|
3570
|
-
_profileChanged(
|
|
3571
|
-
// Prevent the execution as long as the component has not been fully loaded
|
|
3572
|
-
if (newValue === oldValue) {
|
|
3573
|
-
return;
|
|
3574
|
-
}
|
|
3568
|
+
_profileChanged() {
|
|
3575
3569
|
this._updateEditorProfile().catch(console.error);
|
|
3576
3570
|
}
|
|
3577
|
-
_testDataChanged(
|
|
3578
|
-
if (
|
|
3571
|
+
_testDataChanged() {
|
|
3572
|
+
if (!this._showExecutionPanel) {
|
|
3579
3573
|
return;
|
|
3580
3574
|
}
|
|
3581
3575
|
this._executeScript().catch(console.error);
|
|
3582
3576
|
}
|
|
3583
|
-
_snippetChanged(
|
|
3584
|
-
if (newValue === oldValue) {
|
|
3585
|
-
return;
|
|
3586
|
-
}
|
|
3577
|
+
_snippetChanged() {
|
|
3587
3578
|
arcadeDefaults.arcadeDefaults.updateApiContextForModel(this._modelId, {
|
|
3588
3579
|
snippets: this.snippets
|
|
3589
3580
|
});
|
|
@@ -3612,7 +3603,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3612
3603
|
*/
|
|
3613
3604
|
async getEditorInstance() {
|
|
3614
3605
|
await this._componentReadyDefer.promise;
|
|
3615
|
-
return
|
|
3606
|
+
return await this._codeEditorElt?.getEditorInstance();
|
|
3616
3607
|
}
|
|
3617
3608
|
/**
|
|
3618
3609
|
* Returns the Arcade result for the script for the provided test data.
|
|
@@ -3744,7 +3735,6 @@ const ArcgisArcadeEditor = class {
|
|
|
3744
3735
|
if (this.hideSideBar) {
|
|
3745
3736
|
return null;
|
|
3746
3737
|
}
|
|
3747
|
-
console.log("expanded", this.sideActionBarExpanded);
|
|
3748
3738
|
return (index.h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, index.h("calcite-action-group", null, this.renderAction({
|
|
3749
3739
|
id: "profile-variables-action",
|
|
3750
3740
|
label: this._t9nStrings?.profilevariables ?? "Profile variables",
|
|
@@ -4358,20 +4348,20 @@ const ArcgisCodeEditor = class {
|
|
|
4358
4348
|
this.modelId = arcadeDefaults.U();
|
|
4359
4349
|
this.options = undefined;
|
|
4360
4350
|
}
|
|
4361
|
-
valuePropChange(newValue
|
|
4362
|
-
if (!this._editorInstance
|
|
4351
|
+
valuePropChange(newValue) {
|
|
4352
|
+
if (!this._editorInstance) {
|
|
4363
4353
|
return;
|
|
4364
4354
|
}
|
|
4365
4355
|
this._editorInstance.setValue(newValue ?? "");
|
|
4366
4356
|
}
|
|
4367
|
-
languagePropChange(
|
|
4368
|
-
if (!this._editorInstance
|
|
4357
|
+
languagePropChange() {
|
|
4358
|
+
if (!this._editorInstance) {
|
|
4369
4359
|
return;
|
|
4370
4360
|
}
|
|
4371
4361
|
this.updateModel();
|
|
4372
4362
|
}
|
|
4373
|
-
modelIdPropChange(
|
|
4374
|
-
if (!this._editorInstance
|
|
4363
|
+
modelIdPropChange() {
|
|
4364
|
+
if (!this._editorInstance) {
|
|
4375
4365
|
return;
|
|
4376
4366
|
}
|
|
4377
4367
|
this.updateModel();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
const index = require('./index-
|
|
10
|
+
const index = require('./index-c33ea685.js');
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
|
-
Stencil Client Patch Browser v4.
|
|
13
|
+
Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com
|
|
14
14
|
*/
|
|
15
15
|
const patchBrowser = () => {
|
|
16
16
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('arcgis-coding-components.cjs.js', document.baseURI).href));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
|
-
* v4.30.0-next.
|
|
4
|
+
* v4.30.0-next.10
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
9
|
-
require('./index-
|
|
8
|
+
const arcadeDefaults = require('./arcade-defaults-38ad9b42.js');
|
|
9
|
+
require('./index-c33ea685.js');
|
|
10
10
|
|
|
11
11
|
/*!-----------------------------------------------------------------------------
|
|
12
12
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|