@esri/solutions-components 0.6.6 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. package/dist/cjs/basemap-gallery_4.cjs.entry.js +622 -0
  2. package/dist/cjs/card-manager_4.cjs.entry.js +91 -37
  3. package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/solutions-components.cjs.js +2 -2
  6. package/dist/collection/collection-manifest.json +3 -1
  7. package/dist/collection/components/basemap-gallery/basemap-gallery.css +19 -0
  8. package/dist/collection/components/basemap-gallery/basemap-gallery.js +166 -0
  9. package/dist/collection/components/basemap-gallery/test/basemap-gallery.e2e.js +29 -0
  10. package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +37 -0
  11. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +43 -2
  12. package/dist/collection/components/layer-table/layer-table.js +99 -30
  13. package/dist/collection/components/map-card/map-card.css +0 -7
  14. package/dist/collection/components/map-card/map-card.js +12 -7
  15. package/dist/collection/components/map-search/map-search.css +24 -0
  16. package/dist/collection/components/map-search/map-search.js +321 -0
  17. package/dist/collection/components/map-search/test/map-search.e2e.js +29 -0
  18. package/dist/collection/components/map-search/test/map-search.spec.js +37 -0
  19. package/dist/collection/components/map-tools/map-tools.js +139 -14
  20. package/dist/collection/demos/crowdsource-manager.html +3 -3
  21. package/dist/collection/utils/interfaces.ts +2 -0
  22. package/dist/components/action-bar.js +1 -0
  23. package/dist/components/action-group.js +1 -0
  24. package/dist/components/action-menu.js +1 -0
  25. package/dist/components/action.js +1 -0
  26. package/dist/components/alert.js +1 -0
  27. package/dist/components/avatar.js +1 -0
  28. package/dist/components/basemap-gallery.d.ts +11 -0
  29. package/dist/components/basemap-gallery.js +11 -0
  30. package/dist/components/basemap-gallery2.js +118 -0
  31. package/dist/components/buffer-tools2.js +1 -0
  32. package/dist/components/button.js +1 -0
  33. package/dist/components/calcite-accordion-item.js +1 -0
  34. package/dist/components/calcite-accordion.js +1 -0
  35. package/dist/components/calcite-action-pad.js +1 -0
  36. package/dist/components/calcite-block-section.js +1 -0
  37. package/dist/components/calcite-block.js +1 -0
  38. package/dist/components/calcite-card.js +1 -0
  39. package/dist/components/calcite-chip-group.js +1 -0
  40. package/dist/components/calcite-color-picker.js +1 -0
  41. package/dist/components/calcite-combobox-item-group.js +1 -0
  42. package/dist/components/calcite-fab.js +1 -0
  43. package/dist/components/calcite-flow-item.js +1 -0
  44. package/dist/components/calcite-flow.js +1 -0
  45. package/dist/components/calcite-inline-editable.js +1 -0
  46. package/dist/components/calcite-input-date-picker.js +1 -0
  47. package/dist/components/calcite-input-time-picker.js +1 -0
  48. package/dist/components/calcite-input-time-zone.js +1 -0
  49. package/dist/components/calcite-list-item-group.js +1 -0
  50. package/dist/components/calcite-menu-item.js +1 -0
  51. package/dist/components/calcite-modal.js +1 -0
  52. package/dist/components/calcite-navigation-logo.js +1 -0
  53. package/dist/components/calcite-navigation-user.js +1 -0
  54. package/dist/components/calcite-navigation.js +1 -0
  55. package/dist/components/calcite-option-group.js +1 -0
  56. package/dist/components/calcite-pagination.js +1 -0
  57. package/dist/components/calcite-pick-list-group.js +1 -0
  58. package/dist/components/calcite-pick-list.js +1 -0
  59. package/dist/components/calcite-radio-button-group.js +1 -0
  60. package/dist/components/calcite-radio-button.js +1 -0
  61. package/dist/components/calcite-rating.js +1 -0
  62. package/dist/components/calcite-shell-center-row.js +1 -0
  63. package/dist/components/calcite-sortable-list.js +1 -0
  64. package/dist/components/calcite-split-button.js +1 -0
  65. package/dist/components/calcite-stepper-item.js +1 -0
  66. package/dist/components/calcite-stepper.js +1 -0
  67. package/dist/components/calcite-text-area.js +1 -0
  68. package/dist/components/calcite-tile-select-group.js +1 -0
  69. package/dist/components/calcite-tile-select.js +1 -0
  70. package/dist/components/calcite-tip-group.js +1 -0
  71. package/dist/components/calcite-tip-manager.js +1 -0
  72. package/dist/components/calcite-tip.js +1 -0
  73. package/dist/components/card-manager2.js +1 -0
  74. package/dist/components/checkbox.js +1 -0
  75. package/dist/components/chip.js +1 -0
  76. package/dist/components/color-picker-hex-input.js +1 -0
  77. package/dist/components/color-picker-swatch.js +1 -0
  78. package/dist/components/combobox-item.js +1 -0
  79. package/dist/components/combobox.js +1 -0
  80. package/dist/components/crowdsource-manager.js +95 -78
  81. package/dist/components/crowdsource-reporter.js +1 -0
  82. package/dist/components/date-picker-day.js +1 -0
  83. package/dist/components/date-picker-month-header.js +1 -0
  84. package/dist/components/date-picker-month.js +1 -0
  85. package/dist/components/date-picker.js +1 -0
  86. package/dist/components/deduct-calculator2.js +1 -0
  87. package/dist/components/dropdown-group.js +1 -0
  88. package/dist/components/dropdown-item.js +1 -0
  89. package/dist/components/dropdown.js +1 -0
  90. package/dist/components/edit-card2.js +1 -0
  91. package/dist/components/esri-loader.js +301 -0
  92. package/dist/components/filter2.js +1 -0
  93. package/dist/components/graph.js +1 -0
  94. package/dist/components/handle.js +1 -0
  95. package/dist/components/icon.js +1 -0
  96. package/dist/components/index.d.ts +6 -0
  97. package/dist/components/index.js +1 -1
  98. package/dist/components/info-card2.js +1 -0
  99. package/dist/components/input-message.js +1 -0
  100. package/dist/components/input-number.js +1 -0
  101. package/dist/components/input-text.js +1 -0
  102. package/dist/components/input.js +1 -0
  103. package/dist/components/json-editor2.js +1 -0
  104. package/dist/components/label2.js +1 -0
  105. package/dist/components/layer-table2.js +83 -31
  106. package/dist/components/layout-manager2.js +1 -0
  107. package/dist/components/link.js +1 -0
  108. package/dist/components/list-item.js +1 -0
  109. package/dist/components/list-item2.js +1 -0
  110. package/dist/components/list.js +1 -0
  111. package/dist/components/loadModules.js +1 -1
  112. package/dist/components/loader.js +1 -0
  113. package/dist/components/locale.js +2 -295
  114. package/dist/components/map-card2.js +61 -42
  115. package/dist/components/map-draw-tools2.js +1 -0
  116. package/dist/components/map-layer-picker2.js +1 -0
  117. package/dist/components/map-picker2.js +1 -0
  118. package/dist/components/map-search.d.ts +11 -0
  119. package/dist/components/map-search.js +11 -0
  120. package/dist/components/map-search2.js +201 -0
  121. package/dist/components/map-select-tools2.js +1 -0
  122. package/dist/components/map-tools2.js +141 -30
  123. package/dist/components/menu.js +1 -0
  124. package/dist/components/notice.js +1 -0
  125. package/dist/components/option.js +1 -0
  126. package/dist/components/panel.js +1 -0
  127. package/dist/components/pci-calculator.js +1 -0
  128. package/dist/components/pdf-download2.js +1 -0
  129. package/dist/components/pick-list-item.js +1 -0
  130. package/dist/components/popover.js +1 -0
  131. package/dist/components/progress.js +1 -0
  132. package/dist/components/public-notification.js +1 -0
  133. package/dist/components/refine-selection2.js +1 -0
  134. package/dist/components/scrim.js +1 -0
  135. package/dist/components/segmented-control-item.js +1 -0
  136. package/dist/components/segmented-control.js +1 -0
  137. package/dist/components/select.js +1 -0
  138. package/dist/components/shell-panel.js +1 -0
  139. package/dist/components/shell.js +1 -0
  140. package/dist/components/slider.js +1 -0
  141. package/dist/components/solution-configuration.js +1 -0
  142. package/dist/components/solution-contents2.js +1 -0
  143. package/dist/components/solution-item-details2.js +1 -0
  144. package/dist/components/solution-item-icon2.js +1 -0
  145. package/dist/components/solution-item-sharing2.js +1 -0
  146. package/dist/components/solution-item2.js +1 -0
  147. package/dist/components/solution-organization-variables2.js +1 -0
  148. package/dist/components/solution-resource-item2.js +1 -0
  149. package/dist/components/solution-spatial-ref2.js +1 -0
  150. package/dist/components/solution-template-data2.js +1 -0
  151. package/dist/components/solution-variables2.js +1 -0
  152. package/dist/components/stack.js +1 -0
  153. package/dist/components/store-manager.js +1 -0
  154. package/dist/components/switch.js +1 -0
  155. package/dist/components/tab-nav.js +1 -0
  156. package/dist/components/tab-title.js +1 -0
  157. package/dist/components/tab.js +1 -0
  158. package/dist/components/tabs.js +1 -0
  159. package/dist/components/tile.js +1 -0
  160. package/dist/components/time-picker.js +1 -0
  161. package/dist/components/tooltip.js +1 -0
  162. package/dist/components/tree-item.js +1 -0
  163. package/dist/components/tree.js +1 -0
  164. package/dist/components/value-list-item.js +1 -0
  165. package/dist/components/value-list.js +1 -0
  166. package/dist/esm/basemap-gallery_4.entry.js +615 -0
  167. package/dist/esm/card-manager_4.entry.js +91 -37
  168. package/dist/esm/crowdsource-manager.entry.js +4 -2
  169. package/dist/esm/loader.js +1 -1
  170. package/dist/esm/polyfills/core-js.js +11 -0
  171. package/dist/esm/polyfills/dom.js +79 -0
  172. package/dist/esm/polyfills/es5-html-element.js +1 -0
  173. package/dist/esm/polyfills/index.js +34 -0
  174. package/dist/esm/polyfills/system.js +6 -0
  175. package/dist/esm/solutions-components.js +2 -2
  176. package/dist/solutions-components/demos/crowdsource-manager.html +3 -3
  177. package/dist/solutions-components/p-55aefaa8.entry.js +6 -0
  178. package/dist/solutions-components/p-5b5a6ac8.entry.js +6 -0
  179. package/dist/solutions-components/p-a6c85bd7.entry.js +6 -0
  180. package/dist/solutions-components/solutions-components.esm.js +1 -1
  181. package/dist/solutions-components/utils/interfaces.ts +2 -0
  182. package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +64 -0
  183. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
  184. package/dist/types/components/layer-table/layer-table.d.ts +24 -2
  185. package/dist/types/components/map-card/map-card.d.ts +10 -2
  186. package/dist/types/components/map-search/map-search.d.ts +107 -0
  187. package/dist/types/components/map-tools/map-tools.d.ts +68 -5
  188. package/dist/types/components.d.ts +122 -0
  189. package/dist/types/preact.d.ts +4 -0
  190. package/dist/types/stencil-public-runtime.d.ts +2 -0
  191. package/dist/types/utils/interfaces.d.ts +2 -0
  192. package/package.json +1 -1
  193. package/dist/cjs/map-picker_2.cjs.entry.js +0 -264
  194. package/dist/esm/map-picker_2.entry.js +0 -259
  195. package/dist/solutions-components/p-1990d9c8.entry.js +0 -6
  196. package/dist/solutions-components/p-40bde8b2.entry.js +0 -6
  197. package/dist/solutions-components/p-b921aa1a.entry.js +0 -6
