@arcgis/coding-components 5.1.0-next.0 → 5.1.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{UNTQC5M2.js → 44MLHT3A.js} +1 -1
- package/dist/cdn/{5JKSRJZY.js → 7YLRIYVH.js} +1 -1
- package/dist/cdn/{3B6KNFHK.js → BQLG62QR.js} +4 -4
- package/dist/cdn/{KKQIZTTK.js → F7IHWMK7.js} +1 -1
- package/dist/cdn/{NZY7KXAF.js → H75CMJQP.js} +1 -1
- package/dist/cdn/{Z56TGOZF.js → HVHTW7TF.js} +2 -2
- package/dist/cdn/JS62T4I5.js +4 -0
- package/dist/cdn/{N2FN7LBN.js → K7O73D3Q.js} +1 -1
- package/dist/cdn/{3YWUK77P.js → L2AQ5FXC.js} +1 -1
- package/dist/cdn/{DEWLD2VE.js → NXNOBP7G.js} +1 -1
- package/dist/cdn/{EPMYM35I.js → OPWQ5CNY.js} +1 -1
- package/dist/cdn/{3FSDLLYC.js → QWLPT7LO.js} +1 -1
- package/dist/cdn/{BYO7RLJT.js → T7GEIGWF.js} +1 -1
- package/dist/cdn/{QXQAIN3R.js → TDEKR2LM.js} +1 -1
- package/dist/cdn/TDYUEEOH.js +2 -0
- package/dist/cdn/WNUR7N3L.js +6 -0
- package/dist/cdn/XEUCI6KC.js +2 -0
- package/dist/cdn/{D2RP5367.js → ZGBZ6BXY.js} +1 -1
- package/dist/cdn/assets/code-editor/arcade.worker.js +8 -0
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2192 -2186
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/arcade-defaults.js +84 -84
- package/dist/chunks/arcade-mode.js +2 -2
- package/dist/chunks/language-defaults-base.js +3 -2
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +101 -96
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +5 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +72 -59
- package/dist/components/arcgis-arcade-results/customElement.js +13 -13
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/6QWZ6LSH.js +0 -2
- package/dist/cdn/ASVCAO4G.js +0 -4
- package/dist/cdn/MY63AUW2.js +0 -2
- package/dist/cdn/RXNRHK3U.js +0 -6
package/dist/cdn/RXNRHK3U.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./Z56TGOZF.js";import{b as m,c,d as p}from"./3B6KNFHK.js";import{f as x,g as v}from"./WMLTLTIE.js";import{K as y}from"./EMMNZESW.js";export default $arcgis.t(([{getDeclaredPixelMembers:E},{a:T,b:M,c:F,d:P,e:k,f:b,i:A,j:I,k:V,l:D}])=>{async function S(e){let{apiVersion:n,bundles:i,hiddenApiItems:a}=e.toEditorProfileDefinition(),t=await L(e.dictionaryVariables);return{apiVersion:n,bundles:i,variables:t,hiddenApiItems:a?.map(r=>r.toLowerCase())}}async function L(e,n=m.Variable){return await Promise.all(e.map(async i=>{switch(i.type){case"dictionary":return await B(i,n);case"pixel":return await _(i,n);case"voxel":case"feature":return await K(i,n);default:return $(i,n)}}))}function $(e,n){let{name:i,type:a}=e,t=e.getDescription();return{name:i,description:t,type:a,completion:{label:i,detail:i,insertText:i,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:n,documentation:{kind:"markdown",value:t}}}}async function K(e,n){let i=await e.loadSource(),{name:a}=e,t=e.getDescription(),r={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:n},s={name:a,description:t,type:"dictionary",properties:[],completion:r};if(!i)return s;let[o,l]=A(i.fields,t,!0);return s.properties=o,r.documentation={kind:"markdown",value:l},s}async function _(e,n){let i=await e.loadSource(),a=e.toProfileVariableDefinition();if(a.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:t}=e,r=e.getDescription(),s={label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:n},o={name:t,description:r,type:"dictionary",properties:[],completion:s};if(!i||!a.definition)return o;let l=await E(i),[d,u]=I(l,r);return o.properties=d,s.documentation={kind:"markdown",value:u},o}async function B(e,n){let{name:i,dictionaryVariables:a}=e,t=e.getDescription(),r=a.reduce((s,o)=>{s!==""&&(s+=`
|
|
3
|
-
|
|
4
|
-
`),s+=`**${o.name}**
|
|
5
|
-
${o.type}`;let l=o.getDescription();return l&&(s+=`
|
|
6
|
-
${l}`),s},t);return{name:i,description:t,type:"dictionary",properties:await L(a,m.Field),completion:{label:i,detail:i,insertText:i,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:n,documentation:{kind:"markdown",value:r}}}}async function w(e="en"){let n=C.get(e);if(n)return n;if(!x.has(e))return await w("en");try{let i=await fetch(y(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));return i.ok?q(e,await i.json()):e==="en"?null:await w("en")}catch{return null}}var C=new Map;function q(e,n){let i=new Map;return n.forEach(a=>{i.set(a.id,a)}),C.set(e,i),i}async function z(e,n="en"){return(await w(n))?.get(e)??null}function G(e){return!!e&&typeof e=="object"&&"additionalVariables"in e&&Array.isArray(e.additionalVariables)}function H(e){return e?.map(h)}function h(e){switch(e.type){case"dictionary":return{...e,type:e.type,properties:H(e.properties)};case"array":return{...e,type:e.type,elementType:{type:"number",name:"number"}};default:return{...e,type:e.type}}}async function J(e,n="en"){if(!b(e))return;let i=await z(e.id,n);if(!i)return;let a={bundles:[...i.bundles],variables:[],hiddenApiItems:e.hiddenApiItems?.map(t=>t.toLowerCase())};return i.variables.forEach(t=>{if(e.disabledVariables?.includes(t.name))return;let r=e.definitions[t.name];switch(t.type){case"dictionary":return a.variables.push(h({...t,type:t.type,properties:Array.isArray(r)?[...r]:t.properties}));case"feature":return T(r)?a.variables.push({...t,type:"feature",definition:r}):void 0;case"pixel":return F(r)?a.variables.push({...t,type:t.type,definition:r}):void 0;case"voxel":return M(r)?a.variables.push({...t,type:t.type,definition:r}):void 0;case"featureSet":return P(r)?a.variables.push({...t,type:t.type,definition:r}):void 0;case"featureSetCollection":return k(r)?a.variables.push({...t,type:t.type,definition:r}):void 0;default:return a.variables.push(h(t))}}),G(e)&&a.variables.push(...e.additionalVariables??[]),a}var N=["catalog-footprint","catalog","csv","feature","geojson","knowledge-graph-sublayer","oriented-imagery","subtype-group","subtype-sublayer","wfs"];function O(e){return!!e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&N.includes(e.type)}var Q={filterFsCollectionLayersFromMap:e=>O(e)},g=class extends D{#e=new Map;constructor(){super("arcade",{apiPath:"./assets/arcade-language/api",apiPrefix:"arcade-api.t9n."})}async setProfileForModel(n,i,a={locale:"en"}){let t=this._getApiKey(n),r=(this.#e.get(t)||Promise.resolve()).then(async()=>{let o=i,l=b(o)?await J(o,a.locale):o,d=await v(a.locale,y("./assets/editor-profile/t9n"),"messages.");if(!d)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(n);let u=new V(l,d,a.locale,Q);this._modelToProfileMap.set(t,u);let j=await S(u);this.updateApiContextForModel(n,{locale:a.locale,profile:j,snippets:a.snippets})}),s=r.finally(()=>{this.#e.get(t)===s&&this.#e.delete(t)});return this.#e.set(t,s),await r}},f=new g,R={setProfileForModel:f.setProfileForModel.bind(f),getApiLibraryForModel:f.getApiLibraryForModel.bind(f)};return f},"applications/Components/arcadeEditorUtils",a)
|