@esri/solutions-components 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  2. package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  3. package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  4. package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  5. package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
  6. package/dist/assets/data/images/grid.png +0 -0
  7. package/dist/assets/data/images/horizontal.png +0 -0
  8. package/dist/assets/data/images/vertical.png +0 -0
  9. package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
  10. package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
  11. package/dist/cjs/buffer-tools_6.cjs.entry.js +85 -85
  12. package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
  13. package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
  14. package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +187 -61
  15. package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
  16. package/dist/cjs/calcite-input-message_5.cjs.entry.js +283 -283
  17. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  18. package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
  19. package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
  20. package/dist/cjs/{downloadUtils-b85476e8.js → downloadUtils-9359e9ff.js} +1218 -1127
  21. package/dist/cjs/{index.es-3ba50626.js → index.es-9c0d0ed6.js} +10682 -10682
  22. package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
  23. package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
  24. package/dist/cjs/loader.cjs.js +30 -30
  25. package/dist/cjs/{mapViewUtils-df63bfa4.js → mapViewUtils-090f4d4d.js} +24 -24
  26. package/dist/cjs/public-notification.cjs.entry.js +69 -49
  27. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  28. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  29. package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +31 -31
  31. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  32. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  33. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  34. package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  35. package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
  37. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
  38. package/dist/collection/components/layer-table/layer-table.css +2 -70
  39. package/dist/collection/components/layer-table/layer-table.js +66 -106
  40. package/dist/collection/components/map-card/map-card.css +4 -7
  41. package/dist/collection/components/map-card/map-card.js +44 -10
  42. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  43. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  44. package/dist/collection/components/public-notification/public-notification.js +45 -27
  45. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
  46. package/dist/collection/demos/crowdsource-manager.html +14 -41
  47. package/dist/collection/utils/csvDownload.js +41 -0
  48. package/dist/collection/utils/csvDownload.ts +42 -0
  49. package/dist/collection/utils/csvUtils.js +6 -23
  50. package/dist/collection/utils/csvUtils.ts +8 -27
  51. package/dist/collection/utils/downloadUtils.js +30 -14
  52. package/dist/collection/utils/downloadUtils.ts +36 -14
  53. package/dist/collection/utils/interfaces.js +6 -0
  54. package/dist/collection/utils/interfaces.ts +6 -0
  55. package/dist/collection/utils/pdfUtils.js +9 -6
  56. package/dist/collection/utils/pdfUtils.ts +13 -8
  57. package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
  58. package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
  59. package/dist/components/crowdsource-manager.js +293 -17
  60. package/dist/components/downloadUtils.js +133 -42
  61. package/dist/components/interfaces3.js +7 -1
  62. package/dist/components/layer-table.js +1 -443
  63. package/dist/components/layer-table2.js +429 -0
  64. package/dist/components/map-card.js +1 -339
  65. package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
  66. package/dist/components/map-draw-tools2.js +16 -16
  67. package/dist/components/map-layer-picker2.js +1 -1
  68. package/dist/components/map-select-tools2.js +38 -38
  69. package/dist/components/public-notification.js +102 -82
  70. package/dist/components/queryUtils.js +10 -10
  71. package/dist/components/refine-selection-tools2.js +3 -3
  72. package/dist/components/refine-selection2.js +1 -1
  73. package/dist/components/solution-resource-item2.js +1 -1
  74. package/dist/components/solution-store.js +1 -1
  75. package/dist/esm/buffer-tools_6.entry.js +76 -76
  76. package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
  77. package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
  78. package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +181 -56
  79. package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
  80. package/dist/esm/calcite-input-message_5.entry.js +275 -275
  81. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  82. package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
  83. package/dist/esm/crowdsource-manager.entry.js +88 -14
  84. package/dist/esm/{downloadUtils-f278742f.js → downloadUtils-a8f139c5.js} +1214 -1123
  85. package/dist/esm/{index.es-6f3a1143.js → index.es-a75412ff.js} +10596 -10596
  86. package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
  87. package/dist/esm/layer-table_2.entry.js +507 -0
  88. package/dist/esm/loader.js +26 -26
  89. package/dist/esm/{mapViewUtils-bd1809f0.js → mapViewUtils-8ffcd36d.js} +12 -12
  90. package/dist/esm/public-notification.entry.js +65 -45
  91. package/dist/esm/solution-configuration.entry.js +2 -2
  92. package/dist/esm/solution-contents_3.entry.js +2 -2
  93. package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
  94. package/dist/esm/solutions-components.js +26 -26
  95. package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
  96. package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
  97. package/dist/solutions-components/{p-cbac29fb.entry.js → p-1affd711.entry.js} +18 -18
  98. package/dist/solutions-components/p-30de8da1.entry.js +17 -0
  99. package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
  100. package/dist/solutions-components/{p-03e2c6fd.js → p-765a27f3.js} +60 -60
  101. package/dist/solutions-components/p-813a04c3.entry.js +6 -0
  102. package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
  103. package/dist/solutions-components/p-8cece97f.js +21 -0
  104. package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
  105. package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
  106. package/dist/solutions-components/{p-40c12650.js → p-bb64bd47.js} +453 -437
  107. package/dist/solutions-components/{p-70e1d4d8.entry.js → p-c392dd95.entry.js} +17 -17
  108. package/dist/solutions-components/p-ca386a72.entry.js +6 -0
  109. package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
  110. package/dist/solutions-components/p-db846ee2.entry.js +11 -0
  111. package/dist/solutions-components/{p-88e5a76d.js → p-dc53c9c1.js} +36 -36
  112. package/dist/solutions-components/p-e1c93241.entry.js +6 -0
  113. package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
  114. package/dist/solutions-components/solutions-components.esm.js +6 -6
  115. package/dist/solutions-components/utils/csvDownload.ts +42 -0
  116. package/dist/solutions-components/utils/csvUtils.ts +8 -27
  117. package/dist/solutions-components/utils/downloadUtils.ts +36 -14
  118. package/dist/solutions-components/utils/interfaces.ts +6 -0
  119. package/dist/solutions-components/utils/pdfUtils.ts +13 -8
  120. package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
  121. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
  122. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
  123. package/dist/types/components/layer-table/layer-table.d.ts +35 -48
  124. package/dist/types/components/map-card/map-card.d.ts +10 -6
  125. package/dist/types/components/public-notification/public-notification.d.ts +18 -6
  126. package/dist/types/components.d.ts +1621 -1601
  127. package/dist/types/preact.d.ts +2 -1
  128. package/dist/types/utils/csvDownload.d.ts +24 -0
  129. package/dist/types/utils/csvUtils.d.ts +2 -1
  130. package/dist/types/utils/downloadUtils.d.ts +25 -0
  131. package/dist/types/utils/interfaces.d.ts +5 -0
  132. package/dist/types/utils/pdfUtils.d.ts +2 -1
  133. package/package.json +4 -4
  134. package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
  135. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
  136. package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
  137. package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
  138. package/dist/cjs/layer-table.cjs.entry.js +0 -317
  139. package/dist/cjs/map-card.cjs.entry.js +0 -252
  140. package/dist/esm/calcite-chip.entry.js +0 -138
  141. package/dist/esm/calcite-dropdown.entry.js +0 -477
  142. package/dist/esm/calcite-handle.entry.js +0 -95
  143. package/dist/esm/calcite-loader.entry.js +0 -91
  144. package/dist/esm/layer-table.entry.js +0 -313
  145. package/dist/solutions-components/p-045d3988.entry.js +0 -12
  146. package/dist/solutions-components/p-11132485.entry.js +0 -11
  147. package/dist/solutions-components/p-15b43c29.entry.js +0 -11
  148. package/dist/solutions-components/p-5034aabc.entry.js +0 -11
  149. package/dist/solutions-components/p-6f012424.entry.js +0 -6
  150. package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
  151. package/dist/solutions-components/p-a57ef371.entry.js +0 -6
  152. package/dist/solutions-components/p-bc39f296.entry.js +0 -6
  153. package/dist/solutions-components/p-c93d8e80.entry.js +0 -6
  154. package/dist/solutions-components/p-dbc9a5a8.js +0 -21
  155. package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
  156. package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -3,345 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
