@arcgis/coding-components 4.31.0-next.77 → 4.31.0-next.79

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 (147) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +188 -121
  3. package/dist/arcgis-coding-components/index.esm.js +2 -2
  4. package/dist/arcgis-coding-components/{p-df6a6e92.js → p-107c8fe2.js} +2 -2
  5. package/dist/arcgis-coding-components/p-2247cf38.entry.js +6 -0
  6. package/dist/arcgis-coding-components/{p-6447807e.js → p-240f7a13.js} +3 -3
  7. package/dist/arcgis-coding-components/{p-1ce37139.js → p-244dc397.js} +2 -2
  8. package/dist/arcgis-coding-components/{p-5cd53181.js → p-24e6454a.js} +1 -1
  9. package/dist/arcgis-coding-components/{p-3e8e339e.js → p-258c5771.js} +2 -2
  10. package/dist/arcgis-coding-components/{p-9877b739.js → p-286969f5.js} +10 -10
  11. package/dist/arcgis-coding-components/{p-6c970ef9.js → p-3ecc0989.js} +2 -2
  12. package/dist/arcgis-coding-components/{p-05cd1527.js → p-600fcb1b.js} +2 -2
  13. package/dist/arcgis-coding-components/p-6a5ea839.js +6 -0
  14. package/dist/arcgis-coding-components/p-6aa2333f.entry.js +6 -0
  15. package/dist/arcgis-coding-components/{p-a8b3c7ff.js → p-6fddddee.js} +1 -1
  16. package/dist/arcgis-coding-components/{p-f8f31aee.entry.js → p-777a0f76.entry.js} +2 -2
  17. package/dist/arcgis-coding-components/{p-597365db.js → p-8da1aaa1.js} +1 -1
  18. package/dist/arcgis-coding-components/{p-5692bbc7.js → p-92fee4ab.js} +2 -2
  19. package/dist/arcgis-coding-components/{p-2759ba9d.js → p-94be4a7f.js} +2 -2
  20. package/dist/arcgis-coding-components/{p-8d832502.js → p-c4c66618.js} +2 -2
  21. package/dist/arcgis-coding-components/{p-f304a898.js → p-cd89f007.js} +2 -2
  22. package/dist/cjs/{app-globals-e36ff7b6.js → app-globals-4497f8e0.js} +1 -1
  23. package/dist/cjs/{arcade-defaults-7eb50451.js → arcade-defaults-82c1a665.js} +3 -3
  24. package/dist/cjs/{arcade-mode-ca4a9411.js → arcade-mode-f6538113.js} +3 -3
  25. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +207 -157
  26. package/dist/cjs/arcgis-coding-components.cjs.js +4 -4
  27. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +26 -7
  28. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
  29. package/dist/cjs/{css-bf7efcc6.js → css-758f43cd.js} +1 -1
  30. package/dist/cjs/{cssMode-3e6f7824.js → cssMode-cf3fef03.js} +3 -3
  31. package/dist/cjs/{html-d74edc5e.js → html-2da332c6.js} +3 -3
  32. package/dist/cjs/{htmlMode-55fb85d1.js → htmlMode-816efb27.js} +3 -3
  33. package/dist/cjs/{index-16caf224.js → index-05ceca06.js} +1 -1
  34. package/dist/cjs/index.cjs.js +4 -4
  35. package/dist/cjs/{javascript-0e468a0c.js → javascript-2572304a.js} +4 -4
  36. package/dist/cjs/{jsonMode-b61f2f13.js → jsonMode-7f1c339b.js} +3 -3
  37. package/dist/cjs/loader.cjs.js +4 -4
  38. package/dist/cjs/{sql-expr-defaults-abca6c0e.js → sql-expr-defaults-8da1e20e.js} +13 -12
  39. package/dist/cjs/{sql-expr-mode-fd4c0094.js → sql-expr-mode-a54f0061.js} +7 -5
  40. package/dist/cjs/{tsMode-f517e713.js → tsMode-fa2cc8d9.js} +3 -3
  41. package/dist/cjs/{typescript-7a310fd3.js → typescript-62652114.js} +3 -3
  42. package/dist/cjs/{useT9n-4e9beec5.js → useT9n-93800da2.js} +3 -3
  43. package/dist/components/arcade-defaults.js +2 -2
  44. package/dist/components/arcade-mode.js +1 -1
  45. package/dist/components/arcade-results.js +1 -1
  46. package/dist/components/arcade-suggestions.js +1 -1
  47. package/dist/components/arcgis-arcade-editor.js +8 -8
  48. package/dist/components/arcgis-arcade-results.js +1 -1
  49. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  50. package/dist/components/arcgis-assets.d.ts +1 -1
  51. package/dist/components/arcgis-assets.js +1 -1
  52. package/dist/components/arcgis-code-editor.js +1 -1
  53. package/dist/components/{arcgis-arcade-variables.d.ts → arcgis-editor-variables.d.ts} +4 -4
  54. package/dist/components/arcgis-editor-variables.js +11 -0
  55. package/dist/components/arcgis-language-api-panel.js +1 -1
  56. package/dist/components/arcgis-sql-expression-editor.js +29 -10
  57. package/dist/components/arcgis-sql-expression-fields.js +103 -2
  58. package/dist/components/chunk-A4MUWALE.js +1 -1
  59. package/dist/components/code-editor.js +2 -2
  60. package/dist/components/{arcade-variables.js → editor-variables.js} +65 -16
  61. package/dist/components/fields.js +1 -1
  62. package/dist/components/index.js +1 -1
  63. package/dist/components/index2.js +1 -1
  64. package/dist/components/language-api-panel.js +1 -1
  65. package/dist/components/markdown.js +1 -1
  66. package/dist/components/sql-expr-defaults.js +1347 -5
  67. package/dist/components/sql-expr-mode.js +6 -4
  68. package/dist/components/useT9n.js +1 -1
  69. package/dist/components/utilities.js +1 -1
  70. package/dist/esm/{app-globals-3fe7cb9f.js → app-globals-4d228c7f.js} +1 -1
  71. package/dist/esm/{arcade-defaults-dc90a65f.js → arcade-defaults-87dae5bb.js} +3 -3
  72. package/dist/esm/{arcade-mode-5580d9f3.js → arcade-mode-95d965cd.js} +3 -3
  73. package/dist/esm/arcgis-arcade-editor_6.entry.js +207 -157
  74. package/dist/esm/arcgis-coding-components.js +5 -5
  75. package/dist/esm/arcgis-sql-expression-editor.entry.js +26 -7
  76. package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
  77. package/dist/esm/{css-69a1774f.js → css-61df822a.js} +1 -1
  78. package/dist/esm/{cssMode-4fa18850.js → cssMode-854d0444.js} +3 -3
  79. package/dist/esm/{html-b7892d66.js → html-e212cff4.js} +3 -3
  80. package/dist/esm/{htmlMode-ab689485.js → htmlMode-62efd3ab.js} +3 -3
  81. package/dist/esm/{index-5df9a0d7.js → index-718a7ca6.js} +1 -1
  82. package/dist/esm/index.js +4 -4
  83. package/dist/esm/{javascript-a9a5f5d5.js → javascript-4536b286.js} +4 -4
  84. package/dist/esm/{jsonMode-d2251707.js → jsonMode-c27992b4.js} +3 -3
  85. package/dist/esm/loader.js +5 -5
  86. package/dist/esm/{sql-expr-defaults-3a01e6ef.js → sql-expr-defaults-b95d538c.js} +14 -13
  87. package/dist/esm/{sql-expr-mode-6964367f.js → sql-expr-mode-e25cff46.js} +7 -5
  88. package/dist/esm/{tsMode-21f06c86.js → tsMode-c2a2a492.js} +3 -3
  89. package/dist/esm/{typescript-4ce4badc.js → typescript-fff5fb54.js} +3 -3
  90. package/dist/esm/{useT9n-c7e8c91e.js → useT9n-4f519849.js} +3 -3
  91. package/dist/loader/cdn.js +1 -1
  92. package/dist/loader/index.cjs.js +1 -1
  93. package/dist/loader/index.es2017.js +1 -1
  94. package/dist/loader/index.js +1 -1
  95. package/dist/types/components/{arcade-variables/arcade-variables.d.ts → editor-variables/editor-variables.d.ts} +25 -2
  96. package/dist/types/components/sql-expression-editor/sql-expression-editor.d.ts +6 -0
  97. package/dist/types/components.d.ts +63 -53
  98. package/dist/types/utils/profile/editor-profile.d.ts +2 -1
  99. package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +1 -0
  100. package/dist/types/utils/sql-expr-monaco/sql-expr-constants.d.ts +1 -1
  101. package/package.json +11 -11
  102. package/dist/arcgis-coding-components/p-6b6106c2.entry.js +0 -6
  103. package/dist/arcgis-coding-components/p-ac0c2b9a.js +0 -6
  104. package/dist/arcgis-coding-components/p-f18177dd.entry.js +0 -6
  105. package/dist/components/arcgis-arcade-variables.js +0 -11
  106. package/dist/components/language-defaults-base.js +0 -1352
  107. package/dist/components/sql-expression-fields.js +0 -109
  108. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ar.json → editor-variables/t9n/editor-variables.t9n.ar.json} +0 -0
  109. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.bg.json → editor-variables/t9n/editor-variables.t9n.bg.json} +0 -0
  110. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.bs.json → editor-variables/t9n/editor-variables.t9n.bs.json} +0 -0
  111. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ca.json → editor-variables/t9n/editor-variables.t9n.ca.json} +0 -0
  112. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.cs.json → editor-variables/t9n/editor-variables.t9n.cs.json} +0 -0
  113. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.da.json → editor-variables/t9n/editor-variables.t9n.da.json} +0 -0
  114. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.de.json → editor-variables/t9n/editor-variables.t9n.de.json} +0 -0
  115. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.el.json → editor-variables/t9n/editor-variables.t9n.el.json} +0 -0
  116. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.en.json → editor-variables/t9n/editor-variables.t9n.en.json} +0 -0
  117. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.es.json → editor-variables/t9n/editor-variables.t9n.es.json} +0 -0
  118. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.et.json → editor-variables/t9n/editor-variables.t9n.et.json} +0 -0
  119. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.fi.json → editor-variables/t9n/editor-variables.t9n.fi.json} +0 -0
  120. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.fr.json → editor-variables/t9n/editor-variables.t9n.fr.json} +0 -0
  121. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.he.json → editor-variables/t9n/editor-variables.t9n.he.json} +0 -0
  122. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.hr.json → editor-variables/t9n/editor-variables.t9n.hr.json} +0 -0
  123. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.hu.json → editor-variables/t9n/editor-variables.t9n.hu.json} +0 -0
  124. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.id.json → editor-variables/t9n/editor-variables.t9n.id.json} +0 -0
  125. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.it.json → editor-variables/t9n/editor-variables.t9n.it.json} +0 -0
  126. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ja.json → editor-variables/t9n/editor-variables.t9n.ja.json} +0 -0
  127. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ko.json → editor-variables/t9n/editor-variables.t9n.ko.json} +0 -0
  128. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.lt.json → editor-variables/t9n/editor-variables.t9n.lt.json} +0 -0
  129. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.lv.json → editor-variables/t9n/editor-variables.t9n.lv.json} +0 -0
  130. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.nb.json → editor-variables/t9n/editor-variables.t9n.nb.json} +0 -0
  131. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.nl.json → editor-variables/t9n/editor-variables.t9n.nl.json} +0 -0
  132. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.pl.json → editor-variables/t9n/editor-variables.t9n.pl.json} +0 -0
  133. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.pt-BR.json → editor-variables/t9n/editor-variables.t9n.pt-BR.json} +0 -0
  134. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.pt-PT.json → editor-variables/t9n/editor-variables.t9n.pt-PT.json} +0 -0
  135. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ro.json → editor-variables/t9n/editor-variables.t9n.ro.json} +0 -0
  136. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.ru.json → editor-variables/t9n/editor-variables.t9n.ru.json} +0 -0
  137. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sk.json → editor-variables/t9n/editor-variables.t9n.sk.json} +0 -0
  138. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sl.json → editor-variables/t9n/editor-variables.t9n.sl.json} +0 -0
  139. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sr.json → editor-variables/t9n/editor-variables.t9n.sr.json} +0 -0
  140. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.sv.json → editor-variables/t9n/editor-variables.t9n.sv.json} +0 -0
  141. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.th.json → editor-variables/t9n/editor-variables.t9n.th.json} +0 -0
  142. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.tr.json → editor-variables/t9n/editor-variables.t9n.tr.json} +0 -0
  143. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.uk.json → editor-variables/t9n/editor-variables.t9n.uk.json} +0 -0
  144. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.vi.json → editor-variables/t9n/editor-variables.t9n.vi.json} +0 -0
  145. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.zh-CN.json → editor-variables/t9n/editor-variables.t9n.zh-CN.json} +0 -0
  146. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.zh-HK.json → editor-variables/t9n/editor-variables.t9n.zh-HK.json} +0 -0
  147. /package/dist/arcgis-coding-components/assets/{arcade-variables/t9n/arcade-variables.t9n.zh-TW.json → editor-variables/t9n/editor-variables.t9n.zh-TW.json} +0 -0
