@arcgis/coding-components 4.32.0-next.83 → 4.32.0-next.84

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.
Files changed (73) hide show
  1. package/dist/arcgis-coding-components/{C6XW2MT3.js → 2PGXQJD2.js} +2 -2
  2. package/dist/arcgis-coding-components/{SVC6J2DE.js → 34FFTPGY.js} +2 -2
  3. package/dist/arcgis-coding-components/{QR6WVNQI.js → 3ZS345BU.js} +2 -2
  4. package/dist/arcgis-coding-components/{WRMFW3PU.js → 4PICOR24.js} +2 -2
  5. package/dist/arcgis-coding-components/{ORNMMSBL.js → 4QY7CHXX.js} +2 -2
  6. package/dist/arcgis-coding-components/{EOMSLJPL.js → 4U3HRYKK.js} +1 -1
  7. package/dist/arcgis-coding-components/{PRR5KOS4.js → 55GT7ULQ.js} +2 -2
  8. package/dist/arcgis-coding-components/{4HUHKO2F.js → 5HQD4SEF.js} +2 -2
  9. package/dist/arcgis-coding-components/{KRSQQ5UL.js → 6LUBBG2N.js} +2 -2
  10. package/dist/arcgis-coding-components/{7252MA7S.js → 76N7QCJ6.js} +2 -2
  11. package/dist/arcgis-coding-components/{P6HD6APH.js → 7CROQMNG.js} +1 -1
  12. package/dist/arcgis-coding-components/{V6XSS2WT.js → 7QCIBSWF.js} +1 -1
  13. package/dist/arcgis-coding-components/{DC4CHF7W.js → BYM3DDKJ.js} +2 -2
  14. package/dist/arcgis-coding-components/{Z6AJHTW4.js → C5N4BJ5X.js} +2 -2
  15. package/dist/arcgis-coding-components/{BUX5A6M5.js → CDGGUMYZ.js} +2 -2
  16. package/dist/arcgis-coding-components/{WGWENSFB.js → DXKIQQFU.js} +2 -2
  17. package/dist/arcgis-coding-components/{77MY6AMZ.js → GEHXKKNK.js} +2 -2
  18. package/dist/arcgis-coding-components/{LZXHELU4.js → HZ2I4EZ6.js} +2 -2
  19. package/dist/arcgis-coding-components/{V3N4TSTX.js → I6G5RWRV.js} +2 -2
  20. package/dist/arcgis-coding-components/{4VB23NUX.js → IJWZ2C4G.js} +2 -2
  21. package/dist/arcgis-coding-components/{UDC3ATPR.js → JVLYMMQM.js} +2 -2
  22. package/dist/arcgis-coding-components/{5KLMJERZ.js → KDDODFMF.js} +2 -2
  23. package/dist/arcgis-coding-components/{5QRWOYYV.js → KLE7VSIC.js} +2 -2
  24. package/dist/arcgis-coding-components/{26D2TEEA.js → LIHVPH5O.js} +1 -1
  25. package/dist/arcgis-coding-components/{7NSF3PXP.js → LZP6K7IC.js} +2 -2
  26. package/dist/arcgis-coding-components/{W3GFC524.js → MRKG254N.js} +2 -2
  27. package/dist/arcgis-coding-components/{JTRK76CP.js → RE6RBJJS.js} +2 -2
  28. package/dist/arcgis-coding-components/UHJELEGL.js +4 -0
  29. package/dist/arcgis-coding-components/{VB6ORQZM.js → VGL2ZEKS.js} +2 -2
  30. package/dist/arcgis-coding-components/{TNFDDZLL.js → VM4NS5TR.js} +2 -2
  31. package/dist/arcgis-coding-components/{FBVEF5NR.js → X44UIUQV.js} +2 -2
  32. package/dist/arcgis-coding-components/{ESXQSD7A.js → Z2T2GNL7.js} +3 -3
  33. package/dist/arcgis-coding-components/{WG4LIQ47.js → Z3H2ERUB.js} +2 -2
  34. package/dist/arcgis-coding-components/{7ACPV5V2.js → ZGS4LC3Y.js} +2 -2
  35. package/dist/arcgis-coding-components/{LWVJU2TB.js → ZMOE7YCI.js} +2 -2
  36. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  37. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +29 -29
  38. package/dist/chunks/arcade-defaults.js +1 -1
  39. package/dist/chunks/arcade-executor.js +1 -1
  40. package/dist/chunks/arcade-mode.js +1 -1
  41. package/dist/chunks/arcade-service-accessors.js +1 -1
  42. package/dist/chunks/fields.js +1 -1
  43. package/dist/chunks/language-defaults-base.js +1 -1
  44. package/dist/chunks/markdown.js +1 -1
  45. package/dist/chunks/monaco-importer.js +1 -1
  46. package/dist/chunks/runtime.js +1 -1
  47. package/dist/chunks/sql-expr-defaults.js +1 -1
  48. package/dist/chunks/sql-expr-mode.js +1 -1
  49. package/dist/chunks/useT9n.js +1 -1
  50. package/dist/components/arcgis-arcade-editor/customElement.d.ts +14 -3
  51. package/dist/components/arcgis-arcade-editor/customElement.js +49 -30
  52. package/dist/components/arcgis-arcade-editor/index.d.ts +2 -0
  53. package/dist/components/arcgis-arcade-editor/index.js +2 -0
  54. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  55. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  56. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  57. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  58. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  59. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  60. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  61. package/dist/docs/api.json +30 -46
  62. package/dist/docs/docs.json +39 -25
  63. package/dist/docs/vscode.html-custom-data.json +0 -18
  64. package/dist/docs/web-types.json +7 -15
  65. package/dist/index.js +1 -1
  66. package/dist/loader.js +2 -2
  67. package/dist/types/lumina.d.ts +1 -1
  68. package/dist/types/preact.d.ts +1 -1
  69. package/dist/types/react.d.ts +8 -7
  70. package/dist/types/stencil.d.ts +1 -1
  71. package/dist/utils/custom-panel.d.ts +23 -0
  72. package/package.json +7 -7
  73. package/dist/arcgis-coding-components/DITB2IHG.js +0 -4
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2025-01-15T04:57:21",
2
+ "timestamp": "2025-01-16T04:57:13",
3
3
  "compiler": {
4
4
  "name": "@arcgis/lumina-compiler",
5
- "version": "4.32.0-next.83",
5
+ "version": "4.32.0-next.84",
6
6
  "typescriptVersion": "5.6.3"
7
7
  },
