@esri/solutions-components 0.10.45 → 0.10.46

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.
@@ -51,12 +51,12 @@ const MapSelectTools = class {
51
51
  this.sketchLineSymbol = undefined;
52
52
  this.sketchPointSymbol = undefined;
53
53
  this.sketchPolygonSymbol = undefined;
54
+ this.searchDistanceEnabled = false;
55
+ this.useLayerFeaturesEnabled = false;
54
56
  this._numSelected = 0;
55
- this._searchDistanceEnabled = false;
56
57
  this._searchTerm = undefined;
57
58
  this._selectionLoading = false;
58
59
  this._translations = undefined;
59
- this._useLayerFeaturesEnabled = false;
60
60
  }
61
61
  get el() { return index.getElement(this); }
62
62
  //--------------------------------------------------------------------------
@@ -245,9 +245,9 @@ const MapSelectTools = class {
245
245
  graphics: this._graphics,
246
246
  selectLayers: this.layerViews,
247
247
  skipGeomOIDs: this._skipGeomOIDs,
248
- searchDistanceEnabled: this._searchDistanceEnabled,
248
+ searchDistanceEnabled: this.searchDistanceEnabled,
249
249
  workflowType: this._workflowType,
250
- useLayerFeaturesEnabled: this._useLayerFeaturesEnabled,
250
+ useLayerFeaturesEnabled: this.useLayerFeaturesEnabled,
251
251
  sketchGraphic: this._sketchGraphic
252
252
  };
253
253
  }
