@esri/solutions-components 0.6.9 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/dist/assets/t9n/crowdsource-manager/resources.json +2 -1
  2. package/dist/assets/t9n/crowdsource-manager/resources_en.json +2 -1
  3. package/dist/assets/t9n/info-card/resources.json +4 -1
  4. package/dist/assets/t9n/info-card/resources_en.json +4 -1
  5. package/dist/assets/t9n/layer-table/resources.json +2 -1
  6. package/dist/assets/t9n/layer-table/resources_en.json +2 -1
  7. package/dist/assets/t9n/map-tools/resources.json +0 -3
  8. package/dist/assets/t9n/map-tools/resources_en.json +0 -3
  9. package/dist/cjs/basemap-gallery_5.cjs.entry.js +6 -61
  10. package/dist/cjs/buffer-tools_4.cjs.entry.js +4 -2
  11. package/dist/cjs/card-manager_3.cjs.entry.js +22 -12
  12. package/dist/cjs/crowdsource-manager.cjs.entry.js +27 -5
  13. package/dist/cjs/{downloadUtils-1f057ec0.js → downloadUtils-471a6a2d.js} +16 -10
  14. package/dist/cjs/edit-card_2.cjs.entry.js +34 -2
  15. package/dist/cjs/{index.es-a1507f1c.js → index.es-33154f03.js} +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  18. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  19. package/dist/cjs/solutions-components.cjs.js +1 -1
  20. package/dist/collection/components/buffer-tools/buffer-tools.js +4 -2
  21. package/dist/collection/components/card-manager/card-manager.js +1 -1
  22. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -2
  23. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +27 -4
  24. package/dist/collection/components/info-card/info-card.css +15 -2
  25. package/dist/collection/components/info-card/info-card.js +34 -1
  26. package/dist/collection/components/layer-table/layer-table.css +20 -0
  27. package/dist/collection/components/layer-table/layer-table.js +5 -1
  28. package/dist/collection/components/map-card/map-card.css +0 -7
  29. package/dist/collection/components/map-card/map-card.js +13 -7
  30. package/dist/collection/components/map-picker/map-picker.css +64 -60
  31. package/dist/collection/components/map-picker/map-picker.js +2 -2
  32. package/dist/collection/components/map-tools/map-tools.css +45 -31
  33. package/dist/collection/components/map-tools/map-tools.js +2 -59
  34. package/dist/collection/utils/downloadUtils.js +15 -9
  35. package/dist/collection/utils/downloadUtils.ts +21 -10
  36. package/dist/components/buffer-tools2.js +4 -2
  37. package/dist/components/card-manager2.js +6 -6
  38. package/dist/components/crowdsource-manager.js +28 -5
  39. package/dist/components/downloadUtils.js +15 -9
  40. package/dist/components/info-card2.js +40 -7
  41. package/dist/components/layer-table2.js +6 -2
  42. package/dist/components/map-card2.js +14 -8
  43. package/dist/components/map-picker2.js +3 -3
  44. package/dist/components/map-tools2.js +3 -58
  45. package/dist/esm/basemap-gallery_5.entry.js +6 -61
  46. package/dist/esm/buffer-tools_4.entry.js +4 -2
  47. package/dist/esm/card-manager_3.entry.js +22 -12
  48. package/dist/esm/crowdsource-manager.entry.js +27 -5
  49. package/dist/esm/{downloadUtils-64c27514.js → downloadUtils-8d4c13bb.js} +16 -10
  50. package/dist/esm/edit-card_2.entry.js +34 -2
  51. package/dist/esm/{index.es-b7bc2db1.js → index.es-065c3035.js} +1 -1
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/esm/map-select-tools_3.entry.js +1 -1
  54. package/dist/esm/public-notification.entry.js +1 -1
  55. package/dist/esm/solutions-components.js +1 -1
  56. package/dist/solutions-components/{p-12f06497.entry.js → p-0dd8368d.entry.js} +1 -1
  57. package/dist/solutions-components/p-46352a57.entry.js +6 -0
  58. package/dist/solutions-components/{p-22d06238.js → p-6eb4ba8f.js} +1 -1
  59. package/dist/solutions-components/{p-35cb6eca.entry.js → p-7a8d99fe.entry.js} +2 -2
  60. package/dist/solutions-components/{p-a26dc184.js → p-95c11620.js} +2 -2
  61. package/dist/solutions-components/p-9eba78eb.entry.js +6 -0
  62. package/dist/solutions-components/{p-b2a52acb.entry.js → p-c26cd409.entry.js} +1 -1
  63. package/dist/solutions-components/p-d4cb29ed.entry.js +6 -0
  64. package/dist/solutions-components/p-fb7ca639.entry.js +6 -0
  65. package/dist/solutions-components/solutions-components.esm.js +1 -1
  66. package/dist/solutions-components/utils/downloadUtils.ts +21 -10
  67. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +17 -0
  68. package/dist/types/components/info-card/info-card.d.ts +23 -0
  69. package/dist/types/components/map-card/map-card.d.ts +4 -0
  70. package/dist/types/components/map-tools/map-tools.d.ts +0 -42
  71. package/dist/types/utils/downloadUtils.d.ts +7 -3
  72. package/package.json +1 -1
  73. package/dist/esm/polyfills/core-js.js +0 -11
  74. package/dist/esm/polyfills/dom.js +0 -79
  75. package/dist/esm/polyfills/es5-html-element.js +0 -1
  76. package/dist/esm/polyfills/index.js +0 -34
  77. package/dist/esm/polyfills/system.js +0 -6
  78. package/dist/solutions-components/p-0dce2c3b.entry.js +0 -6
  79. package/dist/solutions-components/p-476eb52c.entry.js +0 -6
  80. package/dist/solutions-components/p-8b8a6c1f.entry.js +0 -6
  81. package/dist/solutions-components/p-97a4001d.entry.js +0 -6
