@esri/solutions-components 0.6.26 → 0.6.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/dist/cjs/buffer-tools_4.cjs.entry.js +28 -7
  2. package/dist/cjs/calcite-alert_3.cjs.entry.js +5 -1
  3. package/dist/cjs/card-manager_3.cjs.entry.js +3 -3
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +0 -2
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/map-select-tools_3.cjs.entry.js +14 -13
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/components/buffer-tools/buffer-tools.js +55 -7
  9. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +0 -2
  10. package/dist/collection/components/edit-card/edit-card.js +5 -1
  11. package/dist/collection/components/layer-table/layer-table.css +4 -0
  12. package/dist/collection/components/layer-table/layer-table.js +2 -2
  13. package/dist/collection/components/map-select-tools/map-select-tools.js +14 -13
  14. package/dist/collection/demos/crowdsource-manager.html +1 -1
  15. package/dist/components/buffer-tools2.js +30 -8
  16. package/dist/components/crowdsource-manager.js +0 -2
  17. package/dist/components/edit-card2.js +5 -1
  18. package/dist/components/layer-table2.js +3 -3
  19. package/dist/components/map-select-tools2.js +14 -13
  20. package/dist/esm/buffer-tools_4.entry.js +28 -7
  21. package/dist/esm/calcite-alert_3.entry.js +5 -1
  22. package/dist/esm/card-manager_3.entry.js +3 -3
  23. package/dist/esm/crowdsource-manager.entry.js +0 -2
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/map-select-tools_3.entry.js +14 -13
  26. package/dist/esm/solutions-components.js +1 -1
  27. package/dist/solutions-components/demos/crowdsource-manager.html +1 -1
  28. package/dist/solutions-components/p-25729b41.entry.js +6 -0
  29. package/dist/solutions-components/{p-de268445.entry.js → p-3fe6368e.entry.js} +1 -1
  30. package/dist/solutions-components/p-8144c528.entry.js +6 -0
  31. package/dist/solutions-components/p-86893d46.entry.js +6 -0
  32. package/dist/solutions-components/{p-cfe4ec71.entry.js → p-c68d870a.entry.js} +3 -3
  33. package/dist/solutions-components/solutions-components.esm.js +1 -1
  34. package/dist/types/components/buffer-tools/buffer-tools.d.ts +18 -0
  35. package/dist/types/components/map-select-tools/map-select-tools.d.ts +4 -4
  36. package/dist/types/components.d.ts +5 -0
  37. package/package.json +1 -1
  38. package/dist/esm/polyfills/core-js.js +0 -11
  39. package/dist/esm/polyfills/dom.js +0 -79
  40. package/dist/esm/polyfills/es5-html-element.js +0 -1
  41. package/dist/esm/polyfills/index.js +0 -34
  42. package/dist/esm/polyfills/system.js +0 -6
  43. package/dist/solutions-components/p-dc477b27.entry.js +0 -6
  44. package/dist/solutions-components/p-e3bf18fc.entry.js +0 -6
  45. package/dist/solutions-components/p-e48eb0b2.entry.js +0 -6
@@ -138,7 +138,11 @@ export class EditCard {
138
138
  const container = document.createElement("div");
139
139
  this._editor = new this.Editor({
140
140
  allowedWorkflows: "update",
141
- view: this.mapView,
141
+ //view: this.mapView,
142
+ layerInfos: [{
143
+ layer: this._layer,
144
+ geometryUpdatesEnabled: false
145
+ }],
142
146
  visibleElements: {
143
147
  snappingControls: false,
144
148
  sketchTooltipControls: false
@@ -22,6 +22,10 @@
22
22
  height: 100%;
23
23
  }
24
24
 
25
+ .height-full-adjusted {
26
+ height: calc(100% - 20px);
27
+ }
28
+
25
29
  .width-full {
26
30
  width: 100%;
27
31
  }
@@ -159,7 +159,7 @@ export class LayerTable {
159
159
  const loadingClass = this._fetchingData ? "" : "display-none";
160
160
  const total = this._allIds.length.toString();
161
161
  const selected = this._selectedIndexes.length.toString();
162
- return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
162
+ return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full-adjusted width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left text-color" }, this._translations.recordsSelected
163
163
  .replace("{{total}}", total)
164
164
  .replace("{{selected}}", selected)))), this._deleteMessage()));
