@esri/solutions-components 0.8.31 → 0.8.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +23 -7
  2. package/dist/cjs/card-manager_3.cjs.entry.js +17 -4
  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 +1 -1
  6. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +4 -2
  7. package/dist/collection/components/floor-filter/floor-filter.js +23 -7
  8. package/dist/collection/components/layer-table/layer-table.js +36 -4
  9. package/dist/collection/demos/crowdsource-manager.html +1 -1
  10. package/dist/components/crowdsource-manager.js +4 -2
  11. package/dist/components/floor-filter2.js +23 -7
  12. package/dist/components/layer-table2.js +19 -4
  13. package/dist/esm/basemap-gallery_7.entry.js +23 -7
  14. package/dist/esm/card-manager_3.entry.js +17 -4
  15. package/dist/esm/crowdsource-manager.entry.js +4 -2
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/esm/solutions-components.js +1 -1
  18. package/dist/solutions-components/demos/crowdsource-manager.html +1 -1
  19. package/dist/solutions-components/p-21cbb55d.entry.js +6 -0
  20. package/dist/solutions-components/p-5862de8d.entry.js +6 -0
  21. package/dist/solutions-components/p-c91b2153.entry.js +6 -0
  22. package/dist/solutions-components/solutions-components.esm.js +1 -1
  23. package/dist/types/components/layer-table/layer-table.d.ts +8 -0
  24. package/dist/types/components.d.ts +8 -0
  25. package/package.json +1 -1
  26. package/dist/solutions-components/p-1bdf0ba0.entry.js +0 -6
  27. package/dist/solutions-components/p-61bf98bc.entry.js +0 -6
  28. package/dist/solutions-components/p-a0616647.entry.js +0 -6
