@arcgis/coding-components 4.31.0-next.117 → 4.31.0-next.118
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/api/test.json +6861 -0
- package/dist/arcgis-coding-components/assets/code-editor/arcgis-sql-expression.worker.js +18943 -0
- package/dist/arcgis-coding-components/assets/code-editor/arcgis-sql-expression.worker.js.map +7 -0
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +93 -83
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-9d9b509b.js → p-002444a6.js} +1 -1
- package/dist/arcgis-coding-components/{p-1ad930cc.entry.js → p-0a5b478b.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-68b7973f.js → p-1127e8e6.js} +1 -1
- package/dist/arcgis-coding-components/{p-7f7da482.js → p-26debb25.js} +2 -2
- package/dist/arcgis-coding-components/{p-128a0aee.js → p-2abc9c38.js} +3 -3
- package/dist/arcgis-coding-components/{p-8d0b03d6.js → p-50518425.js} +2 -2
- package/dist/arcgis-coding-components/{p-7510add7.js → p-6b839fe5.js} +2 -2
- package/dist/arcgis-coding-components/{p-524b5196.js → p-6d9a702c.js} +2 -2
- package/dist/arcgis-coding-components/{p-f4192303.js → p-78c4eba0.js} +2 -2
- package/dist/arcgis-coding-components/{p-ca5cde7d.js → p-7bd68e46.js} +2 -2
- package/dist/arcgis-coding-components/{p-1a9f475d.js → p-89a581be.js} +1 -1
- package/dist/arcgis-coding-components/{p-465435e1.entry.js → p-a197cb71.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-f793651c.js → p-a8a9dd68.js} +2 -2
- package/dist/arcgis-coding-components/{p-60b0ff5a.js → p-b5e2d7e4.js} +2 -2
- package/dist/arcgis-coding-components/{p-a09a2995.js → p-c48e2b97.js} +10 -10
- package/dist/arcgis-coding-components/{p-df7f4e90.js → p-d3ad750c.js} +2 -2
- package/dist/arcgis-coding-components/{p-93a3652f.js → p-e0cdc0cd.js} +2 -2
- package/dist/arcgis-coding-components/{p-8c9338b6.entry.js → p-facab962.entry.js} +2 -2
- package/dist/cjs/{app-globals-ef1b44a9.js → app-globals-a6eaeb50.js} +1 -1
- package/dist/cjs/{arcade-defaults-4d3a6776.js → arcade-defaults-5ac8b83c.js} +3 -3
- package/dist/cjs/{arcade-mode-9f1102b2.js → arcade-mode-e50b4e81.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-d1b6a768.js → css-d8ca0762.js} +1 -1
- package/dist/cjs/{cssMode-a52f34b0.js → cssMode-0dfc36ca.js} +3 -3
- package/dist/cjs/{html-a8fd5819.js → html-49bff616.js} +3 -3
- package/dist/cjs/{htmlMode-38e44197.js → htmlMode-642d7454.js} +3 -3
- package/dist/cjs/{index-9ee06dbb.js → index-0c87f8c3.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-4b0f387a.js → javascript-a9560b85.js} +4 -4
- package/dist/cjs/{jsonMode-f9197c41.js → jsonMode-e49e5dae.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-28864bc0.js → sql-expr-defaults-ba1e1463.js} +10 -10
- package/dist/cjs/{sql-expr-mode-ff0b079a.js → sql-expr-mode-11a87d27.js} +3 -3
- package/dist/cjs/{tsMode-5edab23c.js → tsMode-bcadce08.js} +3 -3
- package/dist/cjs/{typescript-6aeb5725.js → typescript-1ea634d6.js} +3 -3
- package/dist/cjs/{useT9n-5f495adc.js → useT9n-9fed1d2d.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-091b87ba.js → app-globals-db9d153e.js} +1 -1
- package/dist/esm/{arcade-defaults-413bb46c.js → arcade-defaults-6f8b26d3.js} +3 -3
- package/dist/esm/{arcade-mode-9c21be34.js → arcade-mode-4e9c533c.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-930b25a7.js → css-0a9928e0.js} +1 -1
- package/dist/esm/{cssMode-c8059805.js → cssMode-ae70c516.js} +3 -3
- package/dist/esm/{html-aa299729.js → html-85896233.js} +3 -3
- package/dist/esm/{htmlMode-e383146f.js → htmlMode-e5f2c8a2.js} +3 -3
- package/dist/esm/{index-5c929d0c.js → index-4db609d5.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-1aec637d.js → javascript-539096af.js} +4 -4
- package/dist/esm/{jsonMode-deabe739.js → jsonMode-45b2f447.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-e24aed0a.js → sql-expr-defaults-a3104aa0.js} +10 -10
- package/dist/esm/{sql-expr-mode-b6e67897.js → sql-expr-mode-7be17e27.js} +3 -3
- package/dist/esm/{tsMode-e5eb14a5.js → tsMode-6ff21691.js} +3 -3
- package/dist/esm/{typescript-29f4259e.js → typescript-cc67db82.js} +3 -3
- package/dist/esm/{useT9n-0e6a80f8.js → useT9n-49f45d26.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/Users/fred/Projects/arcgis-web-components-work/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
- package/package.json +12 -13
- package/dist/types/data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/stories/internal/sql-expression-editor/sql-expression-editor.stories.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -0
- /package/dist/types/{data/arcgis-web-compoments/actions-runner-1/_work/arcgis-web-components/arcgis-web-components → Users/fred/Projects/arcgis-web-components-work}/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -0
|
@@ -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.118
|
|
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-c48e2b97.js";import"./p-89a581be.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}
|