8
8
  "components": [
@@ -24,6 +24,32 @@
24
24
  "dependencies": [],
25
25
  "dependencyGraph": {},
26
26
  "props": [
27
+ {
28
+ "name": "customPanels",
29
+ "type": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n }) => JsxNode;\n}>)",
30
+ "complexType": {
31
+ "original": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n }) => JsxNode;\n}>)",
32
+ "resolved": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n }) => JsxNode;\n}>)",
33
+ "references": {
34
+ "Array": {
35
+ "location": "import",
36
+ "path": "typescript/lib/lib.es5.d.ts",
37
+ "id": "notImplemented"
38
+ }
39
+ }
40
+ },
41
+ "mutable": true,
42
+ "reflectToAttr": false,
43
+ "docs": "Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.",
44
+ "docsTags": [
45
+ {
46
+ "name": "internal"
47
+ }
48
+ ],
49
+ "values": [],
50
+ "optional": true,
51
+ "required": false
52
+ },
27
53
  {
28
54
  "name": "editorOptions",
29
55
  "type": "(IEditorOptions & IGlobalEditorOptions)",
@@ -97,36 +123,24 @@
97
123
  },
98
124
  {
99
125
  "name": "openedSidePanel",
100
- "type": "\"api\" | \"none\" | \"suggestions\" | \"variables\"",
126
+ "type": "T extends {\n customPanels: Array<ICustomPanel>;\n} ? \"none\" | \"variables\" | \"suggestions\" | \"api\" : string",
101
127
  "complexType": {
102
- "original": "\"api\" | \"none\" | \"suggestions\" | \"variables\"",
103
- "resolved": "\"api\" | \"none\" | \"suggestions\" | \"variables\"",
104
- "references": {}
128
+ "original": "T extends {\n customPanels: Array<ICustomPanel>;\n} ? \"none\" | \"variables\" | \"suggestions\" | \"api\" : string",
129
+ "resolved": "T extends {\n customPanels: Array<ICustomPanel>;\n} ? \"none\" | \"variables\" | \"suggestions\" | \"api\" : string",
130
+ "references": {
131
+ "T": {
132
+ "location": "local",
133
+ "path": "dist/components/arcgis-arcade-editor/customElement.d.ts",
134
+ "id": "notImplemented"
135
+ }
136
+ }
105
137
  },
106
138
  "mutable": true,
107
- "attr": "opened-side-panel",
108
139
  "reflectToAttr": true,
109
140
  "docs": "The name of the opened side panel. 'none' means 'no panel opened'.",
110
141
  "docsTags": [],
111
142
  "default": "\"none\"",
112
- "values": [
113
- {
114
- "value": "api",
115
- "type": "string"
116
- },
117
- {
118
- "value": "none",
119
- "type": "string"
120
- },
121
- {
122
- "value": "suggestions",
123
- "type": "string"
124
- },
125
- {
126
- "value": "variables",
127
- "type": "string"
128
- }
129
- ],
143
+ "values": [],
130
144
  "optional": true,
131
145
  "required": false
132
146
  },
