@arcgis/coding-components 4.31.0-next.126 → 4.31.0-next.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-61111744.entry.js → p-07b95c23.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-75f804a7.js → p-0c5bec93.js} +2 -2
- package/dist/arcgis-coding-components/{p-1449e799.js → p-10f9376b.js} +1 -1
- package/dist/arcgis-coding-components/{p-574760eb.js → p-114b8df5.js} +2 -2
- package/dist/arcgis-coding-components/{p-10fdb8a4.js → p-1dc8539a.js} +2 -2
- package/dist/arcgis-coding-components/{p-c136077a.js → p-2bad3642.js} +2 -2
- package/dist/arcgis-coding-components/{p-9e3280e1.js → p-33f0c541.js} +2 -2
- package/dist/arcgis-coding-components/{p-43d39a08.entry.js → p-4c4b8f94.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-9e42c6a6.js → p-653529e4.js} +1 -1
- package/dist/arcgis-coding-components/{p-af0b253f.js → p-991c8a27.js} +2 -2
- package/dist/arcgis-coding-components/{p-a3f04ed8.js → p-9e211af5.js} +10 -10
- package/dist/arcgis-coding-components/{p-0021fae4.js → p-ad2d423d.js} +2 -2
- package/dist/arcgis-coding-components/{p-9fd377cf.js → p-b78beb97.js} +2 -2
- package/dist/arcgis-coding-components/{p-7f339954.js → p-b7ebd8b5.js} +2 -2
- package/dist/arcgis-coding-components/{p-e0113c04.js → p-c3076bfb.js} +1 -1
- package/dist/arcgis-coding-components/{p-c088f928.js → p-ca0c7798.js} +2 -2
- package/dist/arcgis-coding-components/{p-5a3e009a.js → p-e902cc4f.js} +2 -2
- package/dist/arcgis-coding-components/{p-b576e60f.entry.js → p-fa4981ff.entry.js} +2 -2
- package/dist/cjs/{app-globals-5c00dd0e.js → app-globals-d53a18da.js} +1 -1
- package/dist/cjs/{arcade-defaults-a3460a73.js → arcade-defaults-96478f60.js} +3 -3
- package/dist/cjs/{arcade-mode-d37ded87.js → arcade-mode-e7e62e10.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-f054a047.js → css-de6d82ba.js} +1 -1
- package/dist/cjs/{cssMode-8ad36f8f.js → cssMode-a6393240.js} +3 -3
- package/dist/cjs/{html-1cc311c1.js → html-74ccb7b7.js} +3 -3
- package/dist/cjs/{htmlMode-2fcbdab7.js → htmlMode-6c1f3e24.js} +3 -3
- package/dist/cjs/{index-ee92878b.js → index-96ead082.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-6bd88294.js → javascript-7cdbfbb6.js} +4 -4
- package/dist/cjs/{jsonMode-8c760a0c.js → jsonMode-9504b4ed.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-4decf6f4.js → sql-expr-defaults-bb4e0860.js} +10 -10
- package/dist/cjs/{sql-expr-mode-bdd40be0.js → sql-expr-mode-24e37b35.js} +3 -3
- package/dist/cjs/{tsMode-27770fed.js → tsMode-d7cc00d7.js} +3 -3
- package/dist/cjs/{typescript-96f1fc53.js → typescript-4588ee22.js} +3 -3
- package/dist/cjs/{useT9n-925dc03d.js → useT9n-08599af5.js} +3 -3
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-editor-variables.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-UFIZBDFE.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/editor-variables.js +1 -1
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-c174ec2f.js → app-globals-df909ce9.js} +1 -1
- package/dist/esm/{arcade-defaults-b3e573d1.js → arcade-defaults-c1d4dc85.js} +3 -3
- package/dist/esm/{arcade-mode-81003f64.js → arcade-mode-083f9fca.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +7 -7
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-ae921dee.js → css-565f9005.js} +1 -1
- package/dist/esm/{cssMode-18178285.js → cssMode-9a1b7996.js} +3 -3
- package/dist/esm/{html-b33c5b1a.js → html-1547220d.js} +3 -3
- package/dist/esm/{htmlMode-211b6473.js → htmlMode-a19c3c89.js} +3 -3
- package/dist/esm/{index-e76c2ccf.js → index-13d98d12.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-ba83b0d4.js → javascript-2a08496e.js} +4 -4
- package/dist/esm/{jsonMode-60e5a6e9.js → jsonMode-8f487d55.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-7807df66.js → sql-expr-defaults-e102f4a5.js} +10 -10
- package/dist/esm/{sql-expr-mode-809e2fcb.js → sql-expr-mode-ab16d20b.js} +3 -3
- package/dist/esm/{tsMode-56fdc565.js → tsMode-588d0779.js} +3 -3
- package/dist/esm/{typescript-d0f391be.js → typescript-92c48924.js} +3 -3
- package/dist/esm/{useT9n-c08561d9.js → useT9n-c3eff750.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/package.json +6 -6
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{p as e,b as
|
|
6
|
+
import{p as e,b as i}from"./p-653529e4.js";export{s as setNonce}from"./p-653529e4.js";import{g as a}from"./p-c3076bfb.js";(()=>{const i=import.meta.url,a={};return""!==i&&(a.resourcesUrl=new URL(".",i).href),e(a)})().then((async e=>(await a(),i([["p-4c4b8f94",[[0,"arcgis-arcade-editor",{profile:[16],script:[1025],testData:[16],suggestions:[16],snippets:[16],hideDocumentationActions:[4,"hide-documentation-actions"],hideSideBar:[4,"hide-side-bar"],sideActionBarExpanded:[1540,"side-action-bar-expanded"],openedSidePanel:[1537,"opened-side-panel"],editorOptions:[16],editorInstance:[16],_preparingArcade:[32],_editorProfile:[32],_apiLibrary:[32],_showExecutionPanel:[32],_resultPanel:[32],_executingScript:[32],_consoleLogs:[32],_executionResult:[32],messages:[32],getScript:[64],setFocus:[64],getEditorInstance:[64],getTestResult:[64]},null,{messages:["_messagesChanged"],profile:["_profileChanged"],testData:["_testDataChanged"],snippets:["_snippetChanged"]}],[1,"arcgis-arcade-results",{loading:[4],openedResultPanel:[1537,"opened-result-panel"],result:[16],consoleLogs:[16]}],[1,"arcgis-arcade-suggestions",{suggestions:[16],_selectedSuggestion:[32],_filterValue:[32],_colorizeStyle:[32]},null,{suggestions:["suggestionsPropChanged"]}],[0,"arcgis-code-editor",{value:[1],language:[1],modelId:[1,"model-id"],editorOptions:[16],editorInstance:[16],getValue:[64],setValue:[64],insertText:[64],insertSnippet:[64],getEditorInstance:[64],setFocus:[64]},null,{language:["languagePropChange"],modelId:["modelIdPropChange"],editorOptions:["editorOptionsPropChange"]}],[1,"arcgis-editor-variables",{loading:[4],modelId:[1,"model-id"],variable:[16],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32],_mode:[32]},null,{modelId:["modelIdPropChanged"],variable:["_variableChanged"]}],[1,"arcgis-language-api-panel",{hideDocumentationActions:[4,"hide-documentation-actions"],loading:[4],apiLibrary:[16],_selectedApiItem:[32],_filterValue:[32],_colorizeStyle:[32]},null,{apiLibrary:["_apiLibraryChanged"]}]]],["p-fa4981ff",[[0,"arcgis-sql-expression-editor",{profile:[16],script:[1025],hideSideBar:[4,"hide-side-bar"],_preparing:[32],_editorProfile:[32],_activeAction:[32],_apiLibrary:[32],sideActionBarExpanded:[32],messages:[32]},null,{messages:["_messagesChanged"],profile:["_profileChanged"]}]]],["p-07b95c23",[[1,"arcgis-sql-expression-fields",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}]]]],e))));
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
export{a as arcade}from"./p-
|
|
6
|
+
export{a as arcade}from"./p-1dc8539a.js";export{s as sqlExpression}from"./p-9e211af5.js";import"./p-653529e4.js";
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as s,a as e}from"./p-
|
|
6
|
+
import{r as t,c as i,h as s,a as e}from"./p-653529e4.js";import{u as c,a as l}from"./p-b7ebd8b5.js";import{x as o}from"./p-9e211af5.js";const a=class{constructor(s){t(this,s),this.arcgisClose=i(this,"arcgisClose",3),this.arcgisFieldSelected=i(this,"arcgisFieldSelected",3),this.manager=c(this),this.messages=l(),this._handleSelectField=t=>{if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":this.arcgisFieldSelected.emit(t.target.value??"");break;case"calcite-action":t.stopPropagation()}},this._handleSelectDomain=t=>{const i=t.target.value;this.arcgisFieldSelected.emit(i?`'${i}'`:"")},this._emitClose=()=>{this.arcgisClose.emit()},this._mutationCounter=1,this._flowItemRenderers=[],this._filterValue="",this.loading=!1,this.modelId=void 0}modelIdPropChanged(){this._flowItemRenderers=[]}disconnectedCallback(){this._flowObserver?.disconnect()}render(){const t=o.getFeatureLayerForModel(this.modelId??"");return!this.loading&&this.modelId&&t?s("calcite-flow",null,s("calcite-flow-item",{heading:this.messages.availablefields??"",closable:!0,onCalciteFlowItemClose:this._emitClose},s("calcite-list",{filterEnabled:!0},t.fields.map((t=>s("calcite-list-item",{key:t.name,onClick:this._handleSelectField,label:t.name,description:t.alias,value:t.name},t.domain&&s("calcite-action",{slot:"actions-end",text:"open",icon:"chevron-right",onClick:()=>{const i=t.domain;"coded-value"===i.type&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>s("calcite-flow-item",{closable:!0,heading:this.messages.domainvalues??"",description:t.name,onCalciteFlowItemClose:this._emitClose},s("calcite-list",null,i.codedValues.map((t=>s("calcite-list-item",{key:t.code,onClick:this._handleSelectDomain,label:t.name,description:String(t.code),value:String(t.code)})))))])}})))))),this._flowItemRenderers.map((t=>t()))):s("calcite-block",{heading:this.messages.availablefields??""})}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{modelId:["modelIdPropChanged"]}}};a.style=":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";export{a as arcgis_sql_expression_fields}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{O as t}from"./p-
|
|
6
|
+
import{O as t}from"./p-9e211af5.js";import"./p-653529e4.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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{D as e,r as t,T as s,w as i,x as n,V as o}from"./p-
|
|
6
|
+
import{D as e,r as t,T as s,w as i,x as n,V as o}from"./p-9e211af5.js";import"./p-653529e4.js";let r=new e;class a{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,r=new e),this._client=null}static async waitForWorker(){return await r.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"SqlExprWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),r.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}var c,l;!function(e){e.ARGS="args",e.CLAUSES="clauses",e.ELSE="else",e.END="end",e.EXPR="expr",e.LEFT="left",e.OPERAND="operand",e.QUALIFIER="qualifier",e.RIGHT="right",e.START="start",e.VALUE="value"}(c||(c={})),function(e){e.CASE_EXPRESSION="case-expression",e.EXPRESSION_LIST="expression-list",e.FUNCTION="function",e.INTERVAL="interval",e.INTERVAL_QUALIFIER="interval-qualifier",e.WHEN_CLAUSE="when-clause",e.UNARY_EXPRESSION="unary-expression",e.BINARY_EXPRESSION="binary-expression"}(l||(l={})),Object.values({date:"DATE",float:"FLOAT",integer:"INTEGER",real:"REAL",smallint:"SMALLINT",time:"TIME",timestamp:"TIMESTAMP",varchar:"VARCHAR"});const h={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:"'"}]},u={defaultToken:"",tokenPostfix:".arcgis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["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"],operators:["AND","BETWEEN","LIKE","NOT","OR","IS","NULL"],builtinFunctions:["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"],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 E{constructor(e,t){this._worker=e,this._defaults=t}async provideCompletionItems(e,t){try{const s=await this._worker(e.uri),i=e.getWordUntilPosition(t),n={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn},o=this._defaults.getApiContextForModel(e.uri);return await s.doComplete(e.uri.toString(),n,t,o)}catch(e){return console.error(e),{suggestions:[]}}}}class T{constructor(e,i,{defaults:n,diagnosticService:o}){this._languageId=e,this._worker=i,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=o,this._defaults=n;const r=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const i=s((()=>{this._doValidate(e,t).catch((e=>{throw e}))})),n=e.onDidChangeContent(i),o=e.onDidChangeAttached(i);this._modelListeners.set(e.uri.toString(),[n,o]),this._doValidate(e,t).catch(console.error)},a=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const i=this._modelListeners.get(s);if(i){for(;i.length;)i.pop()?.dispose();this._modelListeners.delete(s)}};this._disposables.push(t.onDidCreateModel(r)),this._disposables.push(t.onWillDisposeModel((e=>a(e)))),this._disposables.push(t.onDidChangeModelLanguage((e=>{a(e.model),r(e.model)}))),this._disposables.push(n.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(a(e),r(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._modelListeners.forEach((e=>e.forEach((e=>e.dispose())))),this._modelListeners.clear()}}),t.getModels().forEach(r)}async _doValidate(e,s){if(e.isAttachedToEditor())try{const i=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),o=await i.doValidation(e.uri.toString(),n);this._diagnosticsService.fireDiagnosticsChange(e.uri,o),t.setModelMarkers(e,s,o)}catch(e){console.error(e)}}}let d;async function N(...e){return await a.waitForWorker(),await new Promise(((t,s)=>{d?t(d(...e)):s(new Error("sql expression worker not registered!"))}))}const p=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function m(){return p}function I(e){const t=new a(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);d=s,i.setMonarchTokensProvider(n.languageId,u),i.setLanguageConfiguration(n.languageId,h);const o=new E(s,n);i.registerCompletionItemProvider(n.languageId,o),new T(e.languageId,s,{defaults:e,diagnosticService:p})}export{m as getSqlExprDiagnosticService,N as getSqlExprWorker,I as setupMode}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{m as e,f as t,i as n,a,b as r,c as i,d as s,L as o,e as c,E as u}from"./p-
|
|
6
|
+
import{m as e,f as t,i as n,a,b as r,c as i,d as s,L as o,e as c,E as u}from"./p-9e211af5.js";import{g as d}from"./p-653529e4.js";async function l(n,a=e.exports.CompletionItemKind.Variable){return await Promise.all(n.map((async n=>{switch(n.type){case"dictionary":return await async function(t,n){const{name:a,dictionaryVariables:r}=t,i=t.getDescription(),s=r.reduce(((e,t)=>{""!==e&&(e+=" \n \n"),e+=`**${t.name}** \n${t.type}`;const n=t.getDescription();return n&&(e+=` \n${n}`),e}),i);return{name:a,description:i,type:"dictionary",properties:await l(r,e.exports.CompletionItemKind.Field),completion:{label:a,detail:a,insertText:a,insertTextMode:e.exports.InsertTextMode.asIs,insertTextFormat:e.exports.InsertTextFormat.PlainText,kind:n,documentation:{kind:"markdown",value:s}}}}(n,a);case"feature":return await async function(n,a){const r=await n.loadSource(),{name:i}=n,s=n.getDescription(),o={label:i,detail:i,insertText:i,insertTextMode:e.exports.InsertTextMode.asIs,insertTextFormat:e.exports.InsertTextFormat.PlainText,kind:a},c={name:i,description:s,type:"dictionary",properties:[],completion:o};if(!r)return c;const[u,d]=t(r.fields,s,!0);return c.properties=u,o.documentation={kind:"markdown",value:d},c}(n,a);default:return function(t,n){const{name:a,type:r}=t,i=t.getDescription();return{name:a,description:i,type:r,completion:{label:a,detail:a,insertText:a,insertTextMode:e.exports.InsertTextMode.asIs,insertTextFormat:e.exports.InsertTextFormat.PlainText,kind:n,documentation:{kind:"markdown",value:i}}}}(n,a)}})))}async function p(e="en"){const t=f.get(e);if(t)return t;if(!s.has(e))return await p("en");try{const t=await fetch(d(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));return t.ok?function(e,t){const n=new Map;return t.forEach((e=>{n.set(e.id,e)})),f.set(e,n),n}(e,await t.json()):"en"===e?null:await p("en")}catch{return null}}const f=new Map;function y(e){switch(e.type){case"dictionary":return{...e,type:e.type,properties:(t=e.properties,t?.map(y))};case"array":return{...e,type:e.type,elementType:{type:"number",name:"number"}};default:return{...e,type:e.type}}var t}async function m(e,t="en"){if(!n(e))return;const s=await async function(e,t="en"){const n=await p(t);return n?.get(e)??null}(e.id,t);if(!s)return;const o={bundles:[...s.bundles],variables:[],hiddenApiItems:e.hiddenApiItems?.map((e=>e.toLowerCase()))};var c;return s.variables.forEach((t=>{if(e.disabledVariables?.includes(t.name))return;const n=e.definitions[t.name];switch(t.type){case"dictionary":return o.variables.push(y({...t,type:t.type,properties:Array.isArray(n)?[...n]:t.properties}));case"feature":if(!i(n))return;return o.variables.push({...t,type:t.type,definition:n});case"featureSet":if(!r(n))return;return o.variables.push({...t,type:t.type,definition:n});case"featureSetCollection":if(!a(n))return;return o.variables.push({...t,type:t.type,definition:n});default:return o.variables.push(y(t))}})),(c=e)&&"object"==typeof c&&"additionalVariables"in c&&Array.isArray(c.additionalVariables)&&o.variables.push(...e.additionalVariables??[]),o}const w=new class extends o{constructor(){super("arcade",{apiPath:"./assets/arcade-language/api",apiPrefix:"arcade-api.t9n."})}async setProfileForModel(e,t,a={locale:"en"}){n(t)&&(t=await m(t,a.locale));const r=await c(a.locale,d("./assets/arcade-language/t9n"),"profile.t9n.");if(!r)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(e);const i=this._getApiKey(e),s=new u(t,r);this._modelToProfileMap.set(i,s);const o=await async function(e){const{apiVersion:t,bundles:n,hiddenApiItems:a}=e.toEditorProfileDefinition();return{apiVersion:t,bundles:n,variables:await l(e.dictionaryVariables),hiddenApiItems:a?.map((e=>e.toLowerCase()))}}(s);this.updateApiContextForModel(e,{locale:a.locale,profile:o,snippets:a.snippets})}},b={setProfileForModel:w.setProfileForModel.bind(w),getApiLibraryForModel:w.getApiLibraryForModel.bind(w)};export{b as a,w as b}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{O as t}from"./p-
|
|
6
|
+
import{O as t}from"./p-9e211af5.js";import"./p-653529e4.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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.127
|
|
5
5
|
*/
|
|
6
|
-
import{conf as e,language as t}from"./p-
|
|
6
|
+
import{conf as e,language as t}from"./p-b78beb97.js";import"./p-9e211af5.js";import"./p-653529e4.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|