@arcgis/coding-components 4.30.0-next.21 → 4.30.0-next.22

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 (135) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  3. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  4. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  42. package/dist/arcgis-coding-components/index.esm.js +2 -2
  43. package/dist/arcgis-coding-components/p-0596e58a.js +68 -0
  44. package/dist/arcgis-coding-components/p-09b3d456.js +6 -0
  45. package/dist/arcgis-coding-components/{p-5583b25d.js → p-237cd069.js} +2 -2
  46. package/dist/arcgis-coding-components/{p-a63eeed9.js → p-3c4c9bb1.js} +1 -1
  47. package/dist/arcgis-coding-components/{p-253f92ea.js → p-52af3d36.js} +2 -2
  48. package/dist/arcgis-coding-components/{p-cb5166f2.js → p-54a3c846.js} +2 -2
  49. package/dist/arcgis-coding-components/{p-192601ca.js → p-68c09f28.js} +2 -2
  50. package/dist/arcgis-coding-components/p-704509f4.entry.js +6 -0
  51. package/dist/arcgis-coding-components/{p-b177db92.js → p-89a837be.js} +2 -2
  52. package/dist/arcgis-coding-components/p-8be62afd.js +7 -0
  53. package/dist/arcgis-coding-components/{p-eb16cce2.js → p-a8a82d95.js} +2 -2
  54. package/dist/arcgis-coding-components/{p-1451e0cc.js → p-bf1aaa39.js} +2 -2
  55. package/dist/arcgis-coding-components/{p-0e7b5896.js → p-bf789380.js} +2 -2
  56. package/dist/arcgis-coding-components/p-f31fa95c.js +6 -0
  57. package/dist/arcgis-coding-components/p-f9bdf871.js +6 -0
  58. package/dist/cjs/Accessor-YDTURKZ7-064d4ec3.js +1249 -0
  59. package/dist/cjs/{arcade-defaults-9d57f506.js → arcade-defaults-75be7a9b.js} +294 -295
  60. package/dist/cjs/{arcade-mode-9079b8e0.js → arcade-mode-bf406304.js} +4 -4
  61. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1347 -89
  62. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  63. package/dist/cjs/chunk-OMA4PI5N-c7c531ca.js +1286 -0
  64. package/dist/cjs/{css-9aa4569b.js → css-a1b28a9f.js} +1 -1
  65. package/dist/cjs/{cssMode-6f57c416.js → cssMode-5b3b9c9b.js} +3 -3
  66. package/dist/cjs/decorators-443AWDOE-ab85b9eb.js +120 -0
  67. package/dist/cjs/{html-95d3a234.js → html-51efc5f2.js} +3 -3
  68. package/dist/cjs/{htmlMode-ebd8894d.js → htmlMode-a3589bc9.js} +3 -3
  69. package/dist/cjs/{index-a3f52cf5.js → index-6a3d1ddd.js} +42 -4
  70. package/dist/cjs/index.cjs.js +3 -3
  71. package/dist/cjs/{javascript-1a01235b.js → javascript-f387480b.js} +4 -4
  72. package/dist/cjs/{jsonMode-26ed7799.js → jsonMode-f9b19644.js} +3 -3
  73. package/dist/cjs/loader.cjs.js +3 -3
  74. package/dist/cjs/{tsMode-9cfeb9a5.js → tsMode-b1e0bb57.js} +3 -3
  75. package/dist/cjs/{typescript-f9907455.js → typescript-64e66362.js} +3 -3
  76. package/dist/components/Accessor-YDTURKZ7.js +1247 -0
  77. package/dist/components/arcade-api.js +9 -15
  78. package/dist/components/arcade-contribution.js +3 -3
  79. package/dist/components/arcade-defaults.js +10 -10
  80. package/dist/components/arcade-mode.js +3 -3
  81. package/dist/components/arcade-results.js +24 -35
  82. package/dist/components/arcade-suggestions.js +10 -16
  83. package/dist/components/arcade-variables.js +11 -20
  84. package/dist/components/arcgis-arcade-api.js +1 -1
  85. package/dist/components/arcgis-arcade-editor.js +20 -24
  86. package/dist/components/arcgis-arcade-results.js +1 -1
  87. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  88. package/dist/components/arcgis-arcade-variables.js +1 -1
  89. package/dist/components/arcgis-assets.d.ts +1 -1
  90. package/dist/components/arcgis-assets.js +1 -1
  91. package/dist/components/arcgis-code-editor.js +1 -1
  92. package/dist/components/chunk-3I7AEPTU.js +1290 -0
  93. package/dist/components/chunk-OMA4PI5N.js +1257 -0
  94. package/dist/components/code-editor.js +6 -6
  95. package/dist/components/decorators-443AWDOE.js +109 -0
  96. package/dist/components/fields.js +40 -39
  97. package/dist/components/index.js +1 -1
  98. package/dist/components/index2.js +3 -3
  99. package/dist/components/markdown.js +1 -1
  100. package/dist/components/utilities.js +3 -3
  101. package/dist/esm/Accessor-YDTURKZ7-4eefd1d8.js +1247 -0
  102. package/dist/esm/{arcade-defaults-1577045c.js → arcade-defaults-fcc709e4.js} +286 -285
  103. package/dist/esm/{arcade-mode-ec8b7890.js → arcade-mode-dbf28353.js} +4 -4
  104. package/dist/esm/arcgis-arcade-api_6.entry.js +1389 -131
  105. package/dist/esm/arcgis-coding-components.js +4 -4
  106. package/dist/esm/chunk-OMA4PI5N-0c09fa7b.js +1257 -0
  107. package/dist/esm/{css-6350c0f7.js → css-6122a30a.js} +1 -1
  108. package/dist/esm/{cssMode-629b1349.js → cssMode-b890adfc.js} +3 -3
  109. package/dist/esm/decorators-443AWDOE-77ed5d5a.js +109 -0
  110. package/dist/esm/{html-979016b0.js → html-2f56c6c3.js} +3 -3
  111. package/dist/esm/{htmlMode-dd504dae.js → htmlMode-84b5c7ea.js} +3 -3
  112. package/dist/esm/{index-093931a1.js → index-e75c4ffc.js} +42 -5
  113. package/dist/esm/index.js +3 -3
  114. package/dist/esm/{javascript-7af48cb1.js → javascript-8456a624.js} +4 -4
  115. package/dist/esm/{jsonMode-eb6b41d1.js → jsonMode-29439efe.js} +3 -3
  116. package/dist/esm/loader.js +4 -4
  117. package/dist/esm/{tsMode-64deb000.js → tsMode-ec7fe1bf.js} +3 -3
  118. package/dist/esm/{typescript-c9b14542.js → typescript-d9362143.js} +3 -3
  119. package/dist/loader/cdn.js +1 -1
  120. package/dist/loader/index.cjs.js +1 -1
  121. package/dist/loader/index.es2017.js +1 -1
  122. package/dist/loader/index.js +1 -1
  123. package/dist/types/components/arcade-api/arcade-api.d.ts +4 -5
  124. package/dist/types/components/arcade-editor/arcade-editor.d.ts +7 -4
  125. package/dist/types/components/arcade-results/arcade-results.d.ts +4 -7
  126. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +4 -5
  127. package/dist/types/components/arcade-variables/arcade-variables.d.ts +4 -6
  128. package/package.json +12 -12
  129. package/dist/arcgis-coding-components/p-81935687.js +0 -68
  130. package/dist/arcgis-coding-components/p-a2190df0.js +0 -7
  131. package/dist/arcgis-coding-components/p-e8c2933f.entry.js +0 -6
  132. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +0 -3
  133. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +0 -9
  134. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +0 -19
  135. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +0 -6