@@ -16,24 +16,6 @@
16
16
  "description": "If true, it will hide the side actions bar. The editor will be in a minimalistic UX.",
17
17
  "values": []
18
18
  },
19
- {
20
- "name": "opened-side-panel",
21
- "description": "The name of the opened side panel. 'none' means 'no panel opened'.",
22
- "values": [
23
- {
24
- "name": "api"
25
- },
26
- {
27
- "name": "none"
28
- },
29
- {
30
- "name": "suggestions"
31
- },
32
- {
33
- "name": "variables"
34
- }
35
- ]
36
- },
37
19
  {
38
20
  "name": "script",
39
21
  "description": "The arcade script. Use this property to define or update the script.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@arcgis/coding-components",
4
- "version": "4.32.0-next.83",
4
+ "version": "4.32.0-next.84",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -26,19 +26,6 @@
26
26
  "type": "boolean"
27
27
  }
28
28
  },
29
- {
30
- "name": "opened-side-panel",
31
- "description": "The name of the opened side panel. 'none' means 'no panel opened'.",
32
- "default": "\"none\"",
33
- "value": {
34
- "type": [
35
- "\"api\"",
36
- "\"none\"",
37
- "\"suggestions\"",
38
- "\"variables\""
39
- ]
40
- }
41
- },
42
29
  {
43
30
  "name": "script",
44
31
  "description": "The arcade script. Use this property to define or update the script.",
@@ -70,6 +57,11 @@
70
57
  ],