@@ -140,12 +140,17 @@ const FloorFilter = class {
140
140
  * Watch for changes to the mapView and re-init the floor filter
141
141
  */
142
142
  async mapViewWatchHandler() {
143
+ console.log("mapViewWatchHandler");
144
+ console.log(`this.mapView: ${this.mapView}`);
143
145
  await this._initFloorFilter(this.mapView);
144
146
  }
145
147
  /**
146
148
  * Watch for changes to the enabled property and re-init or destroy the floor filter
147
149
  */
148
150
  async enabledWatchHandler() {
151
+ console.log("enabledWatchHandler");
152
+ console.log(`this.enabled: ${this.enabled}`);
153
+ console.log(`this.mapView: ${this.mapView}`);
149
154
  if (this.enabled) {
150
155
  await this._initFloorFilter(this.mapView);
151
156
  }
@@ -168,7 +173,9 @@ const FloorFilter = class {
168
173
  * Renders the component.
169
174
  */
170
175
  render() {
171
- return (index.h(index.Host, { key: 'c80a8d46fb48f3789d9fa09c2400faad49e2e236' }, index.h("div", { key: '82919a3ba061a17c8aeaa0d2f6f4f13bc428b519', ref: (el) => { this._floorFilterElement = el; } })));
176
+ console.log("render");
177
+ console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
178
+ return (index.h(index.Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, index.h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
172
179
  }
173
180
  //--------------------------------------------------------------------------
174
181
  //
@@ -196,6 +203,7 @@ const FloorFilter = class {
196
203
  * @protected
197
204
  */
198
205
  _destroyWidget() {
206
+ console.log("_destroyWidget");
199
207
  if (this.floorFilterWidget) {
200
208
  this.floorFilterWidget.destroy();
201
209
  this.floorFilterWidget = undefined;
@@ -210,6 +218,7 @@ const FloorFilter = class {
210
218
  * @protected
211
219
  */
212
220
  _initContainer() {
221
+ console.log("_initContainer");
213
222
  this._destroyWidget();
214
223
  this._floorFilterElement = document.createElement("div");
215
224
  }
@@ -217,11 +226,18 @@ const FloorFilter = class {
217
226
  * Initialize the floor filter or reset the current view if it already exists
218
227
  */
219
228
  async _initFloorFilter(view) {
229
+ console.log("_initFloorFilter");
220
230
  const webMap = view === null || view === void 0 ? void 0 : view.map;
221
- if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
222
- this._initContainer();
223
- await webMap.when(() => {
224
- var _a, _b, _c;
231
+ await webMap.when(() => {
232
+ var _a, _b, _c;
233
+ console.log("webMap.when");
234
+ console.log("_initFloorFilter");
235
+ console.log(`view: ${view}`);
236
+ console.log(`this.enabled: ${this.enabled}`);
237
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
238
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
239
+ if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
240
+ this._initContainer();
225
241
  this.floorFilterWidget = new this.FloorFilter({
226
242
  container: this._floorFilterElement,
227
243
  view
@@ -238,8 +254,8 @@ const FloorFilter = class {
238
254
  this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
239
255
  this.siteChanged.emit(site);
240
256
  });
241
- });
242
- }
257
+ }
258
+ });
243
259
  }
244
260
  get el() { return index.getElement(this); }
245
261
  static get watchers() { return {
@@ -159,6 +159,7 @@ const LayerTable = class {
159
159
  this.enableInlineEdit = undefined;
160
160
  this.enableShare = undefined;
161
161
  this.isMobile = undefined;
162
+ this.mapHidden = undefined;
162
163
  this.mapInfo = undefined;
163
164
  this.mapView = undefined;
164
165
  this.onlyShowUpdatableLayers = undefined;
@@ -242,6 +243,15 @@ const LayerTable = class {
242
243
  }
243
244
  });
244
245
  }
246
+ /**
247
+ * Reset the toolInfos when mapHidden prop changes so we can show/hide any map dependant tool(s)
248
+ */
249
+ mapHiddenWatchHandler() {
250
+ var _a;
251
+ if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
252
+ this._initToolInfos();
253
+ }
254
+ }
245
255
  /**
246
256
  * When isMobile is false we need to init the tool infos for the dynamic toolbar
247
257
  */
@@ -405,7 +415,7 @@ const LayerTable = class {
405
415
  const selected = this.selectedIds.length.toString();
406
416
  const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
407
417
  this._validateActiveActions();
408
- return (index.h(index.Host, { key: '928286a8e4d1159b56b2aa4384f0d6eed38c9e76' }, index.h("calcite-shell", { key: '7c9b98056ee867df54ebfd31fee6f046f5152f64' }, this._getTableControlRow("header"), index.h("div", { key: 'b1a9a9cca100c7bef335afd5b6c7d7384ca7536c', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: 'ceeead9900f43c94f46c8c94698ae17f3ae558b7', class: "height-full width-full" }, index.h("calcite-loader", { key: '7bf3c9ba21daa27dd387ba5413b6f6e982e1f10d', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '7d0440047453a45fe1688ad373ab2463fe7479ba', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
418
+ return (index.h(index.Host, { key: '9692c6f764d078c22e1d6271deb3844ef65b1fca' }, index.h("calcite-shell", { key: 'a37b9fcfdd8450fea4a994738bf833c331bb168a' }, this._getTableControlRow("header"), index.h("div", { key: 'e0e82e0bb5441286d5cd3bdda3c55d77515fbcb0', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '4890c168eba3db34a291121f633c0d69ab8a1517', class: "height-full width-full" }, index.h("calcite-loader", { key: '19f85ec47a03731fe4c9ebb13d91cad66a8637fa', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: '53d1c8bce2e2d464a141fabfcf13ee41aaf02168', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
409
419
  .replace("{{total}}", total)
410
420
  .replace("{{selected}}", selected))) : undefined)), this._filterModal()));
411
421
  }
@@ -568,7 +578,8 @@ const LayerTable = class {
568
578
  const featuresEmpty = this._featuresEmpty();
569
579
  const hasFilterExpressions = this._hasFilterExpressions();
570
580
  if (this._translations) {
571
- this._toolInfos = [{
581
+ this._toolInfos = [
582
+ !this.mapHidden ? {
572
583
  active: false,
573
584
  icon: "zoom-to-object",
574
585
  indicator: false,
@@ -576,7 +587,7 @@ const LayerTable = class {
576
587
  func: () => this._zoom(),
577
588
  disabled: !featuresSelected,
578
589
  isOverflow: false
579
- },
590
+ } : undefined,
580
591
  hasFilterExpressions ? {
581
592
  active: false,
582
593
  icon: "filter",
@@ -654,7 +665,8 @@ const LayerTable = class {
654
665
  disabled: false,
655
666
  isOverflow: false,
656
667
  isSublist: true
657
- }];
668
+ }
669
+ ];
658
670
  this._defaultVisibleToolSizeInfos = undefined;
659
671
  }
660
672
  }
@@ -1595,6 +1607,7 @@ const LayerTable = class {
1595
1607
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1596
1608
  "enableShare": ["enableShareWatchHandler"],
1597
1609
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1610
+ "mapHidden": ["mapHiddenWatchHandler"],
1598
1611
  "isMobile": ["isMobileWatchHandler"],
1599
1612
  "mapInfo": ["mapInfoWatchHandler"],
1600
1613
  "mapView": ["mapViewWatchHandler"],
@@ -208,7 +208,9 @@ const CrowdsourceManager = class {
208
208
  async componentDidRender() {
209
209
  if (this._shouldSetMapView) {
210
210
  this._shouldSetMapView = false;
211
- await this._setMapView();
211
+ if (this._mapChange) {
212
+ await this._setMapView();
213
+ }
212
214
  }
213
215
  }
214
216
  /**
@@ -428,7 +430,7 @@ const CrowdsourceManager = class {
428
430
  ((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
429
431
  const defaultOid = !this.defaultOid ? undefined :
430
432
  ((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
431
- return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
433
+ return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: this._expandPopup, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
432
434
  }
433
435
  /**
434
436
  * Update the component layout when its size changes