@@ -1,13 +1,14 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, a as colorizedAllCodeElements } from './markdown.js';
8
8
  import { f as filterCollection } from './utilities.js';
9
9
  import { Uri } from 'monaco-editor';
10
- import { B, q, W, G } from './index2.js';
10
+ import { u as useControllerManager, a as useT9n } from './chunk-3I7AEPTU.js';
11
+ import { W, o as oe } from './index2.js';
11
12
  import { b as arcadeDefaults } from './arcade-defaults.js';
12
13
  import { g as getArcadeWorker } from './arcade-contribution.js';
13
14
  import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
@@ -20,7 +21,6 @@ import "@esri/calcite-components/dist/components/calcite-flow.js";
20
21
  import "@esri/calcite-components/dist/components/calcite-input.js";
21
22
  import "@esri/calcite-components/dist/components/calcite-loader.js";
22
23
  import "@esri/calcite-components/dist/components/calcite-list.js";
23
- import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
24
24
 
25
25
  const arcadeApiCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}:host calcite-block p:first-of-type{margin-top:0}:host calcite-block code{font-family:var(--calcite-code-family)}:host calcite-block pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm)}:host calcite-block pre code{font-size:var(--calcite-font-size--2)}";
26
26
 
@@ -31,6 +31,8 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
31
31
  this.__attachShadow();
32
32
  this.close = createEvent(this, "close", 3);
33
33
  this.itemSelected = createEvent(this, "itemSelected", 3);