@@ -0,0 +1,201 @@
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
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
+ import { l as loadModules } from './loadModules.js';
8
+
9
+ const mapSearchCss = ":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}";
10
+
11
+ const MapSearch = /*@__PURE__*/ proxyCustomElement(class MapSearch extends HTMLElement {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.__attachShadow();
16
+ this.mapView = undefined;
17
+ this.popupEnabled = false;
18
+ this.resultGraphicEnabled = false;
19
+ this.searchConfiguration = undefined;
20
+ this.searchTerm = undefined;
21
+ this.searchWidget = undefined;
22
+ }
23
+ //--------------------------------------------------------------------------
24
+ //
25
+ // Watch handlers
26
+ //
27
+ //--------------------------------------------------------------------------
28
+ /**
29
+ * Called each time the searchConfiguration prop is changed.
30
+ *
31
+ * @returns Promise when complete
32
+ */
33
+ async watchSearchConfigurationHandler() {
34
+ this._initSearchWidget();
35
+ }
36
+ /**
37
+ * Called each time the mapView prop is changed.
38
+ *
39
+ * @returns Promise when complete
40
+ */
41
+ async mapViewWatchHandler() {
42
+ await this.mapView.when(() => {
43
+ this._initSearchWidget();
44
+ });
45
+ }
46
+ //--------------------------------------------------------------------------
47
+ //
48
+ // Methods (public)
49
+ //
50
+ //--------------------------------------------------------------------------
51
+ //--------------------------------------------------------------------------
52
+ //
53
+ // Events (public)
54
+ //
55
+ //--------------------------------------------------------------------------
56
+ //--------------------------------------------------------------------------
57
+ //
58
+ // Functions (lifecycle)
59
+ //
60
+ //--------------------------------------------------------------------------
61
+ /**
62
+ * StencilJS: Called once just after the component is first connected to the DOM.
63
+ */
64
+ async componentWillLoad() {
65
+ await this._initModules();
66
+ }
67
+ /**
68
+ * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
69
+ */
70
+ async componentDidLoad() {
71
+ return this._initSearchWidget();
72
+ }
73
+ /**
74
+ * Renders the component.
75
+ */
76
+ render() {
77
+ return (h(Host, null, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })));
78
+ }
79
+ //--------------------------------------------------------------------------
80
+ //
81
+ // Functions (protected)
82
+ //
83
+ //--------------------------------------------------------------------------
84
+ /**
85
+ * Load esri javascript api modules
86
+ *
87
+ * @returns Promise resolving when function is done
88
+ *
89
+ * @protected
90
+ */
91
+ async _initModules() {
92
+ const [Search, FeatureLayer] = await loadModules([
93
+ "esri/widgets/Search",
94
+ "esri/layers/FeatureLayer"
95
+ ]);
96
+ this.Search = Search;
97
+ this.FeatureLayer = FeatureLayer;
98
+ }
99
+ /**
100
+ * Initialize the search widget
101
+ *
102
+ * @protected
103
+ */
104
+ _initSearchWidget() {
105
+ if (this.mapView && this._searchElement && !this.searchWidget) {
106
+ let searchOptions = {
107
+ view: this.mapView,
108
+ container: this._searchElement,
109
+ searchTerm: this.searchTerm
110
+ };
111
+ if (this.searchConfiguration) {
112
+ const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
113
+ searchOptions = Object.assign({}, searchConfiguration);
114
+ }
115
+ this.searchWidget = new this.Search(searchOptions);
116
+ this.searchWidget.popupEnabled = this.popupEnabled;
117
+ this.searchWidget.resultGraphicEnabled = this.resultGraphicEnabled;
118
+ }
119
+ else {
120
+ if (this.searchWidget) {
121
+ this.searchWidget.view = this.mapView;
122
+ }
123
+ }
124
+ }
125
+ /**
126
+ * Initialize the search widget based on user defined configuration
127
+ *
128
+ * @param searchConfiguration search configuration defined by the user
129
+ * @param view the current map view
130
+ *
131
+ * @protected
132
+ */
133
+ _getSearchConfig(searchConfiguration, view) {
134
+ const INCLUDE_DEFAULT_SOURCES = "includeDefaultSources";
135
+ const sources = searchConfiguration.sources;
136
+ if ((sources === null || sources === void 0 ? void 0 : sources.length) > 0) {
137
+ searchConfiguration[INCLUDE_DEFAULT_SOURCES] = false;
138
+ sources.forEach((source) => {
139
+ var _a, _b;
140
+ const isLayerSource = source.hasOwnProperty("layer");
141
+ if (isLayerSource) {
142
+ const layerSource = source;
143
+ const layerId = (_a = layerSource.layer) === null || _a === void 0 ? void 0 : _a.id;
144
+ const layerFromMap = layerId ? view.map.findLayerById(layerId) : null;
145
+ const layerUrl = (_b = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _b === void 0 ? void 0 : _b.url;
146
+ if (layerFromMap) {
147
+ layerSource.layer = layerFromMap;
148
+ }
149
+ else if (layerUrl) {
150
+ layerSource.layer = new this.FeatureLayer(layerUrl);
151
+ }
152
+ }
153
+ });
154
+ sources === null || sources === void 0 ? void 0 : sources.forEach((source) => {
155
+ const isLocatorSource = source.hasOwnProperty("locator");
156
+ if (isLocatorSource) {
157
+ const locatorSource = source;
158
+ if ((locatorSource === null || locatorSource === void 0 ? void 0 : locatorSource.name) === "ArcGIS World Geocoding Service") {
159
+ const outFields = locatorSource.outFields || ["Addr_type", "Match_addr", "StAddr", "City"];
160
+ locatorSource.outFields = outFields;
161
+ locatorSource.singleLineFieldName = "SingleLine";
162
+ }
163
+ locatorSource.url = locatorSource.url;
164
+ delete locatorSource.url;
165
+ }
166
+ });
167
+ }
168
+ else {
169
+ searchConfiguration = Object.assign(Object.assign({}, searchConfiguration), { includeDefaultSources: true });
170
+ }
171
+ return searchConfiguration;
172
+ }
173
+ static get watchers() { return {
174
+ "searchConfiguration": ["watchSearchConfigurationHandler"],
175
+ "mapView": ["mapViewWatchHandler"]
176
+ }; }
177
+ static get style() { return mapSearchCss; }
178
+ }, [1, "map-search", {
179
+ "mapView": [16],
180
+ "popupEnabled": [4, "popup-enabled"],
181
+ "resultGraphicEnabled": [4, "result-graphic-enabled"],
182
+ "searchConfiguration": [16],
183
+ "searchTerm": [1, "search-term"],
184
+ "searchWidget": [16]
185
+ }]);
186
+ function defineCustomElement() {
187
+ if (typeof customElements === "undefined") {
188
+ return;
189
+ }
190
+ const components = ["map-search"];
191
+ components.forEach(tagName => { switch (tagName) {
192
+ case "map-search":
193
+ if (!customElements.get(tagName)) {
194
+ customElements.define(tagName, MapSearch);
195
+ }
196
+ break;
197
+ } });
198
+ }
199
+ defineCustomElement();
200
+
201
+ export { MapSearch as M, defineCustomElement as d };
@@ -948,5 +948,6 @@ function defineCustomElement() {
948
948
  break;
949
949
  } });