- import { l as loadModules } from './loadModules.js';
8
- import { g as getLocaleComponentStrings } from './locale.js';
9
- import { E as EExpandType } from './interfaces3.js';
10
- import { d as defineCustomElement$e } from './action.js';
11
- import { d as defineCustomElement$d } from './action-bar.js';
12
- import { d as defineCustomElement$c } from './action-group.js';
13
- import { d as defineCustomElement$b } from './action-menu.js';
14
- import { d as defineCustomElement$a } from './block.js';
15
- import { d as defineCustomElement$9 } from './handle.js';
16
- import { d as defineCustomElement$8 } from './icon.js';
17
- import { d as defineCustomElement$7 } from './loader.js';
18
- import { d as defineCustomElement$6 } from './pick-list.js';
19
- import { d as defineCustomElement$5 } from './pick-list-item.js';
20
- import { d as defineCustomElement$4 } from './popover.js';
21
- import { d as defineCustomElement$3 } from './scrim.js';
22
- import { d as defineCustomElement$2 } from './tooltip.js';
23
-
24
- const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.action-bar-size{height:3.5rem;width:100%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.width-1-7{width:14.28%}.width-1-6{width:16.66%}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.block-button{border-bottom:0}.block-button:hover{background-color:var(--calcite-ui-foreground-2)}.block-button:active{background-color:var(--calcite-ui-foreground-3)}.map-view{padding:0;margin:0;height:100%;width:100%}.map-list{position:absolute;inset:3.5rem 0 0 0;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}.map-height{height:calc(100% - 58px)}.display-none{display:none}.esri-zoom{display:none !important}";
25
-
26
- const MapCard$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
27
- constructor() {
28
- super();
29
- this.__registerHost();
30
- this.expandMap = createEvent(this, "expandMap", 7);
31
- /**
32
- * string: the id of map currently displayed
33
- */
34
- this._loadedId = "";
35
- /**
36
- * string: the id of the container div for the map
37
- */
38
- this._mapDivId = "map-div";
39
- this.mapInfos = [];
40
- this._mapListExpanded = false;
41
- this._mapView = undefined;
42
- this._translations = undefined;
43
- this._webMapId = "";
44
- }
45
- //--------------------------------------------------------------------------
46
- //
47
- // Watch handlers
48
- //
49
- //--------------------------------------------------------------------------
50
- /**
51
- * Called each time the _webMapId prop is changed.
52
- */
53
- _webMapIdWatchHandler(v, oldV) {
54
- if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
55
- this._loadMap(v);
56
- }
57
- }
58
- /**
59
- * Called each time the mapInfos prop is changed.
60
- */
61
- mapInfosWatchHandler(v, oldV) {
62
- if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
63
- this._loadMap(v[0].id);
64
- }
65
- }
66
- //--------------------------------------------------------------------------
67
- //
68
- // Functions (lifecycle)
69
- //
70
- //--------------------------------------------------------------------------
71
- /**
72
- * StencilJS: Called once just after the component is first connected to the DOM.
73
- */
74
- async componentWillLoad() {
75
- await this._getTranslations();
76
- await this._initModules();
77
- }
78
- /**
79
- * StencilJS: Called after every render.
80
- */
81
- componentDidRender() {
82
- // the container node for the map view needs to exist before the view is created
83
- this._loadMap(this._webMapId);
84
- }
85
- /**
86
- * Renders the component.
87
- */
88
- render() {
89
- return (h(Host, null, this._getToolbar(), this._getMapNameList(this._mapListExpanded), h("div", { class: "map-height", id: this._mapDivId })));
90
- }
91
- //--------------------------------------------------------------------------
92
- //
93
- // Functions (protected)
94
- //
95
- //--------------------------------------------------------------------------
96
- /**
97
- * Load esri javascript api modules
98
- *
99
- * @returns Promise resolving when function is done
100
- *
101
- * @protected
102
- */
103
- async _initModules() {
104
- const [WebMap, MapView] = await loadModules([
105
- "esri/WebMap",
106
- "esri/views/MapView"
107
- ]);
108
- this.WebMap = WebMap;
109
- this.MapView = MapView;
110
- }
111
- /**
112
- * Create the toolbar (controls used for map and app interactions)
113
- *
114
- * @returns The dom node with the toolbar
115
- *
116
- * @protected
117
- */
118
- _getToolbar() {
119
- 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(), this._getActionGroup("home", false, this._translations.home, () => this._goHome()), this._getActionGroup("list", false, this._translations.list, () => this._showList()), this._getActionGroup("magnifying-glass-plus", false, this._translations.search, () => this._search()), this._getActionGroup("plus", false, this._translations.zoomIn, () => this._zoomIn()), this._getActionGroup("minus", false, this._translations.zoomOut, () => this._zoomOut()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()))));
120
- }
121
- /**
122
- * Load the webmap for the provided id
123
- *
124
- * @param id the webmap id to load
125
- *
126
- * @returns void
127
- *
128
- * @protected
129
- */
130
- _loadMap(id) {
131
- // on the first render use the first child of the provided mapInfos
132
- if (id === "" && this.mapInfos.length > 0) {
133
- id = this.mapInfos[0].id;
134
- }
135
- if (this._loadedId !== id) {
136
- const webMap = new this.WebMap({
137
- portalItem: { id }
138
- });
139
- this._mapView = new this.MapView({
140
- container: this._mapDivId,
141
- map: webMap,
142
- // TODO consider this more...seems to cause less overflow issues when the component is resized
143
- resizeAlign: "top-left"
144
- });
145
- this._loadedId = id;
146
- }
147
- }
148
- /**
149
- * Get a calcite action group for the current action
150
- *
151
- * @param icon the icon to display for the current action
152
- * @param disabled should the action be disabled
153
- * @param tip information tip to display helpful details to end user
154
- * @param func the associated onClick function to execute
155
- *
156
- * @returns the dom node for the action group
157
- *
158
- * @protected
159
- */
160
- _getActionGroup(icon, disabled, tip, func) {
161
- return (h("calcite-action-group", { class: "action-center width-1-6", layout: "horizontal" }, h("calcite-action", { alignment: "center", class: "width-full height-full", 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))));
162
- }
163
- /**
164
- * Get a calcite action group for the map list
165
- * Actions do not support multiple icons so this uses a block
166
- *
167
- * @returns the dom node for the action group
168
- *
169
- * @protected
170
- */
171
- _getMapPicker() {
172
- const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
173
- return (h("calcite-action-group", { class: "action-center width-1-6", layout: "horizontal" }, h("calcite-block", { class: "action-center block-button width-full height-full", heading: '', onClick: () => this._chooseMap() }, h("calcite-icon", { icon: "map", scale: "s", slot: "icon" }), h("calcite-icon", { icon: mapListIcon, scale: "s", slot: "icon" }), h("calcite-tooltip", { label: "", placement: "bottom" }, h("span", null, this._translations.mapName)))));
174
- }
175
- /**
176
- * Get a pick list for all maps in mapInfos
177
- *
178
- * @param show boolean to indicate if the list should be shown or hidden
179
- *
180
- * @returns the dom node for the list of maps
181
- *
182
- * @protected
183
- */
184
- _getMapNameList(show) {
185
- const listClass = show ? "map-list" : "display-none";
186
- return (h("div", { class: listClass }, h("calcite-pick-list", { id: "mapList" }, this.mapInfos.map(mapInfo => {
187
- return (h("calcite-pick-list-item", { label: mapInfo.name, onClick: () => this._webMapSelected(mapInfo.id), selected: mapInfo.id === this._loadedId, value: mapInfo.id }));
188
- }))));
189
- }
190
- /**
191
- * Fired when the user clicks on the map list
192
- *
193
- * @param id the web map id selected from the list
194
- *
195
- * @returns void
196
- *
197
- * @protected
198
- */
199
- _webMapSelected(id) {
200
- this._mapListExpanded = false;
201
- this._webMapId = id;
202
- }
203
- /**
204
- * Toggles the open/close state of the map list
205
- *
206
- * @returns the dom node for the action group
207
- *
208
- * @protected
209
- */
210
- _chooseMap() {
211
- this._mapListExpanded = !this._mapListExpanded;
212
- }
213
- // Need to discuss this with the team
214
- _goHome() {
215
- alert("go home");
216
- }
217
- // need to discuss this with the team
218
- _showList() {
219
- alert("show list");
220
- }
221
- // Need to discuss this with the team
222
- _search() {
223
- alert("search");
224
- }
225
- // Need to explore map fixed zoom in considerations
226
- _zoomIn() {
227
- alert("zoom in");
228
- }
229
- // Need to explore map fixed zoom out considerations
230
- _zoomOut() {
231
- alert("zoom out");
232
- }
233
- /**
234
- * Emit the expand map event
235
- *
236
- * @returns void
237
- *
238
- * @protected
239
- */
240
- _expand() {
241
- this.expandMap.emit(EExpandType.EXPAND);
242
- }
243
- /**
244
- * Fetches the component's translations
245
- *
246
- * @returns Promise when complete
247
- * @protected
248
- */
249
- async _getTranslations() {
250
- const messages = await getLocaleComponentStrings(this.el);
251
- this._translations = messages[0];
252
- }
253
- get el() { return this; }
254
- static get watchers() { return {
255
- "_webMapId": ["_webMapIdWatchHandler"],
256
- "mapInfos": ["mapInfosWatchHandler"]
257
- }; }
258
- static get style() { return mapCardCss; }
259
- }, [0, "map-card", {
260
- "mapInfos": [16],
261
- "_mapListExpanded": [32],
262
- "_mapView": [32],
263
- "_translations": [32],
264
- "_webMapId": [32]
265
- }]);
266
- function defineCustomElement$1() {
267
- if (typeof customElements === "undefined") {
268
- return;
269
- }
270
- const components = ["map-card", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-block", "calcite-handle", "calcite-icon", "calcite-loader", "calcite-pick-list", "calcite-pick-list-item", "calcite-popover", "calcite-scrim", "calcite-tooltip"];
271
- components.forEach(tagName => { switch (tagName) {
272
- case "map-card":
273
- if (!customElements.get(tagName)) {
274
- customElements.define(tagName, MapCard$1);
275
- }
276
- break;
277
- case "calcite-action":
278
- if (!customElements.get(tagName)) {
279
- defineCustomElement$e();
280
- }
281
- break;
282
- case "calcite-action-bar":
283
- if (!customElements.get(tagName)) {
284
- defineCustomElement$d();
285
- }
286
- break;
287
- case "calcite-action-group":
288
- if (!customElements.get(tagName)) {
289
- defineCustomElement$c();
290
- }
291
- break;
292
- case "calcite-action-menu":
293
- if (!customElements.get(tagName)) {
294
- defineCustomElement$b();
295
- }
296
- break;
297
- case "calcite-block":
298
- if (!customElements.get(tagName)) {
299
- defineCustomElement$a();
300
- }
301
- break;
302
- case "calcite-handle":
303
- if (!customElements.get(tagName)) {
304
- defineCustomElement$9();
305
- }
306
- break;
307
- case "calcite-icon":
308
- if (!customElements.get(tagName)) {
309
- defineCustomElement$8();
310
- }
311
- break;
312
- case "calcite-loader":
313
- if (!customElements.get(tagName)) {
314
- defineCustomElement$7();
315
- }
316
- break;
317
- case "calcite-pick-list":
318
- if (!customElements.get(tagName)) {
319
- defineCustomElement$6();
320
- }
321
- break;
322
- case "calcite-pick-list-item":
323
- if (!customElements.get(tagName)) {
324
- defineCustomElement$5();
325
- }
326
- break;
327
- case "calcite-popover":
328
- if (!customElements.get(tagName)) {
329
- defineCustomElement$4();
330
- }
331
- break;
332
- case "calcite-scrim":
333
- if (!customElements.get(tagName)) {
334
- defineCustomElement$3();
335
- }
336
- break;
337
- case "calcite-tooltip":
338
- if (!customElements.get(tagName)) {
339
- defineCustomElement$2();
340
- }
341
- break;
342
- } });
343
- }
344
- defineCustomElement$1();
6
+ import { M as MapCard$1, d as defineCustomElement$1 } from './map-card2.js';
345
7
 
346
8
  const MapCard = MapCard$1;
347
9
  const defineCustomElement = defineCustomElement$1;
@@ -3,29 +3,39 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
7
- import { l as loadModules } from './loadModules-b299cd43.js';
8
- import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
9
- import { a as EExpandType } from './interfaces-d0d83efa.js';
10
- import './_commonjsHelpers-d5f9d613.js';
6
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
+ import { l as loadModules } from './loadModules.js';
8
+ import { g as getLocaleComponentStrings } from './locale.js';
9
+ import { e as EExpandType } from './interfaces3.js';
10
+ import { d as defineCustomElement$d } from './action.js';
11
+ import { d as defineCustomElement$c } from './action-bar.js';
12
+ import { d as defineCustomElement$b } from './action-group.js';
13
+ import { d as defineCustomElement$a } from './action-menu.js';
14
+ import { d as defineCustomElement$9 } from './block.js';
15
+ import { d as defineCustomElement$8 } from './handle.js';
16
+ import { d as defineCustomElement$7 } from './icon.js';
17
+ import { d as defineCustomElement$6 } from './loader.js';
18
+ import { d as defineCustomElement$5 } from './pick-list.js';
19
+ import { d as defineCustomElement$4 } from './pick-list-item.js';
20
+ import { d as defineCustomElement$3 } from './popover.js';
21
+ import { d as defineCustomElement$2 } from './scrim.js';
22
+ import { d as defineCustomElement$1 } from './tooltip.js';
11
23
 
12
- const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.action-bar-size{height:3.5rem;width:100%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.width-1-7{width:14.28%}.width-1-6{width:16.66%}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.block-button{border-bottom:0}.block-button:hover{background-color:var(--calcite-ui-foreground-2)}.block-button:active{background-color:var(--calcite-ui-foreground-3)}.map-view{padding:0;margin:0;height:100%;width:100%}.map-list{position:absolute;inset:3.5rem 0 0 0;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}.map-height{height:calc(100% - 58px)}.display-none{display:none}.esri-zoom{display:none !important}";
24
+ const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.action-bar-size{height:3.5rem;width:100%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.width-1-7{width:14.28%}.width-1-6{width:16.66%}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.display-grid{display:inline-grid}.block-button{border-bottom:0}.block-button:hover{background-color:var(--calcite-ui-foreground-2)}.block-button:active{background-color:var(--calcite-ui-foreground-3)}.map-list{position:absolute;inset:3.5rem 0 0 0;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}.map-height{height:calc(100% - 58px)}.display-none{display:none}.esri-zoom{display:none !important}";
13
25
 
14
- const MapCard = class {
15
- constructor(hostRef) {
16
- registerInstance(this, hostRef);
26
+ const MapCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
27
+ constructor() {
28
+ super();
29
+ this.__registerHost();
17
30
  this.expandMap = createEvent(this, "expandMap", 7);
31
+ this.mapChanged = createEvent(this, "mapChanged", 7);
18
32
  /**
19
33
  * string: the id of map currently displayed
20
34
  */
21
35
  this._loadedId = "";
22
- /**
23
- * string: the id of the container div for the map
24
- */
25
- this._mapDivId = "map-div";
26
36
  this.mapInfos = [];
37
+ this.mapView = undefined;
27
38
  this._mapListExpanded = false;
28
- this._mapView = undefined;
29
39
  this._translations = undefined;
30
40
  this._webMapId = "";
31
41
  }
@@ -73,7 +83,7 @@ const MapCard = class {
73
83
  * Renders the component.
74
84
  */
75
85
  render() {
76
- return (h(Host, null, this._getToolbar(), this._getMapNameList(this._mapListExpanded), h("div", { class: "map-height", id: this._mapDivId })));
86
+ return (h(Host, null, this._getToolbar(), this._getMapNameList(this._mapListExpanded), h("div", { class: "map-height", ref: (el) => (this._mapDiv = el) })));
77
87
  }
78
88
  //--------------------------------------------------------------------------
79
89
  //
@@ -123,13 +133,14 @@ const MapCard = class {
123
133
  const webMap = new this.WebMap({
124
134
  portalItem: { id }
125
135
  });
126
- this._mapView = new this.MapView({
127
- container: this._mapDivId,
136
+ this.mapView = new this.MapView({
137
+ container: this._mapDiv,
128
138
  map: webMap,
129
139
  // TODO consider this more...seems to cause less overflow issues when the component is resized
130
140
  resizeAlign: "top-left"
131
141
  });
132
142
  this._loadedId = id;
143
+ this.mapChanged.emit(this.mapView);
133
144
  }
134
145
  }
135
146
  /**
@@ -157,7 +168,7 @@ const MapCard = class {
157
168
  */
158
169
  _getMapPicker() {
159
170
  const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
160
- return (h("calcite-action-group", { class: "action-center width-1-6", layout: "horizontal" }, h("calcite-block", { class: "action-center block-button width-full height-full", heading: '', onClick: () => this._chooseMap() }, h("calcite-icon", { icon: "map", scale: "s", slot: "icon" }), h("calcite-icon", { icon: mapListIcon, scale: "s", slot: "icon" }), h("calcite-tooltip", { label: "", placement: "bottom" }, h("span", null, this._translations.mapName)))));
171
+ return (h("calcite-action-group", { class: "action-center width-1-6", layout: "horizontal" }, h("calcite-block", { class: "action-center block-button width-full height-full display-grid", heading: '', onClick: () => this._chooseMap() }, h("calcite-icon", { icon: "map", scale: "s", slot: "icon" }), h("calcite-icon", { icon: mapListIcon, scale: "s", slot: "icon" }), h("calcite-tooltip", { label: "", placement: "bottom" }, h("span", null, this._translations.mapName)))));
161
172
  }
162
173
  /**
163
174
  * Get a pick list for all maps in mapInfos
@@ -237,12 +248,97 @@ const MapCard = class {
237
248
  const messages = await getLocaleComponentStrings(this.el);
238
249
  this._translations = messages[0];
239
250
  }
240
- get el() { return getElement(this); }
251
+ get el() { return this; }
241
252
  static get watchers() { return {
242
253
  "_webMapId": ["_webMapIdWatchHandler"],
243
254
  "mapInfos": ["mapInfosWatchHandler"]
244
255
  }; }
245
- };
246
- MapCard.style = mapCardCss;
256
+ static get style() { return mapCardCss; }
257
+ }, [0, "map-card", {
258
+ "mapInfos": [16],
259
+ "mapView": [16],
260
+ "_mapListExpanded": [32],
261
+ "_translations": [32],
262
+ "_webMapId": [32]
263
+ }]);
264
+ function defineCustomElement() {
265
+ if (typeof customElements === "undefined") {
266
+ return;
267
+ }
268
+ const components = ["map-card", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-block", "calcite-handle", "calcite-icon", "calcite-loader", "calcite-pick-list", "calcite-pick-list-item", "calcite-popover", "calcite-scrim", "calcite-tooltip"];
269
+ components.forEach(tagName => { switch (tagName) {
270
+ case "map-card":
271
+ if (!customElements.get(tagName)) {
272
+ customElements.define(tagName, MapCard);
273
+ }
274
+ break;
275
+ case "calcite-action":
276
+ if (!customElements.get(tagName)) {
277
+ defineCustomElement$d();
278
+ }
279
+ break;
280
+ case "calcite-action-bar":
281
+ if (!customElements.get(tagName)) {
282
+ defineCustomElement$c();
283
+ }
284
+ break;
285
+ case "calcite-action-group":
286
+ if (!customElements.get(tagName)) {
287
+ defineCustomElement$b();
288
+ }
289
+ break;
290
+ case "calcite-action-menu":
291
+ if (!customElements.get(tagName)) {
292
+ defineCustomElement$a();
293
+ }
294
+ break;
295
+ case "calcite-block":
296
+ if (!customElements.get(tagName)) {
297
+ defineCustomElement$9();
298
+ }
299
+ break;
300
+ case "calcite-handle":
301
+ if (!customElements.get(tagName)) {
302
+ defineCustomElement$8();
303
+ }
304
+ break;
305
+ case "calcite-icon":
306
+ if (!customElements.get(tagName)) {
307
+ defineCustomElement$7();
308
+ }
309
+ break;
310
+ case "calcite-loader":
311
+ if (!customElements.get(tagName)) {
312
+ defineCustomElement$6();
313
+ }
314
+ break;
315
+ case "calcite-pick-list":
316
+ if (!customElements.get(tagName)) {
317
+ defineCustomElement$5();
318
+ }
319
+ break;
320
+ case "calcite-pick-list-item":
321
+ if (!customElements.get(tagName)) {
322
+ defineCustomElement$4();
323
+ }
324
+ break;
325
+ case "calcite-popover":
326
+ if (!customElements.get(tagName)) {
327
+ defineCustomElement$3();
328
+ }
329
+ break;
330
+ case "calcite-scrim":
331
+ if (!customElements.get(tagName)) {
332
+ defineCustomElement$2();
333
+ }
334
+ break;
335
+ case "calcite-tooltip":
336
+ if (!customElements.get(tagName)) {
337
+ defineCustomElement$1();
338
+ }
339
+ break;
340
+ } });
341
+ }
342
+ defineCustomElement();
247
343
 
248
- export { MapCard as map_card };
344
+ export { MapCard as M, defineCustomElement as d };
@@ -1,15 +1,15 @@
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, createEvent, h, Host } from '@stencil/core/internal/client';
7
- import { l as loadModules } from './loadModules.js';
8
- import { s as state } from './publicNotificationStore.js';
9
- import { g as getLocaleComponentStrings } from './locale.js';
10
-
11
- const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}";
12
-
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, createEvent, h, Host } from '@stencil/core/internal/client';
7
+ import { l as loadModules } from './loadModules.js';
8
+ import { s as state } from './publicNotificationStore.js';
9
+ import { g as getLocaleComponentStrings } from './locale.js';
10
+
11
+ const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}";
12
+
13
13
  const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14
14
  constructor() {
15
15
  super();
@@ -133,7 +133,7 @@ const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
133
133
  this._sketchGraphicsLayer = this.mapView.map.layers.getItemAt(sketchIndex);
134
134
  }
135
135
  else {
136
- this._sketchGraphicsLayer = new this.GraphicsLayer({ title });
136
+ this._sketchGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
137
137
  state.managedLayers.push(title);
138
138
  this.mapView.map.layers.add(this._sketchGraphicsLayer);
139
139
  }
@@ -245,6 +245,6 @@ function defineCustomElement() {
245
245
  break;
246
246
  } });
247
247
  }
248
- defineCustomElement();
249
-
250
- export { MapDrawTools as M, defineCustomElement as d };
248
+ defineCustomElement();
249
+
250
+ export { MapDrawTools as M, defineCustomElement as d };
@@ -339,4 +339,4 @@ function defineCustomElement() {
339
339
  }
340
340
  defineCustomElement();
341
341
 
342
- export { MapLayerPicker as M, getMapLayerView as a, defineCustomElement as d, goToSelection as g, highlightFeatures as h };
342
+ export { MapLayerPicker as M, goToSelection as a, getMapLayerIds as b, defineCustomElement as d, getMapLayerView as g, highlightFeatures as h };