@esri/solutions-components 0.10.20 → 0.10.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ const CrowdsourceManager = class {
22
22
  index.registerInstance(this, hostRef);
23
23
  this.showIntroductionWindow = index.createEvent(this, "showIntroductionWindow", 7);
24
24
  this.showCoverPage = index.createEvent(this, "showCoverPage", 7);
25
- this.appLayout = 'splitView';
25
+ this.appLayout = undefined;
26
26
  this.appProxies = undefined;
27
27
  this.basemapConfig = undefined;
28
28
  this.coverPageEnabled = undefined;
@@ -45,6 +45,7 @@ const CrowdsourceManager = class {
45
45
  this.enableSearch = true;
46
46
  this.enableShare = false;
47
47
  this.enableZoom = true;
48
+ this.hideMapOnLoad = false;
48
49
  this.mapInfos = [];
49
50
  this.onlyShowUpdatableLayers = true;
50
51
  this.popupHeaderColor = undefined;
@@ -128,6 +129,12 @@ const CrowdsourceManager = class {
128
129
  enableZoomWatchHandler() {
129
130
  this._initMapZoom();
130
131
  }
132
+ /**
133
+ * When true and no appLayout is defined the map will be hidden on load
134
+ */
135
+ hideMapOnLoadWatchHandler() {
136
+ console.warn("hideMapOnLoad will be removed. Please use appLayout to control layout options.");
137
+ }
131
138
  //--------------------------------------------------------------------------
132
139
  //
133
140
  // Methods (public)
@@ -206,7 +213,7 @@ const CrowdsourceManager = class {
206
213
  render() {
207
214
  // only avoid border when we have a header color that is not white
208
215
  const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
209
- return (index.h(index.Host, { key: '113737d5d1c315a85d7fd72f2f79aa1ad4acd03d' }, index.h("calcite-shell", { key: 'b5e9653ecc35019333ed8a7d7f91c7b4c4930fcc', class: "position-relative" }, index.h("calcite-panel", { key: '45cd232c8ea8706315e9fc15bb35f99698c33467', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
216
+ return (index.h(index.Host, { key: '28614b892c93b83de202a681a756027472d092c2' }, index.h("calcite-shell", { key: '8f9c57fa9d1c1c88dbac9706376aad6bbd425691', class: "position-relative" }, index.h("calcite-panel", { key: '3c156df89f396425c2711a39968017cc23910a55', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
210
217
  }
211
218
  /**
212
219
  * Called after each render
@@ -225,6 +232,12 @@ const CrowdsourceManager = class {
225
232
  */
226
233
  async componentDidLoad() {
227
234
  this._resizeObserver.observe(this.el);
235
+ if (this.hideMapOnLoad && !this.appLayout) {
236
+ this.appLayout = 'tableView';
237
+ }
238
+ else if (!this.appLayout) {
239
+ this.appLayout = 'splitView';
240
+ }
228
241
  this._isMapViewOnLoad = this.appLayout === 'mapView';
229
242
  this._setActiveLayout(this.appLayout);
230
243
  }
@@ -666,7 +679,8 @@ const CrowdsourceManager = class {
666
679
  this._translations = messages[0];
667
680
  }
668
681
  static get watchers() { return {
669
- "enableZoom": ["enableZoomWatchHandler"]
682
+ "enableZoom": ["enableZoomWatchHandler"],
683
+ "hideMapOnLoad": ["hideMapOnLoadWatchHandler"]
670
684
  }; }
671
685
  };
672
686
  CrowdsourceManager.style = CrowdsourceManagerStyle0;