@arcgis/coding-components 4.28.0-beta.10 → 4.28.0-beta.12
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 +1 -1
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +51 -52
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +9 -10
- package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +9 -10
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +19 -19
- package/dist/arcgis-coding-components/index.esm.js +1 -1
- package/dist/arcgis-coding-components/{p-acbdd63d.entry.js → p-0058a559.entry.js} +1 -1
- package/dist/arcgis-coding-components/{p-d4923085.js → p-0a1c12bc.js} +1 -1
- package/dist/arcgis-coding-components/p-23a9d01f.js +62 -0
- package/dist/arcgis-coding-components/{p-c4665951.js → p-833d7d5d.js} +1 -1
- package/dist/arcgis-coding-components/{p-8ffe58f2.js → p-86c7337f.js} +2 -2
- package/dist/arcgis-coding-components/{p-358ed87a.js → p-b98f37e4.js} +1 -1
- package/dist/arcgis-coding-components/{p-c1ebad13.js → p-d0a7fde3.js} +1 -1
- package/dist/arcgis-coding-components/{p-30774b8f.js → p-d8a77530.js} +2 -2
- package/dist/arcgis-coding-components/p-e255a13c.js +1 -0
- package/dist/arcgis-coding-components/{p-cff113f1.js → p-fdd3f4de.js} +1 -1
- package/dist/cjs/{arcade-defaults-fe6b2490.js → arcade-defaults-4a9774c6.js} +267 -581
- package/dist/cjs/{arcade-mode-684d2b36.js → arcade-mode-c040c92c.js} +3 -5
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +34 -34
- package/dist/cjs/{cssMode-67c943a9.js → cssMode-2b1f78c9.js} +1 -1
- package/dist/cjs/{html-98e131a9.js → html-0c87581b.js} +1 -1
- package/dist/cjs/{htmlMode-900fc9a2.js → htmlMode-007d54b7.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{javascript-5baa3db6.js → javascript-8cef2a6b.js} +2 -2
- package/dist/cjs/{jsonMode-bd64dcac.js → jsonMode-d7517de7.js} +1 -1
- package/dist/cjs/{tsMode-d958fede.js → tsMode-d3684fd5.js} +1 -1
- package/dist/cjs/{typescript-5ebad4f3.js → typescript-99122582.js} +1 -1
- package/dist/components/arcade-api.js +6 -6
- package/dist/components/arcade-contribution.js +2 -2
- package/dist/components/arcade-defaults.js +9 -9
- package/dist/components/arcade-mode.js +3 -5
- package/dist/components/arcade-results.js +12 -12
- package/dist/components/arcade-suggestions.js +4 -4
- package/dist/components/arcade-variables.js +5 -5
- package/dist/components/arcgis-arcade-editor.js +15 -15
- package/dist/components/code-editor.js +6 -6
- package/dist/components/index2.js +2 -316
- package/dist/components/utilities.js +2 -2
- package/dist/esm/{arcade-defaults-1023126c.js → arcade-defaults-93ecbfa3.js} +255 -569
- package/dist/esm/arcade-mode-48ac843d.js +594 -0
- package/dist/esm/arcgis-arcade-api_6.entry.js +34 -34
- package/dist/esm/{cssMode-eff7de28.js → cssMode-9d4a5968.js} +1 -1
- package/dist/esm/{html-9661ece4.js → html-bbd01073.js} +1 -1
- package/dist/esm/{htmlMode-482b86a1.js → htmlMode-16f49bff.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{javascript-90f59381.js → javascript-d9d37aa3.js} +2 -2
- package/dist/esm/{jsonMode-334ce784.js → jsonMode-5f32debe.js} +1 -1
- package/dist/esm/{tsMode-28b98722.js → tsMode-dc4e785a.js} +1 -1
- package/dist/esm/{typescript-aec431cc.js → typescript-52f0d258.js} +1 -1
- package/package.json +13 -13
- package/dist/arcgis-coding-components/p-5d8443b7.js +0 -62
- package/dist/arcgis-coding-components/p-e464f3a9.js +0 -1
- package/dist/esm/arcade-mode-b060035b.js +0 -596
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
|
-
var ke=(e=>(e.False="false",e.Null="null",e.True="true",e))(ke||{}),Be=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(Be||{}),d=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(d||{}),Ie=["++","--"],gt=["-","+","!","~"],xt=["=","/=","*=","%=","+=","-="],Ct=["||","&&"],Hi=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],Gi=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(Gi||{}),Ki=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(Ki||{});var M=[[],[],[]];Ie.forEach(e=>M[e.length-1].push(e));gt.forEach(e=>M[e.length-1].push(e));Ct.forEach(e=>M[e.length-1].push(e));xt.forEach(e=>M[e.length-1].push(e));Hi.forEach(e=>M[e.length-1].push(e));var Lt;(function(e){function t(i){return typeof i=="string"}e.is=t;})(Lt||(Lt={}));var _e;(function(e){function t(i){return typeof i=="string"}e.is=t;})(_e||(_e={}));var kt;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=t;})(kt||(kt={}));var ue;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=t;})(ue||(ue={}));var v;(function(e){function t(r,n){return r===Number.MAX_VALUE&&(r=ue.MAX_VALUE),n===Number.MAX_VALUE&&(n=ue.MAX_VALUE),{line:r,character:n}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&o.uinteger(n.line)&&o.uinteger(n.character)}e.is=i;})(v||(v={}));var E;(function(e){function t(r,n,s,a){if(o.uinteger(r)&&o.uinteger(n)&&o.uinteger(s)&&o.uinteger(a))return {start:v.create(r,n),end:v.create(s,a)};if(v.is(r)&&v.is(n))return {start:r,end:n};throw new Error(`Range#create called with invalid arguments[${r}, ${n}, ${s}, ${a}]`)}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&v.is(n.start)&&v.is(n.end)}e.is=i;})(E||(E={}));var ce;(function(e){function t(r,n){return {uri:r,range:n}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&E.is(n.range)&&(o.string(n.uri)||o.undefined(n.uri))}e.is=i;})(ce||(ce={}));var Bt;(function(e){function t(r,n,s,a){return {targetUri:r,targetRange:n,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&E.is(n.targetRange)&&o.string(n.targetUri)&&E.is(n.targetSelectionRange)&&(E.is(n.originSelectionRange)||o.undefined(n.originSelectionRange))}e.is=i;})(Bt||(Bt={}));var Oe;(function(e){function t(r,n,s,a){return {red:r,green:n,blue:s,alpha:a}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&o.numberRange(n.red,0,1)&&o.numberRange(n.green,0,1)&&o.numberRange(n.blue,0,1)&&o.numberRange(n.alpha,0,1)}e.is=i;})(Oe||(Oe={}));var wt;(function(e){function t(r,n){return {range:r,color:n}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&E.is(n.range)&&Oe.is(n.color)}e.is=i;})(wt||(wt={}));var Tt;(function(e){function t(r,n,s){return {label:r,textEdit:n,additionalTextEdits:s}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&o.string(n.label)&&(o.undefined(n.textEdit)||j.is(n))&&(o.undefined(n.additionalTextEdits)||o.typedArray(n.additionalTextEdits,j.is))}e.is=i;})(Tt||(Tt={}));var Nt;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region";})(Nt||(Nt={}));var Mt;(function(e){function t(r,n,s,a,u,c){let l={startLine:r,endLine:n};return o.defined(s)&&(l.startCharacter=s),o.defined(a)&&(l.endCharacter=a),o.defined(u)&&(l.kind=u),o.defined(c)&&(l.collapsedText=c),l}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&o.uinteger(n.startLine)&&o.uinteger(n.startLine)&&(o.undefined(n.startCharacter)||o.uinteger(n.startCharacter))&&(o.undefined(n.endCharacter)||o.uinteger(n.endCharacter))&&(o.undefined(n.kind)||o.string(n.kind))}e.is=i;})(Mt||(Mt={}));var Ve;(function(e){function t(r,n){return {location:r,message:n}}e.create=t;function i(r){let n=r;return o.defined(n)&&ce.is(n.location)&&o.string(n.message)}e.is=i;})(Ve||(Ve={}));var A;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4;})(A||(A={}));var Ut;(function(e){e.Unnecessary=1,e.Deprecated=2;})(Ut||(Ut={}));var _t;(function(e){function t(i){let r=i;return o.objectLiteral(r)&&o.string(r.href)}e.is=t;})(_t||(_t={}));var le;(function(e){function t(r,n,s,a,u,c){let l={range:r,message:n};return o.defined(s)&&(l.severity=s),o.defined(a)&&(l.code=a),o.defined(u)&&(l.source=u),o.defined(c)&&(l.relatedInformation=c),l}e.create=t;function i(r){var n;let s=r;return o.defined(s)&&E.is(s.range)&&o.string(s.message)&&(o.number(s.severity)||o.undefined(s.severity))&&(o.integer(s.code)||o.string(s.code)||o.undefined(s.code))&&(o.undefined(s.codeDescription)||o.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(o.string(s.source)||o.undefined(s.source))&&(o.undefined(s.relatedInformation)||o.typedArray(s.relatedInformation,Ve.is))}e.is=i;})(le||(le={}));var V;(function(e){function t(r,n,...s){let a={title:r,command:n};return o.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function i(r){let n=r;return o.defined(n)&&o.string(n.title)&&o.string(n.command)}e.is=i;})(V||(V={}));var j;(function(e){function t(s,a){return {range:s,newText:a}}e.replace=t;function i(s,a){return {range:{start:s,end:s},newText:a}}e.insert=i;function r(s){return {range:s,newText:""}}e.del=r;function n(s){let a=s;return o.objectLiteral(a)&&o.string(a.newText)&&E.is(a.range)}e.is=n;})(j||(j={}));var je;(function(e){function t(r,n,s){let a={label:r};return n!==void 0&&(a.needsConfirmation=n),s!==void 0&&(a.description=s),a}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&o.string(n.label)&&(o.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(o.string(n.description)||n.description===void 0)}e.is=i;})(je||(je={}));var R;(function(e){function t(i){let r=i;return o.string(r)}e.is=t;})(R||(R={}));var Ot;(function(e){function t(s,a,u){return {range:s,newText:a,annotationId:u}}e.replace=t;function i(s,a,u){return {range:{start:s,end:s},newText:a,annotationId:u}}e.insert=i;function r(s,a){return {range:s,newText:"",annotationId:a}}e.del=r;function n(s){let a=s;return j.is(a)&&(je.is(a.annotationId)||R.is(a.annotationId))}e.is=n;})(Ot||(Ot={}));var Re;(function(e){function t(r,n){return {textDocument:r,edits:n}}e.create=t;function i(r){let n=r;return o.defined(n)&&He.is(n.textDocument)&&Array.isArray(n.edits)}e.is=i;})(Re||(Re={}));var ze;(function(e){function t(r,n,s){let a={kind:"create",uri:r};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}e.create=t;function i(r){let n=r;return n&&n.kind==="create"&&o.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||o.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||o.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||R.is(n.annotationId))}e.is=i;})(ze||(ze={}));var $e;(function(e){function t(r,n,s,a){let u={kind:"rename",oldUri:r,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(u.options=s),a!==void 0&&(u.annotationId=a),u}e.create=t;function i(r){let n=r;return n&&n.kind==="rename"&&o.string(n.oldUri)&&o.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||o.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||o.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||R.is(n.annotationId))}e.is=i;})($e||($e={}));var We;(function(e){function t(r,n,s){let a={kind:"delete",uri:r};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}e.create=t;function i(r){let n=r;return n&&n.kind==="delete"&&o.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||o.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||o.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||R.is(n.annotationId))}e.is=i;})(We||(We={}));var qe;(function(e){function t(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(n=>o.string(n.kind)?ze.is(n)||$e.is(n)||We.is(n):Re.is(n)))}e.is=t;})(qe||(qe={}));var Vt;(function(e){function t(r){return {uri:r}}e.create=t;function i(r){let n=r;return o.defined(n)&&o.string(n.uri)}e.is=i;})(Vt||(Vt={}));var jt;(function(e){function t(r,n){return {uri:r,version:n}}e.create=t;function i(r){let n=r;return o.defined(n)&&o.string(n.uri)&&o.integer(n.version)}e.is=i;})(jt||(jt={}));var He;(function(e){function t(r,n){return {uri:r,version:n}}e.create=t;function i(r){let n=r;return o.defined(n)&&o.string(n.uri)&&(n.version===null||o.integer(n.version))}e.is=i;})(He||(He={}));var Rt;(function(e){function t(r,n,s,a){return {uri:r,languageId:n,version:s,text:a}}e.create=t;function i(r){let n=r;return o.defined(n)&&o.string(n.uri)&&o.string(n.languageId)&&o.integer(n.version)&&o.string(n.text)}e.is=i;})(Rt||(Rt={}));var ee;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(i){let r=i;return r===e.PlainText||r===e.Markdown}e.is=t;})(ee||(ee={}));var te;(function(e){function t(i){let r=i;return o.objectLiteral(i)&&ee.is(r.kind)&&o.string(r.value)}e.is=t;})(te||(te={}));var x;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25;})(x||(x={}));var y;(function(e){e.PlainText=1,e.Snippet=2;})(y||(y={}));var zt;(function(e){e.Deprecated=1;})(zt||(zt={}));var $t;(function(e){function t(r,n,s){return {newText:r,insert:n,replace:s}}e.create=t;function i(r){let n=r;return n&&o.string(n.newText)&&E.is(n.insert)&&E.is(n.replace)}e.is=i;})($t||($t={}));var P;(function(e){e.asIs=1,e.adjustIndentation=2;})(P||(P={}));var Wt;(function(e){function t(i){let r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=t;})(Wt||(Wt={}));var qt;(function(e){function t(i){return {label:i}}e.create=t;})(qt||(qt={}));var Ht;(function(e){function t(i,r){return {items:i||[],isIncomplete:!!r}}e.create=t;})(Ht||(Ht={}));var de;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function i(r){let n=r;return o.string(n)||o.objectLiteral(n)&&o.string(n.language)&&o.string(n.value)}e.is=i;})(de||(de={}));var Gt;(function(e){function t(i){let r=i;return !!r&&o.objectLiteral(r)&&(te.is(r.contents)||de.is(r.contents)||o.typedArray(r.contents,de.is))&&(i.range===void 0||E.is(i.range))}e.is=t;})(Gt||(Gt={}));var Kt;(function(e){function t(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=t;})(Kt||(Kt={}));var Jt;(function(e){function t(i,r,...n){let s={label:i};return o.defined(r)&&(s.documentation=r),o.defined(n)?s.parameters=n:s.parameters=[],s}e.create=t;})(Jt||(Jt={}));var Xt;(function(e){e.Text=1,e.Read=2,e.Write=3;})(Xt||(Xt={}));var Qt;(function(e){function t(i,r){let n={range:i};return o.number(r)&&(n.kind=r),n}e.create=t;})(Qt||(Qt={}));var Zt;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26;})(Zt||(Zt={}));var Yt;(function(e){e.Deprecated=1;})(Yt||(Yt={}));var ei;(function(e){function t(i,r,n,s,a){let u={name:i,kind:r,location:{uri:s,range:n}};return a&&(u.containerName=a),u}e.create=t;})(ei||(ei={}));var ti;(function(e){function t(i,r,n,s){return s!==void 0?{name:i,kind:r,location:{uri:n,range:s}}:{name:i,kind:r,location:{uri:n}}}e.create=t;})(ti||(ti={}));var ii;(function(e){function t(r,n,s,a,u,c){let l={name:r,detail:n,kind:s,range:a,selectionRange:u};return c!==void 0&&(l.children=c),l}e.create=t;function i(r){let n=r;return n&&o.string(n.name)&&o.number(n.kind)&&E.is(n.range)&&E.is(n.selectionRange)&&(n.detail===void 0||o.string(n.detail))&&(n.deprecated===void 0||o.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}e.is=i;})(ii||(ii={}));var ni;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll";})(ni||(ni={}));var pe;(function(e){e.Invoked=1,e.Automatic=2;})(pe||(pe={}));var ri;(function(e){function t(r,n,s){let a={diagnostics:r};return n!=null&&(a.only=n),s!=null&&(a.triggerKind=s),a}e.create=t;function i(r){let n=r;return o.defined(n)&&o.typedArray(n.diagnostics,le.is)&&(n.only===void 0||o.typedArray(n.only,o.string))&&(n.triggerKind===void 0||n.triggerKind===pe.Invoked||n.triggerKind===pe.Automatic)}e.is=i;})(ri||(ri={}));var si;(function(e){function t(r,n,s){let a={title:r},u=!0;return typeof n=="string"?(u=!1,a.kind=n):V.is(n)?a.command=n:a.edit=n,u&&s!==void 0&&(a.kind=s),a}e.create=t;function i(r){let n=r;return n&&o.string(n.title)&&(n.diagnostics===void 0||o.typedArray(n.diagnostics,le.is))&&(n.kind===void 0||o.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||V.is(n.command))&&(n.isPreferred===void 0||o.boolean(n.isPreferred))&&(n.edit===void 0||qe.is(n.edit))}e.is=i;})(si||(si={}));var ai;(function(e){function t(r,n){let s={range:r};return o.defined(n)&&(s.data=n),s}e.create=t;function i(r){let n=r;return o.defined(n)&&E.is(n.range)&&(o.undefined(n.command)||V.is(n.command))}e.is=i;})(ai||(ai={}));var oi;(function(e){function t(r,n){return {tabSize:r,insertSpaces:n}}e.create=t;function i(r){let n=r;return o.defined(n)&&o.uinteger(n.tabSize)&&o.boolean(n.insertSpaces)}e.is=i;})(oi||(oi={}));var ui;(function(e){function t(r,n,s){return {range:r,target:n,data:s}}e.create=t;function i(r){let n=r;return o.defined(n)&&E.is(n.range)&&(o.undefined(n.target)||o.string(n.target))}e.is=i;})(ui||(ui={}));var ci;(function(e){function t(r,n){return {range:r,parent:n}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&E.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=i;})(ci||(ci={}));var li;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator";})(li||(li={}));var di;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary";})(di||(di={}));var pi;(function(e){function t(i){let r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t;})(pi||(pi={}));var hi;(function(e){function t(r,n){return {range:r,text:n}}e.create=t;function i(r){let n=r;return n!=null&&E.is(n.range)&&o.string(n.text)}e.is=i;})(hi||(hi={}));var fi;(function(e){function t(r,n,s){return {range:r,variableName:n,caseSensitiveLookup:s}}e.create=t;function i(r){let n=r;return n!=null&&E.is(n.range)&&o.boolean(n.caseSensitiveLookup)&&(o.string(n.variableName)||n.variableName===void 0)}e.is=i;})(fi||(fi={}));var mi;(function(e){function t(r,n){return {range:r,expression:n}}e.create=t;function i(r){let n=r;return n!=null&&E.is(n.range)&&(o.string(n.expression)||n.expression===void 0)}e.is=i;})(mi||(mi={}));var Di;(function(e){function t(r,n){return {frameId:r,stoppedLocation:n}}e.create=t;function i(r){let n=r;return o.defined(n)&&E.is(r.stoppedLocation)}e.is=i;})(Di||(Di={}));var Ge;(function(e){e.Type=1,e.Parameter=2;function t(i){return i===1||i===2}e.is=t;})(Ge||(Ge={}));var Ke;(function(e){function t(r){return {value:r}}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&(n.tooltip===void 0||o.string(n.tooltip)||te.is(n.tooltip))&&(n.location===void 0||ce.is(n.location))&&(n.command===void 0||V.is(n.command))}e.is=i;})(Ke||(Ke={}));var gi;(function(e){function t(r,n,s){let a={position:r,label:n};return s!==void 0&&(a.kind=s),a}e.create=t;function i(r){let n=r;return o.objectLiteral(n)&&v.is(n.position)&&(o.string(n.label)||o.typedArray(n.label,Ke.is))&&(n.kind===void 0||Ge.is(n.kind))&&n.textEdits===void 0||o.typedArray(n.textEdits,j.is)&&(n.tooltip===void 0||o.string(n.tooltip)||te.is(n.tooltip))&&(n.paddingLeft===void 0||o.boolean(n.paddingLeft))&&(n.paddingRight===void 0||o.boolean(n.paddingRight))}e.is=i;})(gi||(gi={}));var xi;(function(e){function t(i){return {kind:"snippet",value:i}}e.createSnippet=t;})(xi||(xi={}));var Ci;(function(e){function t(i,r,n,s){return {insertText:i,filterText:r,range:n,command:s}}e.create=t;})(Ci||(Ci={}));var Ei;(function(e){function t(i){return {items:i}}e.create=t;})(Ei||(Ei={}));var Fi;(function(e){e.Invoked=0,e.Automatic=1;})(Fi||(Fi={}));var Ai;(function(e){function t(i,r){return {range:i,text:r}}e.create=t;})(Ai||(Ai={}));var yi;(function(e){function t(i,r){return {triggerKind:i,selectedCompletionInfo:r}}e.create=t;})(yi||(yi={}));var Pi;(function(e){function t(i){let r=i;return o.objectLiteral(r)&&_e.is(r.uri)&&o.string(r.name)}e.is=t;})(Pi||(Pi={}));var Si;(function(e){function t(s,a,u,c){return new Je(s,a,u,c)}e.create=t;function i(s){let a=s;return !!(o.defined(a)&&o.string(a.uri)&&(o.undefined(a.languageId)||o.string(a.languageId))&&o.uinteger(a.lineCount)&&o.func(a.getText)&&o.func(a.positionAt)&&o.func(a.offsetAt))}e.is=i;function r(s,a){let u=s.getText(),c=n(a,(h,D)=>{let F=h.range.start.line-D.range.start.line;return F===0?h.range.start.character-D.range.start.character:F}),l=u.length;for(let h=c.length-1;h>=0;h--){let D=c[h],F=s.offsetAt(D.range.start),m=s.offsetAt(D.range.end);if(m<=l)u=u.substring(0,F)+D.newText+u.substring(m,u.length);else throw new Error("Overlapping edit");l=F;}return u}e.applyEdits=r;function n(s,a){if(s.length<=1)return s;let u=s.length/2|0,c=s.slice(0,u),l=s.slice(u);n(c,a),n(l,a);let h=0,D=0,F=0;for(;h<c.length&&D<l.length;)a(c[h],l[D])<=0?s[F++]=c[h++]:s[F++]=l[D++];for(;h<c.length;)s[F++]=c[h++];for(;D<l.length;)s[F++]=l[D++];return s}})(Si||(Si={}));var Je=class{constructor(t,i,r,n){this._uri=t,this._languageId=i,this._version=r,this._content=n,this._lineOffsets=void 0;}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let i=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(i,r)}return this._content}update(t,i){this._content=t.text,this._version=i,this._lineOffsets=void 0;}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],i=this._content,r=!0;for(let n=0;n<i.length;n++){r&&(t.push(n),r=!1);let s=i.charAt(n);r=s==="\r"||s===`
|
|
7
|
-
`,s==="\r"&&n+1<i.length&&i.charAt(n+1)===`
|
|
8
|
-
`&&n++;}r&&i.length>0&&t.push(i.length),this._lineOffsets=t;}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let i=this.getLineOffsets(),r=0,n=i.length;if(n===0)return v.create(0,t);for(;r<n;){let a=Math.floor((r+n)/2);i[a]>t?n=a:r=a+1;}let s=r-1;return v.create(s,t-i[s])}offsetAt(t){let i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;let r=i[t.line],n=t.line+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,n),r)}get lineCount(){return this.getLineOffsets().length}},o;(function(e){let t=Object.prototype.toString;function i(m){return typeof m<"u"}e.defined=i;function r(m){return typeof m>"u"}e.undefined=r;function n(m){return m===!0||m===!1}e.boolean=n;function s(m){return t.call(m)==="[object String]"}e.string=s;function a(m){return t.call(m)==="[object Number]"}e.number=a;function u(m,G,qi){return t.call(m)==="[object Number]"&&G<=m&&m<=qi}e.numberRange=u;function c(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=c;function l(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=l;function h(m){return t.call(m)==="[object Function]"}e.func=h;function D(m){return m!==null&&typeof m=="object"}e.objectLiteral=D;function F(m,G){return Array.isArray(m)&&m.every(G)}e.typedArray=F;})(o||(o={}));var bi=(C=>(C.AlreadyDefined="AlreadyDefined",C.ApiConflict="ApiConflict",C.AssignedNeverUsed="AssignedNeverUsed",C.DefinedNeverAssigned="DefinedNeverAssigned",C.DefinedNeverUsed="DefinedNeverUsed",C.EmptyBlockStatement="EmptyBlockStatement",C.ExecutionError="ExecutionError",C.InvalidApiFunctionUsage="InvalidApiFunctionUsage",C.InvalidConstantIdentifier="InvalidConstantIdentifier",C.InvalidPropertyIdentifier="InvalidPropertyIdentifier",C.NoArgumentExpected="NoArgumentExpected",C.NotADictionary="NotADictionary",C.NotDefined="NotDefined",C.NotEnoughArguments="NotEnoughArguments",C.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",C.ProfileVariablesConflict="ProfileVariablesConflict",C.ReservedKeyword="ReservedKeyword",C.TooManyArguments="TooManyArguments",C.UnexpectedEmptyFunction="UnexpectedEmptyFunction",C.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",C.UnknownPropertyIdentifier="UnknownPropertyIdentifier",C))(bi||{});var Ii=Object.values(Be),Li=Object.values(ke);Li.map(e=>({label:e,kind:x.Constant}));Ii.map(e=>({label:e,kind:x.Keyword}));
|
|
6
|
+
var ge=(e=>(e.False="false",e.Null="null",e.True="true",e))(ge||{}),xe=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(xe||{}),c=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(c||{}),De=["++","--"],We=["-","+","!","~"],qe=["=","/=","*=","%=","+=","-="],He=["||","&&"],bt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],It=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(It||{}),kt=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(kt||{});var v=[[],[],[]];De.forEach(e=>v[e.length-1].push(e));We.forEach(e=>v[e.length-1].push(e));He.forEach(e=>v[e.length-1].push(e));qe.forEach(e=>v[e.length-1].push(e));bt.forEach(e=>v[e.length-1].push(e));var rt=(D=>(D.AlreadyDefined="AlreadyDefined",D.ApiConflict="ApiConflict",D.AssignedNeverUsed="AssignedNeverUsed",D.DefinedNeverAssigned="DefinedNeverAssigned",D.DefinedNeverUsed="DefinedNeverUsed",D.EmptyBlockStatement="EmptyBlockStatement",D.ExecutionError="ExecutionError",D.InvalidApiFunctionUsage="InvalidApiFunctionUsage",D.InvalidConstantIdentifier="InvalidConstantIdentifier",D.InvalidPropertyIdentifier="InvalidPropertyIdentifier",D.NoArgumentExpected="NoArgumentExpected",D.NotADictionary="NotADictionary",D.NotDefined="NotDefined",D.NotEnoughArguments="NotEnoughArguments",D.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",D.ProfileVariablesConflict="ProfileVariablesConflict",D.ReservedKeyword="ReservedKeyword",D.TooManyArguments="TooManyArguments",D.UnexpectedEmptyFunction="UnexpectedEmptyFunction",D.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",D.UnknownPropertyIdentifier="UnknownPropertyIdentifier",D))(rt||{});var st=Object.values(xe),at=Object.values(ge);at.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Constant}));st.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Keyword}));
|
|
9
7
|
|
|
10
8
|
const operators = [
|
|
11
9
|
"<=",
|
|
@@ -80,7 +78,7 @@ const arcadeMonarchLanguage = {
|
|
|
80
78
|
// builtinFunctions: Array.from(arcadeService.FunctionNames),
|
|
81
79
|
// Arcade keywords. 'from' is a special case as we want to treat it as a keyword in
|
|
82
80
|
// import statement but as an identifer in var statement.
|
|
83
|
-
keywords:
|
|
81
|
+
keywords: st.filter((k) => k !== "from"),
|
|
84
82
|
operators,
|
|
85
83
|
constants: ["true", "false", "null"],
|
|
86
84
|
// we include these common regular expressions
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f8a85eb8.js');
|
|
6
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
6
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
7
7
|
|
|
8
8
|
async function colorizeCode(code) {
|
|
9
9
|
return arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
|
|
@@ -2972,7 +2972,7 @@ function setupMonacoEnvironment(assetsPath) {
|
|
|
2972
2972
|
break;
|
|
2973
2973
|
}
|
|
2974
2974
|
// If we have a relative path or we are on same orgin, we can use the default js implementation
|
|
2975
|
-
if (!arcadeDefaults.
|
|
2975
|
+
if (!arcadeDefaults.D(url) || arcadeDefaults.V(url, location.href, true)) {
|
|
2976
2976
|
return new Worker(url, { name: languageId });
|
|
2977
2977
|
}
|
|
2978
2978
|
// For cross orgin, we will load the worker code as a string and manufacture a blob
|
|
@@ -3019,7 +3019,7 @@ async function getArcadeWorker(uri) {
|
|
|
3019
3019
|
* @returns mode for arcade
|
|
3020
3020
|
*/
|
|
3021
3021
|
function getMode() {
|
|
3022
|
-
return Promise.resolve().then(function () { return require('./arcade-mode-
|
|
3022
|
+
return Promise.resolve().then(function () { return require('./arcade-mode-c040c92c.js'); });
|
|
3023
3023
|
}
|
|
3024
3024
|
// Register the language in Monaco
|
|
3025
3025
|
arcadeDefaults.languages.register({
|
|
@@ -3097,7 +3097,7 @@ const ArcgisArcadeApi = class {
|
|
|
3097
3097
|
async componentWillLoad() {
|
|
3098
3098
|
this._colorizeStyle = generateColorizeStyles();
|
|
3099
3099
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
3100
|
-
await arcadeDefaults
|
|
3100
|
+
await arcadeDefaults.$(this, index.getAssetPath("./assets"));
|
|
3101
3101
|
arcadeDefaults.arcadeDefaults.onModelContextDidChange((key) => {
|
|
3102
3102
|
if (!this.modelId || key !== arcadeDefaults.Uri.parse(this.modelId).toString()) {
|
|
3103
3103
|
return;
|
|
@@ -3107,7 +3107,7 @@ const ArcgisArcadeApi = class {
|
|
|
3107
3107
|
this._updateApiLibrary();
|
|
3108
3108
|
}
|
|
3109
3109
|
disconnectedCallback() {
|
|
3110
|
-
arcadeDefaults.
|
|
3110
|
+
arcadeDefaults.F(this);
|
|
3111
3111
|
this._flowObserver?.disconnect();
|
|
3112
3112
|
this._themeChangedListner?.dispose();
|
|
3113
3113
|
}
|
|
@@ -3151,7 +3151,7 @@ const ArcgisArcadeApi = class {
|
|
|
3151
3151
|
// When switching between flow the same reference is reused
|
|
3152
3152
|
this._flowObserver = new MutationObserver(() => {
|
|
3153
3153
|
// Get the last panel and try to set focus on the input element
|
|
3154
|
-
arcadeDefaults.
|
|
3154
|
+
arcadeDefaults.O(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
3155
3155
|
});
|
|
3156
3156
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
3157
3157
|
}
|
|
@@ -3162,14 +3162,14 @@ const ArcgisArcadeApi = class {
|
|
|
3162
3162
|
if (!filteredApiItems.length) {
|
|
3163
3163
|
return null;
|
|
3164
3164
|
}
|
|
3165
|
-
return (index.h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3165
|
+
return (index.h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (index.h("calcite-list-item", { label: arcadeDefaults.q(apiItem.completion.detail), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": apiItem }, index.h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "Expand", icon: "chevron-right", iconFlipRtl: true, scale: "s", onClick: this._selectItem, "data-item": apiItem }))))));
|
|
3166
3166
|
}
|
|
3167
3167
|
renderApiItemFlowItem() {
|
|
3168
3168
|
const apiItem = this._selectedApiItem;
|
|
3169
3169
|
if (!apiItem) {
|
|
3170
3170
|
return null;
|
|
3171
3171
|
}
|
|
3172
|
-
return (index.h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (index.h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), index.h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), index.h("calcite-block", { open: true, heading: arcadeDefaults.
|
|
3172
|
+
return (index.h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (index.h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), index.h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), index.h("calcite-block", { open: true, heading: arcadeDefaults.q(apiItem.completion.detail) }, index.h("div", { innerHTML: convertMarkdownString(apiItem.completion.documentation) }), apiItem.examples ? (index.h("div", { ref: (e) => {
|
|
3173
3173
|
if (!e) {
|
|
3174
3174
|
return;
|
|
3175
3175
|
}
|
|
@@ -3432,8 +3432,8 @@ const ArcgisArcadeEditor = class {
|
|
|
3432
3432
|
index.registerInstance(this, hostRef);
|
|
3433
3433
|
this.scriptChange = index.createEvent(this, "scriptChange", 3);
|
|
3434
3434
|
this.diagnosticsChange = index.createEvent(this, "diagnosticsChange", 3);
|
|
3435
|
-
this._componentReadyDefer = new arcadeDefaults.
|
|
3436
|
-
this._modelId = arcadeDefaults.
|
|
3435
|
+
this._componentReadyDefer = new arcadeDefaults.h();
|
|
3436
|
+
this._modelId = arcadeDefaults._();
|
|
3437
3437
|
this._editorProfilePromise = Promise.resolve(undefined);
|
|
3438
3438
|
this._disposables = [];
|
|
3439
3439
|
this._executeScript = async () => {
|
|
@@ -3573,7 +3573,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3573
3573
|
* @internal
|
|
3574
3574
|
*/
|
|
3575
3575
|
async updateThemeColors(colorRules) {
|
|
3576
|
-
const theme = arcadeDefaults.
|
|
3576
|
+
const theme = arcadeDefaults.C(this._hostElt);
|
|
3577
3577
|
updateThemeColors(theme, colorRules);
|
|
3578
3578
|
if (colorRules === undefined) {
|
|
3579
3579
|
["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
|
|
@@ -3602,7 +3602,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3602
3602
|
// Starts a locale observer. It will load the correct t9n strings for the component
|
|
3603
3603
|
// when the locale changes. We also pass updateEditorProfile. It will be invoked the first
|
|
3604
3604
|
// and on each locale change. The profile has to be refreshed on locale change as well.
|
|
3605
|
-
await arcadeDefaults
|
|
3605
|
+
await arcadeDefaults.$(this, assetsPath, async () => await this._updateEditorProfile());
|
|
3606
3606
|
}
|
|
3607
3607
|
async componentDidLoad() {
|
|
3608
3608
|
// Mark on component as ready.
|
|
@@ -3630,7 +3630,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3630
3630
|
await this._codeEditorElt?.setFocus();
|
|
3631
3631
|
}
|
|
3632
3632
|
disconnectedCallback() {
|
|
3633
|
-
arcadeDefaults.
|
|
3633
|
+
arcadeDefaults.F(this);
|
|
3634
3634
|
arcadeDefaults.arcadeDefaults.disposeApiContextForModel(this._modelId);
|
|
3635
3635
|
arcadeDefaults.arcadeDefaults.disposeEditorProfileForModel(this._modelId);
|
|
3636
3636
|
while (this._disposables.length) {
|
|
@@ -3833,10 +3833,10 @@ const ArcgisArcadeResults = class {
|
|
|
3833
3833
|
//#endregion
|
|
3834
3834
|
// #region Component lifecycle events
|
|
3835
3835
|
async componentWillLoad() {
|
|
3836
|
-
await arcadeDefaults
|
|
3836
|
+
await arcadeDefaults.$(this, index.getAssetPath("./assets"));
|
|
3837
3837
|
}
|
|
3838
3838
|
disconnectedCallback() {
|
|
3839
|
-
arcadeDefaults.
|
|
3839
|
+
arcadeDefaults.F(this);
|
|
3840
3840
|
}
|
|
3841
3841
|
// #endregion
|
|
3842
3842
|
//#region Private Methods
|
|
@@ -3865,15 +3865,15 @@ const ArcgisArcadeResults = class {
|
|
|
3865
3865
|
return index.h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
|
|
3866
3866
|
}
|
|
3867
3867
|
const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
|
|
3868
|
-
return (index.h("calcite-list", null, this.result ? (index.h(index.Fragment, null, index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3868
|
+
return (index.h("calcite-list", null, this.result ? (index.h(index.Fragment, null, index.h("calcite-list-item", { label: arcadeDefaults.B(this._t9nStrings?.lastexecutionformat, {
|
|
3869
3869
|
timeStamp: new Intl.DateTimeFormat(this._locale, { dateStyle: "medium", timeStyle: "medium" }).format(this.result.timeStamp)
|
|
3870
|
-
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3870
|
+
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.B(this._t9nStrings?.compilationtimeformat, {
|
|
3871
3871
|
time: new Intl.NumberFormat(this._locale, {
|
|
3872
3872
|
style: "unit",
|
|
3873
3873
|
unit: "millisecond",
|
|
3874
3874
|
maximumFractionDigits: 2
|
|
3875
3875
|
}).format(this.result.compilationTime ?? 0)
|
|
3876
|
-
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.
|
|
3876
|
+
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.B(this._t9nStrings?.executiontimeformat, {
|
|
3877
3877
|
time: new Intl.NumberFormat(this._locale, {
|
|
3878
3878
|
style: "unit",
|
|
3879
3879
|
unit: "millisecond",
|
|
@@ -3890,7 +3890,7 @@ const ArcgisArcadeResults = class {
|
|
|
3890
3890
|
}
|
|
3891
3891
|
switch (this.result?.type) {
|
|
3892
3892
|
case "error":
|
|
3893
|
-
return (index.h("div", { class: "result-value-simple flex-adjustable" }, arcadeDefaults.
|
|
3893
|
+
return (index.h("div", { class: "result-value-simple flex-adjustable" }, arcadeDefaults.B(this._t9nStrings?.executionerrorformat, {
|
|
3894
3894
|
message: this.result.value
|
|
3895
3895
|
})));
|
|
3896
3896
|
case "null":
|
|
@@ -3931,7 +3931,7 @@ const ArcgisArcadeResults = class {
|
|
|
3931
3931
|
case "null":
|
|
3932
3932
|
return index.h("span", { class: "constant-value" }, arcadeResult.type);
|
|
3933
3933
|
case "text":
|
|
3934
|
-
return index.h("span", { class: "string-value" }, arcadeDefaults.
|
|
3934
|
+
return index.h("span", { class: "string-value" }, arcadeDefaults.W(arcadeResult.value));
|
|
3935
3935
|
case "number":
|
|
3936
3936
|
return index.h("span", { class: "number-value" }, arcadeResult.value.toString());
|
|
3937
3937
|
case "boolean":
|
|
@@ -3939,9 +3939,9 @@ const ArcgisArcadeResults = class {
|
|
|
3939
3939
|
case "date":
|
|
3940
3940
|
return index.h("span", { class: "date-value" }, formatArcadeResultDate(arcadeResult));
|
|
3941
3941
|
case "dateOnly":
|
|
3942
|
-
return index.h("span", { class: "string-value" }, arcadeDefaults.
|
|
3942
|
+
return index.h("span", { class: "string-value" }, arcadeDefaults.W(formatArcadeResultDateOnly(arcadeResult)));
|
|
3943
3943
|
case "time":
|
|
3944
|
-
return index.h("span", { class: "string-value" }, arcadeDefaults.
|
|
3944
|
+
return index.h("span", { class: "string-value" }, arcadeDefaults.W(formatArcadeResultTimeOnly(arcadeResult)));
|
|
3945
3945
|
default:
|
|
3946
3946
|
return null;
|
|
3947
3947
|
}
|
|
@@ -3949,7 +3949,7 @@ const ArcgisArcadeResults = class {
|
|
|
3949
3949
|
renderArrayHeader(arcadeResult) {
|
|
3950
3950
|
const items = arcadeResult.value ?? [];
|
|
3951
3951
|
const leftoverCount = Math.max(items.length - MaxArrayItems, 0);
|
|
3952
|
-
return (index.h(index.Fragment, null, index.h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (index.h("span", null, "\u00A0", arcadeDefaults.
|
|
3952
|
+
return (index.h(index.Fragment, null, index.h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (index.h("span", null, "\u00A0", arcadeDefaults.B(this._t9nStrings?.showingfirstitemsformat, {
|
|
3953
3953
|
count: MaxArrayItems.toString()
|
|
3954
3954
|
}))) : null));
|
|
3955
3955
|
}
|
|
@@ -4001,7 +4001,7 @@ const ArcgisArcadeResults = class {
|
|
|
4001
4001
|
}
|
|
4002
4002
|
}
|
|
4003
4003
|
renderFeatureSetLabel(arcadeResult) {
|
|
4004
|
-
return (index.h("div", { class: "value-type" }, index.h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (index.h("span", null, "\u00A0", arcadeDefaults.
|
|
4004
|
+
return (index.h("div", { class: "value-type" }, index.h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (index.h("span", null, "\u00A0", arcadeDefaults.B(this._t9nStrings?.showingfirstitemsformat, {
|
|
4005
4005
|
count: BatchSize.toString()
|
|
4006
4006
|
}))) : null));
|
|
4007
4007
|
}
|
|
@@ -4084,12 +4084,12 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4084
4084
|
async componentWillLoad() {
|
|
4085
4085
|
this._colorizeStyle = generateColorizeStyles();
|
|
4086
4086
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
4087
|
-
await arcadeDefaults
|
|
4087
|
+
await arcadeDefaults.$(this, index.getAssetPath("./assets"));
|
|
4088
4088
|
}
|
|
4089
4089
|
disconnectedCallback() {
|
|
4090
4090
|
this._flowObserver?.disconnect();
|
|
4091
4091
|
this._themeChangedListner?.dispose();
|
|
4092
|
-
arcadeDefaults.
|
|
4092
|
+
arcadeDefaults.F(this);
|
|
4093
4093
|
}
|
|
4094
4094
|
// #endregion
|
|
4095
4095
|
//#region Private Methods
|
|
@@ -4107,7 +4107,7 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4107
4107
|
// When switching between flow the same reference is reused
|
|
4108
4108
|
this._flowObserver = new MutationObserver(() => {
|
|
4109
4109
|
// Get the last panel and try to set focus on the input element
|
|
4110
|
-
arcadeDefaults.
|
|
4110
|
+
arcadeDefaults.O(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4111
4111
|
});
|
|
4112
4112
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4113
4113
|
}
|
|
@@ -4204,10 +4204,10 @@ const ArcgisArcadeVariables = class {
|
|
|
4204
4204
|
//#endregion
|
|
4205
4205
|
// #region Component lifecycle events
|
|
4206
4206
|
async componentWillLoad() {
|
|
4207
|
-
await arcadeDefaults
|
|
4207
|
+
await arcadeDefaults.$(this, index.getAssetPath("./assets"));
|
|
4208
4208
|
}
|
|
4209
4209
|
disconnectedCallback() {
|
|
4210
|
-
arcadeDefaults.
|
|
4210
|
+
arcadeDefaults.F(this);
|
|
4211
4211
|
this._flowObserver?.disconnect();
|
|
4212
4212
|
}
|
|
4213
4213
|
// #endregion
|
|
@@ -4232,7 +4232,7 @@ const ArcgisArcadeVariables = class {
|
|
|
4232
4232
|
// When switching between flow the same reference is reused
|
|
4233
4233
|
this._flowObserver = new MutationObserver(() => {
|
|
4234
4234
|
// Get the last panel and try to set focus on the input element
|
|
4235
|
-
arcadeDefaults.
|
|
4235
|
+
arcadeDefaults.O(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4236
4236
|
});
|
|
4237
4237
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4238
4238
|
}
|
|
@@ -4258,7 +4258,7 @@ const ArcgisArcadeVariables = class {
|
|
|
4258
4258
|
}
|
|
4259
4259
|
renderEditorVariables(collection) {
|
|
4260
4260
|
// Filter the variables. Skip group, we will filter the children later on.
|
|
4261
|
-
const filterExpression = arcadeDefaults.
|
|
4261
|
+
const filterExpression = arcadeDefaults.z(this._filterValue);
|
|
4262
4262
|
const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
|
|
4263
4263
|
if (!filteredVariables.length) {
|
|
4264
4264
|
return index.h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
|
|
@@ -4309,7 +4309,7 @@ const ArcgisCodeEditor = class {
|
|
|
4309
4309
|
constructor(hostRef) {
|
|
4310
4310
|
index.registerInstance(this, hostRef);
|
|
4311
4311
|
this.valueChange = index.createEvent(this, "valueChange", 3);
|
|
4312
|
-
this._componentReadyDefer = new arcadeDefaults.
|
|
4312
|
+
this._componentReadyDefer = new arcadeDefaults.h();
|
|
4313
4313
|
this._disposables = [];
|
|
4314
4314
|
this.value = undefined;
|
|
4315
4315
|
this.language = undefined;
|
|
@@ -4447,7 +4447,7 @@ const ArcgisCodeEditor = class {
|
|
|
4447
4447
|
this.valueChange.emit(script);
|
|
4448
4448
|
});
|
|
4449
4449
|
// Detect if the host element or its ancestors got a theme attribute mutation
|
|
4450
|
-
this._themeObserver = arcadeDefaults.
|
|
4450
|
+
this._themeObserver = arcadeDefaults.p(this._hostElt, ["class"], () => this.updateTheme());
|
|
4451
4451
|
// Update the theme of the Monaco Editor
|
|
4452
4452
|
this.updateTheme();
|
|
4453
4453
|
// Creates a resize observer to re-layout the editor on size changing
|
|
@@ -4478,7 +4478,7 @@ const ArcgisCodeEditor = class {
|
|
|
4478
4478
|
// This is called the first time and subsequently by the Mutation Observer
|
|
4479
4479
|
// Figure out the theme by walking the ancestor path.
|
|
4480
4480
|
// If no theme is found then default to light.
|
|
4481
|
-
const theme = arcadeDefaults.
|
|
4481
|
+
const theme = arcadeDefaults.C(this._hostElt) === "light" ? "vs" : "vs-dark";
|
|
4482
4482
|
if (theme === this._currentTheme) {
|
|
4483
4483
|
return;
|
|
4484
4484
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const typescript = require('./typescript-
|
|
4
|
-
require('./arcade-defaults-
|
|
3
|
+
const typescript = require('./typescript-99122582.js');
|
|
4
|
+
require('./arcade-defaults-4a9774c6.js');
|
|
5
5
|
require('./index-f8a85eb8.js');
|
|
6
6
|
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-4a9774c6.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -3,7 +3,7 @@ import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertM
|
|
|
3
3
|
import { S as StickyFilterInput } from './functional-components.js';
|
|
4
4
|
import { f as filterCollection } from './utilities.js';
|
|
5
5
|
import { Uri } from 'monaco-editor';
|
|
6
|
-
import {
|
|
6
|
+
import { $, F, O, q } from './index2.js';
|
|
7
7
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
8
8
|
import { a as getArcadeWorker } from './arcade-contribution.js';
|
|
9
9
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
@@ -77,7 +77,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
77
77
|
async componentWillLoad() {
|
|
78
78
|
this._colorizeStyle = generateColorizeStyles();
|
|
79
79
|
this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
|
|
80
|
-
await
|
|
80
|
+
await $(this, getAssetPath("./assets"));
|
|
81
81
|
arcadeDefaults.onModelContextDidChange((key) => {
|
|
82
82
|
if (!this.modelId || key !== Uri.parse(this.modelId).toString()) {
|
|
83
83
|
return;
|
|
@@ -87,7 +87,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
87
87
|
this._updateApiLibrary();
|
|
88
88
|
}
|
|
89
89
|
disconnectedCallback() {
|
|
90
|
-
|
|
90
|
+
F(this);
|
|
91
91
|
this._flowObserver?.disconnect();
|
|
92
92
|
this._themeChangedListner?.dispose();
|
|
93
93
|
}
|
|
@@ -131,7 +131,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
131
131
|
// When switching between flow the same reference is reused
|
|
132
132
|
this._flowObserver = new MutationObserver(() => {
|
|
133
133
|
// Get the last panel and try to set focus on the input element
|
|
134
|
-
|
|
134
|
+
O(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
135
135
|
});
|
|
136
136
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
137
137
|
}
|
|
@@ -142,14 +142,14 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
142
142
|
if (!filteredApiItems.length) {
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
145
|
-
return (h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (h("calcite-list-item", { label:
|
|
145
|
+
return (h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (h("calcite-list-item", { label: q(apiItem.completion.detail), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": apiItem }, h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "Expand", icon: "chevron-right", iconFlipRtl: true, scale: "s", onClick: this._selectItem, "data-item": apiItem }))))));
|
|
146
146
|
}
|
|
147
147
|
renderApiItemFlowItem() {
|
|
148
148
|
const apiItem = this._selectedApiItem;
|
|
149
149
|
if (!apiItem) {
|
|
150
150
|
return null;
|
|
151
151
|
}
|
|
152
|
-
return (h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), h("calcite-block", { open: true, heading:
|
|
152
|
+
return (h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), h("calcite-button", { width: "half", slot: "footer-actions", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), h("calcite-block", { open: true, heading: q(apiItem.completion.detail) }, h("div", { innerHTML: convertMarkdownString(apiItem.completion.documentation) }), apiItem.examples ? (h("div", { ref: (e) => {
|
|
153
153
|
if (!e) {
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { languages } from 'monaco-editor';
|
|
2
2
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
3
3
|
import { c as importRequest } from './fields.js';
|
|
4
|
-
import {
|
|
4
|
+
import { D, V } from './index2.js';
|
|
5
5
|
|
|
6
6
|
function isMonacoEnvironmentSetup() {
|
|
7
7
|
return !!self.MonacoEnvironment?.getWorkerUrl;
|
|
@@ -42,7 +42,7 @@ function setupMonacoEnvironment(assetsPath) {
|
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
// If we have a relative path or we are on same orgin, we can use the default js implementation
|
|
45
|
-
if (!
|
|
45
|
+
if (!D(url) || V(url, location.href, true)) {
|
|
46
46
|
return new Worker(url, { name: languageId });
|
|
47
47
|
}
|
|
48
48
|
// For cross orgin, we will load the worker code as a string and manufacture a blob
|
|
@@ -2,7 +2,7 @@ import { Emitter, Uri } from 'monaco-editor';
|
|
|
2
2
|
import { CompletionItemKind, InsertTextMode, InsertTextFormat } from 'vscode-languageserver-types';
|
|
3
3
|
import { i as importPortalPortalItem, a as importLayersFeatureLayer, b as importWebMap, s as supportedFields, c as importRequest, f as fieldTypeToIconName, d as fieldTypeToArcadeType } from './fields.js';
|
|
4
4
|
import { p as portalItemPageUrl } from './utilities.js';
|
|
5
|
-
import {
|
|
5
|
+
import { Q, G, q, B, x, N } from './index2.js';
|
|
6
6
|
import { getAssetPath } from '@stencil/core/internal/client';
|
|
7
7
|
|
|
8
8
|
async function newPortalItem(definition) {
|
|
@@ -423,9 +423,9 @@ class ProfileItemBase {
|
|
|
423
423
|
// If the component is under RTL, the string is messed up.
|
|
424
424
|
// It is converted from $feature to feature$, This is not acceptable since the label
|
|
425
425
|
// represents a variable name. We are adding in front of the $ sign a right to left mark.
|
|
426
|
-
return
|
|
426
|
+
return q(this._label);
|
|
427
427
|
}
|
|
428
|
-
return
|
|
428
|
+
return B(this._profile?.intlStrings?.[this._label.code], this._label.formatValues);
|
|
429
429
|
}
|
|
430
430
|
/**
|
|
431
431
|
* Returns the description string.
|
|
@@ -437,7 +437,7 @@ class ProfileItemBase {
|
|
|
437
437
|
if (typeof this.description === "string") {
|
|
438
438
|
return this.description;
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return B(this._profile?.intlStrings?.[this.description.code ?? ""], this.description.formatValues);
|
|
441
441
|
}
|
|
442
442
|
/**
|
|
443
443
|
* Returns true if the item pass the filter test
|
|
@@ -671,7 +671,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
671
671
|
return this._profile?.intlStrings?.layer ?? "layer";
|
|
672
672
|
}
|
|
673
673
|
loadSource() {
|
|
674
|
-
if (
|
|
674
|
+
if (Q(this._loadPromise) && G(this._loadPromise)) {
|
|
675
675
|
return this._loadPromise;
|
|
676
676
|
}
|
|
677
677
|
this._loadPromise = this._loadSource();
|
|
@@ -788,7 +788,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
|
|
|
788
788
|
nonInteractive: true
|
|
789
789
|
}, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
|
|
790
790
|
}));
|
|
791
|
-
relationshipsGroup.variables = relationshipItems.filter(
|
|
791
|
+
relationshipsGroup.variables = relationshipItems.filter(Q);
|
|
792
792
|
if (!relationshipsGroup.variables.length) {
|
|
793
793
|
return null;
|
|
794
794
|
}
|
|
@@ -946,7 +946,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
|
|
|
946
946
|
return this._profile?.intlStrings?.featureservice ?? "featureservice";
|
|
947
947
|
}
|
|
948
948
|
async loadSource() {
|
|
949
|
-
if (
|
|
949
|
+
if (Q(this._loadPromise) && G(this._loadPromise)) {
|
|
950
950
|
return this._loadPromise;
|
|
951
951
|
}
|
|
952
952
|
this._loadPromise = this._loadSource();
|
|
@@ -1182,7 +1182,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
|
|
|
1182
1182
|
if (profiles) {
|
|
1183
1183
|
return profiles;
|
|
1184
1184
|
}
|
|
1185
|
-
if (!
|
|
1185
|
+
if (!x.has(locale)) {
|
|
1186
1186
|
return getSdkPredefinedProfiles("en");
|
|
1187
1187
|
}
|
|
1188
1188
|
try {
|
|
@@ -1356,7 +1356,7 @@ class ArcadeLanguageServiceDefaults {
|
|
|
1356
1356
|
if (isPredefinedProfile(definition)) {
|
|
1357
1357
|
definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
|
|
1358
1358
|
}
|
|
1359
|
-
const intlStrings = await
|
|
1359
|
+
const intlStrings = await N(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
|
|
1360
1360
|
if (!intlStrings) {
|
|
1361
1361
|
throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
|
|
1362
1362
|
}
|