@esri/solutions-components 0.7.24 → 0.7.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/cjs/{info-card_4.cjs.entry.js → basemap-gallery_7.cjs.entry.js} +410 -324
  2. package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -4
  3. package/dist/cjs/{calcite-alert_3.cjs.entry.js → calcite-alert_4.cjs.entry.js} +296 -3
  4. package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -2
  5. package/dist/cjs/calcite-flow_4.cjs.entry.js +3 -4
  6. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -2
  7. package/dist/cjs/{card-manager_2.cjs.entry.js → card-manager_3.cjs.entry.js} +182 -5
  8. package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -2
  9. package/dist/cjs/crowdsource-reporter.cjs.entry.js +32 -90
  10. package/dist/cjs/{downloadUtils-401356b5.js → downloadUtils-83c6d3c3.js} +6 -6
  11. package/dist/cjs/{index.es-a9a4ff08.js → index.es-bd1a93b2.js} +2 -2
  12. package/dist/cjs/layout-manager.cjs.entry.js +1 -2
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/{locale-1ff119f5.js → locale-a476e15d.js} +24 -3
  15. package/dist/cjs/map-select-tools_3.cjs.entry.js +4 -5
  16. package/dist/cjs/{popupUtils-8d5b6e94.js → popupUtils-a73902a6.js} +2 -2
  17. package/dist/cjs/public-notification.cjs.entry.js +3 -4
  18. package/dist/cjs/solution-configuration.cjs.entry.js +1 -2
  19. package/dist/cjs/solution-contents_3.cjs.entry.js +1 -2
  20. package/dist/cjs/solutions-components.cjs.js +1 -1
  21. package/dist/cjs/spatial-ref.cjs.entry.js +1 -2
  22. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +5 -27
  23. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +69 -95
  24. package/dist/collection/demos/crowdsource-reporter.html +96 -45
  25. package/dist/components/crowdsource-reporter.js +95 -209
  26. package/dist/esm/{info-card_4.entry.js → basemap-gallery_7.entry.js} +406 -323
  27. package/dist/esm/buffer-tools_3.entry.js +1 -2
  28. package/dist/esm/{calcite-alert_3.entry.js → calcite-alert_4.entry.js} +295 -3
  29. package/dist/esm/calcite-combobox_6.entry.js +1 -2
  30. package/dist/esm/calcite-flow_4.entry.js +3 -4
  31. package/dist/esm/calcite-shell-panel_14.entry.js +1 -2
  32. package/dist/esm/{card-manager_2.entry.js → card-manager_3.entry.js} +181 -5
  33. package/dist/esm/crowdsource-manager.entry.js +1 -2
  34. package/dist/esm/crowdsource-reporter.entry.js +32 -90
  35. package/dist/esm/{downloadUtils-067dc2ff.js → downloadUtils-a301c193.js} +2 -2
  36. package/dist/esm/{index.es-92e46d8b.js → index.es-37a9907e.js} +2 -2
  37. package/dist/esm/layout-manager.entry.js +1 -2
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/{locale-13e3c96c.js → locale-731e75a8.js} +22 -2
  40. package/dist/esm/map-select-tools_3.entry.js +2 -3
  41. package/dist/esm/{popupUtils-b71f30fc.js → popupUtils-a593bd78.js} +1 -1
  42. package/dist/esm/public-notification.entry.js +2 -3
  43. package/dist/esm/solution-configuration.entry.js +1 -2
  44. package/dist/esm/solution-contents_3.entry.js +1 -2
  45. package/dist/esm/solutions-components.js +1 -1
  46. package/dist/esm/spatial-ref.entry.js +1 -2
  47. package/dist/solutions-components/demos/crowdsource-reporter.html +96 -45
  48. package/dist/solutions-components/{p-36cbf14f.js → p-0587972d.js} +1 -1
  49. package/dist/solutions-components/p-0b4f4b0e.entry.js +6 -0
  50. package/dist/solutions-components/{p-f54f3719.entry.js → p-0b619197.entry.js} +1 -1
  51. package/dist/solutions-components/{p-d50f34c4.entry.js → p-2656c6e4.entry.js} +1 -1
  52. package/dist/solutions-components/p-284cc5cd.entry.js +6 -0
  53. package/dist/solutions-components/{p-01032eec.entry.js → p-29f661f5.entry.js} +2 -2
  54. package/dist/solutions-components/p-5af99fd8.entry.js +6 -0
  55. package/dist/solutions-components/{p-d9061e5d.entry.js → p-7116f96d.entry.js} +1 -1
  56. package/dist/solutions-components/p-7c13406e.entry.js +6 -0
  57. package/dist/solutions-components/{p-685257d1.entry.js → p-7dbccc10.entry.js} +1 -1
  58. package/dist/solutions-components/p-8308f64c.entry.js +6 -0
  59. package/dist/solutions-components/{p-ca4023f4.entry.js → p-891682da.entry.js} +1 -1
  60. package/dist/solutions-components/{p-14ff1465.js → p-a603e673.js} +2 -2
  61. package/dist/solutions-components/p-b37ec1f3.entry.js +6 -0
  62. package/dist/solutions-components/{p-fec77450.js → p-db868283.js} +1 -1
  63. package/dist/solutions-components/{p-fb1c6811.entry.js → p-dded59a7.entry.js} +1 -1
  64. package/dist/solutions-components/p-e88a64be.entry.js +6 -0
  65. package/dist/solutions-components/p-e902ba19.js +36 -0
  66. package/dist/solutions-components/p-fe295e9d.entry.js +6 -0
  67. package/dist/solutions-components/solutions-components.esm.js +1 -1
  68. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +14 -28
  69. package/dist/types/components.d.ts +16 -0
  70. package/package.json +1 -1
  71. package/dist/cjs/basemap-gallery_5.cjs.entry.js +0 -573
  72. package/dist/cjs/loadModules-46d14e81.js +0 -30
  73. package/dist/esm/basemap-gallery_5.entry.js +0 -565
  74. package/dist/esm/loadModules-cea493da.js +0 -28
  75. package/dist/solutions-components/p-3606c4b8.entry.js +0 -6
  76. package/dist/solutions-components/p-48ff9cea.js +0 -21
  77. package/dist/solutions-components/p-5e832d65.entry.js +0 -6
  78. package/dist/solutions-components/p-8fc072ca.entry.js +0 -6
  79. package/dist/solutions-components/p-a2d3df14.entry.js +0 -6
  80. package/dist/solutions-components/p-ab006ace.js +0 -21
  81. package/dist/solutions-components/p-ba56035f.entry.js +0 -6
  82. package/dist/solutions-components/p-c0ed2b83.entry.js +0 -6
  83. package/dist/solutions-components/p-cc88bb42.entry.js +0 -6
  84. package/dist/solutions-components/p-db69f4ba.entry.js +0 -6
  85. package/dist/solutions-components/p-e3061220.entry.js +0 -6
