@arcgis/coding-components 5.0.0-next.114 → 5.0.0-next.116
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/addons.js +1 -1
- package/dist/cdn/{5XRXNGIJ.js → 2VBQTKPJ.js} +2 -2
- package/dist/cdn/{N4HK6QPY.js → 2VDNM4E2.js} +1 -1
- package/dist/cdn/4VCUCVBK.js +4 -0
- package/dist/cdn/{SZPTSVKI.js → 5E34XUIB.js} +2 -2
- package/dist/cdn/{O2RLIM4Z.js → 5OKP7MR6.js} +2 -2
- package/dist/cdn/{NOJYWNV6.js → 7JJPXZKZ.js} +2 -2
- package/dist/cdn/{LVRGJKTO.js → 7V25IS6A.js} +2 -2
- package/dist/cdn/{67ZTNYDR.js → AFWFVZ3D.js} +2 -2
- package/dist/cdn/{OCXQUJHW.js → ATMZJVQS.js} +2 -2
- package/dist/cdn/{5D7BZ4AJ.js → BKDPALF4.js} +2 -2
- package/dist/cdn/{FXBIE4TU.js → D6OLHQF3.js} +2 -2
- package/dist/cdn/{Q7T6IG6A.js → DTYDEUN2.js} +2 -2
- package/dist/cdn/{ELX57OKG.js → E3ACBLRP.js} +1 -1
- package/dist/cdn/{6HZN5K7C.js → EFBFASZ2.js} +1 -1
- package/dist/cdn/{TDWKY5BJ.js → ENLUMTM2.js} +1 -1
- package/dist/cdn/{VWGDPBT6.js → FGWMLBVV.js} +2 -2
- package/dist/cdn/{VJTAK7CX.js → FXCCH2NR.js} +2 -2
- package/dist/cdn/{C62MXLP6.js → GAFDXLRK.js} +1 -1
- package/dist/cdn/{UYKE4EFV.js → GRGNF5BP.js} +2 -2
- package/dist/cdn/{GELX4TL4.js → HAU34O2T.js} +2 -2
- package/dist/cdn/{TOESJKP6.js → IBKP7EVS.js} +2 -2
- package/dist/cdn/{VCLSKCOF.js → JHIMMZLU.js} +2 -2
- package/dist/cdn/{NR6Y3SMQ.js → JLKSWW5G.js} +2 -2
- package/dist/cdn/{TINATS7X.js → KWHR4CPP.js} +2 -2
- package/dist/cdn/{BLWQ7QOL.js → KZ3NNHCH.js} +2 -2
- package/dist/cdn/{AW57CO3G.js → LDRKCODQ.js} +2 -2
- package/dist/cdn/{EAJJ7BYC.js → LHKKZWM7.js} +2 -2
- package/dist/cdn/{RVD7TQR3.js → NP2YJUNW.js} +2 -2
- package/dist/cdn/{OTTHE5A7.js → OI2LQPNO.js} +2 -2
- package/dist/cdn/{JX5Z5PZM.js → OVHUPF6I.js} +2 -2
- package/dist/cdn/{HZPKRD5Y.js → PCXGFTQ5.js} +2 -2
- package/dist/cdn/{JYZFOYLT.js → PE2O2A3D.js} +1 -1
- package/dist/cdn/{4Y5YSMOE.js → PEDVTCDU.js} +2 -2
- package/dist/cdn/{GZAZQWHH.js → PLGJ2YGG.js} +2 -2
- package/dist/cdn/{FBPV75KB.js → QJQAOLAC.js} +2 -2
- package/dist/cdn/{2GCQFUMI.js → RIWO6MXU.js} +2 -2
- package/dist/cdn/{YEA4EWQC.js → RSX4DVU2.js} +2 -2
- package/dist/cdn/{67ARLOL3.js → SARGQYJB.js} +2 -2
- package/dist/cdn/SSXARCZF.js +8 -0
- package/dist/cdn/{DR2NYKLD.js → TASZMXVX.js} +2 -2
- package/dist/cdn/{R7M5X6VK.js → UBD2AOJU.js} +2 -2
- package/dist/cdn/{OTELJGV3.js → V7NFXJT4.js} +3 -3
- package/dist/cdn/{4LHBHN5J.js → VPJMN4YI.js} +2 -2
- package/dist/cdn/{IGN4DYX6.js → VR2FY3BO.js} +1 -1
- package/dist/cdn/{NNVZSNRG.js → WCZCRBXC.js} +3 -3
- package/dist/cdn/{P6PEG6MN.js → XZO6ZBYE.js} +2 -2
- package/dist/cdn/{KRZYNZ3L.js → YCFI5E4G.js} +1 -1
- package/dist/cdn/{5CZRMWEI.js → ZFJ2WJ7H.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-contribution.js +1 -1
- package/dist/chunks/arcade-defaults.js +113 -90
- 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/colorize.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +51 -51
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/monaco-theme.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/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.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-code-editor-shell/customElement.js +1 -1
- package/dist/components/arcgis-code-viewer/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/dist/utils/arcade-monaco/arcade-profile-strategy.d.ts +4 -1
- package/dist/utils/language-defaults-base.d.ts +1 -1
- package/dist/utils/profile/editor-profile.d.ts +2 -1
- package/dist/utils/profile/types.d.ts +17 -0
- package/dist/utils/profile/utils.d.ts +0 -2
- package/package.json +5 -5
- package/dist/cdn/NGMWEFSR.js +0 -8
- package/dist/cdn/QGA5LYZF.js +0 -4
|
@@ -262,8 +262,9 @@ export declare class EditorProfile extends DictionaryVariable {
|
|
|
262
262
|
readonly definition: types.IEditorProfileDefinition | undefined;
|
|
263
263
|
readonly intlStrings: types.IndexedProfileStrings;
|
|
264
264
|
readonly locale: string;
|
|
265
|
+
readonly policy: types.IProfilePolicy;
|
|
265
266
|
variables: EditorVariable[];
|
|
266
|
-
constructor(definition: types.IEditorProfileDefinition | undefined, intlStrings: types.IndexedProfileStrings, locale?: string);
|
|
267
|
+
constructor(definition: types.IEditorProfileDefinition | undefined, intlStrings: types.IndexedProfileStrings, locale?: string, policy?: types.IProfilePolicy);
|
|
267
268
|
/**
|
|
268
269
|
* Returns true if the profile supports feature set functions for snippets.
|
|
269
270
|
*/
|
|
@@ -446,4 +446,21 @@ export interface LayerInfo {
|
|
|
446
446
|
export interface IExtendedPredefinedProfile extends IPredefinedProfile {
|
|
447
447
|
additionalVariables?: IProfileVariable[];
|
|
448
448
|
}
|
|
449
|
+
/**
|
|
450
|
+
* Represents the policy for an editor profile. The policy can influence specific configuration and loading behavior of the editor profile.
|
|
451
|
+
*
|
|
452
|
+
* @privateremarks
|
|
453
|
+
* Currently we use this to ignore specific layers in feature set variables for arcade profiles, but the concept is extensible to other configuration and loading behavior in the future.
|
|
454
|
+
*/
|
|
455
|
+
export interface IProfilePolicy {
|
|
456
|
+
/**
|
|
457
|
+
* A hook to filter layers to be included in a feature set collection
|
|
458
|
+
* that source from a map
|
|
459
|
+
*
|
|
460
|
+
* @privateremarks
|
|
461
|
+
* see https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/10715 for a use case.
|
|
462
|
+
* In arcade we don't want to include certain layer types in the $map variable.
|
|
463
|
+
*/
|
|
464
|
+
filterFsCollectionLayersFromMap?: (layer: Layer) => boolean;
|
|
465
|
+
}
|
|
449
466
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FeatureDefinition, FeatureSetCollectionDefinition, FeatureSetDefinition, VoxelDefinition, PixelDefinition } from './types';
|
|
2
|
-
import { ArcadeSupportedFeatureSetLayerUnion } from '@arcgis/core/arcade';
|
|
3
2
|
import { default as Map } from '@arcgis/core/Map';
|
|
4
3
|
import { default as ImageryLayer } from '@arcgis/core/layers/ImageryLayer';
|
|
5
4
|
import { default as ImageryTileLayer } from '@arcgis/core/layers/ImageryTileLayer';
|
|
@@ -9,7 +8,6 @@ import { default as Subtype } from '@arcgis/core/layers/support/Subtype';
|
|
|
9
8
|
import { default as VoxelLayer } from '@arcgis/core/layers/VoxelLayer';
|
|
10
9
|
import type * as types from "./types";
|
|
11
10
|
export declare function isFeatureLayerLikeInstance(item: unknown): item is types.IFeatureLayerLikeInstance;
|
|
12
|
-
export declare function isSupportedLayerInstanceType(item: unknown): item is ArcadeSupportedFeatureSetLayerUnion;
|
|
13
11
|
export declare function isGroupLayerCapable(item: unknown): item is types.IGroupLayerCapable;
|
|
14
12
|
export declare function isMapInstance(item: unknown): item is Map;
|
|
15
13
|
export declare function isLoadAllCapable(item: unknown): item is types.ILoadAllCapable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.116",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
],
|
|
43
43
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@arcgis/arcade-languageservice": "5.0.0-next.
|
|
46
|
-
"@arcgis/languages-api-utils": "5.0.0-next.
|
|
47
|
-
"@arcgis/lumina": "5.0.0-next.
|
|
48
|
-
"@arcgis/toolkit": "5.0.0-next.
|
|
45
|
+
"@arcgis/arcade-languageservice": "5.0.0-next.116",
|
|
46
|
+
"@arcgis/languages-api-utils": "5.0.0-next.116",
|
|
47
|
+
"@arcgis/lumina": "5.0.0-next.116",
|
|
48
|
+
"@arcgis/toolkit": "5.0.0-next.116",
|
|
49
49
|
"@lit/task": "^1.0.3",
|
|
50
50
|
"lit": "^3.3.0",
|
|
51
51
|
"monaco-editor": "^0.52.0",
|
package/dist/cdn/NGMWEFSR.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.114 */
|
|
4
|
-
import a from"./NNVZSNRG.js";import{b as f,c,d as p}from"./JYZFOYLT.js";import{f as h,g as x}from"./JX5Z5PZM.js";import{K as u}from"./Q7T6IG6A.js";export default $arcgis.t(([{getDeclaredPixelMembers:C},{b:v,c:g,d:T,e:M,f:F,g:m,h:P,i:k,j:A,k:I}])=>{async function S(e){let{apiVersion:r,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),i=await V(e.dictionaryVariables);return{apiVersion:r,bundles:t,variables:i,hiddenApiItems:a?.map(n=>n.toLowerCase())}}async function V(e,r=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await _(t,r);case"pixel":return await K(t,r);case"voxel":case"feature":return await j(t,r);default:return $(t,r)}}))}function $(e,r){let{name:t,type:a}=e,i=e.getDescription();return{name:t,description:i,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:i}}}}async function j(e,r){let t=await e.loadSource(),{name:a}=e,i=e.getDescription(),n={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},s={name:a,description:i,type:"dictionary",properties:[],completion:n};if(!t)return s;let[o,l]=P(t.fields,i,!0);return s.properties=o,n.documentation={kind:"markdown",value:l},s}async function K(e,r){let t=await e.loadSource(),a=e.toProfileVariableDefinition();if(a.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:i}=e,n=e.getDescription(),s={label:i,detail:i,insertText:i,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},o={name:i,description:n,type:"dictionary",properties:[],completion:s};if(!t||!a.definition)return o;let l=await C(t),[E,L]=k(l,n);return o.properties=E,s.documentation={kind:"markdown",value:L},o}async function _(e,r){let{name:t,dictionaryVariables:a}=e,i=e.getDescription(),n=a.reduce((s,o)=>{s!==""&&(s+=`
|
|
5
|
-
|
|
6
|
-
`),s+=`**${o.name}**
|
|
7
|
-
${o.type}`;let l=o.getDescription();return l&&(s+=`
|
|
8
|
-
${l}`),s},i);return{name:t,description:i,type:"dictionary",properties:await V(a,f.Field),completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:n}}}}async function y(e="en"){let r=D.get(e);if(r)return r;if(!h.has(e))return await y("en");try{let t=await fetch(u(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));return t.ok?B(e,await t.json()):e==="en"?null:await y("en")}catch{return null}}var D=new Map;function B(e,r){let t=new Map;return r.forEach(a=>{t.set(a.id,a)}),D.set(e,t),t}async function q(e,r="en"){return(await y(r))?.get(e)??null}function z(e){return!!e&&typeof e=="object"&&"additionalVariables"in e&&Array.isArray(e.additionalVariables)}function G(e){return e?.map(b)}function b(e){switch(e.type){case"dictionary":return{...e,type:e.type,properties:G(e.properties)};case"array":return{...e,type:e.type,elementType:{type:"number",name:"number"}};default:return{...e,type:e.type}}}async function H(e,r="en"){if(!m(e))return;let t=await q(e.id,r);if(!t)return;let a={bundles:[...t.bundles],variables:[],hiddenApiItems:e.hiddenApiItems?.map(i=>i.toLowerCase())};return t.variables.forEach(i=>{if(e.disabledVariables?.includes(i.name))return;let n=e.definitions[i.name];switch(i.type){case"dictionary":return a.variables.push(b({...i,type:i.type,properties:Array.isArray(n)?[...n]:i.properties}));case"feature":return v(n)?a.variables.push({...i,type:"feature",definition:n}):void 0;case"pixel":return T(n)?a.variables.push({...i,type:i.type,definition:n}):void 0;case"voxel":return g(n)?a.variables.push({...i,type:i.type,definition:n}):void 0;case"featureSet":return M(n)?a.variables.push({...i,type:i.type,definition:n}):void 0;case"featureSetCollection":return F(n)?a.variables.push({...i,type:i.type,definition:n}):void 0;default:return a.variables.push(b(i))}}),z(e)&&a.variables.push(...e.additionalVariables??[]),a}var w=class extends I{constructor(){super("arcade",{apiPath:"./assets/arcade-language/api",apiPrefix:"arcade-api.t9n."})}async setProfileForModel(r,t,a={locale:"en"}){m(t)&&(t=await H(t,a.locale));let i=await x(a.locale,u("./assets/editor-profile/t9n"),"messages.");if(!i)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(r);let n=this._getApiKey(r),s=new A(t,i);this._modelToProfileMap.set(n,s);let o=await S(s);this.updateApiContextForModel(r,{locale:a.locale,profile:o,snippets:a.snippets})}},d=new w,U={setProfileForModel:d.setProfileForModel.bind(d),getApiLibraryForModel:d.getApiLibraryForModel.bind(d)};return d},"applications/Components/arcadeEditorUtils",a)
|
package/dist/cdn/QGA5LYZF.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.114 */
|
|
4
|
-
import c from"./P6PEG6MN.js";import"./NOJYWNV6.js";import b from"./HZPKRD5Y.js";import a from"./NNVZSNRG.js";import"./ELX57OKG.js";import"./C62MXLP6.js";import"./4Y5YSMOE.js";import"./OTELJGV3.js";import"./JYZFOYLT.js";import"./5CZRMWEI.js";import"./JX5Z5PZM.js";import"./Q7T6IG6A.js";import"./6HZN5K7C.js";import"./5D7BZ4AJ.js";import"./N4HK6QPY.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)
|