@arcgis/coding-components 4.33.0-next.65 → 4.33.0-next.67
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/{Q7NAA3FS.js → 3AOHHNVR.js} +3 -3
- package/dist/arcgis-coding-components/{Q7NAA3FS.js.LEGAL.txt → 3AOHHNVR.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{AFTWQVCQ.js → 42AYTZKA.js} +2 -2
- package/dist/arcgis-coding-components/{LQKC6MDX.js → 5WSAZR2C.js} +2 -2
- package/dist/arcgis-coding-components/{6UN4J3PM.js.LEGAL.txt → 5WSAZR2C.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{CEB5KEP7.js → 6FN7SOMM.js} +2 -2
- package/dist/arcgis-coding-components/{6XSNGN5L.js.LEGAL.txt → 6FN7SOMM.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{V7KQUHTG.js → BYQJ6XAK.js} +1 -1
- package/dist/arcgis-coding-components/{NZV5TBQB.js → CBTWQSJT.js} +2 -2
- package/dist/arcgis-coding-components/{CY7PL22S.js → CU7Z66MR.js} +2 -2
- package/dist/arcgis-coding-components/{6XSNGN5L.js → E4F53554.js} +2 -2
- package/dist/arcgis-coding-components/{D6O56CTF.js.LEGAL.txt → E4F53554.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{6JPXA2ES.js → EMHUJGBV.js} +2 -2
- package/dist/arcgis-coding-components/{SASBSYFR.js → F3GZMJJV.js} +1 -1
- package/dist/arcgis-coding-components/{CEB5KEP7.js.LEGAL.txt → F3GZMJJV.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{BSAOCW6H.js → G4KPR7ZN.js} +2 -2
- package/dist/arcgis-coding-components/{AOVBXCSF.js → IF3D2ULX.js} +2 -2
- package/dist/arcgis-coding-components/{G2QXEALN.js → ILIOJSQH.js} +1 -1
- package/dist/arcgis-coding-components/{S7QMMPKF.js → IYOBSYET.js} +2 -2
- package/dist/arcgis-coding-components/IYOBSYET.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{OJ3IJOG7.js → KB7YJMZW.js} +2 -2
- package/dist/arcgis-coding-components/{S5TLRTWI.js → KX37X5GM.js} +2 -2
- package/dist/arcgis-coding-components/{S5TLRTWI.js.LEGAL.txt → KX37X5GM.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{VNGLIQH5.js → LCCL7SZK.js} +2 -2
- package/dist/arcgis-coding-components/{SE7TQCEY.js → LT3SUZ6V.js} +2 -2
- package/dist/arcgis-coding-components/{6UN4J3PM.js → LWCN6DCP.js} +2 -2
- package/dist/arcgis-coding-components/LWCN6DCP.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{EDBJFZS6.js → MAWZ5CZV.js} +2 -2
- package/dist/arcgis-coding-components/MAWZ5CZV.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{SRRC7DLP.js → N5NMKYFJ.js} +2 -2
- package/dist/arcgis-coding-components/N5NMKYFJ.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{D6O56CTF.js → O4AQ73H2.js} +2 -2
- package/dist/arcgis-coding-components/O4AQ73H2.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{IPFC5O54.js → O6NCKJHB.js} +2 -2
- package/dist/arcgis-coding-components/O6NCKJHB.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{3OLU6BJ5.js → P55GU2HI.js} +1 -1
- package/dist/arcgis-coding-components/{Z3WJU7DL.js → RAMWQI3R.js} +2 -2
- package/dist/arcgis-coding-components/RAMWQI3R.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{MIPOWVCF.js → RSHBUJX5.js} +2 -2
- package/dist/arcgis-coding-components/RSHBUJX5.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{DBMDRZL6.js → RX7YWF5K.js} +2 -2
- package/dist/arcgis-coding-components/{CRCEOPNN.js → UWJTKKFV.js} +2 -2
- package/dist/arcgis-coding-components/{NSCY3VGH.js → V773MO7C.js} +2 -2
- package/dist/arcgis-coding-components/V773MO7C.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{L4IBLYEZ.js → VAHOJC2N.js} +2 -2
- package/dist/arcgis-coding-components/{GUYGD2CW.js → VAQCEHOQ.js} +2 -2
- package/dist/arcgis-coding-components/{TT4MRZ3I.js → XNK2TD5S.js} +4 -4
- package/dist/arcgis-coding-components/{TT4MRZ3I.js.LEGAL.txt → XNK2TD5S.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{IDM6RYXI.js → YYHSHDYH.js} +2 -2
- package/dist/arcgis-coding-components/YYHSHDYH.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{TF6PXABV.js → ZNEE3VTS.js} +2 -2
- package/dist/arcgis-coding-components/ZNEE3VTS.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{SMP3POF7.js → ZVZQKKG4.js} +2 -2
- package/dist/arcgis-coding-components/ZVZQKKG4.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js.LEGAL.txt +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +11 -11
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +7 -7
- package/dist/arcgis-coding-components/EDBJFZS6.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/IDM6RYXI.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/IPFC5O54.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/LQKC6MDX.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/MIPOWVCF.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/NSCY3VGH.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/S7QMMPKF.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/SASBSYFR.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/SMP3POF7.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/SRRC7DLP.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/TF6PXABV.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/Z3WJU7DL.js.LEGAL.txt +0 -3
- /package/dist/arcgis-coding-components/{AFTWQVCQ.js.LEGAL.txt → 42AYTZKA.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{3OLU6BJ5.js.LEGAL.txt → BYQJ6XAK.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{NZV5TBQB.js.LEGAL.txt → CBTWQSJT.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{CY7PL22S.js.LEGAL.txt → CU7Z66MR.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{6JPXA2ES.js.LEGAL.txt → EMHUJGBV.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{BSAOCW6H.js.LEGAL.txt → G4KPR7ZN.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{AOVBXCSF.js.LEGAL.txt → IF3D2ULX.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{G2QXEALN.js.LEGAL.txt → ILIOJSQH.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{OJ3IJOG7.js.LEGAL.txt → KB7YJMZW.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{VNGLIQH5.js.LEGAL.txt → LCCL7SZK.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{SE7TQCEY.js.LEGAL.txt → LT3SUZ6V.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{V7KQUHTG.js.LEGAL.txt → P55GU2HI.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{DBMDRZL6.js.LEGAL.txt → RX7YWF5K.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{CRCEOPNN.js.LEGAL.txt → UWJTKKFV.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{L4IBLYEZ.js.LEGAL.txt → VAHOJC2N.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{GUYGD2CW.js.LEGAL.txt → VAQCEHOQ.js.LEGAL.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{b as f}from"./
|
|
3
|
+
v4.33.0-next.67 */
|
|
4
|
+
import{b as f}from"./VAQCEHOQ.js";import{a as u}from"./V773MO7C.js";import{c as d,f as i,r as a,s as h,w as m}from"./XNK2TD5S.js";import{e as c,o as n}from"./P55GU2HI.js";import"./BYQJ6XAK.js";var g=d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;function b(l){l.key==="Enter"&&l.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=u(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,variable:0}}static{this.styles=g}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{c(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let r=this.loading;return!r&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),r=!1}),r=!0),i`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${r?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(r=>r.passFilter(t));return s.length?s.map(r=>this.renderEditorVariable(r)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${b}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${f(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{a as g,b as i,c,d}from"./
|
|
3
|
+
v4.33.0-next.67 */
|
|
4
|
+
import{a as g,b as i,c,d}from"./ILIOJSQH.js";import{c as F}from"./3AOHHNVR.js";import"./LT3SUZ6V.js";import{a as y,v as T}from"./P55GU2HI.js";import{Gl as P,Kl as k,Nl as C,Sl as f,kk as O}from"./LCCL7SZK.js";import"./BYQJ6XAK.js";O();var z={False:"false",Null:"null",True:"true"},$={Break:"break",Continue:"continue",Else:"else",For:"for",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"};var j=["++","--"],V=["-","+","!","~"],W=["=","/=","*=","%=","+=","-="],R=["||","&&"],K=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var s={InvalidModuleUri:"InvalidModuleUri",ForInOfLoopInitializer:"ForInOfLoopInitializer",IdentifierExpected:"IdentifierExpected",InvalidEscapedReservedWord:"InvalidEscapedReservedWord",InvalidExpression:"InvalidExpression",InvalidFunctionIdentifier:"InvalidFunctionIdentifier",InvalidHexEscapeSequence:"InvalidHexEscapeSequence",InvalidLeftHandSideInAssignment:"InvalidLeftHandSideInAssignment",InvalidLeftHandSideInForIn:"InvalidLeftHandSideInForIn",InvalidTemplateHead:"InvalidTemplateHead",InvalidVariableAssignment:"InvalidVariableAssignment",KeyMustBeString:"KeyMustBeString",NoFunctionInsideBlock:"NoFunctionInsideBlock",NoFunctionInsideFunction:"NoFunctionInsideFunction",ModuleExportRootOnly:"ModuleExportRootOnly",ModuleImportRootOnly:"ModuleImportRootOnly",PunctuatorExpected:"PunctuatorExpected",TemplateOctalLiteral:"TemplateOctalLiteral",UnexpectedBoolean:"UnexpectedBoolean",UnexpectedEndOfScript:"UnexpectedEndOfScript",UnexpectedIdentifier:"UnexpectedIdentifier",UnexpectedKeyword:"UnexpectedKeyword",UnexpectedNull:"UnexpectedNull",UnexpectedNumber:"UnexpectedNumber",UnexpectedPunctuator:"UnexpectedPunctuator",UnexpectedString:"UnexpectedString",UnexpectedTemplate:"UnexpectedTemplate",UnexpectedToken:"UnexpectedToken"},H={[s.InvalidModuleUri]:"Module uri must be a text literal.",[s.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[s.IdentifierExpected]:"'${value}' is an invalid identifier.",[s.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[s.InvalidExpression]:"Invalid expression.",[s.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[s.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[s.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[s.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[s.InvalidTemplateHead]:"Invalid template structure.",[s.InvalidVariableAssignment]:"Invalid variable assignment.",[s.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[s.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[s.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[s.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[s.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[s.PunctuatorExpected]:"'${value}' expected.",[s.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[s.UnexpectedBoolean]:"Unexpected boolean literal.",[s.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[s.UnexpectedIdentifier]:"Unexpected identifier.",[s.UnexpectedKeyword]:"Unexpected keyword.",[s.UnexpectedNull]:"Unexpected null literal.",[s.UnexpectedNumber]:"Unexpected number.",[s.UnexpectedPunctuator]:"Unexpected punctuator.",[s.UnexpectedString]:"Unexpected text literal.",[s.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[s.UnexpectedToken]:"Unexpected token '${value}'."};var E=[[],[],[]];j.forEach(t=>E[t.length-1]?.push(t));V.forEach(t=>E[t.length-1]?.push(t));R.forEach(t=>E[t.length-1]?.push(t));W.forEach(t=>E[t.length-1]?.push(t));K.forEach(t=>E[t.length-1]?.push(t));var o={AlreadyDefined:"AlreadyDefined",ApiConflict:"ApiConflict",AssignedNeverUsed:"AssignedNeverUsed",DefinedNeverAssigned:"DefinedNeverAssigned",DefinedNeverUsed:"DefinedNeverUsed",EmptyBlockStatement:"EmptyBlockStatement",ExecutionError:"ExecutionError",InvalidApiFunctionUsage:"InvalidApiFunctionUsage",InvalidConstantIdentifier:"InvalidConstantIdentifier",InvalidPropertyIdentifier:"InvalidPropertyIdentifier",NoArgumentExpected:"NoArgumentExpected",NotADictionary:"NotADictionary",NotDefined:"NotDefined",NotEnoughArguments:"NotEnoughArguments",ProfileVariablesAreImmutable:"ProfileVariablesAreImmutable",ProfileVariablesConflict:"ProfileVariablesConflict",ReservedKeyword:"ReservedKeyword",TooManyArguments:"TooManyArguments",UnexpectedEmptyFunction:"UnexpectedEmptyFunction",UnexpectedPropertyIdentifier:"UnexpectedPropertyIdentifier",UnknownPropertyIdentifier:"UnknownPropertyIdentifier"},ce={[o.AlreadyDefined]:"'${identifier}' is already defined.",[o.ApiConflict]:"'${identifier}' is already defined as an Arcade constant or function.",[o.AssignedNeverUsed]:"'${identifier}' is assigned but never used.",[o.DefinedNeverAssigned]:"'${identifier}' is defined but never assigned.",[o.DefinedNeverUsed]:"'${identifier}' is defined but never used.",[o.EmptyBlockStatement]:"Empty block statement.",[o.ExecutionError]:"Execution Error: '${stack}'",[o.InvalidApiFunctionUsage]:"Arcade function '${identifier}' not used in a call expression.",[o.InvalidConstantIdentifier]:"Invalid constant identifier, expecting ${list}.",[o.InvalidPropertyIdentifier]:"Invalid property identifier, expecting ${list}.",[o.NoArgumentExpected]:"Expecting no argument.",[o.NotADictionary]:"'${identifier}' doesn't have properties.",[o.NotDefined]:"'${identifier}' is not defined.",[o.NotEnoughArguments]:"Expecting at least ${min} argument(s).",[o.ProfileVariablesAreImmutable]:"Profile variables cannot be modified.",[o.ProfileVariablesConflict]:"'${identifier}' is already defined as a profile variable.",[o.ReservedKeyword]:"'${identifier}' is a reserved keyword.",[o.TooManyArguments]:"Too many arguments, expecting ${max}.",[o.UnexpectedEmptyFunction]:"Unexpected empty function '${identifier}'.",[o.UnexpectedPropertyIdentifier]:"Unexpected property identifier.",[o.UnknownPropertyIdentifier]:"Unknown property identifier '${identifier}'.",...H};var B=Object.values($),q=Object.values(z);var le=q.map(t=>({label:t,kind:i.Constant})),he=B.map(t=>({label:t,kind:i.Keyword})),de=[{label:"exportfunction",kind:i.Snippet,detail:"Export Function Statement",insertText:`export function \${1:functionName} ($2) {
|
|
5
5
|
$0
|
|
6
6
|
}`,insertTextMode:d.adjustIndentation,insertTextFormat:c.Snippet},{label:"exportvar",kind:i.Snippet,detail:"Export Variable Statement",insertText:"export var ${0:variableName}\n",insertTextMode:d.adjustIndentation,insertTextFormat:c.Snippet},{label:"for",kind:i.Snippet,detail:"For Loop Statement",insertText:"for (var ${1:i} = 0; ${1:i} < ${2:array.length}; ${1:i}++) {\n $0\n}",insertTextMode:d.adjustIndentation,insertTextFormat:c.Snippet},{label:"forin",kind:i.Snippet,detail:"For-In Loop Statement",insertText:"for (var ${1:i} in ${2:arrayOrObject}) {\n $0\n}",insertTextMode:d.adjustIndentation,insertTextFormat:c.Snippet},{label:"forof",kind:i.Snippet,detail:"For-Of Loop Statement",insertText:"for (var ${1:i} of ${2:arrayOrObject}) {\n $0\n}",insertTextMode:d.adjustIndentation,insertTextFormat:c.Snippet},{label:"function",kind:i.Snippet,detail:"Function Statement",insertText:`function \${1:functionName} ($2) {
|
|
7
7
|
$0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{a as d}from"./
|
|
3
|
+
v4.33.0-next.67 */
|
|
4
|
+
import{a as d}from"./O4AQ73H2.js";import"./RAMWQI3R.js";import"./ILIOJSQH.js";import"./F3GZMJJV.js";import{c as u}from"./3AOHHNVR.js";import"./LT3SUZ6V.js";import"./XNK2TD5S.js";import{a as E,v as k}from"./P55GU2HI.js";import{Gl as w,Sl as g,kk as R}from"./LCCL7SZK.js";import"./BYQJ6XAK.js";R();var m=new E,h=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,m=new E),this._client=null}static async waitForWorker(){return await m.promise}async _getClientProxy(){let e=await u();if(!this._client){let{languageId:t}=this._defaults;this._worker=e.createWebWorker({moduleId:"SqlExprWorker",label:t,createData:{languageId:t},host:this._defaults.workerHost}),m.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let t=await this._getClientProxy();return await this._worker?.withSyncedResources(e),t}},L=["AND","AS","BOTH","CASE","CAST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DAY","ELSE","END","ESCAPE","FALSE","FLOAT","FOR","FROM","HOUR","IN","INT","INTEGER","INTERVAL","LEADING","LIKE","MINUTE","MONTH","POSITION","REAL","SECOND","SMALLINT","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRIM","TRUE","VARCHAR","WHEN","WITH","YEAR","ZONE"],b=["AND","BETWEEN","LIKE","NOT","OR","IS","NULL"],M=["CAST","EXTRACT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","ABS","ACOS","ASIN","ATAN","CEILING","COS","FLOOR","LOG","LOG10","MOD","NULLIF","POWER","ROUND","SIGN","SIN","TAN","TRUNCATE","CHAR_LENGTH","COALESCE","CONCAT","LOWER","POSITION","SUBSTRING","TRIM","UPPER"],O={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},D={defaultToken:"",tokenPostfix:".arcgis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:L,operators:b,builtinFunctions:M,builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}},_=class{constructor(e,t){this._worker=e,this._defaults=t}async provideCompletionItems(e,t){try{let o=await this._worker(e.uri),r=e.getWordUntilPosition(t),n={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:r.startColumn,endColumn:r.endColumn},c=this._defaults.getApiContextForModel(e.uri);return await o.doComplete(e.uri.toString(),n,t,c)}catch(o){return console.error(o),{suggestions:[]}}}},I=class{constructor(e,t,{defaults:o,diagnosticService:r}){this._languageId=e,this._worker=t,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=r,this._defaults=o,u().then(n=>{let c=i=>{let s=i.getLanguageId();if(s!==this._languageId)return;let l=k(()=>{this._doValidate(i,s).catch(A=>{throw A})}),f=i.onDidChangeContent(l),S=i.onDidChangeAttached(l);this._modelListeners.set(i.uri.toString(),[f,S]),this._doValidate(i,s).catch(console.error)},p=i=>{let s=i.uri.toString();n.setModelMarkers(i,this._languageId,[]);let l=this._modelListeners.get(s);if(l){for(;l.length;)l.pop()?.dispose();this._modelListeners.delete(s)}};this._disposables.push(n.onDidCreateModel(c)),this._disposables.push(n.onWillDisposeModel(i=>p(i))),this._disposables.push(n.onDidChangeModelLanguage(i=>{p(i.model),c(i.model)})),this._disposables.push(o.onDidChange(()=>{n.getModels().forEach(i=>{i.getLanguageId()===this._languageId&&(p(i),c(i))})})),this._disposables.push(o.onModelContextDidChange(i=>{n.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&s.uri.toString()===i&&this._doValidate(s,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(i=>i.forEach(s=>s.dispose())),this._modelListeners.clear()}}),n.getModels().forEach(c)})}async _doValidate(e,t){let o=await u();if(e.isAttachedToEditor())try{let r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),c=await r.doValidation(e.uri.toString(),n);this._diagnosticsService.fireDiagnosticsChange(e.uri,c),o.setModelMarkers(e,t,c)}catch(r){console.error(r)}}},C;async function v(...a){return await h.waitForWorker(),await new Promise((e,t)=>{if(!C){t(new Error("sql expression worker not registered!"));return}e(C(...a))})}var T=class{constructor(){this._onDiagnosticsChange=new w}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}},N=new T;function q(){return N}function G(a){let e=new h(a),t=async(...r)=>await e.getLanguageServiceWorker(...r);C=t,g.setMonarchTokensProvider(d.languageId,D),g.setLanguageConfiguration(d.languageId,O);let o=new _(t,d);g.registerCompletionItemProvider(d.languageId,o),new I(a.languageId,t,{defaults:a,diagnosticService:N})}export{q as getSqlExprDiagnosticService,v as getSqlExprWorker,G as setupMode};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.
|
|
4
|
-
import{d as e,v as i}from"./
|
|
3
|
+
v4.33.0-next.67 */
|
|
4
|
+
import{d as e,v as i}from"./XNK2TD5S.js";import"./P55GU2HI.js";import"./BYQJ6XAK.js";var o=e(i,{"arcgis-arcade-editor":[()=>import("./E4F53554.js"),"customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./N5NMKYFJ.js"),"consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./MAWZ5CZV.js"),"suggestions:"],"arcgis-code-editor":[()=>import("./5WSAZR2C.js"),"editorInstance:,editorOptions:,language,modelId,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],"arcgis-editor-variables":[()=>import("./YYHSHDYH.js"),"loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./RSHBUJX5.js"),"apiLibrary:,hideDocumentationActions,loading"],"arcgis-sql-expression-editor":[()=>import("./LWCN6DCP.js"),"hideSideBar,profile:,script"],"arcgis-sql-expression-fields":[()=>import("./KX37X5GM.js"),"loading,modelId"]});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-sql-expression-editor){visibility:hidden}:root{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-side-panel-w: 600px;--arcgis-coding-components-side-panel-max-w: 45%;--arcgis-editor-comment: #606060;--arcgis-editor-constant: #9809C8;--arcgis-editor-date: #296389;--arcgis-editor-identifier: #0000B3;--arcgis-editor-keyword: #BF4900;--arcgis-editor-number: #136D3D;--arcgis-editor-string: #A31515}.calcite-mode-dark{--arcgis-editor-comment: #BFBFBF;--arcgis-editor-constant: #CDBAEA;--arcgis-editor-date: #97A6CE;--arcgis-editor-identifier: #9FD4F3;--arcgis-editor-keyword: #EEAA5A;--arcgis-editor-number: #AAD04B;--arcgis-editor-string: #F2877B}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];o({resourcesUrl:import.meta.url});{window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{},});var a=$arcgis;a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c)}
|