@arcgis/coding-components 4.33.0-next.111 → 4.33.0-next.112

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 (78) hide show
  1. package/dist/arcgis-coding-components/{HYI6UKUH.js → 25DKWHI3.js} +2 -2
  2. package/dist/arcgis-coding-components/{OLASU5SG.js → 3XS5EJDL.js} +2 -2
  3. package/dist/arcgis-coding-components/{366VFWXY.js → 3YUTP46J.js} +2 -2
  4. package/dist/arcgis-coding-components/{NVB6VEAO.js → 4G4TA5ZT.js} +2 -2
  5. package/dist/arcgis-coding-components/{O6DD7TDC.js → 56QG7XHN.js} +1 -1
  6. package/dist/arcgis-coding-components/{JWFZRVYB.js → 5MMZHZNX.js} +2 -2
  7. package/dist/arcgis-coding-components/{VEMQEWST.js → 67X4O22K.js} +2 -2
  8. package/dist/arcgis-coding-components/{OOUHEDKN.js → 7LP5HPZB.js} +2 -2
  9. package/dist/arcgis-coding-components/{MWNFTH2T.js → 7P2TKSLJ.js} +2 -2
  10. package/dist/arcgis-coding-components/{HJKRGMIU.js → ACIV6SL2.js} +2 -2
  11. package/dist/arcgis-coding-components/{UOWSQBKB.js → AVRHL7QJ.js} +2 -2
  12. package/dist/arcgis-coding-components/{L6BAJRDE.js → B7ITJNUQ.js} +3 -3
  13. package/dist/arcgis-coding-components/{WYGDKV4W.js → BEGGRVWE.js} +2 -2
  14. package/dist/arcgis-coding-components/{FDCBDD4U.js → BTS2SVSA.js} +2 -2
  15. package/dist/arcgis-coding-components/{27GXWCXA.js → EFA5UNC5.js} +1 -1
  16. package/dist/arcgis-coding-components/{XV5NZI4G.js → EMV5KQHU.js} +2 -2
  17. package/dist/arcgis-coding-components/{CYAQ4JQA.js → FMI7D3TB.js} +2 -2
  18. package/dist/arcgis-coding-components/{TK4KLTIG.js → HNOCMSEL.js} +2 -2
  19. package/dist/arcgis-coding-components/{GJ2KXDEW.js → IZHVFBJQ.js} +2 -2
  20. package/dist/arcgis-coding-components/{3DQTZMUR.js → JOTIVOCW.js} +2 -2
  21. package/dist/arcgis-coding-components/{43C4JWTF.js → KN4UAU4I.js} +2 -2
  22. package/dist/arcgis-coding-components/{WSTNB3GE.js → KUZ5P5IW.js} +2 -2
  23. package/dist/arcgis-coding-components/{O2Y5HUYR.js → KYDOYJ6B.js} +2 -2
  24. package/dist/arcgis-coding-components/{AAVI25PL.js → M45DCILY.js} +2 -2
  25. package/dist/arcgis-coding-components/{AZI7W2F3.js → M7RCGD5M.js} +1 -1
  26. package/dist/arcgis-coding-components/{3GS5DYNQ.js → OB4WITMY.js} +2 -2
  27. package/dist/arcgis-coding-components/{F53JWUIO.js → PCHLZCA3.js} +3 -3
  28. package/dist/arcgis-coding-components/{CKKLQHCQ.js → PVALMQ3W.js} +2 -2
  29. package/dist/arcgis-coding-components/{PBYIP4H6.js → Q2NHHD6P.js} +2 -2
  30. package/dist/arcgis-coding-components/{4WVBPUJ4.js → QOB6VMNN.js} +2 -2
  31. package/dist/arcgis-coding-components/{E2ZEUIX4.js → SAQN2HYT.js} +2 -2
  32. package/dist/arcgis-coding-components/{2DONQA6Z.js → SU6CQAWE.js} +2 -2
  33. package/dist/arcgis-coding-components/{BSRMUMHU.js → UHPNMUP5.js} +2 -2
  34. package/dist/arcgis-coding-components/{B4WMPRGA.js → VUSOS7Y5.js} +2 -2
  35. package/dist/arcgis-coding-components/{T6ACWCFI.js → XNPOK5IY.js} +2 -2
  36. package/dist/arcgis-coding-components/{LKZCVSJC.js → Y4R3CJBH.js} +2 -2
  37. package/dist/arcgis-coding-components/{TJAN4N3Y.js → YAYGZOXA.js} +2 -2
  38. package/dist/arcgis-coding-components/{KES3DFCL.js → YNNXLJF4.js} +2 -2
  39. package/dist/arcgis-coding-components/{ZNO2W4WL.js → ZKOKTK2U.js} +2 -2
  40. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  41. package/dist/chunks/arcade-defaults.js +1 -1
  42. package/dist/chunks/arcade-executor.js +1 -1
  43. package/dist/chunks/arcade-mode.js +1 -1
  44. package/dist/chunks/arcade-service-accessors.js +1 -1
  45. package/dist/chunks/fields.js +1 -1
  46. package/dist/chunks/language-defaults-base.js +1 -1
  47. package/dist/chunks/markdown.js +1 -1
  48. package/dist/chunks/monaco-importer.js +1 -1
  49. package/dist/chunks/runtime.js +1 -1
  50. package/dist/chunks/setup-monaco.js +1 -1
  51. package/dist/chunks/sql-expr-contribution.js +1 -1
  52. package/dist/chunks/sql-expr-defaults.js +1 -1
  53. package/dist/chunks/sql-expr-mode.js +1 -1
  54. package/dist/chunks/useT9n.js +1 -1
  55. package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +3 -1
  56. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -3
  57. package/dist/components/arcgis-arcade-editor/customElement.d.ts +31 -8
  58. package/dist/components/arcgis-arcade-editor/customElement.js +1 -28
  59. package/dist/components/arcgis-arcade-results/customElement.d.ts +10 -2
  60. package/dist/components/arcgis-arcade-results/customElement.js +1 -5
  61. package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +5 -1
  62. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -7
  63. package/dist/components/arcgis-code-editor/customElement.d.ts +9 -7
  64. package/dist/components/arcgis-code-editor/customElement.js +1 -39
  65. package/dist/components/arcgis-editor-variables/customElement.d.ts +10 -2
  66. package/dist/components/arcgis-editor-variables/customElement.js +1 -7
  67. package/dist/components/arcgis-language-api-panel/customElement.d.ts +20 -4
  68. package/dist/components/arcgis-language-api-panel/customElement.js +1 -7
  69. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +7 -0
  70. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -11
  71. package/dist/components/arcgis-sql-expression-fields/customElement.d.ts +5 -1
  72. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -7
  73. package/dist/docs/api.json +2 -2
  74. package/dist/docs/docs.json +2 -2
  75. package/dist/docs/web-types.json +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/loader.js +1 -1
  78. package/package.json +6 -6