@@ -305,30 +305,30 @@ const MapSelectTools = class {
305
305
  render() {
306
306
  const mapToolsClass = this.enableSketchTools ? "" : "display-none";
307
307
  const mapToolsContainerClass = this.enableSketchTools ? "padding-top-1" : "";
308
- return (index.h(index.Host, { key: '24382e9b9e955147bcdbf4bf65fb3672c121a8e9' }, this._getMapLayerPicker(), index.h("div", { key: '9c0d835c1ebb8020619c0629517021ea257ff38f', class: "border-bottom" }), index.h("div", { key: '19caa1aad9667d1b518d0e5ebe6deeeb44fbdbcf', class: "padding-top-sides-1" }, index.h("div", { key: 'e9cd25ddbb4c47d6fef8c670507bb1039ae9f360', class: "search-widget", ref: (el) => { this._searchElement = el; } }), index.h("div", { key: 'b44dae71755a90cf675ba213704be1c65e5d5f1f', class: mapToolsContainerClass }, index.h("map-draw-tools", { key: '8f9ec344e4056cbc456ea721f4ccdd7311d34797', active: true, class: mapToolsClass, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, locale: this.locale, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), index.h("div", { key: 'b93bf01281a8b2ffc5cf23536b40e380b95da3c8', class: "border-bottom" }), this._getNameInput()));
308
+ return (index.h(index.Host, { key: '1c312d53b800ca401726c653e12465e92abf0eef' }, this._getMapLayerPicker(), index.h("div", { key: '2da9eb5316656769ec2f80dfa5fbdc190c62b1cb', class: "border-bottom" }), index.h("div", { key: 'b21d332e5da0aa8cfb34fdab7a1075bfbd5efb42', class: "padding-top-sides-1" }, index.h("div", { key: '2dd59511d4f07cc2cd43b5b5c2a8037303d21546', class: "search-widget", ref: (el) => { this._searchElement = el; } }), index.h("div", { key: '1149bcd2f36171b82f6902fbf89bb0400383fdde', class: mapToolsContainerClass }, index.h("map-draw-tools", { key: '2d3b1b91a108bf2bb2db463e7ffd4574f4a36dac', active: true, class: mapToolsClass, editGraphicsEnabled: !this.useLayerFeaturesEnabled, graphics: this._graphics, locale: this.locale, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), index.h("div", { key: 'd4068bef106e1f4226b1f9c104a626fe0a0f6700', class: "border-bottom" }), this._getNameInput()));
309
309
  }
310
310
  /**
311
311
  * Renders the buffer tools component.
312
312
  */
313
313
  _getBufferOptions() {
314
314
  if (this.enableSearchDistanceOnLoad) {
315
- this._searchDistanceEnabled = true;
315
+ this.searchDistanceEnabled = true;
316
316
  this.enableSearchDistanceOnLoad = false;
317
317
  }
318
- const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
318
+ const showBufferToolsClass = this.searchDistanceEnabled ? "search-distance" : "div-not-visible";
319
319
  const bufferDistance = typeof this.selectionSet?.distance === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
320
- return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.searchDistance, index.h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "search-distance-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), index.h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), index.h("div", { class: showBufferToolsClass }, index.h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, locale: this.locale, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: this.selectionSet?.unit || this.defaultBufferUnit }))));
320
+ return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.searchDistance, index.h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "search-distance-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), index.h("calcite-switch", { checked: this.searchDistanceEnabled, onCalciteSwitchChange: () => this.searchDistanceEnabled = !this.searchDistanceEnabled })), index.h("div", { class: showBufferToolsClass }, index.h("buffer-tools", { disabled: !this.searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, locale: this.locale, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: this.selectionSet?.unit || this.defaultBufferUnit }))));
321
321
  }
322
322
  /**
323
323
  * Renders the map layer picker component.
324
324
  */
325
325
  _getUseLayerFeaturesOptions() {
326
326
  if (this.enableLayerFeaturesOnLoad) {
327
- this._useLayerFeaturesEnabled = true;
327
+ this.useLayerFeaturesEnabled = true;
328
328
  this.enableLayerFeaturesOnLoad = false;
329
329
  }
330
- const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
331
- return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, index.h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "use-layer-features-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), index.h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), index.h("div", { class: useLayerFeaturesClass + " padding-top-1" }, index.h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, locale: this.locale, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
330
+ const useLayerFeaturesClass = this.useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
331
+ return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, index.h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "use-layer-features-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), index.h("calcite-switch", { checked: this.useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), index.h("div", { class: useLayerFeaturesClass + " padding-top-1" }, index.h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, locale: this.locale, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
332
332
  }
333
333
  /**
334
334
  * Renders the number of selected features
@@ -409,8 +409,8 @@ const MapSelectTools = class {
409
409
  this._selectLayers = this.selectionSet.selectLayers;
410
410
  this._selectedIds = this.selectionSet.selectedIds;
411
411
  this._skipGeomOIDs = this.selectionSet.skipGeomOIDs;
412
- this._searchDistanceEnabled = this.selectionSet.searchDistanceEnabled;
413
- this._useLayerFeaturesEnabled = this.selectionSet.useLayerFeaturesEnabled;
412
+ this.searchDistanceEnabled = this.selectionSet.searchDistanceEnabled;
413
+ this.useLayerFeaturesEnabled = this.selectionSet.useLayerFeaturesEnabled;
414
414
  this._distance = this.selectionSet.searchDistanceEnabled ? this.selectionSet.distance : 0;
415
415
  this._unit = this.selectionSet.unit;
416
416
  this._workflowType = this.selectionSet.workflowType;
@@ -429,7 +429,7 @@ const MapSelectTools = class {
429
429
  });
430
430
  });
431
431
  this._selectionLabel = this.selectionSet?.label;
432
- if (!this._useLayerFeaturesEnabled) {
432
+ if (!this.useLayerFeaturesEnabled) {
433
433
  await this._drawTools?.updateGraphics();
434
434
  }
435
435
  await mapViewUtils.goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
@@ -635,13 +635,13 @@ const MapSelectTools = class {
635
635
  if (!forceUpdate) {
636
636
  this._sketchGraphic = graphics[0];
637
637
  }
638
- this._workflowType = this._useLayerFeaturesEnabled ? interfaces.EWorkflowType.SELECT : interfaces.EWorkflowType.SKETCH;
638
+ this._workflowType = this.useLayerFeaturesEnabled ? interfaces.EWorkflowType.SELECT : interfaces.EWorkflowType.SKETCH;
639
639
  if (this._workflowType === interfaces.EWorkflowType.SKETCH) {
640
640
  await this._drawTools.updateGraphics();
641
641
  }
642
642
  await this._updateLabel();
643
643
  this._clearSearchWidget();
644
- if (this._useLayerFeaturesEnabled && !forceUpdate) {
644
+ if (this.useLayerFeaturesEnabled && !forceUpdate) {
645
645
  // Will only ever be a single graphic
646
646
  const geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
647
647
  await this._selectLayerFeatures(geometries[0]);
@@ -955,7 +955,7 @@ const MapSelectTools = class {
955
955
  * @protected
956
956
  */
957
957
  _useLayerFeaturesEnabledChanged() {
958
- this._useLayerFeaturesEnabled = !this._useLayerFeaturesEnabled;
958
+ this.useLayerFeaturesEnabled = !this.useLayerFeaturesEnabled;
959
959
  if (this._sketchGraphic) {
960
960
  void this._sketchGraphicsChanged({
961
961
  detail: {
@@ -604,7 +604,7 @@ const PublicNotification = class {
604
604
  */
605
605
  _getSelectPage() {
606
606
  const noticeText = this._translations.selectSearchTip;
607
- return (index.h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText, "padding-1", "word-wrap-anywhere"), index.h("div", null, index.h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enableLayerFeatures: this.enableLayerFeatures, enableLayerFeaturesOnLoad: this.enableLayerFeaturesOnLoad, enableSearchDistance: this.enableSearchDistance, enableSearchDistanceOnLoad: this.enableSearchDistanceOnLoad, enableSketchTools: this.enableSketchTools, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, locale: this.locale, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
607
+ return (index.h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText, "padding-1", "word-wrap-anywhere"), index.h("div", null, index.h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enableLayerFeatures: this.enableLayerFeatures, enableLayerFeaturesOnLoad: this.enableLayerFeaturesOnLoad, enableSearchDistance: this.enableSearchDistance, enableSearchDistanceOnLoad: this.enableSearchDistanceOnLoad, enableSketchTools: this.enableSketchTools, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, locale: this.locale, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, searchDistanceEnabled: this.enableSearchDistanceOnLoad, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol, useLayerFeaturesEnabled: this.enableLayerFeaturesOnLoad })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
608
608
  }
609
609
  /**
610
610
  * Create the main download page that has the shared aspects of both PDF and CSV