@esri/solutions-components 0.7.10 → 0.7.11

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.
@@ -226,6 +226,15 @@ const LayerTable = class {
226
226
  }
227
227
  });
228
228
  }
229
+ /**
230
+ * watch for changes in map info and recheck the tool infos
231
+ */
232
+ async mapInfoWatchHandler() {
233
+ var _a;
234
+ if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
235
+ this._initToolInfos();
236
+ }
237
+ }
229
238
  /**
230
239
  * watch for changes in map view and get the first layer
231
240
  */
@@ -1383,6 +1392,7 @@ const LayerTable = class {
1383
1392
  "enableCSV": ["enableCSVWatchHandler"],
1384
1393
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1385
1394
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1395
+ "mapInfo": ["mapInfoWatchHandler"],
1386
1396
  "mapView": ["mapViewWatchHandler"],
1387
1397
  "_layer": ["_layerWatchHandler"],
1388
1398
  "_selectedIndexes": ["_selectedIndexesWatchHandler"],
@@ -1496,6 +1506,7 @@ const MapCard = class {
1496
1506
  // on the first render use the default webmap id if provided otherwise use the first child of the provided mapInfos
1497
1507
  const loadDefaultMap = !this._defaultWebmapHonored && this.defaultWebmapId;
1498
1508
  const defaultMap = (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(i => i.id === this.defaultWebmapId);
1509
+ const mapConfigChanged = JSON.stringify(webMapInfo) !== JSON.stringify(this._webMapInfo);
1499
1510
  this._webMapInfo = loadDefaultMap && defaultMap ? defaultMap[0] :
1500
1511
  !(webMapInfo === null || webMapInfo === void 0 ? void 0 : webMapInfo.id) && this.mapInfos.length > 0 ? this.mapInfos[0] : webMapInfo;
1501
1512
  const id = this._webMapInfo.id;
@@ -1526,6 +1537,15 @@ const MapCard = class {
1526
1537
  this._defaultWebmapHonored = true;
1527
1538
  this._mapPicker.setMapByID(id);
1528
1539
  }
1540
+ else if (mapConfigChanged) {
1541
+ // Map is the same so no need to reload but we need to update for any changes from the config
1542
+ this._searchConfiguration = this._webMapInfo.searchConfiguration;
1543
+ this.beforeMapChanged.emit();
1544
+ this.mapChanged.emit({
1545
+ id: id,
1546
+ mapView: this.mapView
1547
+ });
1548
+ }
1529
1549
  }
1530
1550
  /**
1531
1551
  * Add/remove the home widget base on enableHome prop
@@ -55,6 +55,7 @@ const CrowdsourceManager = class {
55
55
  this._expandPopup = false;
56
56
  this._translations = undefined;
57
57
  this._layoutMode = interfaces.ELayoutMode.GRID;
58
+ this._mapInfo = undefined;
58
59
  this._mapView = undefined;
59
60
  this._panelOpen = true;
60
61
  this._tableOnly = false;
@@ -383,7 +384,7 @@ const CrowdsourceManager = class {
383
384
  return true;
384
385
  }
385
386
  });
386
- return mapInfo;
387
+ return Object.assign({}, mapInfo);
387
388
  }
388
389
  /**
389
390
  * Set the current map info when maps change