@@ -48,7 +48,7 @@ import { d as defineCustomElement$4 } from './map-picker2.js';
48
48
  import { d as defineCustomElement$3 } from './map-search2.js';
49
49
  import { d as defineCustomElement$2 } from './map-tools2.js';
50
50
 
51
- const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem)}.adjusted-height-100{height:calc(100% - 1rem)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}";
51
+ const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem - 25px)}.adjusted-height-100{height:calc(100% - 1rem - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-49-px{height:49px}.height-50-px{height:50px}.padding-inline-end-75{padding-inline-end:0.75rem}.align-items-center{align-items:center}";
52
52
 
53
53
  const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceManager extends HTMLElement {
54
54
  constructor() {
@@ -60,6 +60,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
60
60
  this.mapInfos = [];
61
61
  this.searchConfiguration = undefined;
62
62
  this.zoomAndScrollToSelected = false;
63
+ this._expandPopup = false;
63
64
  this._translations = undefined;
64
65
  this._layoutMode = ELayoutMode.GRID;
65
66
  this._mapView = undefined;
@@ -91,6 +92,9 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
91
92
  */
92
93
  async mapChanged(evt) {
93
94
  const mapChange = evt.detail;
95
+ // close popup by default when the map changes otherwise other components that rely on the view don't work since it
96
+ // doesn't seem to fully load when it's not visible
97
+ this._expandPopup = false;
94
98
  this._mapInfo = this._getMapInfo(mapChange.id);
95
99
  this._mapView = mapChange.mapView;
96
100
  this._mapView.popupEnabled = false;
@@ -227,7 +231,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
227
231
  */
228
232
  _getMapAndCard(layoutMode, panelOpen, hideMap) {
229
233
  const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
230
- return this.classicGrid ? (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getCardNode(layoutMode, hideMap)));
234
+ return this.classicGrid ? (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getPopupExpandNode(), this._getCardNode(layoutMode, hideMap)));
231
235
  }
232
236
  /**
233
237
  * Get the map node based for the current layout options
@@ -241,9 +245,27 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
241
245
  _getMapNode(layoutMode, hideMap) {
242
246
  const mapDisplayClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "display-flex height-full width-1-2" :
243
247
  layoutMode === ELayoutMode.GRID && !hideMap ? "" : "display-none";
244
- const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : "adjusted-height-50";
248
+ const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
245
249
  return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { class: "width-full", mapInfos: this.mapInfos })));
246
250
  }
251
+ /**
252
+ * Get the expand node for the popup information
253
+ *
254
+ * @returns the expand node
255
+ * @protected
256
+ */
257
+ _getPopupExpandNode() {
258
+ const icon = this._expandPopup ? "chevrons-down" : "chevrons-up";
259
+ return (h("div", { class: "height-49-px calcite-mode-dark" }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { class: "padding-inline-end-75", icon: "information", scale: "s" }), h("div", null, this._translations.information)), h("calcite-action", { class: "height-49-px", icon: icon, onClick: () => this._togglePopup(), slot: "header-actions-end" }))));
260
+ }
261
+ /**
262
+ * Toggle the popup information
263
+ *
264
+ * @protected
265
+ */
266
+ _togglePopup() {
267
+ this._expandPopup = !this._expandPopup;
268
+ }
247
269
  /**
248
270
  * Get the card node based for the current layout options
249
271
  *
@@ -255,9 +277,9 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
255
277
  */
