@esri/solutions-components 0.8.22 → 0.8.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
  2. package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
  3. package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
  4. package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -11
  5. package/dist/cjs/{calcite-avatar.cjs.entry.js → calcite-avatar_2.cjs.entry.js} +62 -0
  6. package/dist/cjs/calcite-block_5.cjs.entry.js +12 -3
  7. package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +419 -0
  8. package/dist/cjs/{calcite-dropdown_4.cjs.entry.js → calcite-dropdown_2.cjs.entry.js} +12 -435
  9. package/dist/cjs/calcite-flow_6.cjs.entry.js +25 -29
  10. package/dist/cjs/card-manager_3.cjs.entry.js +9 -3
  11. package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -4
  12. package/dist/cjs/crowdsource-reporter.cjs.entry.js +57 -37
  13. package/dist/cjs/{downloadUtils-2e36a300.js → downloadUtils-5349717a.js} +2 -1
  14. package/dist/cjs/feature-list.cjs.entry.js +11 -6
  15. package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
  16. package/dist/cjs/{index.es-56415e48.js → index.es-aa69b58b.js} +1 -1
  17. package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
  18. package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
  19. package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
  20. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
  21. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
  22. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
  23. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
  24. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
  25. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
  26. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
  27. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
  28. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
  29. package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
  30. package/dist/cjs/loader.cjs.js +1 -1
  31. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  32. package/dist/cjs/{popupUtils-500c1544.js → popupUtils-3e65296c.js} +17 -2
  33. package/dist/cjs/public-notification.cjs.entry.js +4 -4
  34. package/dist/cjs/resources-fa37e40f.js +26 -0
  35. package/dist/cjs/solutions-components.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +3 -1
  37. package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
  38. package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
  39. package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
  40. package/dist/collection/components/card-manager/card-manager.js +1 -1
  41. package/dist/collection/components/create-feature/create-feature.js +1 -1
  42. package/dist/collection/components/create-related-feature/create-related-feature.js +1 -1
  43. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +30 -8
  44. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +57 -46
  45. package/dist/collection/components/feature-details/feature-details.css +2 -2
  46. package/dist/collection/components/feature-details/feature-details.js +56 -13
  47. package/dist/collection/components/feature-list/feature-list.css +1 -1
  48. package/dist/collection/components/feature-list/feature-list.js +23 -4
  49. package/dist/collection/components/info-card/info-card.js +7 -27
  50. package/dist/collection/components/layer-list/layer-list.js +7 -14
  51. package/dist/collection/components/layer-table/layer-table.js +7 -1
  52. package/dist/collection/components/public-notification/public-notification.js +3 -3
  53. package/dist/collection/demos/crowdsource-manager.html +10 -2
  54. package/dist/collection/demos/crowdsource-reporter.html +22 -15
  55. package/dist/collection/utils/interfaces.ts +1 -0
  56. package/dist/collection/utils/popupUtils.js +17 -2
  57. package/dist/collection/utils/popupUtils.ts +23 -3
  58. package/dist/components/arcgis-login.js +1 -1
  59. package/dist/components/basemap-gallery2.js +1 -1
  60. package/dist/components/buffer-tools2.js +1 -1
  61. package/dist/components/calcite-navigation-user.js +1 -99
  62. package/dist/components/card-manager2.js +1 -1
  63. package/dist/components/consent-manager.js +1 -1
  64. package/dist/components/create-feature2.js +1 -1
  65. package/dist/components/create-related-feature2.js +1 -1
  66. package/dist/components/crowdsource-manager.js +13 -5
  67. package/dist/components/crowdsource-reporter.js +58 -38
  68. package/dist/components/downloadUtils.js +1 -1
  69. package/dist/components/esri-loader.js +1 -1
  70. package/dist/components/feature-details2.js +17 -13
  71. package/dist/components/feature-list2.js +7 -5
  72. package/dist/components/helpers.js +3 -2
  73. package/dist/components/html2canvas.js +1 -1
  74. package/dist/components/index.es.js +2 -2
  75. package/dist/components/info-card2.js +7 -11
  76. package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
  77. package/dist/components/instant-apps-create.js +317 -0
  78. package/dist/components/instant-apps-export.js +32 -16
  79. package/dist/components/instant-apps-filter-list2.js +6 -1
  80. package/dist/components/instant-apps-header2.js +3 -2
  81. package/dist/components/instant-apps-interactive-legend-classic2.js +13 -6
  82. package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
  83. package/dist/components/instant-apps-landing-page.js +91 -16
  84. package/dist/components/instant-apps-language-translator2.js +3 -1
  85. package/dist/components/instant-apps-sign-in.js +11 -0
  86. package/dist/components/instant-apps-sign-in2.js +243 -0
  87. package/dist/components/instant-apps-social-share2.js +8 -2
  88. package/dist/components/layer-list2.js +7 -14
  89. package/dist/components/layer-table2.js +7 -1
  90. package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
  91. package/dist/components/popupUtils.js +17 -2
  92. package/dist/components/public-notification.js +3 -3
  93. package/dist/components/purify.js +1 -1
  94. package/dist/components/solution-resource.js +1 -1
  95. package/dist/esm/arcgis-login.entry.js +1 -1
  96. package/dist/esm/basemap-gallery_7.entry.js +1 -1
  97. package/dist/esm/buffer-tools_3.entry.js +1 -1
  98. package/dist/esm/calcite-alert_4.entry.js +12 -11
  99. package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
  100. package/dist/esm/calcite-block_5.entry.js +12 -3
  101. package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
  102. package/dist/esm/calcite-color-picker.entry.js +1 -1
  103. package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
  104. package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
  105. package/dist/esm/calcite-flow_6.entry.js +25 -29
  106. package/dist/esm/card-manager_3.entry.js +9 -3
  107. package/dist/esm/crowdsource-manager.entry.js +12 -4
  108. package/dist/esm/crowdsource-reporter.entry.js +57 -37
  109. package/dist/esm/{downloadUtils-aab31bfe.js → downloadUtils-5fa0d437.js} +2 -2
  110. package/dist/esm/feature-list.entry.js +11 -6
  111. package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
  112. package/dist/esm/{index.es-43ba3006.js → index.es-57c15c9b.js} +1 -1
  113. package/dist/esm/instant-apps-create.entry.js +262 -0
  114. package/dist/esm/instant-apps-export.entry.js +31 -16
  115. package/dist/esm/instant-apps-header.entry.js +3 -2
  116. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
  117. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
  118. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
  119. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
  120. package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
  121. package/dist/esm/instant-apps-landing-page.entry.js +46 -10
  122. package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
  123. package/dist/esm/instant-apps-language-translator.entry.js +1 -1
  124. package/dist/esm/instant-apps-sign-in.entry.js +164 -0
  125. package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
  126. package/dist/esm/loader.js +1 -1
  127. package/dist/esm/map-select-tools_3.entry.js +1 -1
  128. package/dist/esm/{popupUtils-2cc3c366.js → popupUtils-650b6bba.js} +17 -2
  129. package/dist/esm/public-notification.entry.js +4 -4
  130. package/dist/esm/resources-16800cce.js +24 -0
  131. package/dist/esm/solutions-components.js +1 -1
  132. package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
  133. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
  134. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
  135. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
  136. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
  137. package/dist/solutions-components/demos/crowdsource-manager.html +10 -2
  138. package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
  139. package/dist/solutions-components/p-1251dcc6.entry.js +6 -0
  140. package/dist/solutions-components/p-16730f05.entry.js +6 -0
  141. package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
  142. package/dist/solutions-components/p-1ff9eb95.entry.js +6 -0
  143. package/dist/solutions-components/{p-667caa6b.js → p-24bf45b7.js} +1 -1
  144. package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
  145. package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
  146. package/dist/solutions-components/p-314dc933.entry.js +6 -0
  147. package/dist/solutions-components/p-50741707.entry.js +6 -0
  148. package/dist/solutions-components/p-614ebce7.js +6 -0
  149. package/dist/solutions-components/{p-37fc92db.js → p-6f69de4d.js} +2 -2
  150. package/dist/solutions-components/{p-8cff32bd.entry.js → p-72317f8e.entry.js} +2 -2
  151. package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
  152. package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
  153. package/dist/solutions-components/p-79e2e203.entry.js +6 -0
  154. package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
  155. package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
  156. package/dist/solutions-components/p-84913712.js +6 -0
  157. package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
  158. package/dist/solutions-components/{p-54324eaa.entry.js → p-97e343df.entry.js} +1 -1
  159. package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
  160. package/dist/solutions-components/p-a1037b19.js +21 -0
  161. package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
  162. package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
  163. package/dist/solutions-components/p-c41997d5.js +11 -0
  164. package/dist/solutions-components/p-c512fcfb.entry.js +6 -0
  165. package/dist/solutions-components/{p-21d6360a.entry.js → p-c7f0e7a8.entry.js} +1 -1
  166. package/dist/solutions-components/{p-f6668347.entry.js → p-cbf0dada.entry.js} +3 -3
  167. package/dist/solutions-components/{p-9c7d4343.entry.js → p-cd91c3e7.entry.js} +1 -1
  168. package/dist/solutions-components/p-ceba37d3.entry.js +11 -0
  169. package/dist/solutions-components/{p-09b769b7.entry.js → p-d8a15e32.entry.js} +1 -1
  170. package/dist/solutions-components/p-d8da6406.entry.js +6 -0
  171. package/dist/solutions-components/p-da6b3c8a.entry.js +6 -0
  172. package/dist/solutions-components/{p-60f1055e.entry.js → p-e2400b0d.entry.js} +1 -1
  173. package/dist/solutions-components/p-e78be59a.entry.js +6 -0
  174. package/dist/solutions-components/p-f35cc7ae.entry.js +6 -0
  175. package/dist/solutions-components/solutions-components.esm.js +1 -1
  176. package/dist/solutions-components/utils/interfaces.ts +1 -0
  177. package/dist/solutions-components/utils/popupUtils.ts +23 -3
  178. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +14 -6
  179. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
  180. package/dist/types/components/feature-details/feature-details.d.ts +13 -1
  181. package/dist/types/components/feature-list/feature-list.d.ts +4 -0
  182. package/dist/types/components/info-card/info-card.d.ts +0 -4
  183. package/dist/types/components/layer-list/layer-list.d.ts +1 -1
  184. package/dist/types/components.d.ts +36 -16
  185. package/dist/types/preact.d.ts +10 -4
  186. package/dist/types/utils/interfaces.d.ts +1 -0
  187. package/dist/types/utils/popupUtils.d.ts +4 -0
  188. package/package.json +2 -2
  189. package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
  190. package/dist/solutions-components/p-08a1e120.js +0 -6
  191. package/dist/solutions-components/p-3283660c.entry.js +0 -6
  192. package/dist/solutions-components/p-33647277.entry.js +0 -6
  193. package/dist/solutions-components/p-3af0764f.entry.js +0 -6
  194. package/dist/solutions-components/p-48c99a48.entry.js +0 -6
  195. package/dist/solutions-components/p-599dcc29.js +0 -6
  196. package/dist/solutions-components/p-5a740f6c.entry.js +0 -6
  197. package/dist/solutions-components/p-64779bb2.entry.js +0 -6
  198. package/dist/solutions-components/p-64b4b579.entry.js +0 -11
  199. package/dist/solutions-components/p-88f73319.entry.js +0 -6
  200. package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
  201. package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
  202. package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
  203. package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
  204. package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
  205. package/dist/solutions-components/p-ebf82ce0.js +0 -21
  206. package/dist/solutions-components/p-f43d6a86.entry.js +0 -6