950
950
  }
951
+ defineCustomElement();
951
952
 
952
953
  export { MapSelectTools as M, defineCustomElement as d };
@@ -6,14 +6,16 @@
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 { b as EExpandType } from './interfaces.js';
9
- import { d as defineCustomElement$8 } from './action.js';
10
- import { d as defineCustomElement$7 } from './action-bar.js';
11
- import { d as defineCustomElement$6 } from './action-group.js';
12
- import { d as defineCustomElement$5 } from './action-menu.js';
13
- import { d as defineCustomElement$4 } from './icon.js';
14
- import { d as defineCustomElement$3 } from './loader.js';
15
- import { d as defineCustomElement$2 } from './popover.js';
16
- import { d as defineCustomElement$1 } from './tooltip.js';
9
+ import { d as defineCustomElement$a } from './basemap-gallery2.js';
10
+ import { d as defineCustomElement$9 } from './action.js';
11
+ import { d as defineCustomElement$8 } from './action-bar.js';
12
+ import { d as defineCustomElement$7 } from './action-group.js';
13
+ import { d as defineCustomElement$6 } from './action-menu.js';
14
+ import { d as defineCustomElement$5 } from './icon.js';
15
+ import { d as defineCustomElement$4 } from './loader.js';
16
+ import { d as defineCustomElement$3 } from './popover.js';
17
+ import { d as defineCustomElement$2 } from './tooltip.js';
18
+ import { d as defineCustomElement$1 } from './map-search2.js';
17
19
 