@@ -8,9 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-b8a649fc.js');
11
- const locale = require('./locale-1ff119f5.js');
11
+ const locale = require('./locale-a476e15d.js');
12
12
  const common = require('./common-4cd3537b.js');
13
- require('./loadModules-46d14e81.js');
14
13
  require('./esri-loader-a91c0ec1.js');
15
14
  require('./_commonjsHelpers-384729db.js');
16
15
  require('./solution-resource-abec7452.js');
@@ -21,7 +21,7 @@
21
21
  }
22
22
 
23
23
  .width-full {
24
- width: 100%;
24
+ width: 100% !important;
25
25
  }
26
26
 
27
27
  .width-0 {
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .height-full {
32
- height: 100%;
32
+ height: 100% !important;
33
33
  }
34
34
 
35
35
  .height-0 {
@@ -64,29 +64,7 @@
64
64
  padding: 10px;
65
65
  }
66
66
 
67
- @media screen and (max-width: 600px) {
68
- .map-container {
69
- left: 0;
70
- height: 50%;
71
- width: 100%;
72
- }
73
-
74
- .map-container-mobile {
75
- height: calc(100% - 100px);
76
- }
77
-
78
- .side-panel {
79
- padding: 2px;
80
- width: 100%;
81
- height: 50%;
82
- position: absolute;
83
- top: 50%;
84
- left: 0;
85
- z-index: 60;
86
- }
87
-
88
- .collapsed-side-panel {
89
- top: calc(100% - 100px);
90
- height: 100px;
91
- }
67
+ .collapsed-side-panel {
68
+ top: calc(100% - 55px);
69
+ height: 54px;
92
70
  }
@@ -23,6 +23,7 @@ import { getLocaleComponentStrings } from "../../utils/locale";
23
23
  export class CrowdsourceReporter {
24
24
  constructor() {
25
25
  this.description = undefined;
26
+ this.isMobile = undefined;
26
27
  this.enableAnonymousAccess = undefined;
27
28
  this.enableAnonymousComments = undefined;
28
29
  this.enableComments = undefined;
@@ -30,6 +31,7 @@ export class CrowdsourceReporter {
30
31
  this.enableNewReports = undefined;
31
32
  this.layers = undefined;
32
33
  this.loginTitle = undefined;
34
+ this.mapView = undefined;
33
35
  this.reportButtonText = undefined;
34
36
  this.reportsHeader = undefined;
35
37
  this.reportSubmittedMessage = undefined;
@@ -42,8 +44,6 @@ export class CrowdsourceReporter {
42
44
  this.theme = "light";
43
45
  this.enableZoom = true;
44
46
  this._mapInfo = undefined;
45
- this._mapView = undefined;
46
- this._isMobile = false;
47
47
  this._flowItems = ["layer-list"];
48
48
  this._sidePanelCollapsed = false;
49
49
  this._translations = undefined;
@@ -54,6 +54,22 @@ export class CrowdsourceReporter {
54
54
  // Watch handlers
55
55
  //
56
56
  //--------------------------------------------------------------------------
57
+ /**
58
+ * Called each time the mapView prop is changed.
59
+ */
60
+ async isMobileWatchHandler() {
61
+ if (this.isMobile) {
62
+ this._sidePanelCollapsed = false;
63
+ }
64
+ }
65
+ /**
66
+ * Called each time the mapView prop is changed.
67
+ */
68
+ async mapViewWatchHandler() {
69
+ await this.mapView.when(async () => {
70
+ await this.setMapView();
71
+ });
72
+ }
57
73
  //--------------------------------------------------------------------------
58
74
  //
59
75
  // Methods (public)
@@ -64,15 +80,6 @@ export class CrowdsourceReporter {
64
80
  // Events (public)
65
81
  //
66
82
  //--------------------------------------------------------------------------
67
- /**
68
- * Listen for mapChanged event to be fired then store the new mapView so components will be updated
69
- */
70
- async mapChanged(evt) {
71
- this._mapChange = evt.detail;
72
- await this._mapChange.mapView.when(async () => {
73
- await this.setMapView();
74
- });
75
- }
76
83
  //--------------------------------------------------------------------------
77
84
  //
78
85
  // Functions (lifecycle)
@@ -85,27 +92,12 @@ export class CrowdsourceReporter {
85
92
  */
86
93
  async componentWillLoad() {
87
94
  await this._getTranslations();
88
- const mediaQueryList = window.matchMedia("screen and (max-width: 600px)");
89
- this._isMobile = mediaQueryList.matches;
90
- //on change update the state for is mobile and the sidePanelCollapsed
91
- mediaQueryList.onchange = (e) => {
92
- this._isMobile = e.matches;
93
- this._sidePanelCollapsed = false;
94
- };
95
95
  }
96
96
  /**
97
97
  * Renders the component.
98
98
  */
99
99
  render() {
100
- var _a, _b;
101
- let validConfiguration = true;
102
- //Check if webMap id is configured
103
- if (!this.mapInfos || this.mapInfos.length <= 0 || (((_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.length) > 0 && !((_b = this.mapInfos[0]) === null || _b === void 0 ? void 0 : _b.id))) {
104
- validConfiguration = false;
105
- }
106
- return (h(Host, null, h("div", null, validConfiguration &&
107
- h("calcite-shell", { "content-behind": true }, this._getReporter(), this._getMapNode()), !validConfiguration &&
108
- h("calcite-notice", { class: "error-msg", icon: "configure", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._translations.invalidConfigurationErrorMsg)))));
100
+ return (h(Host, null, h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
109
101
  }
110
102
  //--------------------------------------------------------------------------
111
103
  //
@@ -133,11 +125,11 @@ export class CrowdsourceReporter {
133
125
  });
134
126
  let sidePanelClass = "side-panel";
135
127
  //in case of mobile handle for collapsed styles of the panel
136
- if (this._isMobile && this._sidePanelCollapsed) {
128
+ if (this.isMobile && this._sidePanelCollapsed) {
137
129
  sidePanelClass += " collapsed-side-panel";
138
130
  }
139
131
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
140
- return (h("calcite-panel", { class: sidePanelClass + " " + themeClass }, this._mapView
132
+ return (h("calcite-panel", { class: sidePanelClass + " width-full " + themeClass }, this.mapView
141
133
  ? h("calcite-flow", null, (renderLists === null || renderLists === void 0 ? void 0 : renderLists.length) > 0 && renderLists)
142
134
  : h("calcite-loader", { scale: "m" })));
143
135
  }
@@ -147,7 +139,7 @@ export class CrowdsourceReporter {
147
139
  * @protected
148
140
  */
149
141
  getLayerListFlowItem() {
150
- return (h("calcite-flow-item", { collapsed: this._isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers && h("calcite-action", { icon: "sort-ascending-arrow", slot: this._isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this._isMobile }), this._hasValidLayers && h("calcite-action", { icon: "filter", slot: this._isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this._isMobile }), this._isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports && h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this._mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this) }))));
142
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers && h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), this._hasValidLayers && h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports && h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this) }))));
151
143
  }
152
144
  /**
153
145
  * When layer list is loaded, we will receive the list of layers, if its means we don't have any valid layer to be listed
@@ -198,14 +190,14 @@ export class CrowdsourceReporter {
198
190
  * @protected
199
191
  */
200
192
  getFeatureListFlowItem(layerId, layerName) {
201
- return (h("calcite-flow-item", { collapsed: this._isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, h("calcite-action", { icon: "sort-ascending-arrow", slot: this._isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this._isMobile }), h("calcite-action", { icon: "filter", slot: this._isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this._isMobile }), this._isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", highlightOnMap: true, mapView: this._mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 100, selectedLayerId: layerId }))));
193
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", highlightOnMap: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 100, selectedLayerId: layerId }))));
202
194
  }
203
195
  /**
204
196
  * Returns the calcite-flow item for feature details
205
197
  * @returns Node
206
198
  */
207
199
  getFeatureDetailsFlowItem() {
208
- return (h("calcite-flow-item", { collapsed: this._isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, this._isMobile && this.getActionToExpandCollapsePanel(), h("calcite-action", { icon: "share", slot: "header-actions-end", text: this._translations.share }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this._mapView, zoomAndScrollToSelected: true }))));
200
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-action", { icon: "share", slot: "header-actions-end", text: this._translations.share }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this.mapView, zoomAndScrollToSelected: true }))));
209
201
  }
210
202
  /**
211
203
  * Returns the action button to Expand/Collapse side panel in mobile mode
@@ -213,51 +205,14 @@ export class CrowdsourceReporter {
213
205
  getActionToExpandCollapsePanel() {
214
206
  return (h("calcite-action", { icon: this._sidePanelCollapsed ? "chevrons-up" : "chevrons-down", onClick: this.toggleSidePanel.bind(this), slot: "header-actions-end", text: this._sidePanelCollapsed ? this._translations.expand : this._translations.collapse }));
215
207
  }
216
- /**
217
- * Get the map node based for the current layout options
218
- * @returns the map node
219
- * @protected
220
- */
221
- _getMapNode() {
222
- var _a;
223
- let mapContainerClass = "overflow-hidden map-container";
224
- if (this._isMobile) {
225
- if (this._sidePanelCollapsed) {
226
- mapContainerClass += " map-container-mobile";
227
- }
228
- }
229
- else {
230
- mapContainerClass += " height-full";
231
- }
232
- return (h("div", { class: mapContainerClass }, h("map-card", { class: "width-full", defaultWebmapId: this.defaultWebmap, enableBasemap: false, enableFloorFilter: false, enableFullscreen: false, enableHome: this.enableHome, enableLegend: true, enableSearch: this.enableSearch, enableSingleExpand: false, hidden: false, homeZoomIndex: 0, homeZoomPosition: "top-left", homeZoomToolsSize: "s", mapInfos: (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(mapInfo => mapInfo.visible !== false), mapWidgetsIndex: this.enableHome ? 4 : 3, mapWidgetsPosition: "top-left", mapWidgetsSize: "s", stackTools: false, theme: this.theme, toolOrder: ["search", "legend", "fullscreen", "basemap", "floorfilter"] })));
233
- }
234
- /**
235
- * Get the current map info (configuration details) when maps change
236
- * @param id Id of the map to be returned
237
- * @returns IMapInfo for the provided id
238
- * @protected
239
- */
240
- getMapInfo(id) {
241
- let mapInfo;
242
- this.mapInfos.some(mi => {
243
- if (mi.id === id) {
244
- mapInfo = mi;
245
- return true;
246
- }
247
- });
248
- return Object.assign({}, mapInfo);
249
- }
250
208
  /**
251
209
  * Set the current map info when maps change
252
210
  * @protected
253
211
  */
254
212
  async setMapView() {
255
- this._mapInfo = this.getMapInfo(this._mapChange.id);
256
- this._mapView = this._mapChange.mapView;
257
- this.initMapZoom();
258
- this._mapView.popupEnabled = false;
213
+ this.mapView.popupEnabled = false;
259
214
  if (this._defaultCenter && this._defaultLevel) {
260
- await this._mapView.goTo({
215
+ await this.mapView.goTo({
261
216
  center: this._defaultCenter,
262
217
  zoom: this._defaultLevel
263
218
  });
@@ -265,22 +220,6 @@ export class CrowdsourceReporter {
265
220
  this._defaultLevel = undefined;
266
221
  }
267
222
  }
268
- /**
269
- * Add/remove zoom tools based on enableZoom prop
270
- * @protected
271
- */
272
- initMapZoom() {
273
- if (!this.enableZoom) {
274
- this._mapView.ui.remove("zoom");
275
- }
276
- else if (this.enableZoom) {
277
- this._mapView.ui.add({
278
- component: "zoom",
279
- position: "top-left",
280
- index: 0
281
- });
282
- }
283
- }
284
223
  /**
285
224
  * Fetches the component's translations
286
225
  * @returns Promise when complete
@@ -320,6 +259,23 @@ export class CrowdsourceReporter {
320
259
  "attribute": "description",
321
260
  "reflect": false
322
261
  },
262
+ "isMobile": {
263
+ "type": "boolean",
264
+ "mutable": false,
265
+ "complexType": {
266
+ "original": "boolean",
267
+ "resolved": "boolean",
268
+ "references": {}
269
+ },
270
+ "required": false,
271
+ "optional": false,
272
+ "docs": {
273
+ "tags": [],
274
+ "text": "boolean: When true the application will be in mobile mode, controls the mobile or desktop view"
275
+ },
276
+ "attribute": "is-mobile",
277
+ "reflect": false
278
+ },
323
279
  "enableAnonymousAccess": {
324
280
  "type": "boolean",
325
281
  "mutable": false,
@@ -437,6 +393,26 @@ export class CrowdsourceReporter {
437
393
  "attribute": "login-title",
438
394
  "reflect": false
439
395
  },
396
+ "mapView": {
397
+ "type": "unknown",
398
+ "mutable": false,
399
+ "complexType": {
400
+ "original": "__esri.MapView",
401
+ "resolved": "MapView",
402
+ "references": {
403
+ "___esri": {
404
+ "location": "global",
405
+ "id": "global::___esri"
406
+ }
407
+ }
408
+ },
409
+ "required": false,
410
+ "optional": false,
411
+ "docs": {
412
+ "tags": [],
413
+ "text": "esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html"
414
+ }
415
+ },
440
416
  "reportButtonText": {
441
417
  "type": "string",
442
418
  "mutable": false,
@@ -649,8 +625,6 @@ export class CrowdsourceReporter {
649
625
  static get states() {
650
626
  return {
651
627
  "_mapInfo": {},
652
- "_mapView": {},
653
- "_isMobile": {},
654
628
  "_flowItems": {},
655
629
  "_sidePanelCollapsed": {},
656
630
  "_translations": {},
@@ -658,13 +632,13 @@ export class CrowdsourceReporter {
658
632
  };
659
633
  }
660
634
  static get elementRef() { return "el"; }
661
- static get listeners() {
635
+ static get watchers() {
662
636
  return [{
663
- "name": "mapChanged",
664
- "method": "mapChanged",
665
- "target": "window",
666
- "capture": false,
667
- "passive": false
637
+ "propName": "isMobile",
638
+ "methodName": "isMobileWatchHandler"
639
+ }, {
640
+ "propName": "mapView",
641
+ "methodName": "mapViewWatchHandler"
668
642
  }];
669
643
  }
670
644
  }
@@ -22,9 +22,34 @@
22
22
  | limitations under the License.
23
23
  -->
24
24
  <style>
25
- .reporter {
26
- height: 100vh;
27
- width: 100vw;
25
+ #viewDiv {
26
+ position: absolute;
27
+ top: 0px;
28
+ right: 0px;
29
+ bottom: 0px;
30
+ left: 390px;
31
+ }
32
+ #viewDiv[dir="rtl"] {
33
+ right: 390px;
34
+ left: 0px;
35
+ }
36
+ .over-map {
37
+ position: absolute;
38
+ left: 0px;
39
+ background-color: var(--calcite-color-foreground-1);
40
+ }
41
+ .over-map[dir="rtl"] {
42
+ right: 0px;
43
+ }
44
+ .column {
45
+ width: 360px;
46
+ padding: 1rem;
47
+ border: 1px solid var(--calcite-color-border-2);
48
+ height: -webkit-fill-available;
49
+ height: 100%;
50
+ }
51
+ .column[dir="rtl"] {
52
+ float: right;
28
53
  }
29
54
  </style>
30
55
 
@@ -37,64 +62,90 @@
37
62
  <script type="module" src="../solutions-components.esm.js"></script>
38
63
 
39
64
  <script>
40
- function addValues() {
65
+ require(["esri/WebMap", "esri/views/MapView", "esri/widgets/Legend", "esri/config"], (
66
+ WebMap,
67
+ MapView,
68
+ Legend,
69
+ esriConfig
70
+ ) => {
41
71
  const demo = document.getElementById("demo");
42
72
 
43
- let headerSet = false;
44
- let custom = [];
45
- let portal;
46
- //Support id and portal URL parameter
47
- var vars = window.location.search.substring(1).split("&");
48
- vars.forEach((param) => {
49
- let vals = param.split("=");
50
- const v = vals[1];
51
- switch (vals[0]) {
52
- case "id":
53
- custom = [{
54
- id: v,
55
- name: "Map from URL"
56
- }];
57
- break;
58
- case "portal":
59
- portal = v;
60
- default:
61
- break;
73
+ // let headerSet = false;
74
+ // let custom = [];
75
+ // let portal;
76
+ // //Support id and portal URL parameter
77
+ // var vars = window.location.search.substring(1).split("&");
78
+ // vars.forEach((param) => {
79
+ // let vals = param.split("=");
80
+ // const v = vals[1];
81
+ // switch (vals[0]) {
82
+ // case "id":
83
+ // custom = [{
84
+ // id: v,
85
+ // name: "Map from URL"
86
+ // }];
87
+ // break;
88
+ // case "portal":
89
+ // portal = v;
90
+ // default:
91
+ // break;
92
+ // }
93
+ // });
94
+
95
+ // if (portal) {
96
+ // esriConfig.portalUrl = portal;
97
+ // }
98
+
99
+ // demo.mapInfos = [{
100
+ // //id: "f8c4d99deb3c483cac296cc261e18a25", //blank no layers
101
+ // //id: "a7e880f7afbb471991d43c8c4f1438ac" // Se mapping
102
+ // //id: "c720e337ff814fe4a83bc244c46f8e43" //15 Layers
103
+ // //id: "f5186c798b9e40dab1078658ddbc28cf" // 30K features
104
+ // //id: "dda88d905a6748a5ab46bea5be795f33" // screening layers
105
+ // id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content
106
+ // }];
107
+ // //if id is passed in the url parameter use that mapInfos
108
+ // if (custom?.length > 0) {
109
+ // demo.mapInfos = custom;
110
+ // }
111
+
112
+ //esriConfig.portalUrl = "https://solutions.mapsdevext.arcgis.com";
113
+ var webMap = new WebMap({
114
+ portalItem: {
115
+ id: "b5bdcb1e5d684dd3b21a2d44b8e4f928"
62
116
  }
63
117
  });
64
118
 
65
- if (portal) {
66
- esriConfig.portalUrl = portal;
67
- }
119
+ demo.mapView = new MapView({
120
+ container: "viewDiv",
121
+ map: webMap
122
+ });
123
+
124
+ demo.mapView.when(() => {
125
+ // const legend = new Legend({
126
+ // view: demo.mapView
127
+ // });
128
+ // demo.mapView.ui.add(legend, "top-left");
129
+ });
68
130
 
69
- demo.mapInfos = [{
70
- //id: "f8c4d99deb3c483cac296cc261e18a25", //blank no layers
71
- //id: "a7e880f7afbb471991d43c8c4f1438ac" // Se mapping
72
- //id: "c720e337ff814fe4a83bc244c46f8e43" //15 Layers
73
- //id: "f5186c798b9e40dab1078658ddbc28cf" // 30K features
74
- //id: "dda88d905a6748a5ab46bea5be795f33" // screening layers
75
- id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content
76
- }];
77
- //if id is passed in the url parameter use that mapInfos
78
- if (custom?.length > 0) {
79
- demo.mapInfos = custom;
80
- }
81
- demo.enableHome = true;
82
- demo.enableSearch = true;
83
- demo.enableZoom = true;
131
+ // demo.enableHome = true;
132
+ // demo.enableSearch = true;
133
+ // demo.enableZoom = true;
84
134
  demo.reportsHeader = "Reports";
85
135
  demo.reportButtonText = "Report an incident";
86
136
  demo.enableNewReports = true;
87
- //Select reporting layers -
137
+ //Select reporting layers -
88
138
  //demo.layers = ['SE_field_mapping_9688', 'SE_field_mapping_5784', 'SE_field_mapping_1853'];
89
139
  //demo.layers = ['Three_Layers_nested_4042', 'SE_sort_2889', 'SE_sort_756']; //screening layers
90
140
  demo.theme = "light";
91
141
  demo.reportSubmittedMessage = "Thank you";
92
- }
142
+ });
93
143
  </script>
94
144
  </head>
95
145
 
96
146
  <!-- <body class="calcite-mode-dark"> -->
97
- <body onload="addValues()">
98
- <crowdsource-reporter id="demo" class="reporter"></crowdsource-reporter>
147
+ <body>
148
+ <div id="viewDiv"></div>
149
+ <crowdsource-reporter id="demo" class="over-map column"></crowdsource-reporter>
99
150
  </body>
100
151
  </html>