@@ -1,16 +1,16 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-16caf224.js');
11
- const sqlExprDefaults = require('./sql-expr-defaults-abca6c0e.js');
12
- const useT9n = require('./useT9n-4e9beec5.js');
13
- const arcadeDefaults = require('./arcade-defaults-7eb50451.js');
10
+ const index = require('./index-05ceca06.js');
11
+ const sqlExprDefaults = require('./sql-expr-defaults-8da1e20e.js');
12
+ const useT9n = require('./useT9n-93800da2.js');
13
+ const arcadeDefaults = require('./arcade-defaults-82c1a665.js');
14
14
 
15
15
  const DevelopersWebSitePath = "https://developers.arcgis.com/arcade/";
16
16
  const MaxArrayItems = 100;
@@ -367,7 +367,7 @@ async function getArcadeDiagnosticService() {
367
367
  * @returns arcade mode module
368
368
  */
369
369
  async function getMode$1() {
370
- return await Promise.resolve().then(function () { return require('./arcade-mode-ca4a9411.js'); });
370
+ return await Promise.resolve().then(function () { return require('./arcade-mode-f6538113.js'); });
371
371
  }
372
372
 
373
373
  const arcadeEditorCss = "arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-arcade-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-arcade-editor .flex-panel{flex:1 0 auto}arcgis-arcade-editor .position-relative{position:relative}arcgis-arcade-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-arcade-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-arcade-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-arcade-editor .sticky{position:sticky;top:0px;z-index:10}arcgis-arcade-editor .notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}arcgis-arcade-editor .side-action-bar{max-width:25%}arcgis-arcade-editor .side-panel{max-width:45%;width:600px}arcgis-arcade-editor .side-panel calcite-flow{height:100%}arcgis-arcade-editor .main-action-bar{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}arcgis-arcade-editor .main-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor .main-action-bar calcite-action-group:last-child{border-inline-end-width:0px}arcgis-arcade-editor .main-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}arcgis-arcade-editor arcgis-arcade-results{border-top:1px solid var(--calcite-color-border-3);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}arcgis-arcade-editor calcite-flow [slot=footer]{word-break:break-word}";
@@ -664,7 +664,7 @@ const ArcgisArcadeEditor = class {
664
664
  case "api":
665
665
  return (index.h("arcgis-language-api-panel", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, apiLibrary: this._apiLibrary, hideDocumentationActions: this.hideDocumentationActions, onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
666
666
  case "variables":
667
- return (index.h("arcgis-arcade-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, modelId: this._modelId, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
667
+ return (index.h("arcgis-editor-variables", { class: "side-panel flex-panel border-inline-start", loading: this._preparingArcade, modelId: this._modelId, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none", variable: this._editorProfile }));
668
668
  case "suggestions":
669
669
  return (index.h("arcgis-arcade-suggestions", { class: "side-panel flex-panel border-inline-start", suggestions: this.suggestions, onArcgisItemSelected: this._insertAsText, onArcgisClose: this._toggleSidePanel, "data-panel-name": "none" }));
670
670
  default:
@@ -682,7 +682,7 @@ const ArcgisArcadeEditor = class {
682
682
  //#endregion
683
683
  //#region Render
684
684
  render() {
685
- return (index.h(index.Host, { key: 'eb51d98e22574059128883f2aef749f822393903' }, this.renderMainActionBar(), index.h("div", { key: 'c62fd45179c745116af6c53b1d7429ca8554b3c7', class: "flex-row flex-adjustable" }, index.h("div", { key: 'e5a52d1c250a5790ccc495f26f4f4ea06688232d', class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
685
+ return (index.h(index.Host, { key: '82573b59947bcd994ecd8735d367a69b4ce150cd' }, this.renderMainActionBar(), index.h("div", { key: '9b59e8c7dbb3f613e38eb77fc5e752bf18cdc059', class: "flex-row flex-adjustable" }, index.h("div", { key: '7f6972e8c7b43e6181f3f4581add686acb6d882d', class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
686
686
  }
687
687
  static get assetsDirs() { return ["assets"]; }
688
688
  get el() { return index.getElement(this); }
@@ -3982,153 +3982,6 @@ const ArcgisArcadeSuggestions = class {
3982
3982
  };
3983
3983
  ArcgisArcadeSuggestions.style = ArcgisArcadeSuggestionsStyle0;
3984
3984
 
3985
- 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%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
3986
- const ArcgisArcadeVariablesStyle0 = arcadeVariablesCss;
3987
-
3988
- function stopEnterPropagation(e) {
3989
- if (e.key === "Enter") {
3990
- e.stopPropagation();
3991
- }
3992
- }
3993
- const ArcgisArcadeVariables = class {
3994
- constructor(hostRef) {
3995
- index.registerInstance(this, hostRef);
3996
- this.arcgisClose = index.createEvent(this, "arcgisClose", 3);
3997
- this.arcgisItemSelected = index.createEvent(this, "arcgisItemSelected", 3);
3998
- this.manager = useT9n.useControllerManager(this);
3999
- this.messages = useT9n.useT9n();
4000
- this._updateFilterValue = (e) => {
4001
- this._filterValue = e.target.value;
4002
- };
4003
- this._beforeBack = async () => {
4004
- this.removeLastPanelRenderer();
4005
- this._filterValue = "";
4006
- };
4007
- this._emitClose = () => {
4008
- this.arcgisClose.emit();
4009
- };
4010
- this._backToTop = () => {
4011
- this._flowItemRenderers = [];
4012
- };
4013
- this._emitItemSelected = (e) => {
4014
- const variable = e.target?.["data-item"];
4015
- if (!variable || variable.nonInteractive) {
4016
- return;
4017
- }
4018
- const keyEvent = e;
4019
- if (!keyEvent.key || keyEvent.key === "Enter") {
4020
- e.preventDefault();
4021
- this.arcgisItemSelected.emit(variable.snippet);
4022
- }
4023
- };
4024
- this._showCollectionPanel = (e) => {
4025
- const collectionVariable = e.target?.["data-item"];
4026
- if (!collectionVariable) {
4027
- return;
4028
- }
4029
- e.stopPropagation();
4030
- this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
4031
- };
4032
- this._mutationCounter = 1;
4033
- this._flowItemRenderers = [];
4034
- this._filterValue = "";
4035
- this.loading = false;
4036
- this.modelId = undefined;
4037
- }
4038
- modelIdPropChanged() {
4039
- this._flowItemRenderers = [];
4040
- }
4041
- //#endregion
4042
- disconnectedCallback() {
4043
- this._flowObserver?.disconnect();
4044
- }
4045
- // #endregion
4046
- //#region Private Methods
4047
- addPanelRenderer(panelRenderer) {
4048
- this._flowItemRenderers = [...this._flowItemRenderers, panelRenderer];
4049
- }
4050
- removeLastPanelRenderer() {
4051
- this._flowItemRenderers = this._flowItemRenderers.slice(0, -1);
4052
- }
4053
- flowFocusHandler(ref) {
4054
- // When a flow is removed from the document then a null ref will be passed in
4055
- if (!ref) {
4056
- this._flowObserver?.disconnect();
4057
- this._flowObserver = undefined;
4058
- return;
4059
- }
4060
- if (this._flowObserver) {
4061
- return;
4062
- }
4063
- // Observer panel added/removed and also observe the flow id
4064
- // When switching between flow the same reference is reused
4065
- this._flowObserver = new MutationObserver(() => {
4066
- // Get the last panel and try to set focus on the input element
4067
- sqlExprDefaults.setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
4068
- });
4069
- this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
4070
- }
4071
- //#endregion
4072
- //#region Renderers
4073
- collectionBasedVariableRenderer(collection, topPanel = false) {
4074
- // Returns a function to be added to the subpanel render collection
4075
- return () => {
4076
- if (!collection) {
4077
- return null;
4078
- }
4079
- // If the collection actually exists then two options:
4080
- // - the collection still need to be loaded
4081
- // - the collection is ready
4082
- let loading = this.loading;
4083
- if (!loading && !collection.loaded) {
4084
- // Request to load and update mutation counter when done
4085
- collection
4086
- .loadSource()
4087
- .then(() => setTimeout(() => {
4088
- this._mutationCounter += 1;
4089
- }))
4090
- .catch(() => {
4091
- console.error("Error loading collection");
4092
- loading = false;
4093
- });
4094
- loading = true;
4095
- }
4096
- return (index.h("calcite-flow-item", { heading: this.messages.profilevariables, description: collection.breadcrumb, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), index.h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (index.h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "" })) : (index.h("calcite-list", null, this.renderEditorVariables(collection)))));
4097
- };
4098
- }
4099
- renderEditorVariables(collection) {
4100
- // Filter the variables. Skip group, we will filter the children later on.
4101
- const filterExpression = sqlExprDefaults.createFilterExpression(this._filterValue);
4102
- const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
4103
- if (!filteredVariables.length) {
4104
- return index.h("div", { class: "notice-container" }, this.messages.noitems);
4105
- }
4106
- return filteredVariables.map((variable) => this.renderEditorVariable(variable));
4107
- }
4108
- renderEditorVariable(variable) {
4109
- switch (variable.type) {
4110
- case "group":
4111
- // Group is a collection but we represent it differently
4112
- return (index.h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
4113
- default:
4114
- return (index.h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (index.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 ? index.h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
4115
- }
4116
- }
4117
- render() {
4118
- const profile = arcadeDefaults.arcadeDefaults.getEditorProfileForModel(this.modelId ?? "");
4119
- if (!this.loading && !profile?.variables.length) {
4120
- return (index.h("calcite-flow", null, index.h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage))));
4121
- }
4122
- return (index.h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
4123
- }
4124
- static get assetsDirs() { return ["assets"]; }
4125
- get el() { return index.getElement(this); }
4126
- static get watchers() { return {
4127
- "modelId": ["modelIdPropChanged"]
4128
- }; }
4129
- };
4130
- ArcgisArcadeVariables.style = ArcgisArcadeVariablesStyle0;
4131
-
4132
3985
  // Register the language in Monaco
4133
3986
  sqlExprDefaults.languages.register({
4134
3987
  id: arcadeDefaults.arcadeDefaults.languageId,
@@ -4162,7 +4015,7 @@ sqlExprDefaults.languages.onLanguage(arcadeDefaults.arcadeDefaults.languageId, (
4162
4015
  * @returns sql-expression mode module
4163
4016
  */
4164
4017
  async function getMode() {
4165
- return await Promise.resolve().then(function () { return require('./sql-expr-mode-fd4c0094.js'); });
4018
+ return await Promise.resolve().then(function () { return require('./sql-expr-mode-a54f0061.js'); });
4166
4019
  }
4167
4020
 
4168
4021
  // Register the language in Monaco
@@ -4441,6 +4294,203 @@ const ArcgisCodeEditor = class {
4441
4294
  };
4442
4295
  ArcgisCodeEditor.style = ArcgisCodeEditorStyle0;
4443
4296
 
4297
+ const editorVariablesCss = ":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-list-item-group{background-color:var(--calcite-color-foreground-2)}";
4298
+ const ArcgisEditorVariablesStyle0 = editorVariablesCss;
4299
+
4300
+ function stopEnterPropagation(e) {
4301
+ if (e.key === "Enter") {
4302
+ e.stopPropagation();
4303
+ }
4304
+ }
4305
+ const ArcgisEditorVariables = class {
4306
+ constructor(hostRef) {
4307
+ index.registerInstance(this, hostRef);
4308
+ this.arcgisClose = index.createEvent(this, "arcgisClose", 3);
4309
+ this.arcgisItemSelected = index.createEvent(this, "arcgisItemSelected", 3);
4310
+ this.manager = useT9n.useControllerManager(this);
4311
+ this.messages = useT9n.useT9n();
4312
+ this._updateFilterValue = (e) => {
4313
+ this._filterValue = e.target.value;
4314
+ };
4315
+ this._beforeBack = async () => {
4316
+ this.removeLastPanelRenderer();
4317
+ this._filterValue = "";
4318
+ };
4319
+ this._emitClose = () => {
4320
+ this.arcgisClose.emit();
4321
+ };
4322
+ this._backToTop = () => {
4323
+ this._flowItemRenderers = [];
4324
+ };
4325
+ this._emitItemSelected = (e) => {
4326
+ const variable = e.target?.["data-item"];
4327
+ if (!variable || variable.nonInteractive) {
4328
+ return;
4329
+ }
4330
+ const keyEvent = e;
4331
+ if (!keyEvent.key || keyEvent.key === "Enter") {
4332
+ e.preventDefault();
4333
+ this.arcgisItemSelected.emit(variable.snippet);
4334
+ }
4335
+ };
4336
+ this._showCollectionPanel = (e) => {
4337
+ const collectionVariable = e.target?.["data-item"];
4338
+ if (!collectionVariable) {
4339
+ return;
4340
+ }
4341
+ e.stopPropagation();
4342
+ this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
4343
+ };
4344
+ this._mutationCounter = 1;
4345
+ this._flowItemRenderers = [];
4346
+ this._filterValue = "";
4347
+ this._mode = "profile";
4348
+ this.loading = false;
4349
+ this.modelId = undefined;
4350
+ this.variable = undefined;
4351
+ }
4352
+ modelIdPropChanged() {
4353
+ this._flowItemRenderers = [];
4354
+ }
4355
+ _variableChanged() {
4356
+ /**
4357
+ * Update the mode of the component. Either "featureSet" or "profile"
4358
+ * defaults to profile unless the variable is explicitly a featureSet
4359
+ */
4360
+ this._mode = this.variable?.type === "featureSet" ? "featureSet" : "profile";
4361
+ }
4362
+ //#endregion
4363
+ disconnectedCallback() {
4364
+ this._flowObserver?.disconnect();
4365
+ }
4366
+ // #endregion
4367
+ // #region lifecycle methods
4368
+ componentWillLoad() {
4369
+ this._variableChanged();
4370
+ }
4371
+ // #endregion
4372
+ //#region Private Methods
4373
+ addPanelRenderer(panelRenderer) {
4374
+ this._flowItemRenderers = [...this._flowItemRenderers, panelRenderer];
4375
+ }
4376
+ removeLastPanelRenderer() {
4377
+ this._flowItemRenderers = this._flowItemRenderers.slice(0, -1);
4378
+ }
4379
+ _isMode(mode) {
4380
+ return this._mode === mode;
4381
+ }
4382
+ flowFocusHandler(ref) {
4383
+ // When a flow is removed from the document then a null ref will be passed in
4384
+ if (!ref) {
4385
+ this._flowObserver?.disconnect();
4386
+ this._flowObserver = undefined;
4387
+ return;
4388
+ }
4389
+ if (this._flowObserver) {
4390
+ return;
4391
+ }
4392
+ // Observer panel added/removed and also observe the flow id
4393
+ // When switching between flow the same reference is reused
4394
+ this._flowObserver = new MutationObserver(() => {
4395
+ // Get the last panel and try to set focus on the input element
4396
+ sqlExprDefaults.setFocusOnElement(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
4397
+ });
4398
+ this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
4399
+ }
4400
+ _getHeadingForCollection(collection) {
4401
+ if (!collection) {
4402
+ return "";
4403
+ }
4404
+ switch (this._mode) {
4405
+ case "profile":
4406
+ return this.messages.profilevariables ?? "";
4407
+ case "featureSet":
4408
+ // In featureSet mode, we do not show "Profile Variables" as the heading
4409
+ // Instead, we show the label of the collection, i.e. the name of the layer
4410
+ return collection.variables[0]?.getLabel() ?? "";
4411
+ }
4412
+ }
4413
+ _getDescriptionForCollection(collection) {
4414
+ if (!collection) {
4415
+ return "";
4416
+ }
4417
+ switch (this._mode) {
4418
+ case "profile":
4419
+ return collection.breadcrumb;
4420
+ case "featureSet":
4421
+ return "";
4422
+ }
4423
+ }
4424
+ //#endregion
4425
+ //#region Renderers
4426
+ collectionBasedVariableRenderer(collection, topPanel = false) {
4427
+ // Returns a function to be added to the subpanel render collection
4428
+ return () => {
4429
+ if (!collection) {
4430
+ return null;
4431
+ }
4432
+ // If the collection actually exists then two options:
4433
+ // - the collection still need to be loaded
4434
+ // - the collection is ready
4435
+ let loading = this.loading;
4436
+ if (!loading && !collection.loaded) {
4437
+ // Request to load and update mutation counter when done
4438
+ collection
4439
+ .loadSource()
4440
+ .then(() => setTimeout(() => {
4441
+ this._mutationCounter += 1;
4442
+ }))
4443
+ .catch(() => {
4444
+ console.error("Error loading collection");
4445
+ loading = false;
4446
+ });
4447
+ loading = true;
4448
+ }
4449
+ return (index.h("calcite-flow-item", { heading: this._getHeadingForCollection(collection), description: this._getDescriptionForCollection(collection), beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h("calcite-action", { slot: "header-actions-end", text: this.messages.backtotop ?? "", scale: "m",
4450
+ // do not show the back button if the top panel is already displayed or if we are in featureSet mode
4451
+ hidden: topPanel || this._isMode("featureSet"), icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), index.h("calcite-input", { value: this._filterValue, icon: "magnifying-glass", clearable: true, onCalciteInputInput: this._updateFilterValue, class: "sticky", scale: "m" }), loading ? (index.h("calcite-loader", { scale: "s", type: "indeterminate", label: this.messages.loading ?? "" })) : (index.h("calcite-list", null, this.renderEditorVariables(collection)))));
4452
+ };
4453
+ }
4454
+ renderEditorVariables(collection) {
4455
+ // Filter the variables. Skip group, we will filter the children later on.
4456
+ const filterExpression = sqlExprDefaults.createFilterExpression(this._filterValue);
4457
+ const filteredVariables = collection.variables.filter((variable) => variable.passFilter(filterExpression));
4458
+ if (!filteredVariables.length) {
4459
+ return index.h("div", { class: "notice-container" }, this.messages.noitems);
4460
+ }
4461
+ return filteredVariables.map((variable) => this.renderEditorVariable(variable));
4462
+ }
4463
+ renderEditorVariable(variable) {
4464
+ switch (variable.type) {
4465
+ case "group":
4466
+ /**
4467
+ * Skip the header variable if we are in featureSet mode.
4468
+ * The header variable represents the namespace used to access a value inside a variable, i.e. $layer or $feature
4469
+ */
4470
+ if (this._isMode("featureSet") && variable.isHeader) {
4471
+ return;
4472
+ }
4473
+ // Group is a collection but we represent it differently
4474
+ return (index.h("calcite-list-item-group", { heading: variable.getLabel() }, this.renderEditorVariables(variable)));
4475
+ default:
4476
+ return (index.h("calcite-list-item", { label: variable.getLabel(), description: variable.getDescription(), onCalciteListItemSelect: this._emitItemSelected, onKeyPress: this._emitItemSelected, "data-item": variable }, variable.isCollection ? (index.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 ? index.h("calcite-icon", { icon: variable.icon, scale: "s", slot: "content-start" }) : null));
4477
+ }
4478
+ }
4479
+ render() {
4480
+ if (!this.loading && this.variable?.loaded && !this.variable?.variables.length) {
4481
+ return (index.h("calcite-flow", null, index.h("calcite-flow-item", { heading: this.messages.profilevariables, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h("div", { class: "notice-container" }, this.messages.noprofilevariablesmessage))));
4482
+ }
4483
+ return (index.h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(this.variable, true)(), this._flowItemRenderers.map((renderer) => renderer())));
4484
+ }
4485
+ static get assetsDirs() { return ["assets"]; }
4486
+ get el() { return index.getElement(this); }
4487
+ static get watchers() { return {
4488
+ "modelId": ["modelIdPropChanged"],
4489
+ "variable": ["_variableChanged"]
4490
+ }; }
4491
+ };
4492
+ ArcgisEditorVariables.style = ArcgisEditorVariablesStyle0;
4493
+
4444
4494
  const languageApiPanelCss = ":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)}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
4445
4495
  const ArcgisLanguageApiPanelStyle0 = languageApiPanelCss;
4446
4496
 
@@ -4586,6 +4636,6 @@ ArcgisLanguageApiPanel.style = ArcgisLanguageApiPanelStyle0;
4586
4636
  exports.arcgis_arcade_editor = ArcgisArcadeEditor;
4587
4637
  exports.arcgis_arcade_results = ArcgisArcadeResults;
4588
4638
  exports.arcgis_arcade_suggestions = ArcgisArcadeSuggestions;
4589
- exports.arcgis_arcade_variables = ArcgisArcadeVariables;
4590
4639
  exports.arcgis_code_editor = ArcgisCodeEditor;
4640
+ exports.arcgis_editor_variables = ArcgisEditorVariables;
4591
4641
  exports.arcgis_language_api_panel = ArcgisLanguageApiPanel;
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-16caf224.js');
11
- const appGlobals = require('./app-globals-e36ff7b6.js');
10
+ const index = require('./index-05ceca06.js');
11
+ const appGlobals = require('./app-globals-4497f8e0.js');
12
12
 
13
13
  /*
14
14
  Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -24,7 +24,7 @@ var patchBrowser = () => {
24
24
 
25
25
  patchBrowser().then(async (options) => {
26
26
  await appGlobals.globalScripts();
27
- return index.bootstrapLazy([["arcgis-sql-expression-fields.cjs",[[1,"arcgis-sql-expression-fields",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}]]],["arcgis-arcade-editor_6.cjs",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1025],"testData":[16],"suggestions":[16],"snippets":[16],"hideDocumentationActions":[4,"hide-documentation-actions"],"hideSideBar":[4,"hide-side-bar"],"sideActionBarExpanded":[1540,"side-action-bar-expanded"],"openedSidePanel":[1537,"opened-side-panel"],"editorOptions":[16],"editorInstance":[16],"_preparingArcade":[32],"_editorProfile":[32],"_apiLibrary":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"messages":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"updateThemeColors":[64]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"],"testData":["_testDataChanged"],"snippets":["_snippetChanged"]}],[1,"arcgis-arcade-results",{"loading":[4],"openedResultPanel":[1537,"opened-result-panel"],"result":[16],"consoleLogs":[16]}],[1,"arcgis-arcade-suggestions",{"suggestions":[16],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"suggestions":["suggestionsPropChanged"]}],[1,"arcgis-arcade-variables",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}],[0,"arcgis-code-editor",{"value":[1],"language":[1],"modelId":[1,"model-id"],"editorOptions":[16],"editorInstance":[16],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]},null,{"language":["languagePropChange"],"modelId":["modelIdPropChange"],"editorOptions":["editorOptionsPropChange"]}],[1,"arcgis-language-api-panel",{"hideDocumentationActions":[4,"hide-documentation-actions"],"loading":[4],"apiLibrary":[16],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"apiLibrary":["_apiLibraryChanged"]}]]],["arcgis-sql-expression-editor.cjs",[[0,"arcgis-sql-expression-editor",{"profile":[16],"script":[1025],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32],"messages":[32]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"]}]]]], options);
27
+ return index.bootstrapLazy([["arcgis-arcade-editor_6.cjs",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1025],"testData":[16],"suggestions":[16],"snippets":[16],"hideDocumentationActions":[4,"hide-documentation-actions"],"hideSideBar":[4,"hide-side-bar"],"sideActionBarExpanded":[1540,"side-action-bar-expanded"],"openedSidePanel":[1537,"opened-side-panel"],"editorOptions":[16],"editorInstance":[16],"_preparingArcade":[32],"_editorProfile":[32],"_apiLibrary":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"messages":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"updateThemeColors":[64]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"],"testData":["_testDataChanged"],"snippets":["_snippetChanged"]}],[1,"arcgis-arcade-results",{"loading":[4],"openedResultPanel":[1537,"opened-result-panel"],"result":[16],"consoleLogs":[16]}],[1,"arcgis-arcade-suggestions",{"suggestions":[16],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"suggestions":["suggestionsPropChanged"]}],[0,"arcgis-code-editor",{"value":[1],"language":[1],"modelId":[1,"model-id"],"editorOptions":[16],"editorInstance":[16],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]},null,{"language":["languagePropChange"],"modelId":["modelIdPropChange"],"editorOptions":["editorOptionsPropChange"]}],[1,"arcgis-editor-variables",{"loading":[4],"modelId":[1,"model-id"],"variable":[16],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32],"_mode":[32]},null,{"modelId":["modelIdPropChanged"],"variable":["_variableChanged"]}],[1,"arcgis-language-api-panel",{"hideDocumentationActions":[4,"hide-documentation-actions"],"loading":[4],"apiLibrary":[16],"_selectedApiItem":[32],"_filterValue":[32],"_colorizeStyle":[32]},null,{"apiLibrary":["_apiLibraryChanged"]}]]],["arcgis-sql-expression-editor.cjs",[[0,"arcgis-sql-expression-editor",{"profile":[16],"script":[1025],"_preparing":[32],"_editorProfile":[32],"_activeAction":[32],"_apiLibrary":[32],"messages":[32]},null,{"messages":["_messagesChanged"],"profile":["_profileChanged"]}]]],["arcgis-sql-expression-fields.cjs",[[1,"arcgis-sql-expression-fields",{"loading":[4],"modelId":[1,"model-id"],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]},null,{"modelId":["modelIdPropChanged"]}]]]], options);
28
28
  });
29
29
 
30
30
  exports.setNonce = index.setNonce;
@@ -1,15 +1,15 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-16caf224.js');
11
- const useT9n = require('./useT9n-4e9beec5.js');
12
- const sqlExprDefaults = require('./sql-expr-defaults-abca6c0e.js');
10
+ const index = require('./index-05ceca06.js');
11
+ const useT9n = require('./useT9n-93800da2.js');
12
+ const sqlExprDefaults = require('./sql-expr-defaults-8da1e20e.js');
13
13
 
14
14
  const sqlExpressionEditorCss = "arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";
15
15
  const ArcgisSqlExpressionEditorStyle0 = sqlExpressionEditorCss;
@@ -23,6 +23,9 @@ const SqlExpressionEditor = class {
23
23
  // #region Private properties
24
24
  this._modelId = sqlExprDefaults.generateGuid();
25
25
  this._insertAsSnippet = (e) => void this._codeEditorElt?.insertSnippet(e.detail).catch(console.error);
26
+ this._insertAsText = (e) =>
27
+ // sql expressions use single quotes for strings
28
+ void this._codeEditorElt?.insertText(e.detail.replaceAll('"', "'")).catch(console.error);
26
29
  this._updateApiLibrary = async () => {
27
30
  this._apiLibrary = await sqlExprDefaults.sqlExprDefaults.getApiLibraryForModel(this._modelId);
28
31
  };
@@ -53,12 +56,12 @@ const SqlExpressionEditor = class {
53
56
  this._preparing = true;
54
57
  try {
55
58
  await sqlExprDefaults.sqlExprDefaults.setProfileForModel(this._modelId, this.profile);
59
+ this._editorProfile = sqlExprDefaults.sqlExprDefaults.getEditorProfileForModel(this._modelId);
56
60
  }
57
61
  catch {
58
62
  this._editorProfile = undefined;
59
63
  }
60
64
  finally {
61
- // this._editorProfilePromise = Promise.resolve(this._editorProfile);
62
65
  this._preparing = false;
63
66
  }
64
67
  }
@@ -69,6 +72,21 @@ const SqlExpressionEditor = class {
69
72
  const action = e.target;
70
73
  this._setActiveAction(action.dataset.panelName);
71
74
  }
75
+ /***
76
+ * Gets the featureSetVariable from the editor profile- used to populate the variables panel.
77
+ * In current form, there should only be one variable in the profile.
78
+ */
79
+ _getFeatureSetVariable() {
80
+ let featureSetVar;
81
+ const profile = sqlExprDefaults.sqlExprDefaults.getEditorProfileForModel(this._modelId);
82
+ if (profile?.variables?.length && profile?.variables?.[0]?.type !== "featureSet") {
83
+ console.error("encountered unexpected editor profile");
84
+ }
85
+ else {
86
+ featureSetVar = profile?.variables?.[0];
87
+ }
88
+ return featureSetVar;
89
+ }
72
90
  // #endregion
73
91
  // #region Component lifecycle events
74
92
  async componentWillLoad() {
@@ -83,9 +101,10 @@ const SqlExpressionEditor = class {
83
101
  }
84
102
  // #endregion
85
103
  render() {
86
- return (index.h(index.Host, { key: '12b766db77f8e34a545e90fedd0138cf1469b66b' }, index.h("div", { key: '152606eaeac85b19c6c2ff0ced1aa1981d507ca1', class: "flex-row flex-adjustable" }, index.h("div", { key: '7205f9adf6501968f05ba2395821ab7bc188bca1', class: "flex-column flex-adjustable" }, index.h("arcgis-code-editor", { key: '1749a95f1126858e11fc2dc2ac35ae2b89e50ce3', language: "arcgis-sql-expression", modelId: this._modelId, ref: (e) => (this._codeEditorElt = e), value: this.script ?? "", onArcgisValueChange: this._onCodeEditorValueChange })), this._activeAction === "fields" && (index.h("arcgis-sql-expression-fields", { key: '66047896f2420bda201ef1cddea74a27d6a09461', class: "side-panel flex-panel border-inline-start", loading: this._preparing, modelId: this._modelId, "data-panel-name": "none", onArcgisFieldSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined) })), this._activeAction === "functions" && (index.h("arcgis-language-api-panel", { key: '46aebbd9fb0c7e0968642c788a7b1c9445c67188', class: "side-panel flex-panel border-inline-start", onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined), loading: this._preparing, apiLibrary: this._apiLibrary, "data-panel-name": "none" })), index.h("calcite-action-bar", { key: '8451bf2729834205c85efa26d5c55369aba14ac2', class: "side-action-bar border-inline-start", expanded: false, position: "end" }, index.h("calcite-action", { key: '7134aa5fceb91ce0bfd162b8c6e9aab37b000246', id: "fields-action", text: this.messages.fields ?? "Fields", icon: "profile-variables", active: this._activeAction === "fields", "data-panel-name": "fields",
104
+ const variable = this._getFeatureSetVariable();
105
+ return (index.h(index.Host, { key: '68c73513b93f3509d8113eaa32a08f2fbf647427' }, index.h("div", { key: '5ca783649ff7d73e170bcc7e066545f876303d78', class: "flex-row flex-adjustable" }, index.h("div", { key: 'a7d4a39802a0ae38089c0491ae6dbdb462e476c5', class: "flex-column flex-adjustable" }, index.h("arcgis-code-editor", { key: '8dcae6b4cd56a035beadd32a8d7140bc123424fc', language: "arcgis-sql-expression", modelId: this._modelId, ref: (e) => (this._codeEditorElt = e), value: this.script ?? "", onArcgisValueChange: this._onCodeEditorValueChange })), this._activeAction === "fields" && (index.h("arcgis-editor-variables", { key: '5b1e2d0afd9c0c63b2135c00a380ae3708fa18f6', variable: variable, class: "side-panel flex-panel border-inline-start", loading: this._preparing, modelId: this._modelId, onArcgisItemSelected: this._insertAsText, onArcgisClose: () => this._setActiveAction(undefined), "data-panel-name": "none" })), this._activeAction === "functions" && (index.h("arcgis-language-api-panel", { key: '423bbdbe0e8b54c2c630a1f741f3894be22741ab', class: "side-panel flex-panel border-inline-start", onArcgisItemSelected: this._insertAsSnippet, onArcgisClose: () => this._setActiveAction(undefined), loading: this._preparing, apiLibrary: this._apiLibrary, "data-panel-name": "none" })), index.h("calcite-action-bar", { key: '300f670c25b9eca51fc34c94726d7a43d89dd68d', class: "side-action-bar border-inline-start", expanded: false, position: "end" }, index.h("calcite-action", { key: '779c32f84f04208feb7675b4b0f23a070b780492', id: "fields-action", text: this.messages.fields ?? "Fields", icon: "profile-variables", active: this._activeAction === "fields", "data-panel-name": "fields",
87
106
  // need to use an arrow function to automatically bind 'this'
88
- onClick: (e) => this._handleActionClick(e) }), index.h("calcite-action", { key: 'a910c11382e8ea292916ef3e025165d7e613c799', id: "functions-action", text: this.messages.functions ?? "Functions", icon: "function", active: this._activeAction === "functions", "data-panel-name": "functions", onClick: (e) => this._handleActionClick(e) })))));
107
+ onClick: (e) => this._handleActionClick(e) }), index.h("calcite-action", { key: '5e115476df037fb8eace7c02d9a025b800a80ab7', id: "functions-action", text: this.messages.functions ?? "Functions", icon: "function", active: this._activeAction === "functions", "data-panel-name": "functions", onClick: (e) => this._handleActionClick(e) })))));
89
108
  }
90
109
  static get assetsDirs() { return ["assets"]; }
91
110
  get el() { return index.getElement(this); }
@@ -1,15 +1,15 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-16caf224.js');
11
- const useT9n = require('./useT9n-4e9beec5.js');
12
- const sqlExprDefaults = require('./sql-expr-defaults-abca6c0e.js');
10
+ const index = require('./index-05ceca06.js');
11
+ const useT9n = require('./useT9n-93800da2.js');
12
+ const sqlExprDefaults = require('./sql-expr-defaults-8da1e20e.js');
13
13
 
14
14
  const sqlExpressionFieldsCss = ":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";
15
15
  const ArcgisSqlExpressionFieldsStyle0 = sqlExpressionFieldsCss;
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
- const sqlExprDefaults = require('./sql-expr-defaults-abca6c0e.js');
9
- require('./index-16caf224.js');
8
+ const sqlExprDefaults = require('./sql-expr-defaults-8da1e20e.js');
9
+ require('./index-05ceca06.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
- const sqlExprDefaults = require('./sql-expr-defaults-abca6c0e.js');
9
- require('./index-16caf224.js');
8
+ const sqlExprDefaults = require('./sql-expr-defaults-8da1e20e.js');
9
+ require('./index-05ceca06.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7
 
8
- const sqlExprDefaults = require('./sql-expr-defaults-abca6c0e.js');
9
- require('./index-16caf224.js');
8
+ const sqlExprDefaults = require('./sql-expr-defaults-8da1e20e.js');
9
+ require('./index-05ceca06.js');
10
10
 
11
11
  /*!-----------------------------------------------------------------------------
12
12
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -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.31/esri/copyright.txt for details.
4
- * v4.31.0-next.77
4
+ * v4.31.0-next.79
5
5
  */
6
6
  'use strict';
7
7