@esri/solutions-components 0.6.31 → 0.6.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -351,7 +351,7 @@ const EditCard = class {
351
351
  */
352
352
  async graphicsWatchHandler() {
353
353
  if (this.graphics.length === 0) {
354
- this._closeEdit();
354
+ await this._closeEdit();
355
355
  }
356
356
  }
357
357
  async openWatchHandler(v) {
@@ -365,9 +365,12 @@ const EditCard = class {
365
365
  this._editorLoading = false;
366
366
  }
367
367
  if (!v) {
368
- this._closeEdit();
368
+ await this._closeEdit();
369
369
  }
370
370
  }
371
+ async featureSelectionChange() {
372
+ await this._closeEdit();
373
+ }
371
374
  //--------------------------------------------------------------------------
372
375
  //
373
376
  // Functions (lifecycle)
@@ -397,7 +400,7 @@ const EditCard = class {
397
400
  }
398
401
  this._layerEditHandle = this._layer.on("edits", () => {
399
402
  this.editsComplete.emit();
400
- this._closeEdit();
403
+ void this._closeEdit();
401
404
  });
402
405
  }
403
406
  }
@@ -468,7 +471,7 @@ const EditCard = class {
468
471
  });
469
472
  this._editHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "ready", () => {
470
473
  if (this._shouldClose) {
471
- this._closeEdit();
474
+ void this._closeEdit();
472
475
  }
473
476
  else if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
474
477
  void this._startUpdate();
@@ -488,7 +491,13 @@ const EditCard = class {
488
491
  *
489
492
  * @returns void
490
493
  */
491
- _closeEdit() {
494
+ async _closeEdit() {
495
+ var _a, _b, _c;
496
+ this._shouldClose = true;
497
+ if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
498
+ await ((_b = this._editor) === null || _b === void 0 ? void 0 : _b.cancelWorkflow());
499
+ }
500
+ (_c = this._editor) === null || _c === void 0 ? void 0 : _c.destroy();
492
501
  this._shouldClose = false;
493
502
  this.closeEdit.emit();
494
503
  }
@@ -103,7 +103,7 @@ const CardManager = class {
103
103
  };
104
104
  CardManager.style = cardManagerCss;
105
105
 
106
- const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.bottom-left{position:absolute;left:5;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:5;bottom:0}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}";
106
+ const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}";
107
107
 
108
108
  const LayerTable = class {
109
109
  constructor(hostRef) {
@@ -683,33 +683,30 @@ const LayerTable = class {
683
683
  * @returns void
684
684
  */
685
685
  async _resetTable() {
686
- if (this._table) {
687
- this._clearSelection();
688
- this._allIds = [];
689
- this.featureSelectionChange.emit(this._selectedIndexes);
690
- if (this._layer) {
691
- await this._layer.when(() => {
692
- var _a, _b;
693
- const columnTemplates = this._getColumnTemplates(this._layer.id, (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.popupTemplate) === null || _b === void 0 ? void 0 : _b.fieldInfos);
694
- this._table.layer = this._layer;
695
- this._table.tableTemplate.columnTemplates = columnTemplates;
696
- this._table.view = this.mapView;
697
- this._checkEditEnabled();
698
- this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
699
- this._initToolInfos();
700
- });
701
- await this._table.when(() => {
702
- this._table.clearSelectionFilter();
703
- });
704
- this._showOnlySelected = false;
705
- this._sortActive = false;
706
- await this._sortTable();
707
- }
708
- else {
709
- this._table.view = this.mapView;
710
- this._table.layer = this._layer;
711
- }
686
+ var _a, _b;
687
+ this._clearSelection();
688
+ this._allIds = [];
689
+ this.featureSelectionChange.emit(this._selectedIndexes);
690
+ const columnTemplates = this._getColumnTemplates(this._layer.id, (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.popupTemplate) === null || _b === void 0 ? void 0 : _b.fieldInfos);
691
+ this._allIds = await mapViewUtils.queryAllIds(this._layer);
692
+ if (!this._table) {
693
+ await this._getTable(this._tableNode, columnTemplates);
694
+ }
695
+ else if (columnTemplates) {
696
+ this._table.tableTemplate.columnTemplates = columnTemplates;
712
697
  }
698
+ this._table.layer = this._layer;
699
+ this._table.view = this.mapView;
700
+ this._checkEditEnabled();
701
+ this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
702
+ this._initToolInfos();
703
+ await this._table.when(() => {
704
+ this._table.highlightIds.removeAll();
705
+ this._table.clearSelectionFilter();
706
+ });
707
+ this._showOnlySelected = false;
708
+ this._sortActive = false;
709
+ await this._sortTable();
713
710
  }
714
711
  /**
715
712
  * Verify edit capabilities of the layer
@@ -911,28 +908,15 @@ const LayerTable = class {
911
908
  * @returns a promise that will resolve when the operation is complete
912
909
  */
913
910
  async _layerSelectionChanged(evt) {
914
- var _a, _b, _c;
911
+ var _a;
915
912
  const id = evt.detail[0];
916
913
  if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._allIds.length === 0) {
917
914
  this._fetchingData = true;
918
- this._layer = await mapViewUtils.getLayerOrTable(this.mapView, id);
919
- const columnTemplates = this._getColumnTemplates(id, (_c = (_b = this._layer) === null || _b === void 0 ? void 0 : _b.popupTemplate) === null || _c === void 0 ? void 0 : _c.fieldInfos);
920
- this._allIds = await mapViewUtils.queryAllIds(this._layer);
921
- if (!this._table) {
922
- await this._getTable(this._tableNode, columnTemplates);
923
- }
924
- else if (columnTemplates) {
925
- this._table.tableTemplate.columnTemplates = columnTemplates;
926
- }
927
- await this._table.when(() => {
928
- this._table.highlightIds.removeAll();
915
+ const layer = await mapViewUtils.getLayerOrTable(this.mapView, id);
916
+ await layer.when(() => {
917
+ this._layer = layer;
929
918
  });
930
- this._selectedIndexes = [];
931
- this._table.layer = this._layer;
932
- this._table.render();
933
919
  }
934
- this._sortActive = false;
935
- await this._sortTable();
936
920
  this._fetchingData = false;
937
921
  }
938
922
  /**