@@ -52,7 +52,7 @@ const ArcgisLogin = class {
52
52
  //
53
53
  //--------------------------------------------------------------------------
54
54
  render() {
55
- return (index.h(index.Host, { key: '7ef89062c15023c646a5134818900cc5b5ae2c43' }, index.h("slot", { key: 'a1698e009dd0e86591c4858f352186079e0299ed' })));
55
+ return (index.h(index.Host, { key: 'b71ecf635ef91c3604665890c3eec5c5bc51651c' }, index.h("slot", { key: '77c4af2284404bc351b1eb93a81b2151f8e8cce1' })));
56
56
  }
57
57
  get el() { return index.getElement(this); }
58
58
  };
@@ -56,7 +56,7 @@ const BasemapGallery = class {
56
56
  * StencilJS: Renders the component.
57
57
  */
58
58
  render() {
59
- return (index.h(index.Host, { key: '9cef4efc85e1168ca8909f9e7d5cea48bf06b51c' }, index.h("div", { key: '837779b470b2170285fafeffa705d09f573dbfc6', ref: (el) => { this._basemapElement = el; } })));
59
+ return (index.h(index.Host, { key: '7fe5ef48d77de087f17498e2e1f3370a069e8629' }, index.h("div", { key: 'aca555c687352046a138343cab6f656234069644', ref: (el) => { this._basemapElement = el; } })));
60
60
  }
61
61
  /**
62
62
  * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
@@ -87,7 +87,7 @@ const BufferTools = class {
87
87
  * Renders the component.
88
88
  */
89
89
  render() {
90
- return (index.h(index.Host, { key: 'b06e61d0e1cb18f0b7c34f51c74455a8d00c279b' }, this.appearance === "text" ? this._getTextBoxDisplay() : this._getSliderDisplay()));
90
+ return (index.h(index.Host, { key: '63b775eca8dd10785df7b58be3a79eaa6cf4c049' }, this.appearance === "text" ? this._getTextBoxDisplay() : this._getSliderDisplay()));
91
91
  }
92
92
  //--------------------------------------------------------------------------
93
93
  //
@@ -17,13 +17,17 @@ const t9n = require('./t9n-9d199056.js');
17
17
  const resources = require('./resources-6146eb17.js');
18
18
  const locale$1 = require('./locale-48d76c59.js');
19
19
  const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
20
- const popupUtils = require('./popupUtils-500c1544.js');
20
+ const popupUtils = require('./popupUtils-3e65296c.js');
21
21
  require('./guid-a7528dfa.js');
22
22
  require('./resources-1c0e54c1.js');
23
23
  require('./key-7ed07912.js');
24
24
  require('./observers-4fa351d9.js');
25
25
  require('./esri-loader-fce6a9cb.js');
26
26
  require('./interfaces-7cd0a48a.js');
27
+ require('./downloadUtils-5349717a.js');
28
+ require('./solution-resource-a577e84f.js');
29
+ require('./index-f64944ad.js');
30
+ require('./restHelpersGet-dbaa28df.js');
27
31
 
28
32
  /*!
29
33
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
@@ -686,7 +690,6 @@ const InfoCard = class {
686
690
  this.isLoading = false;
687
691
  this.isMobile = undefined;
688
692
  this.mapView = undefined;
689
- this.zoomAndScrollToSelected = undefined;
690
693
  this.allowEditing = true;
691
694
  this.highlightEnabled = true;
692
695
  this.paginationEnabled = true;
@@ -839,8 +842,8 @@ const InfoCard = class {
839
842
  const id = (_d = (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeature) === null || _d === void 0 ? void 0 : _d.getObjectId();
840
843
  const ids = parseInt(id === null || id === void 0 ? void 0 : id.toString(), 10) > -1 ? [id] : [];
841
844
  const deleteEnabled = ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.editingEnabled) && ((_h = (_g = (_f = this._layer) === null || _f === void 0 ? void 0 : _f.capabilities) === null || _g === void 0 ? void 0 : _g.operations) === null || _h === void 0 ? void 0 : _h.supportsDelete);
842
- return (index.h(index.Host, { key: '7b48c1dbd2c4e384c4bcba62a8cf35e4c62d2edb' }, index.h("calcite-shell", { key: 'a8387dfb3968ea07182cdd782a5a147bdcb1188a', style: { position: this.position } }, this._getHeader(), index.h("calcite-loader", { key: '1695d423a19876c6ccde5f4004f21ca26e305350', class: loadingClass, label: this._translations.fetchingData }), index.h("div", { key: 'd8870e95ba06ed713c5143c5b260ee4059275d81', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), index.h("div", { key: '84af335caa0f39890801faebc207bf8c794fe1e3', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
843
- index.h("div", { key: 'fa91c18424af38067c44e50635b9af55aacc84b8', class: "display-flex top-border padding-1-2" }, index.h("calcite-button", { key: 'c4565bda374ab4eb2afd2273c62256fae187d151', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, onEditsComplete: () => this._closePopup() })) : undefined, index.h("calcite-tooltip", { key: '7175a74e7e1db0939fbbe4a229e7f6df6efb2768', placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", { key: '6443c4d8274fe6003f5dcbd3b36f35057234c550' }, this._translations.edit)), this.isMobile ? (index.h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, index.h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && index.h("div", { key: 'ff3d3dffd57bf118f7e71ec5a504bbcfda0de229', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, index.h("div", { key: '1912bdf3dbad45ba66acf13ef8ad6894ced8caa2' }, index.h("calcite-button", { key: 'fe1e5032b764b3c0ac8ef619c9d365f8d781d6b3', appearance: 'transparent', disabled: nextBackDisabled, iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), index.h("calcite-tooltip", { key: 'a9928e72cc3dcebad2544ee5a347a0b70ebdae4b', placement: "top", "reference-element": "solutions-back" }, index.h("span", { key: '6d8cc94ae72deab6ae19d3314f5b0f7e1833bd3c' }, this._translations.back))), index.h("calcite-action", { key: '90d7951f0eacd4b77f8ebe3da79a12665a8b9f63', class: 'pagination-action', onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, index.h("span", { key: '6c36eb43691a79b6a7c0da99663fa22c1d97e572', class: "pagination-count" }, this._count)), index.h("div", { key: '23758504ca1b4b97c4c488e88e61f0c3cdc10830' }, index.h("calcite-button", { key: '93efeff6e0cb54edd1817c3410806b009755618f', appearance: "transparent", disabled: nextBackDisabled, iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), index.h("calcite-tooltip", { key: '17afd49a3b167d9322d944a9d8ae6ffc249d202e', placement: "top", "reference-element": "solutions-next" }, index.h("span", { key: '0b15e569313961c53700d2ef6eb148b9c0efd778' }, this._translations.next))))), index.h("edit-card", { key: '2217a66105095ea1e5bd577dc8bf970b3fdeae10', class: editClass, graphicIndex: (_j = this._features) === null || _j === void 0 ? void 0 : _j.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), index.h("calcite-alert", { key: 'c59bd8d759ef1df763b3bbe513b7146cfa270057', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { key: '3733d543e7483037aa5130f0ca06f8da434eaf7e', slot: "title" }, this._translations.editDisabled), index.h("div", { key: 'eaace9548fd442015000f836d54e556c9859a3fc', slot: "message" }, this._translations.enableEditing)))));
845
+ return (index.h(index.Host, { key: 'ab22ed392db6e8bad11758f39d6bd1738c10a229' }, index.h("calcite-shell", { key: 'f97bdc21cb5e667b1973353a45297f9536252fcd', style: { position: this.position } }, this._getHeader(), index.h("calcite-loader", { key: '82b78360be903de1be044406735db84122399f49', class: loadingClass, label: this._translations.fetchingData }), index.h("div", { key: '168d0310daf7eca08c4891283b8a9865eda102bc', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), index.h("div", { key: '258b913cfdc4f1269dcc250a473643878d97f8bd', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
846
+ index.h("div", { key: 'c6fd569640410dd3a106f27f49eb6553c9ea0167', class: "display-flex top-border padding-1-2" }, index.h("calcite-button", { key: '3dbe007feb1104d53c47298ae1308c776e3ec5cf', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, onEditsComplete: () => this._closePopup() })) : undefined, index.h("calcite-tooltip", { key: '094e52e8d2945125096856a8c5249babdbbd1eec', placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", { key: 'da9edbf6bdb39ce1a287894287d69f2767bb18de' }, this._translations.edit)), this.isMobile ? (index.h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, index.h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && index.h("div", { key: '5badbe8009a3a64e3b471ce4e63f4a7d2ae68acc', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, index.h("div", { key: '17b287e0f0405ead48a9460423e5371e102de38a' }, index.h("calcite-button", { key: '4277d8e56528475c5cea369811c9c3c8a0cdd5c7', appearance: 'transparent', disabled: nextBackDisabled, iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), index.h("calcite-tooltip", { key: 'c8ee8c81d9de098290f35075b0c6ac3ee2f46afc', placement: "top", "reference-element": "solutions-back" }, index.h("span", { key: '3321af9ca1a78efe28249872be05433d9d79f51b' }, this._translations.back))), index.h("calcite-action", { key: '5ce96bff1e1e1bd77f364d8ceb297e0db7453a29', class: 'pagination-action', onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, index.h("span", { key: 'd558026468f5aeb0797efcfa1843f515fed2b451', class: "pagination-count" }, this._count)), index.h("div", { key: '52fd57812fda98ad244a1f60aa4ec2f31efce78d' }, index.h("calcite-button", { key: '3582c2ea725fe9eb36f1846fbb06acaedcb3ebe1', appearance: "transparent", disabled: nextBackDisabled, iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), index.h("calcite-tooltip", { key: '1212e990b6ae4e7979f2a1571b461cf063e55b9d', placement: "top", "reference-element": "solutions-next" }, index.h("span", { key: '2284b042fdfeebc86441119c404c5905fb84f367' }, this._translations.next))))), index.h("edit-card", { key: 'ae9f73223bdffa5c3ec85e3ebdf4b314cd91d1c7', class: editClass, graphicIndex: (_j = this._features) === null || _j === void 0 ? void 0 : _j.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), index.h("calcite-alert", { key: '1927a41a8c9fbb6373490d554cf8128a93fe8e71', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { key: '33ba87f5b72019c2795fe12485aa51429115b74d', slot: "title" }, this._translations.editDisabled), index.h("div", { key: 'd45970a653b416bbdd5e5b97040b23e54eaf98a5', slot: "message" }, this._translations.enableEditing)))));
844
847
  }
845
848
  //--------------------------------------------------------------------------
846
849
  //
@@ -913,13 +916,11 @@ const InfoCard = class {
913
916
  this._showListView = isOpen;
914
917
  }
915
918
  });
916
- if (this.zoomAndScrollToSelected) {
917
- this.reactiveUtils.watch(() => this._features.selectedFeatureIndex, (i) => {
918
- if (i > -1) {
919
- this.selectionChanged.emit({ selectedFeature: [this._features.selectedFeature], selectedFeatureIndex: this._features.selectedFeatureIndex });
920
- }
921
- });
922
- }
919
+ this.reactiveUtils.watch(() => this._features.selectedFeatureIndex, (i) => {
920
+ if (i > -1) {
921
+ this.selectionChanged.emit({ selectedFeature: [this._features.selectedFeature], selectedFeatureIndex: this._features.selectedFeatureIndex });
922
+ }
923
+ });
923
924
  }
924
925
  else {
925
926
  this._features.view = this.mapView;
@@ -10,6 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-79b35510.js');
11
11
  const dom = require('./dom-1c78fa73.js');
12
12
  const utils = require('./utils-518745e7.js');
13
+ const loadable = require('./loadable-b374ef4b.js');
13
14
  require('./guid-a7528dfa.js');
14
15
  require('./resources-1c0e54c1.js');
15
16
 
@@ -148,4 +149,65 @@ const Avatar = class {
148
149
  };
149
150
  Avatar.style = CalciteAvatarStyle0;
150
151
 
152
+ /*!
153
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
154
+ * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
155
+ * v2.8.2
156
+ */
157
+ const CSS = {
158
+ textContainer: "text-container",
159
+ fullName: "full-name",
160
+ username: "username",
161
+ button: "button",
162
+ };
163
+
164
+ const navigationUserCss = ":host{display:inline-flex;outline:2px solid transparent;outline-offset:2px}:host .button{background-color:transparent;border:none;margin:0px;display:flex;cursor:pointer;align-items:center;justify-content:center;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-0);line-height:1.25rem;outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end:2px solid transparent}:host(:hover) .button,:host(:focus) .button{background-color:var(--calcite-color-foreground-2)}:host(:focus) .button{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host(:active) .button{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}:host([active]) .button{border-color:var(--calcite-color-brand);color:var(--calcite-color-text-1);--calcite-ui-icon-color:var(--calcite-color-brand)}.text-container{margin-block-start:0.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}calcite-avatar{padding-inline:1rem}calcite-avatar~.text-container{padding-inline-start:0px}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.username{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host([hidden]){display:none}[hidden]{display:none}";
165
+ const CalciteNavigationUserStyle0 = navigationUserCss;
166
+
167
+ const CalciteNavigationUser = class {
168
+ constructor(hostRef) {
169
+ index.registerInstance(this, hostRef);
170
+ this.active = undefined;
171
+ this.fullName = undefined;
172
+ this.label = undefined;
173
+ this.textDisabled = false;
174
+ this.thumbnail = undefined;
175
+ this.userId = undefined;
176
+ this.username = undefined;
177
+ }
178
+ //--------------------------------------------------------------------------
179
+ //
180
+ // Public Methods
181
+ //
182
+ //--------------------------------------------------------------------------
183
+ /** Sets focus on the component. */
184
+ async setFocus() {
185
+ await loadable.componentFocusable(this);
186
+ this.el.focus();
187
+ }
188
+ //--------------------------------------------------------------------------
189
+ //
190
+ // Lifecycle
191
+ //
192
+ //--------------------------------------------------------------------------
193
+ componentWillLoad() {
194
+ loadable.setUpLoadableComponent(this);
195
+ }
196
+ componentDidLoad() {
197
+ loadable.setComponentLoaded(this);
198
+ }
199
+ // --------------------------------------------------------------------------
200
+ //
201
+ // Render Methods
202
+ //
203
+ // --------------------------------------------------------------------------
204
+ render() {
205
+ return (index.h(index.Host, { key: '869bc0b518ff407bf3f110ebda48571f456229a8' }, index.h("button", { key: '0cb5497ebcbf9fad2bfb6ffdd3bfad151594460d', "aria-label": this.label, class: CSS.button }, index.h("calcite-avatar", { key: '6de54637d077afa83f7520636037b6da33b24334', "full-name": this.fullName, label: this.label, thumbnail: this.thumbnail, "user-id": this.userId, username: this.username }), (this.fullName || this.username) && !this.textDisabled && (index.h("div", { key: '0d0be3d6ba276d6c3e24a67b7085dd75e56b3e5b', class: CSS.textContainer }, this.fullName && (index.h("span", { class: CSS.fullName, key: CSS.fullName }, this.fullName)), this.username && (index.h("span", { class: CSS.username, key: CSS.username }, this.username)))))));
206
+ }
207
+ static get delegatesFocus() { return true; }
208
+ get el() { return index.getElement(this); }
209
+ };
210
+ CalciteNavigationUser.style = CalciteNavigationUserStyle0;
211
+
151
212
  exports.calcite_avatar = Avatar;
213
+ exports.calcite_navigation_user = CalciteNavigationUser;
@@ -2015,7 +2015,12 @@ const InstantAppsFilterList = class {
2015
2015
  update = this.updateCodedValueExpression(expression, layerField);
2016
2016
  }
2017
2017
  else if (type === 'range') {
2018
- update = this.updateRangeExpression(expression, layerField);
2018
+ if (expression.displayOption === 'drop-down') {
2019
+ update = await this.updateStringExpression(layerExpression, expression);
2020
+ }
2021
+ else {
2022
+ update = this.updateRangeExpression(expression, layerField);
2023
+ }
2019
2024
  }
2020
2025
  else if (expression.active && (type === 'checkbox' || type == null)) {
2021
2026
  update = true;
@@ -2555,6 +2560,8 @@ const InstantAppsSocialShare = class {
2555
2560
  this.successMessage = '';
2556
2561
  this.defaultUrlParams = null;
2557
2562
  this.inlineSuccessPopoverPlacement = 'trailing';
2563
+ this.popoverPositioning = 'absolute';
2564
+ this.removePopoverOffset = false;
2558
2565
  this.messages = undefined;
2559
2566
  this.opened = false;
2560
2567
  this.copied = false;
@@ -2672,9 +2679,11 @@ const InstantAppsSocialShare = class {
2672
2679
  const content = this.copied && this.mode === 'popover' ? (this.renderSuccess()) : (index.h("div", { class: CSS.dialogContent }, this.renderOptions(), this.displayTipText ? this.renderTip() : null, this.embed ? this.renderEmbed() : null));
2673
2680
  const layoutClass = this.shareIconsLayout === 'vertical' ? ` ${CSS.layout.vertical}` : ` ${CSS.layout.horizontal}`;
2674
2681
  const dialogContent = (index.h("div", { ref: el => (this.dialogContentRef = el), class: `${CSS.dialog}${layoutClass}` }, content));
2682
+ const defaultOffset = 6;
2683
+ const offsetDistance = this.removePopoverOffset ? 0 : defaultOffset;
2675
2684
  return (index.h(index.Host, null, this.mode === 'popover'
2676
2685
  ? [
2677
- index.h("calcite-popover", { ref: (el) => (this.popoverRef = el), label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, referenceElement: "shareButton", placement: "bottom-start", scale: this.scale }, dialogContent),
2686
+ index.h("calcite-popover", { ref: (el) => (this.popoverRef = el), label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, referenceElement: "shareButton", placement: "bottom-start", scale: this.scale, "overlay-positioning": this.popoverPositioning, "offset-distance": offsetDistance, "pointer-disabled": this.removePopoverOffset }, dialogContent),
2678
2687
  this.renderButton(),
2679
2688
  ]
2680
2689
  : [
@@ -2726,7 +2735,7 @@ const InstantAppsSocialShare = class {
2726
2735
  }
2727
2736
  renderXIcon() {
2728
2737
  const isCalciteModeDark = !!this.el.closest(CALCITE_MODE_DARK);
2729
- return (index.h("svg", { class: isCalciteModeDark ? CSS.xLogo.dark : CSS.xLogo.light, width: "1200", height: "1227", viewBox: "0 0 1200 1227", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { height: "400", style: { fill: 'none' }, width: "400", x: "56", y: "56" }), index.h("path", { d: "M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z", fill: isCalciteModeDark ? 'white' : 'black' })));
2738
+ return (index.h("svg", { class: isCalciteModeDark ? CSS.xLogo.dark : CSS.xLogo.light, viewBox: "0 0 1200 1227", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { height: "400", style: { fill: 'none' }, width: "400", x: "56", y: "56" }), index.h("path", { d: "M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z", fill: isCalciteModeDark ? 'white' : 'black' })));
2730
2739
  }
2731
2740
  renderLinkedInIcon() {
2732
2741
  return (index.h("svg", { height: "100%", style: { fillRule: 'evenodd', clipRule: 'evenodd', strokeLinejoin: 'round', strokeMiterlimit: '2' }, version: "1.1", viewBox: "0 0 512 512", width: "100%", xmlns: "http://www.w3.org/2000/svg" }, index.h("g", { id: "g5891" }, index.h("path", { d: "M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z", id: "background", style: { fill: '#2867b2' } }), index.h("g", { id: "shapes" }, index.h("rect", { height: "257.962", id: "rect11", style: { fill: '#fff' }, width: "85.76", x: "61.053", y: "178.667" }), index.h("path", { d: "M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z", id: "path13-0", style: { fill: '#fff', fillRule: 'nonzero' } }), index.h("path", { d: "M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z", id: "path15", style: { fill: '#fff', fillRule: 'nonzero' } })))));
@@ -0,0 +1,419 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ 'use strict';
7
+
8
+ Object.defineProperty(exports, '__esModule', { value: true });
9
+
10
+ const index = require('./index-79b35510.js');
11
+ const observers = require('./observers-4fa351d9.js');
12
+ const resources = require('./resources-fa37e40f.js');
13
+ const locale = require('./locale-48d76c59.js');
14
+ const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
15
+ const publicNotificationStore = require('./publicNotificationStore-3bfbbed3.js');
16
+ require('./esri-loader-fce6a9cb.js');
17
+ require('./interfaces-7cd0a48a.js');
18
+ require('./index-c078ea5f.js');
19
+
20
+ const dropdownGroupCss = ":host{position:relative;display:block}.container{text-align:start}.container--s{font-size:var(--calcite-font-size--2);line-height:1rem}.container--s .dropdown-title{padding:0.5rem}.container--m{font-size:var(--calcite-font-size--1);line-height:1rem}.container--m .dropdown-title{padding:0.75rem}.container--l{font-size:var(--calcite-font-size-0);line-height:1.25rem}.container--l .dropdown-title{padding:1rem}.dropdown-title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2)}.dropdown-separator{display:block;block-size:1px;background-color:var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}";
21
+ const CalciteDropdownGroupStyle0 = dropdownGroupCss;
22
+
23
+ const DropdownGroup = class {
24
+ constructor(hostRef) {
25
+ index.registerInstance(this, hostRef);
26
+ this.calciteInternalDropdownItemChange = index.createEvent(this, "calciteInternalDropdownItemChange", 6);
27
+ this.updateItems = () => {
28
+ Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach((item) => (item.selectionMode = this.selectionMode));
29
+ };
30
+ this.mutationObserver = observers.createObserver("mutation", () => this.updateItems());
31
+ this.groupTitle = undefined;
32
+ this.scale = "m";
33
+ this.selectionMode = "single";
34
+ }
35
+ handlePropsChange() {
36
+ this.updateItems();
37
+ }
38
+ //--------------------------------------------------------------------------
39
+ //
40
+ // Lifecycle
41
+ //
42
+ //--------------------------------------------------------------------------
43
+ connectedCallback() {
44
+ var _a;
45
+ this.updateItems();
46
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
47
+ }
48
+ componentWillLoad() {
49
+ this.groupPosition = this.getGroupPosition();
50
+ }
51
+ disconnectedCallback() {
52
+ var _a;
53
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
54
+ }
55
+ render() {
56
+ const groupTitle = this.groupTitle ? (index.h("span", { "aria-hidden": "true", class: "dropdown-title" }, this.groupTitle)) : null;
57
+ const dropdownSeparator = this.groupPosition > 0 ? index.h("div", { class: "dropdown-separator", role: "separator" }) : null;
58
+ return (index.h(index.Host, { key: 'c1b662afcbb612d775cea66edb949d71f5f63167', "aria-label": this.groupTitle, role: "group" }, index.h("div", { key: 'cdfdb0919b1b6006f69f7fbcda0c16c2beefec5e', class: {
59
+ [resources.CSS.container]: true,
60
+ [`${resources.CSS.container}--${this.scale}`]: true,
61
+ } }, dropdownSeparator, groupTitle, index.h("slot", { key: '166c8236f3315d2f038f61b0619270d2bd9b344a' }))));
62
+ }
63
+ //--------------------------------------------------------------------------
64
+ //
65
+ // Event Listeners
66
+ //
67
+ //--------------------------------------------------------------------------
68
+ updateActiveItemOnChange(event) {
69
+ this.requestedDropdownGroup = event.detail.requestedDropdownGroup;
70
+ this.requestedDropdownItem = event.detail.requestedDropdownItem;
71
+ this.calciteInternalDropdownItemChange.emit({
72
+ requestedDropdownGroup: this.requestedDropdownGroup,
73
+ requestedDropdownItem: this.requestedDropdownItem,
74
+ });
75
+ }
76
+ //--------------------------------------------------------------------------
77
+ //
78
+ // Private Methods
79
+ //
80
+ //--------------------------------------------------------------------------
81
+ getGroupPosition() {
82
+ return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-dropdown-group"), this.el);
83
+ }
84
+ static get delegatesFocus() { return true; }
85
+ get el() { return index.getElement(this); }
86
+ static get watchers() { return {
87
+ "selectionMode": ["handlePropsChange"]
88
+ }; }
89
+ };
90
+ DropdownGroup.style = CalciteDropdownGroupStyle0;
91
+
92
+ const mapLayerPickerCss = ":host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom:0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}";
93
+ const MapLayerPickerStyle0 = mapLayerPickerCss;
94
+
95
+ const MapLayerPicker = class {
96
+ constructor(hostRef) {
97
+ index.registerInstance(this, hostRef);
98
+ this.idsFound = index.createEvent(this, "idsFound", 7);
99
+ this.noLayersFound = index.createEvent(this, "noLayersFound", 7);
100
+ this.layerSelectionChange = index.createEvent(this, "layerSelectionChange", 7);
101
+ //--------------------------------------------------------------------------
102
+ //
103
+ // Properties (protected)
104
+ //
105
+ //--------------------------------------------------------------------------
106
+ /**
107
+ * boolean: When true the default layer has been loaded once and should no longer be used
108
+ */
109
+ this.defaultLayerHonored = false;
110
+ this.appearance = "transparent";
111
+ this.defaultLayerId = "";
112
+ this.display = "inline-block";
113
+ this.enabledLayerIds = [];
114
+ this.enabledTableIds = [];
115
+ this.height = undefined;
116
+ this.isMobile = undefined;
117
+ this.mapView = undefined;
118
+ this.onlyShowUpdatableLayers = undefined;
119
+ this.placeholderIcon = "";
120
+ this.selectedIds = [];
121
+ this.scale = "m";
122
+ this.showTables = undefined;
123
+ this.showSingleLayerAsLabel = false;
124
+ this.type = "select";
125
+ this._hasMultipleLayers = true;
126
+ this._hasValidLayers = true;
127
+ this._isDropdownOpen = undefined;
128
+ this.ids = [];
129
+ this.selectedName = "";
130
+ this._translations = undefined;
131
+ }
132
+ //--------------------------------------------------------------------------
133
+ //
134
+ // Watch handlers
135
+ //
136
+ //--------------------------------------------------------------------------
137
+ /**
138
+ * Called each time the mapView prop is changed.
139
+ */
140
+ async mapViewWatchHandler() {
141
+ await this._setLayers();
142
+ if (this.ids.length > 0) {
143
+ this._hasValidLayers = true;
144
+ this._hasMultipleLayers = this.ids.length > 1;
145
+ this._setSelectedLayer(this.ids[0]);
146
+ }
147
+ else {
148
+ this._hasValidLayers = false;
149
+ this.noLayersFound.emit();
150
+ }
151
+ }
152
+ //--------------------------------------------------------------------------
153
+ //
154
+ // Functions (lifecycle)
155
+ //
156
+ //--------------------------------------------------------------------------
157
+ /**
158
+ * StencilJS: Called once just after the component is first connected to the DOM.
159
+ */
160
+ async componentWillLoad() {
161
+ await this._getTranslations();
162
+ await this._setLayers();
163
+ if (this.ids.length > 0 || this.selectedIds.length === 1) {
164
+ this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
165
+ }
166
+ }
167
+ /**
168
+ * Renders the component.
169
+ */
170
+ render() {
171
+ const id = "map-layer-picker";
172
+ let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
173
+ style = Object.assign(Object.assign({}, style), { "display": this.display });
174
+ return (index.h(index.Host, { key: 'ccb8c7d12a2e631938308380cd4ecd0a1d73c963' }, index.h("div", { key: 'aa0992de9bab1c5a555d51542c093cc7cb948200', class: "map-layer-picker-container", style: style }, index.h("div", { key: 'a03bca67eb822b492d34abe53db7d05e6fd7ebdf', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
175
+ !this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
176
+ this.type === "combobox" ? this._getCombobox(id) :
177
+ this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
178
+ }
179
+ /**
180
+ * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
181
+ */
182
+ async componentDidLoad() {
183
+ if (this.ids.length > 0 || this.selectedIds.length === 1) {
184
+ const id = this.selectedIds.length === 1 ? this.selectedIds[0] : this.ids[0];
185
+ if (this.type === "select") {
186
+ this._layerElement.value = id;
187
+ }
188
+ else if (this.type === "dropdown") {
189
+ this.selectedName = Object.keys(this._layerNameHash).indexOf(id) > -1 ?
190
+ this._layerNameHash[id].name : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
191
+ this._tableNameHash[id].name : "";
192
+ }
193
+ }
194
+ }
195
+ //--------------------------------------------------------------------------
196
+ //
197
+ // Functions (protected)
198
+ //
199
+ //--------------------------------------------------------------------------
200
+ /**
201
+ * Create a notice to inform the user that no layers were found
202
+ *
203
+ * @returns Calcite Notice component with the message
204
+ */
205
+ _getInvalidPlaceholder() {
206
+ return (index.h("div", null, index.h("calcite-notice", { class: "height-100", icon: "exclamation-mark-triangle", id: "no-valid-layers", kind: "danger", open: true }, index.h("div", { slot: "message" }, this._translations.noLayersFound)), index.h("calcite-tooltip", { label: this._translations.enableEditUpdate, placement: "bottom", "reference-element": "no-valid-layers" }, index.h("span", null, this._translations.enableEditUpdate))));
207
+ }
208
+ /**
209
+ * Show layer name as a label with icon
210
+ *
211
+ * @returns Calcite label with the layer name and icon
212
+ */
213
+ _getSingleLayerPlaceholder() {
214
+ return (index.h("div", { class: "layer-picker-label-container cursor-default" }, index.h("calcite-icon", { icon: "layers", scale: "s" }), index.h("calcite-label", { class: "no-bottom-margin padding-start-1" }, this.selectedName)));
215
+ }
216
+ /**
217
+ * Create a list of layers from the map
218
+ * Used for selecting a single layer.
219
+ *
220
+ * @param id the id for the select component used to support the tooltip
221
+ *
222
+ * @returns Calcite Select component with the ids of the layers from the map
223
+ */
224
+ _getSelect(id) {
225
+ return (index.h("calcite-select", { id: id, label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this._getMapLayerOptions()));
226
+ }
227
+ /**
228
+ * Create a list of layer ids from the map
229
+ * Used for selecting multiple layers
230
+ *
231
+ * @param id the id for the combobox component used to support the tooltip
232
+ *
233
+ * @returns Calcite ComboBox component with the ids of the layers from the map
234
+ */
235
+ _getCombobox(id) {
236
+ return (index.h("calcite-combobox", { clearDisabled: true, id: id, label: "", onCalciteComboboxChange: () => this._layerSelectionChange(), "placeholder-icon": this.placeholderIcon, ref: (el) => { this._layerElement = el; }, scale: this.scale, "selection-mode": "single" }, this._getMapLayerOptions()));
237
+ }
238
+ /**
239
+ * Hydrate a dropdown component with items to display the layer names
240
+ *
241
+ * @param id the id for the dropdown component used to support the tooltip
242
+ *
243
+ * @returns Array of Dropdown items with layer names
244
+ */
245
+ _getDropdown(id) {
246
+ return (index.h("calcite-dropdown", { class: "layer-picker-dropdown", onCalciteDropdownBeforeClose: () => this._isDropdownOpen = false, onCalciteDropdownBeforeOpen: () => this._isDropdownOpen = true }, this.isMobile ? this._getDropdownButton() : this._getActionDropdownButton(id), index.h("calcite-dropdown-group", { "selection-mode": "single" }, this._getMapLayerOptions())));
247
+ }
248
+ /**
249
+ * Get the button that will open the dropdown list wrapped in an action
250
+ *
251
+ * @returns the node for the action and button
252
+ */
253
+ _getActionDropdownButton(id) {
254
+ return (index.h("calcite-action", { id: id, slot: "trigger", text: "" }, this._getDropdownButton()));
255
+ }
256
+ /**
257
+ * Get the button that will open the dropdown list
258
+ *
259
+ * @returns the node for the button
260
+ */
261
+ _getDropdownButton() {
262
+ const buttonClass = this.isMobile ? "" : "max-width-350";
263
+ const buttonSlot = this.isMobile ? "trigger" : "";
264
+ const buttonIcon = this._isDropdownOpen ? "chevron-up" : "chevron-down";
265
+ return (index.h("calcite-button", { alignment: "icon-end-space-between", appearance: this.appearance, class: buttonClass, iconEnd: buttonIcon, iconStart: "layers", kind: "neutral", slot: buttonSlot, width: "full" }, index.h("div", null, this.selectedName)));
266
+ }
267
+ /**
268
+ * Get the appropriate type of dom nodes for each valid layer or table
269
+ *
270
+ * @returns Array of dom nodes with the names of the layers and optionally of the tables
271
+ */
272
+ _getMapLayerOptions() {
273
+ return this.ids.reduce((prev, cur) => {
274
+ if (this._validLayer(cur)) {
275
+ prev.push(this._getItem(cur, "layer"));
276
+ }
277
+ else if (this._validTable(cur)) {
278
+ prev.push(this._getItem(cur, "table"));
279
+ }
280
+ return prev;
281
+ }, []);
282
+ }
283
+ /**
284
+ * Get the appropriate type of dom node for the current layer or table id
285
+ *
286
+ * @returns A dom node with the name of the layer or table
287
+ */
288
+ _getItem(id, itemType) {
289
+ const item = itemType === "layer" ? this._layerNameHash[id] : this._tableNameHash[id];
290
+ const disabled = this.onlyShowUpdatableLayers ? !item.supportsUpdate : false;
291
+ const name = item.name;
292
+ const selected = this.selectedIds.indexOf(id) > -1;
293
+ return this.type === "combobox" ? (index.h("calcite-combobox-item", { disabled: disabled, selected: selected, textLabel: name, value: id })) :
294
+ this.type === "select" ? (index.h("calcite-option", { disabled: disabled, label: name, selected: selected, value: id })) : (index.h("calcite-dropdown-group", { class: disabled ? "disabled" : "", selectionMode: disabled ? "none" : "single" }, index.h("calcite-dropdown-item", { onClick: disabled ? undefined : () => void this._setSelectedLayer(id), selected: selected }, name)));
295
+ }
296
+ /**
297
+ * Store the layer name based on the user selection
298
+ */
299
+ _setSelectedLayer(id) {
300
+ let item;
301
+ const hasDefaultLayer = this.defaultLayerId && !this.defaultLayerHonored;
302
+ if (hasDefaultLayer) {
303
+ item = this._getLayerFromHash(this.defaultLayerId);
304
+ this.defaultLayerHonored = item !== undefined;
305
+ id = this.defaultLayerHonored ? this.defaultLayerId : id;
306
+ }
307
+ item = item ? item : this._getLayerFromHash(id);
308
+ this.selectedName = item === null || item === void 0 ? void 0 : item.name;
309
+ this.selectedIds = [id];
310
+ this.layerSelectionChange.emit(this.selectedIds);
311
+ }
312
+ /**
313
+ * Fetch layer hash info for the given id
314
+ *
315
+ * @returns ILayerHashInfo for the id
316
+ */
317
+ _getLayerFromHash(id) {
318
+ return Object.keys(this._layerNameHash).indexOf(id) > -1 ?
319
+ this._layerNameHash[id] : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
320
+ this._tableNameHash[id] : undefined;
321
+ }
322
+ /**
323
+ * Fetch the ids of the layers from the map
324
+ *
325
+ * @returns Promise when the operation has completed
326
+ */
327
+ async _setLayers() {
328
+ if (this.mapView) {
329
+ await this._initLayerTableHash();
330
+ const layerIds = this.onlyShowUpdatableLayers ?
331
+ this._getEditableIds(this._layerNameHash) : Object.keys(this._layerNameHash);
332
+ const tableIds = this.showTables ? this.onlyShowUpdatableLayers ?
333
+ this._getEditableIds(this._tableNameHash) : Object.keys(this._tableNameHash) : [];
334
+ this.ids = [
335
+ ...layerIds.reverse().filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.reverse().indexOf(n) > -1 : true; }),
336
+ ...tableIds.reverse().filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.reverse().indexOf(n) > -1 : true; }),
337
+ ];
338
+ this.idsFound.emit({
339
+ layerIds,
340
+ tableIds
341
+ });
342
+ }
343
+ }
344
+ /**
345
+ * Fetch the ids of all layers that support edits with the update capability
346
+ *
347
+ * @returns array of layer ids
348
+ */
349
+ _getEditableIds(hash) {
350
+ return Object.keys(hash).reduce((prev, cur) => {
351
+ if (hash[cur].supportsUpdate) {
352
+ prev.push(cur);
353
+ }
354
+ return prev;
355
+ }, []);
356
+ }
357
+ /**
358
+ * Create a layer id:title hash for layer name display
359
+ *
360
+ * @returns Promise when the operation has completed
361
+ */
362
+ async _initLayerTableHash() {
363
+ this._layerNameHash = await mapViewUtils.getMapLayerHash(this.mapView, this.onlyShowUpdatableLayers);
364
+ this._tableNameHash = this.showTables ? await mapViewUtils.getMapTableHash(this.mapView, this.onlyShowUpdatableLayers) : {};
365
+ }
366
+ /**
367
+ * Evaluate if the id exists in the current hash and verify if it should be excluded
368
+ *
369
+ * @returns boolean when true the layer will be used in the current layer picker type
370
+ */
371
+ _validLayer(id) {
372
+ var _a;
373
+ const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
374
+ return name && Object.keys(publicNotificationStore.state.managedLayers).indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
375
+ this.enabledLayerIds.indexOf(id) > -1 : true);
376
+ }
377
+ /**
378
+ * Evaluate if the id exists in the current hash and verify if it should be excluded
379
+ *
380
+ * @returns boolean when true the table will be used in the current layer picker type
381
+ */
382
+ _validTable(id) {
383
+ var _a;
384
+ const name = (_a = this._tableNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
385
+ const validName = name && this.showTables;
386
+ return validName ? publicNotificationStore.state.managedTables.indexOf(name) < 0 &&
387
+ (this.enabledTableIds.length > 0 ? this.enabledTableIds.indexOf(id) > -1 : true) : validName;
388
+ }
389
+ /**
390
+ * Fetch the ids of the layers from the map
391
+ *
392
+ * @returns Promise when the operation has completed
393
+ */
394
+ _layerSelectionChange() {
395
+ const ids = Array.isArray(this._layerElement.value) ? this._layerElement.value : [this._layerElement.value];
396
+ if (JSON.stringify(ids) !== JSON.stringify([""])) {
397
+ this.selectedIds = ids;
398
+ this.layerSelectionChange.emit(this.selectedIds);
399
+ }
400
+ }
401
+ /**
402
+ * Fetches the component's translations
403
+ *
404
+ * @returns Promise when complete
405
+ * @protected
406
+ */
407
+ async _getTranslations() {
408
+ const messages = await locale.getLocaleComponentStrings(this.el);
409
+ this._translations = messages[0];
410
+ }
411
+ get el() { return index.getElement(this); }
412
+ static get watchers() { return {
413
+ "mapView": ["mapViewWatchHandler"]
414
+ }; }
415
+ };
416
+ MapLayerPicker.style = MapLayerPickerStyle0;
417
+
418
+ exports.calcite_dropdown_group = DropdownGroup;
419
+ exports.map_layer_picker = MapLayerPicker;