18
20
  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}";
19
21
 
@@ -25,9 +27,53 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
25
27
  this.expandMap = createEvent(this, "expandMap", 7);
26
28
  this.layout = "vertical";
27
29
  this.mapView = undefined;
30
+ this.searchConfiguration = undefined;
28
31
  this._translations = undefined;
29
32
  this._showTools = true;
30
- this._showBasemapPicker = false;
33
+ this._showBasemapWidget = false;
34
+ this._showSearchWidget = false;
35
+ }
36
+ //--------------------------------------------------------------------------
37
+ //
38
+ // Watch handlers
39
+ //
40
+ //--------------------------------------------------------------------------
41
+ /**
42
+ * Store the home extent when the map view changes
43
+ */
44
+ async mapViewWatchHandler() {
45
+ await this.mapView.when(() => {
46
+ this._homeExtent = this.mapView.extent;
47
+ });
48
+ }
49
+ /**
50
+ * When the _showBasemapWidget property is true display the basemap gallery
51
+ */
52
+ async _showBasemapWidgetWatchHandler(v) {
53
+ if (v) {
54
+ this.mapView.ui.add(this._basemapElement.basemapWidget, {
55
+ position: "top-right",
56
+ index: 1
57
+ });
58
+ }
59
+ else {
60
+ this.mapView.ui.remove(this._basemapElement.basemapWidget);
61
+ }
62
+ }
63
+ /**
64
+ * When the _showSearchWidget property is true display the search widget
65
+ */
66
+ async _showSearchWidgetWatchHandler(v) {
67
+ console.log("_showSearchWidget changed");
68
+ if (v) {
69
+ this.mapView.ui.add(this._searchElement.searchWidget, {
70
+ position: "top-right",
71
+ index: 1
72
+ });
73
+ }
74
+ else {
75
+ this.mapView.ui.remove(this._searchElement.searchWidget);
76
+ }
31
77
  }