71
58
  "js": {
72
59
  "properties": [
60
+ {
61
+ "name": "customPanels",
62
+ "description": "Custom panels to be displayed in the side panel.\nWill be placed below the default panels but above the help panel.",
63
+ "type": "(Array<{\n id: string;\n name: string;\n icon: string;\n description?: string | undefined;\n useFlows?: boolean | undefined;\n renderer: ({ closePanel, insertText, }: {\n closePanel: (e: Event) => void;\n insertText: (text: string) => void;\n }) => JsxNode;\n}>)"
64
+ },
73
65
  {
74
66
  "name": "editorOptions",
75
67
  "description": "Options to update on the editor.\nFor example:\n```json\n{\n \"fontSize\": 18\n}\n```\n\nTo get the full list of available options, see the Monaco Editor options documentation for more details.",
@@ -88,7 +80,7 @@
88
80
  {
89
81
  "name": "openedSidePanel",
90
82
  "description": "The name of the opened side panel. 'none' means 'no panel opened'.",
91
- "type": "\"api\" | \"none\" | \"suggestions\" | \"variables\""
83
+ "type": "T extends {\n customPanels: Array<ICustomPanel>;\n} ? \"none\" | \"variables\" | \"suggestions\" | \"api\" : string"
92
84
  },
93
85
  {
94
86
  "name": "profile",
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
3
3
  import { s as p } from "./chunks/sql-expr-defaults.js";
4
4
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
5
5
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
6
- v4.32.0-next.83 */
6
+ v4.32.0-next.84 */
7
7
  const a = s, r = t;
8
8
  export {
9
9
  c as arcade,
package/dist/loader.js CHANGED
@@ -2,9 +2,9 @@ import { r as e } from "./chunks/runtime.js";
2
2
  import { makeDefineCustomElements as i } from "@arcgis/lumina";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
5
- v4.32.0-next.83 */
5
+ v4.32.0-next.84 */
6
6
  const o = i(e, {
7
- "arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
7
+ "arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
8
8
  "arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
9
9
  "arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "suggestions:"],
10
10
  "arcgis-code-editor": [() => import("./components/arcgis-code-editor/customElement.js"), "editorInstance:,editorOptions:,language,modelId,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],
@@ -4,7 +4,7 @@ import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
4
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
5
  import type { h, EventHandler } from "@arcgis/lumina";
6
6
 
7
- interface LuminaArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, h.JSX.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
7
+ interface LuminaArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'customPanels' | 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, h.JSX.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
8
8
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>;
9
9
  onarcgisScriptChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>;
10
10
  }
@@ -5,7 +5,7 @@ import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-express
5
5
  import { JSX as PreactJsx } from "preact";
6
6
  import type { EventHandler } from "@arcgis/lumina";
7
7
 
8
- interface PreactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, PreactJsx.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
8
+ interface PreactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'customPanels' | 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, PreactJsx.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
9
9
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>;
10
10
  onarcgisScriptChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>;
11
11
  }
@@ -2,20 +2,21 @@
2
2
  import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor";
3
3
  import type { ArcgisCodeEditor } from "../components/arcgis-code-editor";
4
4
  import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor";
5
- import type { Ref, HTMLProps, EventHandler, SyntheticEvent } from 'react';
5
+ import type { HTMLProps } from 'react';
6
+ import type { EventHandler } from "@arcgis/lumina";
6
7
 
7
- interface ReactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, HTMLProps<HTMLArcgisArcadeEditorElement> {
8
- onarcgisDiagnosticsChange?: EventHandler<SyntheticEvent<HTMLArcgisArcadeEditorElement, HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>>;
9
- onarcgisScriptChange?: EventHandler<SyntheticEvent<HTMLArcgisArcadeEditorElement, HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>>;
8
+ interface ReactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'customPanels' | 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, HTMLProps<HTMLArcgisArcadeEditorElement> {
9
+ onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>;
10
+ onarcgisScriptChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>;
10
11
  }
11
12
 
12
13
  interface ReactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, 'editorOptions' | 'language' | 'modelId' | 'value'>>, HTMLProps<HTMLArcgisCodeEditorElement> {
13
- onarcgisSelectionChange?: EventHandler<SyntheticEvent<HTMLArcgisCodeEditorElement, HTMLArcgisCodeEditorElement["arcgisSelectionChange"]>>;
14
- onarcgisValueChange?: EventHandler<SyntheticEvent<HTMLArcgisCodeEditorElement, HTMLArcgisCodeEditorElement["arcgisValueChange"]>>;
14
+ onarcgisSelectionChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisSelectionChange"]>;
15
+ onarcgisValueChange?: EventHandler<HTMLArcgisCodeEditorElement["arcgisValueChange"]>;
15
16
  }
16
17
 
17
18
  interface ReactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, 'hideSideBar' | 'profile' | 'script'>>, HTMLProps<HTMLArcgisSqlExpressionEditorElement> {
18
- onarcgisScriptChange?: EventHandler<SyntheticEvent<HTMLArcgisSqlExpressionEditorElement, HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>>;
19
+ onarcgisScriptChange?: EventHandler<HTMLArcgisSqlExpressionEditorElement["arcgisScriptChange"]>;
19
20
  }
20
21
 
21
22
  declare module "react" {
@@ -5,7 +5,7 @@ import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-express
5
5
  import { JSXBase as StencilJsx } from "@stencil/core/internal";
6
6
  import type { EventHandler } from "@arcgis/lumina";
7
7
 
8
- interface StencilArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, StencilJsx.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
8
+ interface StencilArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, 'customPanels' | 'editorOptions' | 'hideDocumentationActions' | 'hideSideBar' | 'openedSidePanel' | 'profile' | 'script' | 'sideActionBarExpanded' | 'snippets' | 'suggestions' | 'testData'>>, StencilJsx.HTMLAttributes<HTMLArcgisArcadeEditorElement> {
9
9
  onArcgisDiagnosticsChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>;
10
10
  onArcgisScriptChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>;
11
11
  }
@@ -0,0 +1,23 @@
1
+ import { JsxNode } from '@arcgis/lumina';
2
+ export type ICustomPanel = {
3
+ /** Unique ID */
4
+ id: string;
5
+ /** Panel name - will be used in tooltip for side action bar and heading */
6
+ name: string;
7
+ /** Calcite icon */
8
+ icon: string;
9
+ /** Optional description */
10
+ description?: string;
11
+ /** Optional flag to indicate that the user is providing custom flow items */
12
+ useFlows?: boolean;
13
+ /** Renderer function that returns a JSX node */
14
+ renderer: ({ closePanel, insertText, }: {
15
+ closePanel: (e: Event) => void;
16
+ insertText: (text: string) => void;
17
+ }) => JsxNode;
18
+ };
19
+ /**
20
+ * validates that the renderer function returns a a jsx node that includes a calcite-flow-item.
21
+ * TODO: this should be improved to check that actual render result, and perform sanitation.
22
+ */
23
+ export declare const validateUseFlowsRenderer: (renderer: ICustomPanel["renderer"]) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/coding-components",
3
- "version": "4.32.0-next.83",
3
+ "version": "4.32.0-next.84",
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",
@@ -36,12 +36,12 @@
36
36
  ],
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
- "@arcgis/arcade-languageservice": "4.32.0-next.83",
40
- "@arcgis/components-controllers": "4.32.0-next.83",
41
- "@arcgis/components-utils": "4.32.0-next.83",
42
- "@arcgis/core-adapter": "4.32.0-next.83",
43
- "@arcgis/languages-api-utils": "4.32.0-next.83",
44
- "@arcgis/lumina": "4.32.0-next.83",
39
+ "@arcgis/arcade-languageservice": "4.32.0-next.84",
40
+ "@arcgis/components-controllers": "4.32.0-next.84",
41
+ "@arcgis/components-utils": "4.32.0-next.84",
42
+ "@arcgis/core-adapter": "4.32.0-next.84",
43
+ "@arcgis/languages-api-utils": "4.32.0-next.84",
44
+ "@arcgis/lumina": "4.32.0-next.84",
45
45
  "monaco-editor": "^0.52.0",
46
46
  "tslib": "^2.7.0",
47
47
  "vscode-languageserver-types": "^3.17.5"
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.32/esri/copyright.txt for details.
3
- v4.32.0-next.83 */
4
- import{a as b,h as c}from"./UDC3ATPR.js";import{a as P,b as A}from"./QR6WVNQI.js";import{a as E}from"./LWVJU2TB.js";import{a as f,b as v,d as s}from"./KRSQQ5UL.js";import"./4HUHKO2F.js";import"./26D2TEEA.js";import"./EOMSLJPL.js";import"./ESXQSD7A.js";import"./5QRWOYYV.js";import{b as h,e as g,f as t,h as n,r,s as u,w as _,x as m}from"./JTRK76CP.js";import{a as d,h as p}from"./P6HD6APH.js";import{Hl as x,kk as y}from"./V3N4TSTX.js";import"./V6XSS2WT.js";y();var D=g`arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}`,l=class extends u{constructor(){super(...arguments),this._codeEditorElt=P(),this._componentReadyDefer=new d,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=E(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(b,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:3,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0}}static{this.shadowRootOptions=h}static{this.styles=D}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await c(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=m("./assets");f(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await v();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await c(i.definition,a,e,o=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,o],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._codeEditorElt.value?.insertText(e.detail).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[x.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${A(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:a,active:o,panelName:S,iconFlipRtl:w=!1,onClick:$=this._toggleSidePanel}){return t`<calcite-action id=${e??n} .text=${i} .icon=${a} .active=${o} @click=${$} data-panel-name=${S??n} .iconFlipRtl=${w}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;switch(this.openedSidePanel){case"api":return t`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-language-api-panel>`;case"variables":return t`<arcgis-editor-variables class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile}></arcgis-editor-variables>`;case"suggestions":return t`<arcgis-arcade-suggestions class="side-panel flex-panel border-inline-start" .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`;default:return null}}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};_("arcgis-arcade-editor",l);export{l as ArcgisArcadeEditor};