@@ -19,13 +19,13 @@ type WithCustomPanels = {
19
19
  * [**Arcade**](https://developers.arcgis.com/arcade/) is a portable, and lightweight expression language used to create custom content throughout the [ArcGIS system](https://www.esri.com/en-us/arcgis/products/index).
20
20
  * Like other expression languages, it can perform mathematical calculations, format text, and evaluate logical statements.
21
21
  * It also supports multi-statement expressions, variables, and flow control statements. Arcade is unique when compared to other expression and scripting languages due to its inclusion of [feature](https://developers.arcgis.com/arcade/guide/types/#feature) and [geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) data types.
22
-
22
+ *
23
23
  * Map Viewer (MV) was the first ArcGIS Online product to incorporate the new Arcade editor after [the editor's introduction in the November 2022 ArcGIS Online release](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/introducing-the-new-arcade-editor-in-arcgis-online/).
24
24
  * This was possible thanks to the Arcade editor component, which enabled MV to implement its own Arcade expression builder.
25
25
  * You can now also find the editor in ArcGIS Dashboards, ArcGIS Field Maps, and ArcGIS Velocity.
26
-
26
+ *
27
27
  * You can easily get your own dedicated Arcade expression builder with the **Arcade editor** component, which includes:
28
-
28
+ *
29
29
  * - An easy to use [layout](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#the-new-layout)
30
30
  * - An optional minimal layout if you, for example, decide to manually exclude things such as test data, padding, line numbers, and the sidebar
31
31
  * - A way to execute Arcade expressions in a configurable code editor
@@ -34,6 +34,8 @@ type WithCustomPanels = {
34
34
  * - Built-in [keyboard shortcuts](https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/discover-the-arcade-editors-powerful-new-features/#keyboard-shortcuts)
35
35
  * - In-editor help for finding information about profile variables relevant to your profile, documentation for constants and functions, a link to the official Arcade documentation, and, in some case, suggestions.
36
36
  * - Support for many [languages and directionality](https://developers.arcgis.com/javascript/latest/localization/)
37
+ *
38
+ * [Read more...](https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-arcade-editor/)
37
39
  */
38
40
  export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> extends LitElement {
39
41
  /**
@@ -48,11 +50,23 @@ export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> ext
48
50
  * To get the full list of available options, see the Monaco Editor options [documentation](https://microsoft.github.io/monaco-editor/typedoc/variables/editor.EditorOptions.html) for more details.
49
51
  */
50
52
  editorOptions: (Editor.IEditorOptions & Editor.IGlobalEditorOptions) | undefined;
51
- /** If true, it will hide the documentation action in the side panel */
53
+ /**
54
+ * If true, it will hide the documentation action in the side panel
55
+ *
56
+ * @default false
57
+ */
52
58
  hideDocumentationActions: boolean;
53
- /** If true, it will hide the side actions bar. The editor will be in a minimalistic UX. */
59
+ /**
60
+ * If true, it will hide the side actions bar. The editor will be in a minimalistic UX.
61
+ *
62
+ * @default false
63
+ */
54
64
  hideSideBar: boolean;
55
- /** The name of the opened side panel. 'none' means 'no panel opened'. */
65
+ /**
66
+ * The name of the opened side panel. 'none' means 'no panel opened'.
67
+ *
68
+ * @default "none"
69
+ */
56
70
  openedSidePanel: T extends Required<WithCustomPanels> ? SidePanelName : string;
57
71
  /**
58
72
  * The profile contains metadata used by the editor for editing context and help.
@@ -71,9 +85,17 @@ export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> ext
71
85
  * ```
72
86
  */
73
87
  profile: IEditorProfileDefinition | IPredefinedProfile | undefined;
74
- /** The arcade script. Use this property to define or update the script. */
88
+ /**
89
+ * The arcade script. Use this property to define or update the script.
90
+ *
91
+ * @default ""
92
+ */
75
93
  script: string;
76
- /** If true, the side action bar will be expanded */
94
+ /**
95
+ * If true, the side action bar will be expanded
96
+ *
97
+ * @default false
98
+ */
77
99
  sideActionBarExpanded: boolean;
78
100
  /** Collection of snippets */
79
101
  snippets: ApiSnippet[] | undefined;
@@ -84,6 +106,7 @@ export declare class ArcgisArcadeEditor<T extends WithCustomPanels = object> ext
84
106
  /**
85
107
  * Custom panels to be displayed in the side panel.
86
108
  * Will be placed below the default panels but above the help panel.
109
+ *
87
110
  * @internal
88
111
  */
89
112
  customPanels: ICustomPanel[] | undefined;
@@ -15,7 +15,7 @@ import { createRef as S, ref as A } from "lit-html/directives/ref.js";
15
15
  import { css as y } from "@lit/reactive-element/css-tag.js";
16
16
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
17
17
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
18
- v4.33.0-next.111 */
18
+ v4.33.0-next.112 */
19
19
  const D = (r) => {
20
20
  if (!r.toString().includes("calcite-flow-item"))
21
21
  throw new Error("Renderer must return a JSX node that starts with <calcite-flow-item>");
@@ -39,33 +39,15 @@ class R extends f {
39
39
  static {
40
40
  this.styles = C;
41
41
  }
42
- //#endregion
43
- //#region Public Properties
44
- /**
45
- * The instance of the Monaco Editor after the component has been rendered.
46
- * To determine when a component is rendered, you can use componentOnReady() method.
47
- * The method returns a Promise that resolves after the component rendered for the first time.
48
- *
49
- * @readonly
50
- * @private
51
- */
52
42
  get editorInstance() {
53
43
  return this._codeEditorElt.value?.editorInstance;
54
44
  }
55
- //#endregion
56
- //#region Public Methods
57
- /**
58
- * @private
59
- * @deprecated **Deprecated** since 4.30. Use`editorInstance` property instead.
60
- */
61
45
  async getEditorInstance() {
62
46
  return await this._componentReadyDefer.promise, this._codeEditorElt.value?.editorInstance;
63
47
  }
64
- /** @deprecated **Deprecated** since 4.30. Use `script` property instead. */
65
48
  async getScript() {
66
49
  return await this._componentReadyDefer.promise, this._codeEditorElt.value?.value;
67
50
  }
68
- /** Returns the Arcade result for the script for the provided test data. */
69
51
  async getTestResult() {
70
52
  if (!this.testData)
71
53
  return { type: "error", value: "Missing test data", error: null };
@@ -76,12 +58,9 @@ class R extends f {
76
58
  const i = this._codeEditorElt.value?.value;
77
59
  return await d(e.definition, i, this.testData);
78
60
  }
79
- /** Set the focus on the element. */
80
61
  async setFocus() {
81
62
  await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
82
63
  }
83
- //#endregion
84
- //#region Lifecycle
85
64
  async load() {
86
65
  const e = u("./assets");
87
66
  $(e), await this._updateEditorProfile();
@@ -91,7 +70,6 @@ class R extends f {
91
70
  snippets: this.snippets
92
71
  });
93
72
  }
94
- /** This lifecycle method is not expected to return a promise. The returned promise will be ignored by Lit rather than awaited. */
95
73
  async loaded() {
96
74
  this._componentReadyDefer.resolve(), await this._updateApiLibrary();
97
75
  const e = await E();
@@ -101,8 +79,6 @@ class R extends f {
101
79
  for (super.disconnectedCallback(); this._disposables.length; )
102
80
  this._disposables.pop()?.dispose();
103
81
  }
104
- //#endregion
105
- //#region Private Methods
106
82
  async _updateDataModelDeps() {
107
83
  await this._updateEditorProfile(), await this._updateApiLibrary();
108
84
  }
@@ -177,13 +153,10 @@ class R extends f {
177
153
  });
178
154
  e && (this._executeScriptAction = e, this._disposables.push(e));
179
155
  }
180
- // Method to safely dispose of an IDisposable
181
156
  _disposeSafely(e) {
182
157
  const i = this._disposables.indexOf(e);
183
158
  i !== -1 && this._disposables.splice(i, 1), e.dispose();
184
159
  }
185
- //#endregion
186
- //#region Rendering
187
160
  renderMainActionBar() {
188
161
  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;
189
162
  }
@@ -7,9 +7,17 @@ export type ResultPanelName = "console" | "log" | "output";
7
7
  export declare class ArcgisArcadeResults extends LitElement {
8
8
  /** The console logs from the execution of an Arcade expression */
9
9
  consoleLogs: string[] | undefined;
10
- /** Loading state */
10
+ /**
11
+ * Loading state
12
+ *
13
+ * @default false
14
+ */
11
15
  loading?: boolean;
12
- /** The result panel displayed */
16
+ /**
17
+ * The result panel displayed
18
+ *
19
+ * @default "output"
20
+ */
13
21
  openedResultPanel: ResultPanelName;
14
22
  /** The results from the execution of an Arcade expression */
15
23
  result: ArcadeResult | undefined;
@@ -8,7 +8,7 @@ import { css as L } from "@lit/reactive-element/css-tag.js";
8
8
  import { s as O } from "../../chunks/fields.js";
9
9
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
10
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
11
- v4.33.0-next.111 */
11
+ v4.33.0-next.112 */
12
12
  const D = L`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{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)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`, l = {
13
13
  lines: !0,
14
14
  selectionMode: "none",
@@ -107,8 +107,6 @@ class z extends C {
107
107
  static {
108
108
  this.styles = D;
109
109
  }
110
- //#endregion
111
- //#region Private Methods
112
110
  updateResultPanel(a) {
113
111
  this.openedResultPanel = a, this.arcgisOpenedResultPanelChange.emit(a);
114
112
  }
@@ -119,8 +117,6 @@ class z extends C {
119
117
  _emitClose() {
120
118
  this.arcgisClose.emit();
121
119
  }
122
- //#endregion
123
- //#region Rendering
124
120
  renderConsolePanel() {
125
121
  return this.openedResultPanel !== "console" ? null : this.loading && !this.consoleLogs?.length ? t`<calcite-loader scale=s type=indeterminate label></calcite-loader>` : t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length ? this.consoleLogs.map((a) => t`<p>${a}</p>`) : t`<p>${this.messages.consolemessage}</p>`}</div>`;
126
122
  }
@@ -7,7 +7,11 @@ import { IEditorCodeSuggestion, IEditorCodeSuggestionGroup } from '../../utils/e
7
7
  export declare class ArcgisArcadeSuggestions extends LitElement {
8
8
  /** The collection of suggestions */
9
9
  suggestions: IEditorCodeSuggestion[] | IEditorCodeSuggestionGroup[] | undefined;
10
- /** When true, the component will be hidden. */
10
+ /**
11
+ * When true, the component will be hidden.
12
+ *
13
+ * @default false
14
+ */
11
15
  closed?: boolean | undefined;
12
16
  /** Raised when close action has been activated */
13
17
  readonly arcgisClose: TargetedEvent<this, void>;
@@ -9,7 +9,7 @@ import { u as b } from "../../chunks/useT9n.js";
9
9
  import { css as _ } from "@lit/reactive-element/css-tag.js";
10
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
12
- v4.33.0-next.111 */
12
+ v4.33.0-next.112 */
13
13
  function v(o) {
14
14
  return !Array.isArray(o) || !o.length ? !1 : Array.isArray(o[0].suggestions);
15
15
  }
@@ -26,8 +26,6 @@ class $ extends u {
26
26
  static {
27
27
  this.styles = S;
28
28
  }
29
- //#endregion
30
- //#region Lifecycle
31
29
  load() {
32
30
  this._colorizeStyle = a(), this._themeChangedListener = h(() => this._colorizeStyle = a());
33
31
  }
@@ -37,8 +35,6 @@ class $ extends u {
37
35
  disconnectedCallback() {
38
36
  super.disconnectedCallback(), this._flowObserver?.disconnect(), this._themeChangedListener?.dispose();
39
37
  }
40
- //#endregion
41
- //#region Private Methods
42
38
  suggestionsPropChanged() {
43
39
  this._selectedSuggestion = void 0;
44
40
  }
@@ -67,8 +63,6 @@ class $ extends u {
67
63
  _colorizeCode(e) {
68
64
  e !== void 0 && m(e, this._selectedSuggestion.code, "arcade");
69
65
  }
70
- //#endregion
71
- //#region Rendering
72
66
  renderSuggestionGroups() {
73
67
  return this.suggestions === void 0 ? null : v(this.suggestions) ? this.suggestions.map((e) => s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`) : this.renderSuggestionListItems(this.suggestions);
74
68
  }
@@ -4,6 +4,8 @@ import { PropertyValues } from 'lit';
4
4
  import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
5
5
 
6
6
  /**
7
+ * [Read more...](https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-code-editor/)
8
+ *
7
9
  * @internal
8
10
  */
9
11
  export declare class ArcgisCodeEditor extends LitElement {
@@ -11,8 +13,6 @@ export declare class ArcgisCodeEditor extends LitElement {
11
13
  * The instance of the Monaco Editor after the component has been rendered.
12
14
  * To determine when a component is rendered, you can use componentOnReady() method.
13
15
  * The method returns a Promise that resolves after the component rendered for the first time.
14
- *
15
- * @readonly
16
16
  */
17
17
  get editorInstance(): Editor.IStandaloneCodeEditor | undefined;
18
18
  /**
@@ -42,6 +42,8 @@ export declare class ArcgisCodeEditor extends LitElement {
42
42
  /**
43
43
  * The initial value for the editor.
44
44
  * The value is the script, code, css, json, etc.
45
+ *
46
+ * @default ""
45
47
  */
46
48
  value: string;
47
49
  /** @deprecated **Deprecated** since 4.30. Use `value` property instead. */
@@ -49,21 +51,21 @@ export declare class ArcgisCodeEditor extends LitElement {
49
51
  /**
50
52
  * Inserts a snippet at the current position in the editor.
51
53
  *
52
- * @param {string} text - The string snippet to insert
53
- * @returns {Promise<void>}
54
+ * @param text - The string snippet to insert
55
+ * @returns
54
56
  */
55
57
  insertSnippet(text: string | null | undefined): Promise<void>;
56
58
  /**
57
59
  * Inserts a text at the current position in the editor.
58
60
  *
59
- * @param {string} text - The string to insert
60
- * @returns {Promise<void>}
61
+ * @param text - The string to insert
62
+ * @returns
61
63
  */
62
64
  insertText(text: string | null | undefined): Promise<void>;
63
65
  /**
64
66
  * Sets the focus on the editor.
65
67
  *
66
- * @returns {Promise<void>}
68
+ * @returns
67
69
  */
68
70
  setFocus(): Promise<void>;
69
71
  /** @deprecated **Deprecated** since 4.30. Use `value` property instead. */
@@ -9,7 +9,7 @@ import { load as h } from "@arcgis/lumina/controllers";
9
9
  import { Range as M, Uri as c, KeyMod as n, KeyCode as t } from "monaco-editor";
10
10
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
11
11
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
12
- v4.33.0-next.111 */
12
+ v4.33.0-next.112 */
13
13
  const x = m`@layer{/*!-----------------------------------------------------------
14
14
  * Copyright (c) Microsoft Corporation. All rights reserved.
15
15
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -42,68 +42,32 @@ class I extends w {
42
42
  static {
43
43
  this.styles = [x];
44
44
  }
45
- //#endregion
46
- //#region Public Properties
47
- /**
48
- * The instance of the Monaco Editor after the component has been rendered.
49
- * To determine when a component is rendered, you can use componentOnReady() method.
50
- * The method returns a Promise that resolves after the component rendered for the first time.
51
- *
52
- * @readonly
53
- */
54
45
  get editorInstance() {
55
46
  return this._editorInstance;
56
47
  }
57
- //#endregion
58
- //#region Public Methods
59
- /**
60
- * @private
61
- * @deprecated **Deprecated** since 4.30. Use `editorInstance` property instead.
62
- */
63
48
  async getEditorInstance() {
64
49
  return await this._componentReadyDefer.promise, this._editorInstance;
65
50
  }
66
- /** @deprecated **Deprecated** since 4.30. Use `value` property instead. */
67
51
  async getValue() {
68
52
  return await this._componentReadyDefer.promise, this.value;
69
53
  }
70
- /**
71
- * Inserts a snippet at the current position in the editor.
72
- *
73
- * @param {string} text - The string snippet to insert
74
- * @returns {Promise<void>}
75
- */
76
54
  async insertSnippet(A) {
77
55
  if (await this._componentReadyDefer.promise, !this._editorInstance)
78
56
  return;
79
57
  this._editorInstance.getContribution("snippetController2")?.insert(A ?? ""), this._editorInstance.focus();
80
58
  }
81
- /**
82
- * Inserts a text at the current position in the editor.
83
- *
84
- * @param {string} text - The string to insert
85
- * @returns {Promise<void>}
86
- */
87
59
  async insertText(A) {
88
60
  if (await this._componentReadyDefer.promise, !this._editorInstance || !this._editorInstance.getModel())
89
61
  return;
90
62
  const e = this._editorInstance.getSelection() ?? new M(1, 1, 1, 1);
91
63
  this._editorInstance.executeEdits("", [{ range: e, text: A ?? "", forceMoveMarkers: !0 }]);
92
64
  }
93
- /**
94
- * Sets the focus on the editor.
95
- *
96
- * @returns {Promise<void>}
97
- */
98
65
  async setFocus() {
99
66
  await this._componentReadyDefer.promise, this._editorInstance?.focus();
100
67
  }
101
- /** @deprecated **Deprecated** since 4.30. Use `value` property instead. */
102
68
  async setValue(A) {
103
69
  await this._componentReadyDefer.promise, this.value = A ?? "";
104
70
  }
105
- //#endregion
106
- //#region Lifecycle
107
71
  load() {
108
72
  Q(r("./assets"));
109
73
  }
@@ -129,8 +93,6 @@ class I extends w {
129
93
  this._disposables.pop()?.dispose();
130
94
  this._themeObserver?.();
131
95
  }
132
- //#endregion
133
- //#region Private Methods
134
96
  _updateModelValue() {
135
97
  if (!this._editorInstance)
136
98
  return;
@@ -7,11 +7,19 @@ import { EditorProfile, FeatureSetVariable } from '../../utils/profile/editor-pr
7
7
  type Mode = "featureSet" | "profile";
8
8
  /** @private */
9
9
  export declare class ArcgisEditorVariables extends LitElement {
10
- /** Loading state */
10
+ /**
11
+ * Loading state
12
+ *
13
+ * @default false
14
+ */
11
15
  loading: boolean;
12
16
  /** The model id */
13
17
  modelId: string | undefined;
14
- /** When true, the component will be hidden. */
18
+ /**
19
+ * When true, the component will be hidden.
20
+ *
21
+ * @default false
22
+ */
15
23
  closed?: boolean | undefined;
16
24
  /**
17
25
  * The variable to display.
@@ -7,7 +7,7 @@ import { u as f } from "../../chunks/useT9n.js";
7
7
  import { css as u } from "@lit/reactive-element/css-tag.js";
8
8
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
9
9
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
10
- v4.33.0-next.111 */
10
+ v4.33.0-next.112 */
11
11
  const m = u`: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);word-break:break-word}}`;
12
12
  function g(l) {
13
13
  l.key === "Enter" && l.stopPropagation();
@@ -24,8 +24,6 @@ class p extends n {
24
24
  static {
25
25
  this.styles = m;
26
26
  }
27
- //#endregion
28
- //#region Lifecycle
29
27
  load() {
30
28
  this._variableChanged();
31
29
  }
@@ -35,8 +33,6 @@ class p extends n {
35
33
  disconnectedCallback() {
36
34
  super.disconnectedCallback(), this._flowObserver?.disconnect();
37
35
  }
38
- //#endregion
39
- //#region Private Methods
40
36
  _variableChanged() {
41
37
  this._mode = this.variable?.type === "featureSet" ? "featureSet" : "profile";
42
38
  }
@@ -99,8 +95,6 @@ class p extends n {
99
95
  return e.variables[0]?.getLabel() ?? "";
100
96
  }
101
97
  }
102
- //#endregion
103
- //#region Rendering
104
98
  renderCollectionBasedVariable(e, t = !1, i = !1) {
105
99
  if (!e)
106
100
  return null;
@@ -5,15 +5,31 @@ import { ApiCategory, ApiItem } from '@arcgis/languages-api-utils';
5
5
 
6
6
  /** @private */
7
7
  export declare class ArcgisLanguageApiPanel extends LitElement {
8
- /** The language the panel is rendering */
8
+ /**
9
+ * The language the panel is rendering
10
+ *
11
+ * @default "arcade"
12
+ */
9
13
  languageId: string;
10
14
  /** The api library to display */
11
15
  apiLibrary: ApiCategory[] | undefined;
12
- /** Should the documentation action be hidden */
16
+ /**
17
+ * Should the documentation action be hidden
18
+ *
19
+ * @default false
20
+ */
13
21
  hideDocumentationActions: boolean;
14
- /** When true, a busy indicator is displayed */
22
+ /**
23
+ * When true, a busy indicator is displayed
24
+ *
25
+ * @default false
26
+ */
15
27
  loading: boolean;
16
- /** When true, the component will be hidden. */
28
+ /**
29
+ * When true, the component will be hidden.
30
+ *
31
+ * @default false
32
+ */
17
33
  closed?: boolean | undefined;
18
34
  /** Raised when the close action has been requested */
19
35
  readonly arcgisClose: TargetedEvent<this, void>;
@@ -10,7 +10,7 @@ import { css as v } from "@lit/reactive-element/css-tag.js";
10
10
  import { s as d } from "../../chunks/sql-expr-contribution.js";
11
11
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
12
12
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
13
- v4.33.0-next.111 */
13
+ v4.33.0-next.112 */
14
14
  const y = v`: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-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
15
15
  class I extends f {
16
16
  constructor() {
@@ -24,8 +24,6 @@ class I extends f {
24
24
  static {
25
25
  this.styles = y;
26
26
  }
27
- //#endregion
28
- //#region Lifecycle
29
27
  async load() {
30
28
  await d(this.languageId), this._colorizeStyle = r(), this._themeChangedListener = p(() => this._colorizeStyle = r());
31
29
  }
@@ -45,8 +43,6 @@ class I extends f {
45
43
  disconnectedCallback() {
46
44
  super.disconnectedCallback(), this._flowObserver?.disconnect(), this._themeChangedListener?.dispose();
47
45
  }
48
- //#endregion
49
- //#region Private Methods
50
46
  flowFocusHandler(e) {
51
47
  if (!e) {
52
48
  this._flowObserver?.disconnect(), this._flowObserver = void 0;
@@ -78,8 +74,6 @@ class I extends f {
78
74
  _elementToMarkdown(e) {
79
75
  e !== void 0 && (e.innerHTML = n(this._selectedApiItem.examples), g(e, this.languageId).catch(console.error));
80
76
  }
81
- //#endregion
82
- //#region Rendering
83
77
  renderApiCategory(e) {
84
78
  const i = _(e.items, "name", this._filterValue);
85
79
  return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${c(t.completion.detail)} @calciteListItemSelect=${(l) => this._emitItemSelected(l, t)} @keydown=${(l) => this._emitItemSelected(l, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(l) => this._selectItem(l, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
@@ -6,11 +6,14 @@ import { EditorProfile } from '../../utils/profile/editor-profile';
6
6
  import { IPredefinedProfile } from '../../utils/profile/types';
7
7
 
8
8
  /**
9
+ * [Read more...](https://developers.arcgis.com/javascript/latest/references/coding-components/arcgis-sql-expression-editor/)
10
+ *
9
11
  * @internal
10
12
  */
11
13
  export declare class ArcgisSqlExpressionEditor extends LitElement {
12
14
  /**
13
15
  * The profile to use for the editor. The profile defines the variables and functions that are available to the editor.
16
+ *
14
17
  * @example
15
18
  * ```jsx
16
19
  * <arcgis-sql-expression-editor profile={id: "field-calculation", definitions: { $layer: layer }}></arcgis-sql-expression-editor>
@@ -19,18 +22,22 @@ export declare class ArcgisSqlExpressionEditor extends LitElement {
19
22
  profile: IPredefinedProfile | undefined;
20
23
  /**
21
24
  * The sql expression script. Use this property to define or update the script.
25
+ *
22
26
  * @example
23
27
  * ```html
24
28
  * <arcgis-sql-expression-editor script="CAST(2.45 AS INTEGER)"></arcgis-sql-expression-editor>
25
29
  * ```
30
+ * @default ""
26
31
  */
27
32
  script: string;
28
33
  /**
29
34
  * If true, it will hide the side actions bar. The editor will be in a minimalistic UX.
35
+ *
30
36
  * @example
31
37
  * ```html
32
38
  * <arcgis-sql-expression-editor hideSideBar></arcgis-sql-expression-editor>
33
39
  * ```
40
+ * @default false
34
41
  */
35
42
  hideSideBar: boolean;
36
43
  /** Emitted when the script string has changed. */
@@ -8,7 +8,7 @@ import { createRef as p, ref as h } from "lit-html/directives/ref.js";
8
8
  import { css as g } from "@lit/reactive-element/css-tag.js";
9
9
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
10
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
11
- v4.33.0-next.111 */
11
+ v4.33.0-next.112 */
12
12
  const f = g`@layer{arcgis-sql-expression-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}.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%}}}}`;
13
13
  class m extends r {
14
14
  constructor() {
@@ -23,16 +23,12 @@ class m extends r {
23
23
  static {
24
24
  this.styles = f;
25
25
  }
26
- //#endregion
27
- //#region Lifecycle
28
26
  async load() {
29
27
  await this._updateEditorProfile().catch(console.error);
30
28
  }
31
29
  willUpdate(e) {
32
30
  (e.has("messages") || e.has("profile")) && this._updateDataModelDeps();
33
31
  }
34
- //#endregion
35
- //#region Private Methods
36
32
  async _updateDataModelDeps() {
37
33
  await this._updateEditorProfile(), await this._updateApiLibrary();
38
34
  }
@@ -69,10 +65,6 @@ class m extends r {
69
65
  _onCodeEditorValueChange(e) {
70
66
  e.stopPropagation(), this.script = e.detail, this.arcgisScriptChange.emit(e.detail);
71
67
  }
72
- /**
73
- * Gets the featureSetVariable from the editor profile- used to populate the variables panel.
74
- * In current form, there should only be one variable in the profile.
75
- */
76
68
  _getFeatureSetVariable() {
77
69
  let e;
78
70
  const t = a.getEditorProfileForModel(this._modelId);
@@ -81,8 +73,6 @@ class m extends r {
81
73
  _toggleSideActionBarExpanded() {
82
74
  this.sideActionBarExpanded = !this.sideActionBarExpanded;
83
75
  }
84
- //#endregion
85
- //#region Rendering
86
76
  render() {
87
77
  const e = this._getFeatureSetVariable();
88
78
  return i`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${h(this._codeEditorElt)}></arcgis-code-editor></div>${!this.hideSideBar && i`<arcgis-editor-variables .variable=${e} .closed=${this._activeAction !== "fields"} class=${s(this._activeAction === "fields" && "side-panel flex-panel border-inline-start")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${() => this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>` || ""}${!this.hideSideBar && i`<arcgis-language-api-panel class=${s(this._activeAction === "functions" && "side-panel flex-panel border-inline-start")} .closed=${this._activeAction !== "functions"} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${a.languageId}></arcgis-language-api-panel>` || ""}${!this.hideSideBar && i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields ?? "Fields"}</span></calcite-tooltip>` || ""}<calcite-action id=functions-action .text=${this.messages.functions ?? "Functions"} icon=function .active=${this._activeAction === "functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</div>`;
@@ -4,7 +4,11 @@ import { PublicLitElement as LitElement, TargetedEvent, JsxNode } from '@arcgis/
4
4
 
5
5
  /** @private */
6
6
  export declare class SqlExpressionFields extends LitElement {
7
- /** Loading state */
7
+ /**
8
+ * Loading state
9
+ *
10
+ * @default false
11
+ */
8
12
  loading: boolean;
9
13
  /** The model id */
10
14
  modelId: string | undefined;