256
278
  _getCardNode(layoutMode, hideMap) {
257
279
  const cardManagerHeight = this.classicGrid && layoutMode === ELayoutMode.GRID ? "" :
258
- layoutMode === ELayoutMode.GRID && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
280
+ layoutMode === ELayoutMode.GRID && !this._expandPopup && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
259
281
  const cardManagerContainer = this.classicGrid && layoutMode === ELayoutMode.GRID ?
260
- "width-full adjusted-height-100" : "width-50 height-full";
282
+ "width-full adjusted-height-100" : this._expandPopup ? "width-50 adjusted-height-100-50" : "width-50 height-full";
261
283
  return (h("div", { class: `padding-1-2 ${cardManagerContainer}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, mapView: this === null || this === void 0 ? void 0 : this._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
262
284
  }
263
285
  /**
@@ -325,6 +347,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
325
347
  "mapInfos": [16],
326
348
  "searchConfiguration": [16],
327
349
  "zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
350
+ "_expandPopup": [32],
328
351
  "_translations": [32],
329
352
  "_layoutMode": [32],
330
353
  "_mapView": [32],
@@ -2520,8 +2520,8 @@ function _getFieldNamesFromFieldExpressions(fieldExpressions) {
2520
2520
  * all attributes are exported
2521
2521
  * @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
2522
2522
  * with formats by this function
2523
- * @returns A Promise resolving to the format of a single label, e.g., for ILabelFormat type "pattern":
2524
- * "{NAME}|{STREET}|{CITY}, {STATE} {ZIP}"
2523
+ * @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
2524
+ * for ILabelFormat type "pattern": "{name}|{street}|{city}, {state} {zip}"
2525
2525
  */
2526
2526
  async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
2527
2527
  var _a, _b, _c, _d, _e, _f;
@@ -2534,7 +2534,7 @@ async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
2534
2534
  // Extract any format info that we have
2535
2535
  fieldInfo => {
2536
2536
  if (fieldInfo.format) {
2537
- attributeFormats[fieldInfo.fieldName] = fieldInfo.format;
2537
+ attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
2538
2538
  }
2539
2539
  });
2540
2540
  // What is the nature of the label content?
@@ -2643,11 +2643,14 @@ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeH
2643
2643
  // Get the features to export
2644
2644
  const featureSet = await queryFeaturesByID(ids, layer, [], false);
2645
2645
  // Get field data types. Do we have any domain-based fields?
2646
+ const attributeOrigNames = {};
2646
2647
  const attributeTypes = {};
2647
2648
  const attributeDomains = {};
2648
2649
  layer.fields.forEach(field => {
2649
- attributeTypes[field.name] = field.type;
2650
- attributeDomains[field.name] = field.domain;
2650
+ const lowercaseFieldname = field.name.toLowerCase();
2651
+ attributeOrigNames[lowercaseFieldname] = field.name;
2652
+ attributeDomains[lowercaseFieldname] = field.domain;
2653
+ attributeTypes[lowercaseFieldname] = field.type;
2651
2654
  });
2652
2655
  const attributeFormats = {};
2653
2656
  // Get the label formatting, if any
@@ -2658,7 +2661,7 @@ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeH
2658
2661
  await _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames)
2659
2662
  : labelFormat.type == "pattern" ?
2660
2663
  // Export attributes in format
2661
- await _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
2664
+ await _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
2662
2665
  :
2663
2666
  // Export attributes in expression
2664
2667
  await _prepareLabelsUsingExecutor(featureSet, labelFormat.format);
@@ -2678,7 +2681,8 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
2678
2681
  // Export all attributes
2679
2682
  const labels = featureSet.map(feature => {
2680
2683
  return Object.keys(feature.attributes).map((attributeName) => {
2681
- return _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[attributeName], attributeDomains[attributeName], null, intl);
2684
+ const lowercaseFieldname = attributeName.toLowerCase();
2685
+ return _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], null, intl);
2682
2686
  });
2683
2687
  });
2684
2688
  // Add header names
@@ -2696,6 +2700,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
2696
2700
  * Creates labels from attributes in a layer popup.
2697
2701
  *
2698
2702
  * @param featureSet Features to convert to labels
2703
+ * @param attributeOrigNames Mapping from lowercase field names to original field names
2699
2704
  * @param attributeTypes Type for each attribute in a feature
2700
2705
  * @param attributeDomains Domains for each attribute in a feature
2701
2706
  * @param attributeFormats Formats for each attribute in a feature
@@ -2703,7 +2708,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
2703
2708
  * @param includeHeaderNames Add the label format at the front of the list of generated labels
2704
2709
  * @returns Promise resolving with list of labels, each of which is a list of label lines
2705
2710
  */
2706
- async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
2711
+ async function _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
2707
2712
  const [intl] = await loadModules(["esri/intl"]);
2708
2713
  // Find the label fields that we need to replace with values
2709
2714
  const attributeExpressionMatches = _getFieldExpressionsFromLabel(labelFormat);
@@ -2713,7 +2718,8 @@ async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDo
2713
2718
  let labelPrep = labelFormat;
2714
2719
  // Replace non-Arcade fields in this feature
2715
2720
  attributeNames.forEach((attributeName, i) => {
2716
- const value = _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[attributeName], attributeDomains[attributeName], attributeFormats[attributeName], intl);
2721
+ const lowercaseFieldname = attributeName.toLowerCase();
2722
+ const value = _prepareAttributeValue(feature.attributes[attributeOrigNames[lowercaseFieldname]], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], attributeFormats[lowercaseFieldname], intl);
2717
2723
  labelPrep = labelPrep.replace(attributeExpressionMatches[i], value);
2718
2724
  });
2719
2725
  // Split label into lines
@@ -6,8 +6,8 @@
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { g as getLocaleComponentStrings } from './locale.js';
8
8
  import { l as loadModules } from './loadModules.js';
9
- import { d as defineCustomElement$9 } from './action.js';
10
- import { d as defineCustomElement$8 } from './alert.js';
9
+ import { d as defineCustomElement$9 } from './alert.js';
10
+ import { d as defineCustomElement$8 } from './button.js';
11
11
  import { d as defineCustomElement$7 } from './chip.js';
12
12
  import { d as defineCustomElement$6 } from './icon.js';
13
13
  import { d as defineCustomElement$5 } from './loader.js';
@@ -16,7 +16,7 @@ import { d as defineCustomElement$3 } from './shell.js';
16
16
  import { d as defineCustomElement$2 } from './tooltip.js';
17
17
  import { d as defineCustomElement$1 } from './edit-card2.js';
18
18
 
19
- const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute;width:50px}.edit-btn-position{right:0}html[dir=\"rtl\"] .edit-btn-position{left:0}";
19
+ const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute}.edit-btn-position{right:0.5rem;top:0.5rem}html[dir=\"rtl\"] .edit-btn-position{left:0}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.min-width-100{min-width:100px}";
20
20
 
21
21
  const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLElement {
22
22
  constructor() {
@@ -28,6 +28,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
28
28
  this.mapView = undefined;
29
29
  this.zoomAndScrollToSelected = undefined;
30
30
  this._alertOpen = false;
31
+ this._count = "";
31
32
  this._editRecordOpen = false;
32
33
  this._translations = undefined;
33
34
  }
@@ -105,7 +106,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
105
106
  const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
106
107
  const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
107
108
  const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
108
- return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, h("calcite-action", { appearance: "transparent", icon: "pencil", id: "solutions-edit", onClick: () => this._openEditRecord(), scale: "m" }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("edit-card", { class: editClass, graphicIndex: (_a = this._features) === null || _a === void 0 ? void 0 : _a.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
109
+ return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} display-flex padding-1-2 button-container`, slot: "footer" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, this._getCount()), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))), h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, h("calcite-button", { appearance: "outline", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord() }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("edit-card", { class: editClass, graphicIndex: (_a = this._features) === null || _a === void 0 ? void 0 : _a.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
109
110
  }
110
111
  //--------------------------------------------------------------------------
111
112
  //
@@ -186,6 +187,37 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
186
187
  this._alertOpen = true;
187
188
  }
188
189
  }