32
78
  //--------------------------------------------------------------------------
33
79
  //
@@ -46,8 +92,15 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
46
92
  render() {
47
93
  const toggleIcon = this._showTools ? "chevrons-up" : "chevrons-down";
48
94
  const toolsClass = this._showTools ? "" : "display-none";
49
- return (h(Host, null, h("div", { class: "display-flex" }, 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, () => this._goHome()), this._getActionGroup("plus", false, this._translations.zoomIn, () => this._zoomIn()), this._getActionGroup("minus", false, this._translations.zoomOut, () => this._zoomOut()), this._getActionGroup("list", false, this._translations.list, () => this._showList()), 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())))));
95
+ const searchClass = this._showSearchWidget ? "" : "display-none";
96
+ const basemapClass = this._showBasemapWidget ? "" : "display-none";
97
+ 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("list", false, this._translations.list, () => this._showList()), 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 })));
50
98
  }
99
+ //--------------------------------------------------------------------------
100
+ //
101
+ // Functions (protected)
102
+ //
103
+ //--------------------------------------------------------------------------
51
104
  /**
52
105
  * Get a calcite action group for the current action
53
106
  *
@@ -63,9 +116,15 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
63
116
  _getActionGroup(icon, disabled, tip, func) {
64
117
  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))));
65
118
  }
66
- // Need to discuss this with the team
67
- _goHome() {
68
- alert("go home");
119
+ /**
120
+ * Go to the exent that was first used when loading the map
121
+ *
122
+ * @returns void
123
+ *
124
+ * @protected
125
+ */
126
+ async _goHome() {
127
+ await this.mapView.goTo(this._homeExtent);
69
128
  }
