@arcgis/coding-components 5.1.0-next.11 → 5.1.0-next.13

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.
@@ -1,13 +1,26 @@
1
1
  import type { JsxNode } from "@arcgis/lumina";
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor/customElement.js";
3
- import type { IconName } from "../components/arcgis-arcade-coding-assistant/types.js";
3
+ import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
4
4
 
5
- export type ICustomPanel = ICustomSidePanel;
5
+ /** @internal */
6
+ export type IBaseCustomPanel = {
7
+ /** Unique ID */
8
+ id: string;
9
+ name: string;
10
+ location: "sidebar";
11
+ renderer: ({ closePanel, insertText, closed, editorRef, }: {
12
+ closePanel: (e: Event) => void;
13
+ insertText: (text: string) => void;
14
+ closed: boolean;
15
+ editorRef: ArcgisArcadeEditor;
16
+ }) => JsxNode;
17
+ };
6
18
 
19
+ /** @internal */
7
20
  export type ICustomSidePanel = IBaseCustomPanel
8
21
  & {
9
22
  /** Calcite icon */
10
- icon: IconName;
23
+ icon: Icon["icon"];
11
24
  /** Optional description */
12
25
  description?: string;
13
26
  /**
@@ -22,15 +35,5 @@ export type ICustomSidePanel = IBaseCustomPanel
22
35
  location: "sidebar";
23
36
  };
24
37
 
25
- export type IBaseCustomPanel = {
26
- /** Unique ID */
27
- id: string;
28
- name: string;
29
- location: "sidebar";
30
- renderer: ({ closePanel, insertText, closed, editorRef, }: {
31
- closePanel: (e: Event) => void;
32
- insertText: (text: string) => void;
33
- closed: boolean;
34
- editorRef: ArcgisArcadeEditor;
35
- }) => JsxNode;
36
- };
38
+ /** @internal */
39
+ export type ICustomPanel = ICustomSidePanel;
@@ -1,7 +1,8 @@
1
- import type { IEditorProfileDefinition, IPredefinedProfile } from "../profile/types.js";
1
+ import type { IEditorProfileDefinition, IPredefinedProfile } from "../../components/types.js";
2
2
  import type { Uri as Uri2 } from "monaco-editor/esm/vs/editor/editor.api.js";
3
3
  import type { ApiCategory } from "@arcgis/languages-api-utils/dist/types.js";
4
4
 
5
+ /** @internal */
5
6
  export const sqlExpression: {
6
7
  setProfileForModel: (modelId: string | Uri2, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: { locale: string; }) => Promise<void>;
7
8
  getApiLibraryForModel: (modelId: string) => Promise<Array<ApiCategory>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/coding-components",
3
- "version": "5.1.0-next.11",
3
+ "version": "5.1.0-next.13",
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",
@@ -47,10 +47,10 @@
47
47
  "monaco-editor": "^0.55.1",
48
48
  "tslib": "^2.8.1",
49
49
  "vscode-languageserver-types": "^3.17.5",
50
- "@arcgis/arcade-languageservice": "5.1.0-next.11",
51
- "@arcgis/languages-api-utils": "5.1.0-next.11",
52
- "@arcgis/lumina": "5.1.0-next.11",
53
- "@arcgis/toolkit": "5.1.0-next.11"
50
+ "@arcgis/arcade-languageservice": "5.1.0-next.13",
51
+ "@arcgis/languages-api-utils": "5.1.0-next.13",
52
+ "@arcgis/lumina": "5.1.0-next.13",
53
+ "@arcgis/toolkit": "5.1.0-next.13"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@arcgis/core": "^5.0.0-next",
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import a from"./HVHTW7TF.js";import{b as m,c as y,d as h}from"./BQLG62QR.js";import{g as f}from"./WMLTLTIE.js";import{K as u}from"./EMMNZESW.js";export default $arcgis.t(([{d:b,f:d,j:g,l:F,m:M}])=>{var w=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?A(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:r}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:r?.map(s=>s.toLowerCase())}};function A(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},r={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return r;let[s,l]=g(t.fields,i);return r.properties=s,a.documentation={kind:"markdown",value:l},r}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await f(t.locale,u("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let r=this._getApiKey(e),s=new F(i,a);this._modelToProfileMap.set(r,s);let l=w(s);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};async function C(){return await import("./L2AQ5FXC.js").then(m=>m.default)}return{a:n,b:C}},a)
@@ -1,3 +0,0 @@
1
- import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
2
-
3
- export type IconName = Icon["icon"];
@@ -1,21 +0,0 @@
1
- export interface IEditorCodeSuggestionGroup {
2
- /** Label for the suggestion group */
3
- label: string;
4
- /** List of suggestions for the group */
5
- suggestions: IEditorCodeSuggestion[];
6
- }
7
-
8
- /** Defines a code suggestion */
9
- export interface IEditorCodeSuggestion {
10
- /** A short label for the suggestion. Can be thought as a title */
11
- label: string;
12
- /** A short description that will be showed below the label in the list of suggestions panel */
13
- description?: string;
14
- /** Markdown string that will be rendered along with the code in the detail panel */
15
- documentation?: string;
16
- /** The code for the suggestion. Will be injected in the editor is selected */
17
- code: string;
18
- }
19
-
20
- /** @param item */
21
- export function isSuggestionGroups(item: unknown): item is IEditorCodeSuggestionGroup[];
@@ -1,4 +0,0 @@
1
- export * from "./arcade-executor";
2
- export type * from "./profile/types";
3
- export * from "./editor-suggestions";
4
-