165
165
  }
@@ -340,7 +340,7 @@ export class LayerTable {
340
340
  * @returns node to confirm or deny the delete operation
341
341
  */
342
342
  _deleteMessage() {
343
- return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, h("calcite-icon", { "aria-hidden": "true", class: "padding-end-1 danger-color", icon: "exclamation-mark-triangle", scale: "m" }), this._translations.deleteFeature), h("div", { slot: "content" }, this._translations.confirm), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
343
+ return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), h("div", { slot: "content" }, this._translations.confirm), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
344
344
  }
345
345
  /**
346
346
  * Delete the currently selected features
@@ -118,7 +118,7 @@ export class MapSelectTools {
118
118
  async getSelection() {
119
119
  // Allow any non whitespace
120
120
  if (!/\S+/gm.test(this._selectionLabel)) {
121
- this._updateLabel();
121
+ await this._updateLabel();
122
122
  }
123
123
  return {
124
124
  id: this.isUpdate ? this.selectionSet.id : Date.now(),
@@ -149,16 +149,16 @@ export class MapSelectTools {
149
149
  /**
150
150
  * Handle changes to the buffer distance value
151
151
  */
152
- distanceChanged(event) {
153
- this._distanceChanged(event.detail);
152
+ async distanceChanged(event) {
153
+ await this._distanceChanged(event.detail);
154
154
  }
155
155
  /**
156
156
  * Handle changes to the buffer unit
157
157
  */
158
- unitChanged(event) {
158
+ async unitChanged(event) {
159
159
  if (event.detail.newValue !== event.detail.oldValue) {
160
160
  this._unit = event.detail.newValue;
161
- this._updateLabel();
161
+ await this._updateLabel();
162
162
  }
163
163
  }
164
164
  //--------------------------------------------------------------------------
@@ -334,7 +334,7 @@ export class MapSelectTools {
334
334
  const useOIDs = ((_b = (_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer) === null || _b === void 0 ? void 0 : _b.id) && searchResults.source.layer.id === this.selectLayerView.layer.id;
335
335
  const oids = useOIDs ? [searchResults.result.feature.getObjectId()] : undefined;
336
336
  this._workflowType = EWorkflowType.SEARCH;
337
- this._updateLabel();
337
+ void this._updateLabel();
338
338
  const graphics = [searchResults.result.feature];
339
339
  this._updateSelection(graphics, useOIDs, oids);
340
340
  this._drawTools.graphics = graphics;
@@ -446,7 +446,7 @@ export class MapSelectTools {
446
446
  if (this._workflowType === EWorkflowType.SKETCH) {
447
447
  this._drawTools.updateGraphics();
448
448
  }
449
- this._updateLabel();
449
+ await this._updateLabel();
450
450
  this._clearSearchWidget();
451
451
  if (this._useLayerFeaturesEnabled && !forceUpdate) {
452
452
  // Will only ever be a single graphic
@@ -564,7 +564,7 @@ export class MapSelectTools {
564
564
  }
565
565
  // mock this b/c the tools can store a value that is different than what is shown in the map
566
566
  // this occurs when a distance is set but then buffer is disabled
567
- this._distanceChanged({
567
+ await this._distanceChanged({
568
568
  oldValue,
569
569
  newValue
570
570
  });
@@ -643,7 +643,7 @@ export class MapSelectTools {
643
643
  *
644
644
  * @protected
645
645
  */
646
- _updateLabel() {
646
+ async _updateLabel() {
647
647
  var _a, _b;
648
648
  const hasSketch = this._selectionLabel.indexOf(this._translations.sketch) > -1;
649
649
  const hasSelect = this._selectionLabel.indexOf(this._translations.select) > -1;
@@ -651,7 +651,8 @@ export class MapSelectTools {
651
651
  const label = this._workflowType === EWorkflowType.SEARCH ? (_b = this._searchResult) === null || _b === void 0 ? void 0 : _b.name :
652
652
  this._workflowType === EWorkflowType.SELECT ?
653
653
  this._translations.select : this._translations.sketch;
654
- const unit = !this._unit ? this._bufferTools.unit : this._unit;
654
+ const _unit = !this._unit ? this._bufferTools.unit : this._unit;
655
+ const unit = await this._bufferTools.getTranslatedUnit(_unit);
655
656
  const distance = isNaN(this._distance) ? this._bufferTools.distance : this._distance;
656
657
  this._selectionLabel = hasSketch || hasSelect || hasSearch || !this._selectionLabel ?
657
658
  `${label} ${distance} ${unit}` : this._selectionLabel;
@@ -696,7 +697,7 @@ export class MapSelectTools {
696
697
  const id = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
697
698
  if (!this.selectLayerView || id !== this.selectLayerView.layer.id) {
698
699
  this.selectLayerView = await getFeatureLayerView(this.mapView, id);
699
- this._updateLabel();
700
+ await this._updateLabel();
700
701
  this._bufferGeometry ? await this._selectFeatures([this._bufferGeometry]) :
701
702
  await this._highlightWithOIDsOrGeoms();
702
703
  }
@@ -704,10 +705,10 @@ export class MapSelectTools {
704
705
  /**
705
706
  * Handle changes to the buffer distance value
706
707
  */
707
- _distanceChanged(detail) {
708
+ async _distanceChanged(detail) {
708
709
  if (detail.newValue !== detail.oldValue) {
709
710
  this._distance = detail.newValue;
710
- this._updateLabel();
711
+ await this._updateLabel();
711
712
  }
712
713
  }
713
714
  /**
@@ -84,7 +84,7 @@
84
84
  ...custom,
85
85
  ...[{
86
86
  id: "e443af6208f6482d8737c406bdbcb17d",
87
- name: "holistic map"
87
+ name: "edit issues"
88
88
  }, {
89
89
  id: "ce3dec81bf714d3bb71da9691ab686d1",
90
90
  name: "Popup Configured Map",
@@ -53,6 +53,19 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class BufferTools extends H
53
53
  }
54
54
  //--------------------------------------------------------------------------
55
55
  //
56
+ // Methods (public)
57
+ //
58
+ //--------------------------------------------------------------------------
59
+ /**
60
+ * Get the translated unit for display
61
+ *
62
+ * @returns Promise resolving with the translated unit
63
+ */
64
+ async getTranslatedUnit(unit) {
65
+ return this._units[unit];
66
+ }
67
+ //--------------------------------------------------------------------------
68
+ //
56
69
  // Functions (lifecycle)
57
70
  //
58
71
  //--------------------------------------------------------------------------
@@ -64,6 +77,7 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class BufferTools extends H
64
77
  async componentWillLoad() {
65
78
  await this._getTranslations();
66
79
  await this._initModules();
80
+ this._initTranslatedUnits();
67
81
  }
68
82
  /**
69
83
  * Renders the component.
@@ -90,21 +104,28 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class BufferTools extends H
90
104
  this._geometryEngine = geometryEngine;
91
105
  }
92
106
  /**
93
- * Gets the nodes for each of the possible distance units
94
- *
95
- * @returns An array of option nodes
107
+ * Init the lookup hash for translated units
96
108
  *
97
109
  * @protected
98
110
  */
99
- _getUnits() {
100
- const units = {
111
+ _initTranslatedUnits() {
112
+ this._units = {
101
113
  "feet": this._translations.feet,
102
114
  "meters": this._translations.meters,
103
115
  "miles": this._translations.miles,
104
116
  "kilometers": this._translations.kilometers
105
117
  };
106
- return Object.keys(units).map(u => {
107
- return (h("calcite-option", { label: units[u], selected: this.unit === u, value: u }));
118
+ }
119
+ /**
120
+ * Gets the nodes for each of the possible distance units
121
+ *
122
+ * @returns An array of option nodes
123
+ *
124
+ * @protected
125
+ */
126
+ _getUnits() {
127
+ return Object.keys(this._units).map(u => {
128
+ return (h("calcite-option", { label: this._units[u], selected: this.unit === u, value: u }));
108
129
  });
109
130
  }
110
131
  /**
@@ -231,7 +252,8 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class BufferTools extends H
231
252
  "unionResults": [1028, "union-results"],
232
253
  "unit": [1025],
233
254
  "disabled": [4],
234
- "_translations": [32]
255
+ "_translations": [32],
256
+ "getTranslatedUnit": [64]
235
257
  }, undefined, {
236
258
  "geometries": ["geometriesWatchHandler"],
237
259
  "disabled": ["disabledWatchHandler"]
@@ -111,10 +111,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
111
111
  * Listen for mapChanged event to be fired then store the new mapView so components will be updated
112
112
  */
113
113
  async mapChanged(evt) {
114
- console.log("mapChanged");
115
114
  this._mapChange = evt.detail;
116
115
  await this._mapChange.mapView.when(() => {
117
- console.log("mapView.when");
118
116
  this._setMapView();
119
117
  });
120
118
  }
@@ -133,7 +133,11 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
133
133
  const container = document.createElement("div");
134
134
  this._editor = new this.Editor({
135
135
  allowedWorkflows: "update",
136
- view: this.mapView,
136
+ //view: this.mapView,
137
+ layerInfos: [{
138
+ layer: this._layer,
139
+ geometryUpdatesEnabled: false
140
+ }],
137
141
  visibleElements: {
138
142
  snappingControls: false,
139
143
  sketchTooltipControls: false
@@ -33,7 +33,7 @@ import { d as defineCustomElement$3 } from './shell.js';
33
33
  import { d as defineCustomElement$2 } from './tooltip.js';
34
34
  import { d as defineCustomElement$1 } from './map-layer-picker2.js';
35
35
 
36
- const layerTableCss = ":host{display:block}.height-full{height:100%}.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}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.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}";
36
+ 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}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.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}";
37
37
 
38
38
  const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
39
39
  constructor() {
@@ -174,7 +174,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
174
174
  const loadingClass = this._fetchingData ? "" : "display-none";
175
175
  const total = this._allIds.length.toString();
176
176
  const selected = this._selectedIndexes.length.toString();
177
- return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
177
+ return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full-adjusted width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left text-color" }, this._translations.recordsSelected
178
178
  .replace("{{total}}", total)
179
179
  .replace("{{selected}}", selected)))), this._deleteMessage()));
180
180
  }
@@ -355,7 +355,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
355
355
  * @returns node to confirm or deny the delete operation
356
356
  */
357
357
  _deleteMessage() {
358
- return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, h("calcite-icon", { "aria-hidden": "true", class: "padding-end-1 danger-color", icon: "exclamation-mark-triangle", scale: "m" }), this._translations.deleteFeature), h("div", { slot: "content" }, this._translations.confirm), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
358
+ return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), h("div", { slot: "content" }, this._translations.confirm), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
359
359
  }
360
360
  /**
361
361
  * Delete the currently selected features
@@ -134,7 +134,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
134
134
  async getSelection() {
135
135
  // Allow any non whitespace
136
136
  if (!/\S+/gm.test(this._selectionLabel)) {
137
- this._updateLabel();
137
+ await this._updateLabel();
138
138
  }
139
139
  return {
140
140
  id: this.isUpdate ? this.selectionSet.id : Date.now(),
@@ -165,16 +165,16 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
165
165
  /**
166
166
  * Handle changes to the buffer distance value
167
167
  */
168
- distanceChanged(event) {
169
- this._distanceChanged(event.detail);
168
+ async distanceChanged(event) {
169
+ await this._distanceChanged(event.detail);
170
170
  }
171
171
  /**
172
172
  * Handle changes to the buffer unit
173
173
  */
174
- unitChanged(event) {
174
+ async unitChanged(event) {
175
175
  if (event.detail.newValue !== event.detail.oldValue) {
176
176
  this._unit = event.detail.newValue;
177
- this._updateLabel();
177
+ await this._updateLabel();
178
178
  }
179
179
  }
180
180
  //--------------------------------------------------------------------------
@@ -350,7 +350,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
350
350
  const useOIDs = ((_b = (_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer) === null || _b === void 0 ? void 0 : _b.id) && searchResults.source.layer.id === this.selectLayerView.layer.id;
351
351
  const oids = useOIDs ? [searchResults.result.feature.getObjectId()] : undefined;
352
352
  this._workflowType = EWorkflowType.SEARCH;
353
- this._updateLabel();
353
+ void this._updateLabel();
354
354
  const graphics = [searchResults.result.feature];
355
355
  this._updateSelection(graphics, useOIDs, oids);
356
356
  this._drawTools.graphics = graphics;
@@ -462,7 +462,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
462
462
  if (this._workflowType === EWorkflowType.SKETCH) {
463
463
  this._drawTools.updateGraphics();
464
464
  }
465
- this._updateLabel();
465
+ await this._updateLabel();
466
466
  this._clearSearchWidget();
467
467
  if (this._useLayerFeaturesEnabled && !forceUpdate) {
468
468
  // Will only ever be a single graphic
@@ -580,7 +580,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
580
580
  }
581
581
  // mock this b/c the tools can store a value that is different than what is shown in the map
582
582
  // this occurs when a distance is set but then buffer is disabled
583
- this._distanceChanged({
583
+ await this._distanceChanged({
584
584
  oldValue,
585
585
  newValue
586
586
  });
@@ -659,7 +659,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
659
659
  *
660
660
  * @protected
661
661
  */
662
- _updateLabel() {
662
+ async _updateLabel() {
663
663
  var _a, _b;
664
664
  const hasSketch = this._selectionLabel.indexOf(this._translations.sketch) > -1;
665
665
  const hasSelect = this._selectionLabel.indexOf(this._translations.select) > -1;
@@ -667,7 +667,8 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
667
667
  const label = this._workflowType === EWorkflowType.SEARCH ? (_b = this._searchResult) === null || _b === void 0 ? void 0 : _b.name :
668
668
  this._workflowType === EWorkflowType.SELECT ?
669
669
  this._translations.select : this._translations.sketch;
670
- const unit = !this._unit ? this._bufferTools.unit : this._unit;
670
+ const _unit = !this._unit ? this._bufferTools.unit : this._unit;
671
+ const unit = await this._bufferTools.getTranslatedUnit(_unit);
671
672
  const distance = isNaN(this._distance) ? this._bufferTools.distance : this._distance;
672
673
  this._selectionLabel = hasSketch || hasSelect || hasSearch || !this._selectionLabel ?
673
674
  `${label} ${distance} ${unit}` : this._selectionLabel;
@@ -712,7 +713,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
712
713
  const id = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
713
714
  if (!this.selectLayerView || id !== this.selectLayerView.layer.id) {
714
715
  this.selectLayerView = await getFeatureLayerView(this.mapView, id);
715
- this._updateLabel();
716
+ await this._updateLabel();
716
717
  this._bufferGeometry ? await this._selectFeatures([this._bufferGeometry]) :
717
718
  await this._highlightWithOIDsOrGeoms();
718
719
  }
@@ -720,10 +721,10 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
720
721
  /**
721
722
  * Handle changes to the buffer distance value
722
723
  */
723
- _distanceChanged(detail) {
724
+ async _distanceChanged(detail) {
724
725
  if (detail.newValue !== detail.oldValue) {
725
726
  this._distance = detail.newValue;
726
- this._updateLabel();
727
+ await this._updateLabel();
727
728
  }
728
729
  }
729
730
  /**
@@ -60,6 +60,19 @@ const BufferTools = class {
60
60
  }
61
61
  //--------------------------------------------------------------------------
62
62
  //
63
+ // Methods (public)
64
+ //
65
+ //--------------------------------------------------------------------------
66
+ /**
67
+ * Get the translated unit for display
68
+ *
69
+ * @returns Promise resolving with the translated unit
70
+ */
71
+ async getTranslatedUnit(unit) {
72
+ return this._units[unit];
73
+ }
74
+ //--------------------------------------------------------------------------
75
+ //
63
76
  // Functions (lifecycle)
64
77
  //
65
78
  //--------------------------------------------------------------------------
@@ -71,6 +84,7 @@ const BufferTools = class {
71
84
  async componentWillLoad() {
72
85
  await this._getTranslations();
73
86
  await this._initModules();
87
+ this._initTranslatedUnits();
74
88
  }
75
89
  /**
76
90
  * Renders the component.
@@ -97,21 +111,28 @@ const BufferTools = class {
97
111
  this._geometryEngine = geometryEngine;
98
112
  }
99
113
  /**
100
- * Gets the nodes for each of the possible distance units
101
- *
102
- * @returns An array of option nodes
114
+ * Init the lookup hash for translated units
103
115
  *
104
116
  * @protected
105
117
  */
106
- _getUnits() {
107
- const units = {
118
+ _initTranslatedUnits() {
119
+ this._units = {
108
120
  "feet": this._translations.feet,
109
121
  "meters": this._translations.meters,
110
122
  "miles": this._translations.miles,
111
123
  "kilometers": this._translations.kilometers
112
124
  };
113
- return Object.keys(units).map(u => {
114
- return (h("calcite-option", { label: units[u], selected: this.unit === u, value: u }));
125
+ }
126
+ /**
127
+ * Gets the nodes for each of the possible distance units
128
+ *
129
+ * @returns An array of option nodes
130
+ *
131
+ * @protected
132
+ */
133
+ _getUnits() {
134
+ return Object.keys(this._units).map(u => {
135
+ return (h("calcite-option", { label: this._units[u], selected: this.unit === u, value: u }));
115
136
  });
116
137
  }
117
138
  /**
@@ -441,7 +441,11 @@ const EditCard = class {
441
441
  const container = document.createElement("div");
442
442
  this._editor = new this.Editor({
443
443
  allowedWorkflows: "update",
444
- view: this.mapView,
444
+ //view: this.mapView,
445
+ layerInfos: [{
446
+ layer: this._layer,
447
+ geometryUpdatesEnabled: false
448
+ }],
445
449
  visibleElements: {
446
450
  snappingControls: false,
447
451
  sketchTooltipControls: false
@@ -99,7 +99,7 @@ const CardManager = class {
99
99
  };
100
100
  CardManager.style = cardManagerCss;
101
101
 
102
- const layerTableCss = ":host{display:block}.height-full{height:100%}.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}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.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}";
102
+ 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}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.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}";
103
103
 
104
104
  const LayerTable = class {
105
105
  constructor(hostRef) {
@@ -239,7 +239,7 @@ const LayerTable = class {
239
239
  const loadingClass = this._fetchingData ? "" : "display-none";
240
240
  const total = this._allIds.length.toString();
241
241
  const selected = this._selectedIndexes.length.toString();
242
- return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
242
+ return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full-adjusted width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left text-color" }, this._translations.recordsSelected
243
243
  .replace("{{total}}", total)
244
244
  .replace("{{selected}}", selected)))), this._deleteMessage()));
245
245
  }
@@ -420,7 +420,7 @@ const LayerTable = class {
420
420
  * @returns node to confirm or deny the delete operation
421
421
  */
422
422
  _deleteMessage() {
423
- return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, h("calcite-icon", { "aria-hidden": "true", class: "padding-end-1 danger-color", icon: "exclamation-mark-triangle", scale: "m" }), this._translations.deleteFeature), h("div", { slot: "content" }, this._translations.confirm), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
423
+ return (h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), h("div", { slot: "content" }, this._translations.confirm), h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
424
424
  }
425
425
  /**
426
426
  * Delete the currently selected features
@@ -68,10 +68,8 @@ const CrowdsourceManager = class {
68
68
  * Listen for mapChanged event to be fired then store the new mapView so components will be updated
69
69
  */
70
70
  async mapChanged(evt) {
71
- console.log("mapChanged");
72
71
  this._mapChange = evt.detail;
73
72
  await this._mapChange.mapView.when(() => {
74
- console.log("mapView.when");
75
73
  this._setMapView();
76
74
  });
77
75
  }