190
+ /**
191
+ * Go to the previous feature in the features widget
192
+ *
193
+ * @returns void
194
+ */
195
+ _back() {
196
+ this._features.previous();
197
+ this._count = this._getCount();
198
+ }
199
+ /**
200
+ * Go to the next feature in the features widget
201
+ *
202
+ * @returns void
203
+ */
204
+ _next() {
205
+ this._features.next();
206
+ this._count = this._getCount();
207
+ }
208
+ /**
209
+ * Get the current index of total string
210
+ *
211
+ * @returns the index of total string
212
+ */
213
+ _getCount() {
214
+ var _a, _b, _c;
215
+ const index = (((_a = this._features) === null || _a === void 0 ? void 0 : _a.viewModel.selectedFeatureIndex) + 1).toString();
216
+ const total = (_c = (_b = this._features) === null || _b === void 0 ? void 0 : _b.features) === null || _c === void 0 ? void 0 : _c.length.toString();
217
+ return this._translations.indexOfTotal
218
+ .replace("{{index}}", index)
219
+ .replace("{{total}}", total);
220
+ }
189
221
  /**
190
222
  * Fetches the component's translations
191
223
  *
@@ -208,6 +240,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
208
240
  "mapView": [16],
209
241
  "zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
210
242
  "_alertOpen": [32],
243
+ "_count": [32],
211
244
  "_editRecordOpen": [32],
212
245
  "_translations": [32],
213
246
  "getSelectedFeature": [64]
@@ -216,19 +249,19 @@ function defineCustomElement() {
216
249
  if (typeof customElements === "undefined") {
217
250
  return;
218
251
  }
219
- const components = ["info-card", "calcite-action", "calcite-alert", "calcite-chip", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-shell", "calcite-tooltip", "edit-card"];
252
+ const components = ["info-card", "calcite-alert", "calcite-button", "calcite-chip", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-shell", "calcite-tooltip", "edit-card"];
220
253
  components.forEach(tagName => { switch (tagName) {
221
254
  case "info-card":
222
255
  if (!customElements.get(tagName)) {
223
256
  customElements.define(tagName, InfoCard);
224
257
  }
225
258
  break;
226
- case "calcite-action":
259
+ case "calcite-alert":
227
260
  if (!customElements.get(tagName)) {
228
261
  defineCustomElement$9();
229
262
  }
230
263
  break;
231
- case "calcite-alert":
264
+ case "calcite-button":
232
265
  if (!customElements.get(tagName)) {
233
266
  defineCustomElement$8();
234
267
  }
@@ -33,7 +33,7 @@ import { d as defineCustomElement$3 } from './shell.js';
33
33
  import { d as defineCustomElement$2 } from './tooltip.js';
34
34
  import { d as defineCustomElement$1 } from './map-layer-picker2.js';
35
35
 
36
- const layerTableCss = ":host{display:block}.height-full{height:100%}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.height-51{height:51px}";
36
+ const layerTableCss = ":host{display:block}.height-full{height:100%}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}";
37
37
 
38
38
  const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
39
39
  constructor() {
@@ -167,7 +167,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
167
167
  const tableNodeClass = this._fetchingData ? "display-none" : "";
168
168
  const loadingClass = this._fetchingData ? "" : "display-none";
169
169
  const alertActionClass = this._alertShowAction ? "" : "display-none";
170
- return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate }))), h("calcite-alert", { icon: this._alertIcon, kind: this._alertKind, label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._alertTitle), h("div", { slot: "message" }, this._alertMessage), h("calcite-link", { class: alertActionClass, onClick: this._alertActionFunction, slot: "link" }, this._alertActionText)))));
170
+ const total = this._allIds.length.toString();
171
+ const selected = this._selectedIndexes.length.toString();
172
+ return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
173
+ .replace("{{total}}", total)
174
+ .replace("{{selected}}", selected))), h("calcite-alert", { icon: this._alertIcon, kind: this._alertKind, label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._alertTitle), h("div", { slot: "message" }, this._alertMessage), h("calcite-link", { class: alertActionClass, onClick: this._alertActionFunction, slot: "link" }, this._alertActionText)))));
171
175
  }
172
176
  //--------------------------------------------------------------------------
173
177
  //
@@ -28,7 +28,7 @@ import { d as defineCustomElement$3 } from './map-picker2.js';
28
28
  import { d as defineCustomElement$2 } from './map-search2.js';
29
29
  import { d as defineCustomElement$1 } from './map-tools2.js';
30
30
 
31
- const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}.esri-zoom{display:none !important}";
31
+ const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}";
32
32
 
33
33
  const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLElement {
34
34
  constructor() {
@@ -80,12 +80,14 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
80
80
  * @protected
81
81
  */