70
129
  // need to discuss this with the team
71
130
  _showList() {
@@ -73,15 +132,44 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
73
132
  }
74
133
  // Need to discuss this with the team
75
134
  _search() {
76
- alert("search");
135
+ this._showSearchWidget = !this._showSearchWidget;
136
+ this._showTools = false;
77
137
  }
78
- // Need to explore map fixed zoom in considerations
79
- _zoomIn() {
80
- alert("zoom in");
138
+ /**
139
+ * Fixed zoom in
140
+ *
141
+ * @returns void
142
+ *
143
+ * @protected
144
+ */
145
+ async _zoomIn() {
146
+ await this._zoom(this.mapView.zoom + 1);
147
+ }
148
+ /**
149
+ * Fixed zoom out
150
+ *
151
+ * @returns void
152
+ *
153
+ * @protected
154
+ */
155
+ async _zoomOut() {
156
+ await this._zoom(this.mapView.zoom - 1);
81
157
  }
82
- // Need to explore map fixed zoom out considerations
83
- _zoomOut() {
84
- alert("zoom out");
158
+ /**
159
+ * Zoom in/out at the maps current center point
160
+ *
161
+ * @param zoom Number to zoom level to go to
162
+ *
163
+ * @returns void
164
+ *
165
+ * @protected
166
+ */
167
+ async _zoom(zoom) {
168
+ var _a;
169
+ await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
170
+ target: this.mapView.center,
171
+ zoom
172
+ }));
85
173
  }
86
174
  /**
87
175
  * Show/Hide the basemap picker
@@ -91,7 +179,8 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
91
179
  * @protected
92
180
  */
93
181
  _toggleBasemapPicker() {
94
- this._showBasemapPicker = !this._showBasemapPicker;
182
+ this._showBasemapWidget = !this._showBasemapWidget;
183
+ this._showTools = false;
95
184
  }
96
185
  /**
97
186
  * Emit the expand map event
@@ -111,6 +200,10 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
111
200
  * @protected
112
201
  */
113
202
  _toggleTools() {
203
+ if (!this._showTools) {
204
+ this._showBasemapWidget = false;
205
+ this._showSearchWidget = false;
206
+ }
114
207
  this._showTools = !this._showTools;
115
208
  }