34
+ this.manager = useControllerManager(this);
35
+ this.messages = useT9n();
34
36
  this._emitItemSelected = (e) => {
35
37
  const item = e.target?.["data-item"];
36
38
  if (!item) {
@@ -70,9 +72,6 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
70
72
  this._updateFilterValue = (e) => {
71
73
  this._filterValue = e.target?.value ?? "";
72
74
  };
73
- this._lang = "";
74
- this._t9nLocale = "";
75
- this._t9nStrings = undefined;
76
75
  this._selectedApiItem = undefined;
77
76
  this._filterValue = "";
78
77
  this._colorizeStyle = "";
@@ -86,7 +85,6 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
86
85
  async componentWillLoad() {
87
86
  this._colorizeStyle = generateColorizeStyles();
88
87
  this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
89
- await B(this, getAssetPath("./assets"));
90
88
  arcadeDefaults.onModelContextDidChange((key) => {
91
89
  if (!this.modelId || key !== Uri.parse(this.modelId).toString()) {
92
90
  return;
@@ -96,7 +94,6 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
96
94
  await this._updateApiLibrary();
97
95
  }
98
96
  disconnectedCallback() {
99
- q(this);
100
97
  this._flowObserver?.disconnect();
101
98
  this._themeChangedListner?.dispose();
102
99
  }
@@ -152,14 +149,14 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
152
149
  if (!filteredApiItems.length) {
153
150
  return null;
154
151
  }
155
- return (h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (h("calcite-list-item", { label: G(apiItem.completion.detail), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": apiItem }, h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "Expand", icon: "chevron-right", iconFlipRtl: true, scale: "s", onClick: this._selectItem, "data-item": apiItem }))))));
152
+ return (h("calcite-list-item-group", { heading: category.title }, filteredApiItems.map((apiItem) => (h("calcite-list-item", { label: oe(apiItem.completion.detail), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": apiItem }, h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "Expand", icon: "chevron-right", iconFlipRtl: true, scale: "s", onClick: this._selectItem, "data-item": apiItem }))))));
156
153
  }
157
154
  renderApiItemFlowItem() {
158
155
  const apiItem = this._selectedApiItem;
159
156
  if (!apiItem) {
160
157
  return null;
161
158
  }
162
- return (h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this._t9nStrings?.moreinformation)), h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => void e?.setFocus() }, this._t9nStrings?.insert ?? "Insert"), h("calcite-block", { open: true, heading: G(apiItem.completion.detail) }, h("div", { innerHTML: convertMarkdownString(apiItem.completion.documentation) }), apiItem.examples ? (h("div", { ref: (e) => {
159
+ return (h("calcite-flow-item", { heading: this.messages.constantsandfunctions, beforeBack: this._unselectItem, closable: true, onCalciteFlowItemClose: this._emitClose }, this.hideDocumentationActions ? null : (h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", scale: "s", href: apiItem.link, target: "Arcade Help", "icon-start": "information" }, this.messages.moreinformation)), h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelectedAndClose, "data-item": apiItem, ref: (e) => void e?.setFocus() }, this.messages.insert ?? "Insert"), h("calcite-block", { open: true, heading: oe(apiItem.completion.detail) }, h("div", { innerHTML: convertMarkdownString(apiItem.completion.documentation) }), apiItem.examples ? (h("div", { ref: (e) => {
163
160
  if (!e) {
164
161
  return;
165
162
  }
@@ -170,17 +167,14 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
170
167
  render() {
171
168
  const categories = (this._apiLibrary ?? []).map((apiCategory) => this.renderApiCategory(apiCategory));
172
169
  const empty = categories.every((g) => !g);
173
- return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), this._preparingApi ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this._t9nStrings?.loading ?? "Loading" })) : (h("calcite-list", null, empty ? h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No items") : categories))), this.renderApiItemFlowItem())));
170
+ return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this.messages.constantsandfunctions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), this._preparingApi ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "Loading" })) : (h("calcite-list", null, empty ? h("div", { class: "notice-container" }, this.messages.noitems ?? "No items") : categories))), this.renderApiItemFlowItem())));
174
171
  }
175
172
  static get assetsDirs() { return ["assets"]; }
176
- get _hostElement() { return this; }
173
+ get el() { return this; }
177
174
  static get style() { return arcadeApiCss; }
178
175
  }, [1, "arcgis-arcade-api", {
179
176
  "hideDocumentationActions": [4, "hide-documentation-actions"],
180
177
  "modelId": [1, "model-id"],
181
- "_lang": [32],
182
- "_t9nLocale": [32],
183
- "_t9nStrings": [32],
184
178
  "_selectedApiItem": [32],
185
179
  "_filterValue": [32],
186
180
  "_colorizeStyle": [32],
@@ -1,12 +1,12 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { editor, languages } from 'monaco-editor';
7
7
  import { b as arcadeDefaults } from './arcade-defaults.js';
8
8
  import { a as importRequest } from './fields.js';
9
- import { i as ie, s as se } from './index2.js';
9
+ import { d as de, g as ge } from './index2.js';
10
10
 
11
11
  function isMonacoEnvironmentSetup() {
12
12
  return !!window.MonacoEnvironment?.getWorkerUrl;
@@ -48,7 +48,7 @@ function setupMonacoEnvironment(assetsPath) {
48
48
  break;
49
49
  }
50
50
  // If we have a relative path or we are on same orgin, we can use the default js implementation
51
- if (!ie(url) || se(url, globalThis.location.href, true)) {
51
+ if (!de(url) || ge(url, globalThis.location.href, true)) {
52
52
  return new Worker(url, { name: languageId });
53
53
  }
54
54
  // For cross orgin, we will load the worker code as a string and manufacture a blob
@@ -1,13 +1,13 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { Emitter, Uri } from 'monaco-editor';
7
7
  import { InsertTextMode, InsertTextFormat, CompletionItemKind } from 'vscode-languageserver-types';
8
8
  import { i as importLayersFeatureLayer, a as importRequest, s as supportedFields, n as newPortalPortalItem, b as newWebScene, c as newWebMap, f as fieldAlias, d as fieldTypeToIconName, e as fieldTypeToArcadeType } from './fields.js';
9
9
  import { p as portalItemPageUrl } from './utilities.js';
10
- import { e as ee, t as te, G, Z, E, v } from './index2.js';
10
+ import { i as ie, a as ae, o as oe, r as re, v, j } from './index2.js';
11
11
  import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
12
12
 
13
13
  //#region core adapter fix
@@ -431,9 +431,9 @@ class ProfileItemBase {
431
431
  // If the component is under RTL, the string is messed up.
432
432
  // It is converted from $feature to feature$, This is not acceptable since the label
433
433
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
434
- return G(this._label);
434
+ return oe(this._label);
435
435
  }
436
- return Z(this._profile?.intlStrings[this._label.code], this._label.formatValues);
436
+ return re(this._profile?.intlStrings[this._label.code], this._label.formatValues);
437
437
  }
438
438
  /**
439
439
  * Returns the description string.
@@ -445,7 +445,7 @@ class ProfileItemBase {
445
445
  if (typeof this.description === "string") {
446
446
  return this.description;
447
447
  }
448
- return Z(this._profile?.intlStrings[this.description.code], this.description.formatValues);
448
+ return re(this._profile?.intlStrings[this.description.code], this.description.formatValues);
449
449
  }
450
450
  /**
451
451
  * Returns true if the item pass the filter test
@@ -686,7 +686,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
686
686
  return this._profile?.intlStrings.layer ?? "layer";
687
687
  }
688
688
  async loadSource() {
689
- if (ee(this._loadPromise) && te(this._loadPromise)) {
689
+ if (ie(this._loadPromise) && ae(this._loadPromise)) {
690
690
  return await this._loadPromise;
691
691
  }
692
692
  this._loadPromise = this._loadSource();
@@ -954,7 +954,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
954
954
  nonInteractive: true
955
955
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
956
956
  }));
957
- relationshipsGroup.variables = relationshipItems.filter(ee);
957
+ relationshipsGroup.variables = relationshipItems.filter(ie);
958
958
  if (!relationshipsGroup.variables.length) {
959
959
  return null;
960
960
  }
@@ -1118,7 +1118,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
1118
1118
  return this._profile?.intlStrings.map ?? "map";
1119
1119
  }
1120
1120
  async loadSource() {
1121
- if (ee(this._loadPromise) && te(this._loadPromise)) {
1121
+ if (ie(this._loadPromise) && ae(this._loadPromise)) {
1122
1122
  return await this._loadPromise;
1123
1123
  }
1124
1124
  this._loadPromise = this._loadSource();
@@ -1365,7 +1365,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
1365
1365
  if (profiles) {
1366
1366
  return profiles;
1367
1367
  }
1368
- if (!E.has(locale)) {
1368
+ if (!v.has(locale)) {
1369
1369
  return await getSdkPredefinedProfiles("en");
1370
1370
  }
1371
1371
  try {
@@ -1536,7 +1536,7 @@ class ArcadeLanguageServiceDefaults {
1536
1536
  if (isPredefinedProfile(definition)) {
1537
1537
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
1538
1538
  }
1539
- const intlStrings = await v(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
1539
+ const intlStrings = await j(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
1540
1540
  if (!intlStrings) {
1541
1541
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
1542
1542
  }
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { editor, MarkerSeverity, Range, languages, Emitter } from 'monaco-editor';
7
7
  import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat } from 'vscode-languageserver-types';
8
- import { r as re } from './index2.js';
8
+ import { l as le } from './index2.js';
9
9
 
10
10
  var j={False:"false",Null:"null",True:"true"},f={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},Fe=["++","--"],Qe=["-","+","!","~"],Ze=["=","/=","*=","%=","+=","-="],Xe=["||","&&"],Lt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var U=[[],[],[]];Fe.forEach(t=>U[t.length-1]?.push(t));Qe.forEach(t=>U[t.length-1]?.push(t));Xe.forEach(t=>U[t.length-1]?.push(t));Ze.forEach(t=>U[t.length-1]?.push(t));Lt.forEach(t=>U[t.length-1]?.push(t));var ht=Object.values(f),dt=Object.values(j);dt.map(t=>({label:t,kind:CompletionItemKind.Constant}));ht.map(t=>({label:t,kind:CompletionItemKind.Keyword}));
11
11
 
@@ -231,7 +231,7 @@ class DiagnosticsAdapter {
231
231
  if (languageId !== this._languageId) {
232
232
  return;
233
233
  }
234
- const debouncedValidate = re(() => {
234
+ const debouncedValidate = le(() => {
235
235
  this._doValidate(model, languageId).catch((err) => {
236
236
  throw err;
237
237
  });
@@ -1,11 +1,12 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
7
7
  import { g as importArcade, s as supportedFields } from './fields.js';
8
- import { B, q, Z, D } from './index2.js';
8
+ import { u as useControllerManager, a as useT9n } from './chunk-3I7AEPTU.js';
9
+ import { r as re, t as te } from './index2.js';
9
10
  import "@esri/calcite-components/dist/components/calcite-tree.js";
10
11
  import "@esri/calcite-components/dist/components/calcite-tree-item.js";
11
12
  import "@esri/calcite-components/dist/components/calcite-loader.js";
@@ -15,7 +16,6 @@ import "@esri/calcite-components/dist/components/calcite-icon.js";
15
16
  import "@esri/calcite-components/dist/components/calcite-action-bar.js";
16
17
  import "@esri/calcite-components/dist/components/calcite-action-group.js";
17
18
  import "@esri/calcite-components/dist/components/calcite-action.js";
18
- import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
19
19
 
20
20
  const DevelopersWebSitePath = "https://developers.arcgis.com/arcade/";
21
21
  const MaxArrayItems = 100;
@@ -271,7 +271,7 @@ function renderSimpleValue(arcadeResult) {
271
271
  case "null":
272
272
  return h("span", { class: "constant-value" }, arcadeResult.type);
273
273
  case "text":
274
- return h("span", { class: "string-value" }, D(arcadeResult.value));
274
+ return h("span", { class: "string-value" }, te(arcadeResult.value));
275
275
  case "number":
276
276
  return h("span", { class: "number-value" }, arcadeResult.value.toString());
277
277
  case "boolean":
@@ -279,9 +279,9 @@ function renderSimpleValue(arcadeResult) {
279
279
  case "date":
280
280
  return h("span", { class: "date-value" }, formatArcadeResultDate(arcadeResult));
281
281
  case "dateOnly":
282
- return h("span", { class: "string-value" }, D(formatArcadeResultDateOnly(arcadeResult)));
282
+ return h("span", { class: "string-value" }, te(formatArcadeResultDateOnly(arcadeResult)));
283
283
  case "time":
284
- return h("span", { class: "string-value" }, D(formatArcadeResultTimeOnly(arcadeResult)));
284
+ return h("span", { class: "string-value" }, te(formatArcadeResultTimeOnly(arcadeResult)));
285
285
  default:
286
286
  return null;
287
287
  }
@@ -305,6 +305,9 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
305
305
  this.__attachShadow();
306
306
  this.openedResultPanelChange = createEvent(this, "openedResultPanelChange", 3);
307
307
  this.close = createEvent(this, "close", 3);
308
+ this.manager = useControllerManager(this);
309
+ //#region Private Properties
310
+ this.messages = useT9n();
308
311
  this._switchResultPanel = (e) => {
309
312
  if (!e.target) {
310
313
  return;
@@ -316,23 +319,12 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
316
319
  this.updateResultPanel(panelName);
317
320
  };
318
321
  this._emitClose = () => this.close.emit();
319
- this._lang = "";
320
- this._t9nLocale = "";
321
- this._t9nStrings = undefined;
322
322
  this.loading = true;
323
323
  this.openedResultPanel = "output";
324
324
  this.result = undefined;
325
325
  this.consoleLogs = undefined;
326
326
  }
327
327
  //#endregion
328
- // #region Component lifecycle events
329
- async componentWillLoad() {
330
- await B(this, getAssetPath("./assets"));
331
- }
332
- disconnectedCallback() {
333
- q(this);
334
- }
335
- // #endregion
336
328
  //#region Private Methods
337
329
  updateResultPanel(resultPanelType) {
338
330
  this.openedResultPanel = resultPanelType;
@@ -347,7 +339,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
347
339
  if (this.loading && !this.consoleLogs?.length) {
348
340
  return h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
349
341
  }
350
- return (h("div", { class: "console-logs-container ltr-container" }, this.consoleLogs?.length ? (this.consoleLogs.map((log) => h("p", null, log))) : (h("p", null, this._t9nStrings?.consolemessage))));
342
+ return (h("div", { class: "console-logs-container ltr-container" }, this.consoleLogs?.length ? this.consoleLogs.map((log) => h("p", null, log)) : h("p", null, this.messages.consolemessage)));
351
343
  }
352
344
  renderLogPanel() {
353
345
  if (this.openedResultPanel !== "log") {
@@ -357,24 +349,24 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
357
349
  return h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
358
350
  }
359
351
  const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
360
- return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label: Z(this._t9nStrings?.lastexecutionformat, {
361
- timeStamp: new Intl.DateTimeFormat(this._t9nLocale, {
352
+ return (h("calcite-list", null, this.result ? (h(Fragment, null, h("calcite-list-item", { label: re(this.messages.lastexecutionformat, {
353
+ timeStamp: new Intl.DateTimeFormat(this.messages._t9nLocale, {
362
354
  dateStyle: "medium",
363
355
  timeStyle: "medium"
364
356
  }).format(this.result.timeStamp)
365
- }) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: Z(this._t9nStrings?.compilationtimeformat, {
366
- time: new Intl.NumberFormat(this._t9nLocale, {
357
+ }) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: re(this.messages.compilationtimeformat, {
358
+ time: new Intl.NumberFormat(this.messages._t9nLocale, {
367
359
  style: "unit",
368
360
  unit: "millisecond",
369
361
  maximumFractionDigits: 2
370
362
  }).format(this.result.compilationTime ?? 0)
371
- }) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: Z(this._t9nStrings?.executiontimeformat, {
372
- time: new Intl.NumberFormat(this._t9nLocale, {
363
+ }) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), h("calcite-list-item", { label: re(this.messages.executiontimeformat, {
364
+ time: new Intl.NumberFormat(this.messages._t9nLocale, {
373
365
  style: "unit",
374
366
  unit: "millisecond",
375
367
  maximumFractionDigits: 2
376
368
  }).format(this.result.executionTime ?? 0)
377
- }) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })))) : (h("calcite-list-item", { label: this._t9nStrings?.runscriptmessage ?? "No output, run the script once." }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: "color-info" })))));
369
+ }) }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })))) : (h("calcite-list-item", { label: this.messages.runscriptmessage ?? "No output, run the script once." }, h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: "color-info" })))));
378
370
  }
379
371
  renderOutputPanel() {
380
372
  if (this.openedResultPanel !== "output") {
@@ -385,7 +377,7 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
385
377
  }
386
378
  switch (this.result?.type) {
387
379
  case "error":
388
- return (h("div", { class: "result-value-simple flex-adjustable" }, Z(this._t9nStrings?.executionerrorformat, {
380
+ return (h("div", { class: "result-value-simple flex-adjustable" }, re(this.messages.executionerrorformat, {
389
381
  message: this.result.value
390
382
  })));
391
383
  case "null":
@@ -416,13 +408,13 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
416
408
  case "knowledgeGraph":
417
409
  return (h("div", { class: "result-value-simple ltr-container" }, h("span", { class: "value-type" }, this.result.type, ":\u00A0"), h("span", { class: "string-value" }, this.result.value.url)));
418
410
  default:
419
- return (h("div", { class: "result-value-simple flex-adjustable ltr-container" }, this._t9nStrings?.runscriptmessage));
411
+ return h("div", { class: "result-value-simple flex-adjustable ltr-container" }, this.messages.runscriptmessage);
420
412
  }
421
413
  }
422
414
  renderArrayHeader(arcadeResult) {
423
415
  const items = arcadeResult.value ?? [];
424
416
  const leftoverCount = Math.max(items.length - MaxArrayItems, 0);
425
- return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0", Z(this._t9nStrings?.showingfirstitemsformat, {
417
+ return (h(Fragment, null, h("span", null, `${arcadeResult.type}(${items.length ?? 0})`), leftoverCount > 0 ? (h("span", null, "\u00A0", re(this.messages.showingfirstitemsformat, {
426
418
  count: MaxArrayItems.toString()
427
419
  }))) : null));
428
420
  }
@@ -468,24 +460,21 @@ const ArcgisArcadeResults = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeR
468
460
  }
469
461
  }
470
462
  renderFeatureSetLabel(arcadeResult) {
471
- return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0", Z(this._t9nStrings?.showingfirstitemsformat, {
463
+ return (h("div", { class: "value-type" }, h("span", null, arcadeResult.type, ":"), arcadeResult.features.length >= BatchSize ? (h("span", null, "\u00A0", re(this.messages.showingfirstitemsformat, {
472
464
  count: BatchSize.toString()
473
465
  }))) : null));
474
466
  }
475
467
  render() {
476
- return (h(Host, null, h("header", { class: "flex-row" }, h("calcite-action-bar", { class: "flex-adjustable", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { active: this.openedResultPanel === "output", text: this._t9nStrings?.output ?? "Output", "text-enabled": true, scale: "s", icon: "list-show-all", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "output" }), h("calcite-action", { active: this.openedResultPanel === "console", text: this._t9nStrings?.console ?? "Console", "text-enabled": true, scale: "s", icon: "console", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "console" }), h("calcite-action", { active: this.openedResultPanel === "log", text: this._t9nStrings?.log ?? "Log", "text-enabled": true, scale: "s", icon: "list", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "log" }))), h("calcite-action", { scale: "s", icon: "x", text: this._t9nStrings?.close ?? "", onClick: this._emitClose })), h("article", { class: "flex-adjustable" }, this.loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: "" })) : (h("div", { class: "flex-column y-scrollable-container" }, this.renderOutputPanel(), this.renderConsolePanel(), this.renderLogPanel())))));
468
+ return (h(Host, null, h("header", { class: "flex-row" }, h("calcite-action-bar", { class: "flex-adjustable", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { active: this.openedResultPanel === "output", text: this.messages.output ?? "Output", "text-enabled": true, scale: "s", icon: "list-show-all", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "output" }), h("calcite-action", { active: this.openedResultPanel === "console", text: this.messages.console ?? "Console", "text-enabled": true, scale: "s", icon: "console", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "console" }), h("calcite-action", { active: this.openedResultPanel === "log", text: this.messages.log ?? "Log", "text-enabled": true, scale: "s", icon: "list", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "log" }))), h("calcite-action", { scale: "s", icon: "x", text: this.messages.close ?? "", onClick: this._emitClose })), h("article", { class: "flex-adjustable" }, this.loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: "" })) : (h("div", { class: "flex-column y-scrollable-container" }, this.renderOutputPanel(), this.renderConsolePanel(), this.renderLogPanel())))));
477
469
  }
478
470
  static get assetsDirs() { return ["assets"]; }
479
- get _hostElement() { return this; }
471
+ get el() { return this; }
480
472
  static get style() { return arcadeResultsCss; }
481
473
  }, [1, "arcgis-arcade-results", {
482
474
  "loading": [4],
483
475
  "openedResultPanel": [1537, "opened-result-panel"],
484
476
  "result": [16],
485
- "consoleLogs": [16],
486
- "_lang": [32],
487
- "_t9nLocale": [32],
488
- "_t9nStrings": [32]
477
+ "consoleLogs": [16]
489
478
  }]);
490
479
  function defineCustomElement() {
491
480
  if (typeof customElements === "undefined") {
@@ -1,12 +1,13 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizeCodeElement } from './markdown.js';
8
8
  import { f as filterCollection } from './utilities.js';
9
- import { B, q, W } from './index2.js';
9
+ import { u as useControllerManager, a as useT9n } from './chunk-3I7AEPTU.js';
10
+ import { W } from './index2.js';
10
11
  import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
11
12
  import "@esri/calcite-components/dist/components/calcite-list-item.js";
12
13
  import "@esri/calcite-components/dist/components/calcite-action.js";
@@ -16,7 +17,6 @@ import "@esri/calcite-components/dist/components/calcite-block.js";
16
17
  import "@esri/calcite-components/dist/components/calcite-flow.js";
17
18
  import "@esri/calcite-components/dist/components/calcite-input.js";
18
19
  import "@esri/calcite-components/dist/components/calcite-list.js";
19
- import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
20
20
 
21
21
  function isSuggestionGroups(item) {
22
22
  if (!Array.isArray(item)) {
@@ -37,6 +37,8 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
37
37
  this.__attachShadow();
38
38
  this.close = createEvent(this, "close", 3);
39
39
  this.itemSelected = createEvent(this, "itemSelected", 3);
40
+ this.manager = useControllerManager(this);
41
+ this.messages = useT9n();
40
42
  this._updateFilterValue = (e) => {
41
43
  this._filterValue = e.target?.value ?? "";
42
44
  };
@@ -65,9 +67,6 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
65
67
  this._beforeBack = async () => {
66
68
  this._selectedSuggestion = undefined;
67
69
  };
68
- this._lang = "";
69
- this._t9nLocale = "";
70
- this._t9nStrings = undefined;
71
70
  this._selectedSuggestion = undefined;
72
71
  this._filterValue = "";
73
72
  this._colorizeStyle = "";
@@ -81,12 +80,10 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
81
80
  async componentWillLoad() {
82
81
  this._colorizeStyle = generateColorizeStyles();
83
82
  this._themeChangedListner = onColorizeThemeChanged(() => (this._colorizeStyle = generateColorizeStyles()));
84
- await B(this, getAssetPath("./assets"));
85
83
  }
86
84
  disconnectedCallback() {
87
85
  this._flowObserver?.disconnect();
88
86
  this._themeChangedListner?.dispose();
89
- q(this);
90
87
  }
91
88
  // #endregion
92
89
  //#region Private Methods
@@ -122,31 +119,28 @@ const ArcgisArcadeSuggestions = /*@__PURE__*/ proxyCustomElement(class ArcgisArc
122
119
  renderSuggestionListItems(suggestions) {
123
120
  suggestions = filterCollection(suggestions, "label", this._filterValue);
124
121
  if (!suggestions.length) {
125
- return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
122
+ return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
126
123
  }
127
- return suggestions.map((suggestion) => (h("calcite-list-item", { label: suggestion.label, description: suggestion.description, onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": suggestion }, h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showSuggestionDetail, "data-item": suggestion }))));
124
+ return suggestions.map((suggestion) => (h("calcite-list-item", { label: suggestion.label, description: suggestion.description, onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": suggestion }, h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showSuggestionDetail, "data-item": suggestion }))));
128
125
  }
129
126
  renderSuggestionFlowItem() {
130
127
  const suggestion = this._selectedSuggestion;
131
128
  if (!suggestion) {
132
129
  return null;
133
130
  }
134
- return (h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose, beforeBack: this._beforeBack }, h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelected, ref: (e) => void e?.setFocus(), "data-item": suggestion }, this._t9nStrings?.insert), h("calcite-block", { open: true, heading: suggestion.label, description: suggestion.description }, h("div", { innerHTML: convertMarkdownString(suggestion.documentation) }), h("pre", null, h("code", { ref: (e) => e === undefined ? undefined : void colorizeCodeElement(e, suggestion.code).catch(console.error) })))));
131
+ return (h("calcite-flow-item", { heading: this.messages.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose, beforeBack: this._beforeBack }, h("calcite-button", { width: "half", slot: "footer", appearance: "outline", kind: "brand", "icon-start": "code", scale: "s", onClick: this._emitItemSelected, ref: (e) => void e?.setFocus(), "data-item": suggestion }, this.messages.insert), h("calcite-block", { open: true, heading: suggestion.label, description: suggestion.description }, h("div", { innerHTML: convertMarkdownString(suggestion.documentation) }), h("pre", null, h("code", { ref: (e) => e === undefined ? undefined : void colorizeCodeElement(e, suggestion.code).catch(console.error) })))));
135
132
  }
136
133
  render() {
137
- return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), h("calcite-list", null, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
134
+ return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this.messages.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), h("calcite-list", null, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
138
135
  }
139
136
  static get assetsDirs() { return ["assets"]; }
140
- get _hostElement() { return this; }
137
+ get el() { return this; }
141
138
  static get watchers() { return {
142
139
  "suggestions": ["suggestionsPropChanged"]
143
140
  }; }
144
141
  static get style() { return arcadeSuggestionsCss; }
145
142
  }, [1, "arcgis-arcade-suggestions", {
146
143
  "suggestions": [16],
147
- "_lang": [32],
148
- "_t9nLocale": [32],
149
- "_t9nStrings": [32],
150
144
  "_selectedSuggestion": [32],
151
145
  "_filterValue": [32],
152
146
  "_colorizeStyle": [32]
@@ -1,10 +1,11 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
7
- import { B, q, W, K } from './index2.js';
7
+ import { u as useControllerManager, a as useT9n } from './chunk-3I7AEPTU.js';
8
+ import { W, n as ne } from './index2.js';
8
9
  import { b as arcadeDefaults } from './arcade-defaults.js';
9
10
  import "@esri/calcite-components/dist/components/calcite-flow-item.js";
10
11
  import "@esri/calcite-components/dist/components/calcite-action.js";
@@ -15,7 +16,6 @@ import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
15
16
  import "@esri/calcite-components/dist/components/calcite-list-item.js";
16
17
  import "@esri/calcite-components/dist/components/calcite-icon.js";
17
18
  import "@esri/calcite-components/dist/components/calcite-flow.js";
18
- import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
19
19
 
20
20
  const arcadeVariablesCss = ":host{background-color:var(--calcite-color-foreground-1)}:host .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}:host .sticky{position:sticky;top:0px;z-index:10}:host calcite-flow{height:100%}";
21
21
 
@@ -31,6 +31,8 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
31
31
  this.__attachShadow();
32
32
  this.close = createEvent(this, "close", 3);
33
33
  this.itemSelected = createEvent(this, "itemSelected", 3);
34
+ this.manager = useControllerManager(this);
35
+ this.messages = useT9n();
34
36
  this._updateFilterValue = (e) => {
35
37
  this._filterValue = e.target.value;
36
38
  };
@@ -63,9 +65,6 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
63
65
  e.stopPropagation();
64
66
  this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
65
67
  };
66
- this._lang = "";
67
- this._t9nLocale = "";
68
- this._t9nStrings = undefined;
69
68
  this._mutationCounter = 1;
70
69
  this._flowItemRenderers = [];
71
70
  this._filterValue = "";
@@ -76,12 +75,7 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
76
75
  this._flowItemRenderers = [];
77
76
  }
78
77
  //#endregion
79
- // #region Component lifecycle events
80
- async componentWillLoad() {
81
- await B(this, getAssetPath("./assets"));
82
- }
83
78
  disconnectedCallback() {
84
- q(this);
85
79
  this._flowObserver?.disconnect();
86
80
  }
87
81
  // #endregion
@@ -135,15 +129,15 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
135
129
  });
136
130
  loading = true;
137
131
  }
138
- return (h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this._t9nStrings?.backtotop ?? "Back to top", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this._t9nStrings?.loading ?? "Loading" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
132
+ return (h("calcite-flow-item", { heading: this.messages.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "Back to top", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "Loading" })) : (h("calcite-list", null, this.renderEditorVariables(collection)))));
139
133
  };
140
134
  }
141
135
  renderEditorVariables(collection) {
142
136
  // Filter the variables. Skip group, we will filter the children later on.
143
- const filterExpression = K(this._filterValue);
137
+ const filterExpression = ne(this._filterValue);
144
138
  const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
145
139
  if (!filteredVariables.length) {
146
- return h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No item");
140
+ return h("div", { class: "notice-container" }, this.messages.noitems ?? "No item");
147
141
  }
148
142
  return filteredVariables.map((variable) => this.renderEditorVariable(variable));
149
143
  }
@@ -153,18 +147,18 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
153
147
  // Group is a collection but we represent it differently
154
148
  return (h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
155
149
  default:
156
- return (h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (h("calcite-action", { slot: "actions-end", text: this._t9nStrings?.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showCollectionPanel, onKeyPress: stopEnterPropagation, "data-item": variable })) : null, variable.icon ? h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
150
+ return (h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (h("calcite-action", { slot: "actions-end", text: this.messages.expand ?? "", scale: "s", icon: "chevron-right", iconFlipRtl: true, onClick: this._showCollectionPanel, onKeyPress: stopEnterPropagation, "data-item": variable })) : null, variable.icon ? h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
157
151
  }
158
152
  }
159
153
  render() {
160
154
  const profile = arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
161
155
  if (!this.loading && !profile?.variables.length) {
162
- return (h("calcite-flow", null, h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this._t9nStrings?.noprofilevariablesmessage ?? ""))));
156
+ return (h("calcite-flow", null, h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage ?? ""))));
163
157
  }
164
158
  return (h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
165
159
  }
166
160
  static get assetsDirs() { return ["assets"]; }
167
- get _hostElement() { return this; }
161
+ get el() { return this; }
168
162
  static get watchers() { return {
169
163
  "modelId": ["modelIdPropChanged"]
170
164
  }; }
@@ -172,9 +166,6 @@ const ArcgisArcadeVariables = /*@__PURE__*/ proxyCustomElement(class ArcgisArcad
172
166
  }, [1, "arcgis-arcade-variables", {
173
167
  "loading": [4],
174
168
  "modelId": [1, "model-id"],
175
- "_lang": [32],
176
- "_t9nLocale": [32],
177
- "_t9nStrings": [32],
178
169
  "_mutationCounter": [32],
179
170
  "_flowItemRenderers": [32],
180
171
  "_filterValue": [32]
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.22
5
5
  */
6
6
  import { A as ArcgisArcadeApi$1, d as defineCustomElement$1 } from './arcade-api.js';
7
7