82
82
  async _initModules() {
83
- const [WebMap, MapView] = await loadModules([
83
+ const [WebMap, MapView, Home] = await loadModules([
84
84
  "esri/WebMap",
85
- "esri/views/MapView"
85
+ "esri/views/MapView",
86
+ "esri/widgets/Home"
86
87
  ]);
87
88
  this.WebMap = WebMap;
88
89
  this.MapView = MapView;
90
+ this.Home = Home;
89
91
  }
90
92
  /**
91
93
  * Load the webmap for the provided webMapInfo
@@ -111,13 +113,17 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
111
113
  map: webMap,
112
114
  resizeAlign: "top-left"
113
115
  });
116
+ this._loadedId = id;
117
+ this._searchConfiguration = this._webMapInfo.searchConfiguration;
118
+ this.mapChanged.emit({
119
+ id: id,
120
+ mapView: this.mapView
121
+ });
114
122
  await this.mapView.when(() => {
115
- this._loadedId = id;
116
- this._searchConfiguration = this._webMapInfo.searchConfiguration;
117
- this.mapChanged.emit({
118
- id: id,
119
- mapView: this.mapView
123
+ const home = new this.Home({
124
+ view: this.mapView
120
125
  });
126
+ this.mapView.ui.add(home, { position: "top-left", index: 3 });
121
127
  this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
122
128
  });
123
129
  }
@@ -21,7 +21,7 @@ import { d as defineCustomElement$3 } from './progress.js';
21
21
  import { d as defineCustomElement$2 } from './scrim.js';
22
22
  import { d as defineCustomElement$1 } from './stack.js';
23
23
 
24
- const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}";
24
+ const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}";
25
25
 
26
26
  const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLElement {
27
27
  constructor() {
@@ -103,7 +103,7 @@ const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLE
103
103
  _getMapPicker() {
104
104
  var _a;
105
105
  const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
106
- return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "solid", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
106
+ return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "transparent", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
107
107
  }
108
108
  /**
109
109
  * Create the toolbar (controls used for map and app interactions)
@@ -113,7 +113,7 @@ const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLE
113
113
  * @protected
114
114
  */
115
115
  _getToolbar() {
116
- return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
116
+ return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "action-bar-color border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
117
117
  }
118
118
  /**
119
119
  * Get a pick list for all maps in mapInfos
@@ -18,7 +18,7 @@ import { d as defineCustomElement$3 } from './tooltip.js';
18
18
  import { d as defineCustomElement$2 } from './map-legend2.js';
19
19
  import { d as defineCustomElement$1 } from './map-search2.js';
20
20
 
21
- const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}";
21
+ const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}.square-40{width:40px;height:40px}.width-40{width:40px}.square-40-41{width:40px;height:41px}";
22
22
 
23
23
  const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLElement {
24
24
  constructor() {
@@ -40,14 +40,6 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
40
40
  // Watch handlers
41
41
  //
42
42
  //--------------------------------------------------------------------------
43
- /**
44
- * Store the home extent when the map view changes
45
- */
46
- async mapViewWatchHandler() {
47
- await this.mapView.when(() => {
48
- this._homeExtent = this.mapView.extent;
49
- });
50
- }
51
43
  /**
52
44
  * When the _showBasemapWidget property is true display the basemap gallery
53
45
  */
@@ -110,7 +102,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
110
102
  const searchClass = this._showSearchWidget ? "" : "display-none";
111
103
  const basemapClass = this._showBasemapWidget ? "" : "display-none";
112
104
  const legendClass = this._showLegendWidget ? "" : "display-none";
113
- return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, text: "" }), h("calcite-action-bar", { class: `border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("home", false, this._translations.home, () => void this._goHome()), this._getActionGroup("plus", false, this._translations.zoomIn, () => void this._zoomIn()), this._getActionGroup("minus", false, this._translations.zoomOut, () => void this._zoomOut()), this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
105
+ return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border square-40", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, scale: "s", text: "" }), h("calcite-action-bar", { class: `width-40 border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
114
106
  }
115
107
  //--------------------------------------------------------------------------
116
108
  //
@@ -130,17 +122,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
130
122
  * @protected
131
123
  */
132
124
  _getActionGroup(icon, disabled, tip, func) {
133
- return (h("calcite-action-group", null, h("calcite-action", { alignment: "center", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, tip))));
134
- }
135
- /**
136
- * Go to the exent that was first used when loading the map
137
- *
138
- * @returns void
139
- *
140
- * @protected
141
- */
142
- async _goHome() {
143
- await this.mapView.goTo(this._homeExtent);
125
+ return (h("calcite-action-group", { class: "square-40-41" }, h("calcite-action", { alignment: "center", class: "square-40", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, scale: "s", text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "trailing", "reference-element": icon }, h("span", null, tip))));
144
126
  }
145
127
  // need to discuss this with the team
146
128
  _showLegend() {
@@ -152,42 +134,6 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
152
134
  this._showSearchWidget = !this._showSearchWidget;
153
135
  this._showTools = false;
154
136
  }
155
- /**
156
- * Fixed zoom in
157
- *
158
- * @returns void
159
- *
160
- * @protected
161
- */
162
- async _zoomIn() {
163
- await this._zoom(this.mapView.zoom + 1);
164
- }
165
- /**
166
- * Fixed zoom out
167
- *
168
- * @returns void
169
- *
170
- * @protected
171
- */
172
- async _zoomOut() {
173
- await this._zoom(this.mapView.zoom - 1);
174
- }
175
- /**
176
- * Zoom in/out at the maps current center point
177
- *
178
- * @param zoom Number to zoom level to go to
179
- *
180
- * @returns void
181
- *
182
- * @protected
183
- */
184
- async _zoom(zoom) {
185
- var _a;
186
- await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
187
- target: this.mapView.center,
188
- zoom
189
- }));
190
- }
191
137
  /**
192
138
  * Show/Hide the basemap picker
193
139
  *
@@ -236,7 +182,6 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
236
182
  }
237
183
  get el() { return this; }
238
184
  static get watchers() { return {
239
- "mapView": ["mapViewWatchHandler"],
240
185
  "_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
241
186
  "_showLegendWidget": ["_showLegendWidgetWatchHandler"],
242
187
  "_showSearchWidget": ["_showSearchWidgetWatchHandler"]
@@ -189,7 +189,7 @@ const MapLegend = class {
189
189
  };
190
190
  MapLegend.style = mapLegendCss;
191
191
 
192
- const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}";
192
+ const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}";
193
193
 
194
194
  const MapPicker = class {
195
195
  constructor(hostRef) {
@@ -269,7 +269,7 @@ const MapPicker = class {
269
269
  _getMapPicker() {
270
270
  var _a;
271
271
  const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
272
- return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "solid", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
272
+ return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "transparent", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
273
273
  }
274
274
  /**
275
275
  * Create the toolbar (controls used for map and app interactions)
@@ -279,7 +279,7 @@ const MapPicker = class {
279
279
  * @protected
280
280
  */