116
209
  /**
@@ -124,66 +217,84 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
124
217
  this._translations = messages[0];
125
218
  }
126
219
  get el() { return this; }
220
+ static get watchers() { return {
221
+ "mapView": ["mapViewWatchHandler"],
222
+ "_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
223
+ "_showSearchWidget": ["_showSearchWidgetWatchHandler"]
224
+ }; }
127
225
  static get style() { return mapToolsCss; }
128
226
  }, [1, "map-tools", {
129
227
  "layout": [1],
130
228
  "mapView": [16],
229
+ "searchConfiguration": [16],
131
230
  "_translations": [32],
132
231
  "_showTools": [32],
133
- "_showBasemapPicker": [32]
232
+ "_showBasemapWidget": [32],
233
+ "_showSearchWidget": [32]
134
234
  }]);
135
235
  function defineCustomElement() {
136
236
  if (typeof customElements === "undefined") {
137
237
  return;
138
238
  }
139
- const components = ["map-tools", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-icon", "calcite-loader", "calcite-popover", "calcite-tooltip"];
239
+ const components = ["map-tools", "basemap-gallery", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-icon", "calcite-loader", "calcite-popover", "calcite-tooltip", "map-search"];
140
240
  components.forEach(tagName => { switch (tagName) {
141
241
  case "map-tools":
142
242
  if (!customElements.get(tagName)) {
143
243
  customElements.define(tagName, MapTools);
144
244
  }
145
245
  break;
246
+ case "basemap-gallery":
247
+ if (!customElements.get(tagName)) {
248
+ defineCustomElement$a();
249
+ }
250
+ break;
146
251
  case "calcite-action":
147
252
  if (!customElements.get(tagName)) {
148
- defineCustomElement$8();
253
+ defineCustomElement$9();
149
254
  }
150
255
  break;
151
256
  case "calcite-action-bar":
152
257
  if (!customElements.get(tagName)) {
153
- defineCustomElement$7();
258
+ defineCustomElement$8();
154
259
  }
155
260
  break;
156
261
  case "calcite-action-group":
157
262
  if (!customElements.get(tagName)) {
158
- defineCustomElement$6();
263
+ defineCustomElement$7();
159
264
  }
160
265
  break;
161
266
  case "calcite-action-menu":
162
267
  if (!customElements.get(tagName)) {
163
- defineCustomElement$5();
268
+ defineCustomElement$6();
164
269
  }
165
270
  break;
166
271
  case "calcite-icon":
167
272
  if (!customElements.get(tagName)) {
168
- defineCustomElement$4();
273
+ defineCustomElement$5();
169
274
  }
170
275
  break;
171
276
  case "calcite-loader":
172
277
  if (!customElements.get(tagName)) {
173
- defineCustomElement$3();
278
+ defineCustomElement$4();
174
279
  }
175
280
  break;
176
281
  case "calcite-popover":
177
282
  if (!customElements.get(tagName)) {
178
- defineCustomElement$2();
283
+ defineCustomElement$3();
179
284
  }
180
285
  break;
181
286
  case "calcite-tooltip":
287
+ if (!customElements.get(tagName)) {
288
+ defineCustomElement$2();
289
+ }
290
+ break;
291
+ case "map-search":
182
292
  if (!customElements.get(tagName)) {
183
293
  defineCustomElement$1();
184
294
  }
185
295
  break;
186
296
  } });
187
297
  }
298
+ defineCustomElement();
188
299
 
189
300
  export { MapTools as M, defineCustomElement as d };
@@ -255,5 +255,6 @@ function defineCustomElement() {
255
255
  break;
256
256
  } });
257
257
  }
258
+ defineCustomElement();
258
259
 
259
260
  export { CalciteMenu as C, defineCustomElement as d };
@@ -161,5 +161,6 @@ function defineCustomElement() {
161
161
  break;
162
162
  } });
163
163
  }
164
+ defineCustomElement();
164
165
 
165
166
  export { Notice as N, defineCustomElement as d };
@@ -99,5 +99,6 @@ function defineCustomElement() {
99
99
  break;
100
100
  } });
101
101
  }
102
+ defineCustomElement();
102
103
 
103
104
  export { Option as O, defineCustomElement as d };
@@ -366,5 +366,6 @@ function defineCustomElement() {
366
366
  break;
367
367
  } });
368
368
  }
369
+ defineCustomElement();
369
370
 
370
371
  export { Panel as P, SLOTS as S, defineCustomElement as d };
@@ -185,6 +185,7 @@ function defineCustomElement$1() {
185
185
  break;
186
186
  } });
187
187
  }
188
+ defineCustomElement$1();
188
189
 
189
190
  const PciCalculator = PciCalculator$1;
190
191
  const defineCustomElement = defineCustomElement$1;
@@ -383,5 +383,6 @@ function defineCustomElement() {
383
383
  break;
384
384
  } });
385
385
  }
386
+ defineCustomElement();
386
387
 
387
388
  export { PdfDownload as P, defineCustomElement as d };
@@ -263,5 +263,6 @@ function defineCustomElement() {
263
263
  break;
264
264
  } });
265
265
  }
266
+ defineCustomElement();
266
267
 
267
268
  export { CSS as C, PickListItem as P, SLOTS as S, defineCustomElement as d };
@@ -473,5 +473,6 @@ function defineCustomElement() {
473
473
  break;
474
474
  } });
475
475
  }
476
+ defineCustomElement();
476
477
 
477
478
  export { Popover as P, defineCustomElement as d };
@@ -53,5 +53,6 @@ function defineCustomElement() {
53
53
  break;
54
54
  } });
55
55
  }
56
+ defineCustomElement();
56
57
 
57
58
  export { Progress as P, defineCustomElement as d };
@@ -1153,6 +1153,7 @@ function defineCustomElement$1() {
1153
1153
  break;
1154
1154
  } });
1155
1155
  }
1156
+ defineCustomElement$1();
1156
1157
 
1157
1158
  const PublicNotification = PublicNotification$1;
1158
1159
  const defineCustomElement = defineCustomElement$1;
@@ -580,5 +580,6 @@ function defineCustomElement() {
580
580
  break;
581
581
  } });
582
582
  }
583
+ defineCustomElement();
583
584
 
584
585
  export { RefineSelection as R, defineCustomElement as d };
@@ -141,5 +141,6 @@ function defineCustomElement() {
141
141
  break;
142
142
  } });
143
143
  }
144
+ defineCustomElement();
144
145
 
145
146
  export { Scrim as S, defineCustomElement as d };
@@ -82,5 +82,6 @@ function defineCustomElement() {
82
82
  break;
83
83
  } });
84
84
  }
85
+ defineCustomElement();
85
86
 
86
87
  export { SegmentedControlItem as S, defineCustomElement as d };
@@ -223,5 +223,6 @@ function defineCustomElement() {
223
223
  break;
224
224
  } });
225
225
  }
226
+ defineCustomElement();
226
227
 
227
228
  export { SegmentedControl as S, defineCustomElement as d };
@@ -249,5 +249,6 @@ function defineCustomElement() {
249
249
  break;
250
250
  } });
251
251
  }
252
+ defineCustomElement();
252
253
 
253
254
  export { Select as S, defineCustomElement as d };
@@ -428,5 +428,6 @@ function defineCustomElement() {
428
428
  break;
429
429
  } });
430
430
  }
431
+ defineCustomElement();
431
432
 
432
433
  export { ShellPanel as S, defineCustomElement as d };
@@ -153,5 +153,6 @@ function defineCustomElement() {
153
153
  break;
154
154
  } });
155
155
  }
156
+ defineCustomElement();
156
157
 
157
158
  export { Shell as S, defineCustomElement as d };
@@ -927,5 +927,6 @@ function defineCustomElement() {
927
927
  break;
928
928
  } });
929
929
  }
930
+ defineCustomElement();
930
931
 
931
932
  export { Slider as S, defineCustomElement as d };
@@ -2225,6 +2225,7 @@ function defineCustomElement$1() {
2225
2225
  break;
2226
2226
  } });
2227
2227
  }
2228
+ defineCustomElement$1();
2228
2229
 
2229
2230
  const SolutionConfiguration = SolutionConfiguration$1;
2230
2231
  const defineCustomElement = defineCustomElement$1;
@@ -123,5 +123,6 @@ function defineCustomElement() {
123
123
  break;
124
124
  } });
125
125
  }
126
+ defineCustomElement();
126
127
 
127
128
  export { SolutionContents as S, defineCustomElement as d };
@@ -229,5 +229,6 @@ function defineCustomElement() {
229
229
  break;
230
230
  } });
231
231
  }
232
+ defineCustomElement();
232
233
 
233
234
  export { SolutionItemDetails as S, defineCustomElement as d };
@@ -337,5 +337,6 @@ function defineCustomElement() {
337
337
  break;
338
338
  } });
339
339
  }
340
+ defineCustomElement();
340
341
 
341
342
  export { SolutionItemIcon as S, defineCustomElement as d };