@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
@@ -64,6 +64,19 @@ const BufferTools = class {
64
64
  }
65
65
  //--------------------------------------------------------------------------
66
66
  //
67
+ // Methods (public)
68
+ //
69
+ //--------------------------------------------------------------------------
70
+ /**
71
+ * Get the translated unit for display
72
+ *
73
+ * @returns Promise resolving with the translated unit
74
+ */
75
+ async getTranslatedUnit(unit) {
76
+ return this._units[unit];
77
+ }
78
+ //--------------------------------------------------------------------------
79
+ //
67
80
  // Functions (lifecycle)
68
81
  //
69
82
  //--------------------------------------------------------------------------
@@ -75,6 +88,7 @@ const BufferTools = class {
75
88
  async componentWillLoad() {
76
89
  await this._getTranslations();
77
90
  await this._initModules();
91
+ this._initTranslatedUnits();
78
92
  }
79
93
  /**
80
94
  * Renders the component.
@@ -101,21 +115,28 @@ const BufferTools = class {
101
115
  this._geometryEngine = geometryEngine;
102
116
  }
103
117
  /**
104
- * Gets the nodes for each of the possible distance units
105
- *
106
- * @returns An array of option nodes
118
+ * Init the lookup hash for translated units
107
119
  *
108
120
  * @protected
109
121
  */
110
- _getUnits() {
111
- const units = {
122
+ _initTranslatedUnits() {
123
+ this._units = {
112
124
  "feet": this._translations.feet,
113
125
  "meters": this._translations.meters,
114
126
  "miles": this._translations.miles,
115
127
  "kilometers": this._translations.kilometers
116
128
  };
117
- return Object.keys(units).map(u => {
118
- return (index.h("calcite-option", { label: units[u], selected: this.unit === u, value: u }));
129
+ }
130
+ /**
131
+ * Gets the nodes for each of the possible distance units
132
+ *
133
+ * @returns An array of option nodes
134
+ *
135
+ * @protected
136
+ */
137
+ _getUnits() {
138
+ return Object.keys(this._units).map(u => {
139
+ return (index.h("calcite-option", { label: this._units[u], selected: this.unit === u, value: u }));
119
140
  });
120
141
  }
121
142
  /**
@@ -445,7 +445,11 @@ const EditCard = class {
445
445
  const container = document.createElement("div");
446
446
  this._editor = new this.Editor({
447
447
  allowedWorkflows: "update",
448
- view: this.mapView,
448
+ //view: this.mapView,
449
+ layerInfos: [{
450
+ layer: this._layer,
451
+ geometryUpdatesEnabled: false
452
+ }],
449
453
  visibleElements: {
450
454
  snappingControls: false,
451
455
  sketchTooltipControls: false
@@ -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%}.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}";
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}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}";
107
107
 
108
108
  const LayerTable = class {
109
109
  constructor(hostRef) {
@@ -243,7 +243,7 @@ const LayerTable = class {
243
243
  const loadingClass = this._fetchingData ? "" : "display-none";
244
244
  const total = this._allIds.length.toString();
245
245
  const selected = this._selectedIndexes.length.toString();
246
- return (index.h(index.Host, null, index.h("calcite-shell", null, this._getTableControlRow("header"), index.h("div", { class: "height-full width-full" }, index.h("calcite-panel", { class: "height-full width-full" }, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), index.h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
246
+ return (index.h(index.Host, null, index.h("calcite-shell", null, this._getTableControlRow("header"), index.h("div", { class: "height-full-adjusted width-full" }, index.h("calcite-panel", { class: "height-full width-full" }, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), index.h("div", { class: "bottom-left text-color" }, this._translations.recordsSelected
247
247
  .replace("{{total}}", total)
248
248
  .replace("{{selected}}", selected)))), this._deleteMessage()));
249
249
  }
@@ -424,7 +424,7 @@ const LayerTable = class {
424
424
  * @returns node to confirm or deny the delete operation
425
425
  */
426
426
  _deleteMessage() {
427
- return (index.h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, index.h("calcite-icon", { "aria-hidden": "true", class: "padding-end-1 danger-color", icon: "exclamation-mark-triangle", scale: "m" }), this._translations.deleteFeature), index.h("div", { slot: "content" }, this._translations.confirm), index.h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), index.h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
427
+ return (index.h("calcite-modal", { "aria-labelledby": "modal-title", kind: "danger", onCalciteModalClose: () => this._deleteClosed(), open: this._confirmDelete }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations.deleteFeature), index.h("div", { slot: "content" }, this._translations.confirm), index.h("calcite-button", { appearance: "outline", kind: "danger", onClick: () => this._deleteClosed(), slot: "secondary", width: "full" }, this._translations.cancel), index.h("calcite-button", { kind: "danger", loading: this._isDeleting, onClick: () => void this._deleteFeatures(), slot: "primary", width: "full" }, this._translations.delete)));
428
428
  }
429
429
  /**
430
430
  * Delete the currently selected features
@@ -72,10 +72,8 @@ const CrowdsourceManager = class {
72
72
  * Listen for mapChanged event to be fired then store the new mapView so components will be updated
73
73
  */
74
74
  async mapChanged(evt) {
75
- console.log("mapChanged");
76
75
  this._mapChange = evt.detail;
77
76
  await this._mapChange.mapView.when(() => {
78
- console.log("mapView.when");
79
77
  this._setMapView();
80
78
  });
81
79
  }