281
281
  _getToolbar() {
282
- return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
282
+ return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "action-bar-color border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
283
283
  }
284
284
  /**
285
285
  * Get a pick list for all maps in mapInfos
@@ -496,7 +496,7 @@ const MapSearch = class {
496
496
  };
497
497
  MapSearch.style = mapSearchCss;
498
498
 
499
- const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}";
499
+ const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}.square-40{width:40px;height:40px}.width-40{width:40px}.square-40-41{width:40px;height:41px}";
500
500
 
501
501
  const MapTools = class {
502
502
  constructor(hostRef) {
@@ -516,14 +516,6 @@ const MapTools = class {
516
516
  // Watch handlers
517
517
  //
518
518
  //--------------------------------------------------------------------------
519
- /**
520
- * Store the home extent when the map view changes
521
- */
522
- async mapViewWatchHandler() {
523
- await this.mapView.when(() => {
524
- this._homeExtent = this.mapView.extent;
525
- });
526
- }
527
519
  /**
528
520
  * When the _showBasemapWidget property is true display the basemap gallery
529
521
  */
@@ -586,7 +578,7 @@ const MapTools = class {
586
578
  const searchClass = this._showSearchWidget ? "" : "display-none";
587
579
  const basemapClass = this._showBasemapWidget ? "" : "display-none";
588
580
  const legendClass = this._showLegendWidget ? "" : "display-none";
589
- return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, text: "" }), h("calcite-action-bar", { class: `border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("home", false, this._translations.home, () => void this._goHome()), this._getActionGroup("plus", false, this._translations.zoomIn, () => void this._zoomIn()), this._getActionGroup("minus", false, this._translations.zoomOut, () => void this._zoomOut()), this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
581
+ return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border square-40", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, scale: "s", text: "" }), h("calcite-action-bar", { class: `width-40 border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
590
582
  }
591
583
  //--------------------------------------------------------------------------
592
584
  //
@@ -606,17 +598,7 @@ const MapTools = class {
606
598
  * @protected
607
599
  */
608
600
  _getActionGroup(icon, disabled, tip, func) {
609
- return (h("calcite-action-group", null, h("calcite-action", { alignment: "center", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, tip))));
610
- }
611
- /**
612
- * Go to the exent that was first used when loading the map
613
- *
614
- * @returns void
615
- *
616
- * @protected
617
- */
618
- async _goHome() {
619
- await this.mapView.goTo(this._homeExtent);
601
+ return (h("calcite-action-group", { class: "square-40-41" }, h("calcite-action", { alignment: "center", class: "square-40", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, scale: "s", text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "trailing", "reference-element": icon }, h("span", null, tip))));
620
602
  }
621
603
  // need to discuss this with the team
622
604
  _showLegend() {
@@ -628,42 +610,6 @@ const MapTools = class {
628
610
  this._showSearchWidget = !this._showSearchWidget;
629
611
  this._showTools = false;
630
612
  }
631
- /**
632
- * Fixed zoom in
633
- *
634
- * @returns void
635
- *
636
- * @protected
637
- */
638
- async _zoomIn() {
639
- await this._zoom(this.mapView.zoom + 1);
640
- }
641
- /**
642
- * Fixed zoom out
643
- *
644
- * @returns void
645
- *
646
- * @protected
647
- */
648
- async _zoomOut() {
649
- await this._zoom(this.mapView.zoom - 1);
650
- }
651
- /**
652
- * Zoom in/out at the maps current center point
653
- *
654
- * @param zoom Number to zoom level to go to
655
- *
656
- * @returns void
657
- *
658
- * @protected
659
- */
660
- async _zoom(zoom) {
661
- var _a;
662
- await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
663
- target: this.mapView.center,
664
- zoom
665
- }));
666
- }
667
613
  /**
668
614
  * Show/Hide the basemap picker
669
615
  *
@@ -712,7 +658,6 @@ const MapTools = class {
712
658
  }
713
659
  get el() { return getElement(this); }
714
660
  static get watchers() { return {
715
- "mapView": ["mapViewWatchHandler"],
716
661
  "_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
717
662
  "_showLegendWidget": ["_showLegendWidgetWatchHandler"],
718
663
  "_showSearchWidget": ["_showSearchWidgetWatchHandler"]
@@ -161,9 +161,11 @@ const BufferTools = class {
161
161
  }
162
162
  this._bufferTimeout = setTimeout(() => {
163
163
  var _a;
164
- // needs to be wgs 84 or Web Mercator
165
164
  if (((_a = this.geometries) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.unit && this.distance > 0) {
166
- const buffer = this._geometryEngine.geodesicBuffer(this.geometries, this.distance, this.unit, this.unionResults);
165
+ const geom = this.geometries[0];
166
+ const sr = geom.spatialReference;
167
+ const buffer = (sr.isWGS84 || sr.isWebMercator) ?
168
+ this._geometryEngine.geodesicBuffer(this.geometries, this.distance, this.unit, this.unionResults) : this._geometryEngine.buffer(this.geometries, this.distance, this.unit, this.unionResults);
167
169
  this.bufferComplete.emit(buffer);
168
170
  }
169
171
  }, 400);