@esri/solutions-components 0.6.26 → 0.6.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_4.cjs.entry.js +28 -7
- package/dist/cjs/calcite-alert_3.cjs.entry.js +4 -0
- package/dist/cjs/card-manager_3.cjs.entry.js +5 -8
- package/dist/cjs/crowdsource-manager.cjs.entry.js +0 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +14 -13
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +55 -7
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +0 -2
- package/dist/collection/components/edit-card/edit-card.js +4 -0
- package/dist/collection/components/layer-table/layer-table.css +4 -0
- package/dist/collection/components/layer-table/layer-table.js +2 -2
- package/dist/collection/components/map-card/map-card.js +2 -5
- package/dist/collection/components/map-select-tools/map-select-tools.js +14 -13
- package/dist/collection/demos/crowdsource-manager.html +0 -3
- package/dist/components/buffer-tools2.js +30 -8
- package/dist/components/crowdsource-manager.js +0 -2
- package/dist/components/edit-card2.js +4 -0
- package/dist/components/layer-table2.js +3 -3
- package/dist/components/map-card2.js +2 -5
- package/dist/components/map-select-tools2.js +14 -13
- package/dist/esm/buffer-tools_4.entry.js +28 -7
- package/dist/esm/calcite-alert_3.entry.js +4 -0
- package/dist/esm/card-manager_3.entry.js +5 -8
- package/dist/esm/crowdsource-manager.entry.js +0 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +14 -13
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +0 -3
- package/dist/solutions-components/p-25729b41.entry.js +6 -0
- package/dist/solutions-components/p-86893d46.entry.js +6 -0
- package/dist/solutions-components/{p-cfe4ec71.entry.js → p-c68d870a.entry.js} +3 -3
- package/dist/solutions-components/p-cd7873ae.entry.js +6 -0
- package/dist/solutions-components/{p-de268445.entry.js → p-f8687049.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +18 -0
- package/dist/types/components/map-card/map-card.d.ts +0 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +4 -4
- package/dist/types/components.d.ts +5 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-dc477b27.entry.js +0 -6
- package/dist/solutions-components/p-e3bf18fc.entry.js +0 -6
- 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
|
-
*
|
105
|
-
*
|
106
|
-
* @returns An array of option nodes
|
118
|
+
* Init the lookup hash for translated units
|
107
119
|
*
|
108
120
|
* @protected
|
109
121
|
*/
|
110
|
-
|
111
|
-
|
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
|
-
|
118
|
-
|
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
|
/**
|
@@ -446,6 +446,10 @@ const EditCard = class {
|
|
446
446
|
this._editor = new this.Editor({
|
447
447
|
allowedWorkflows: "update",
|
448
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
|
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" },
|
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
|
@@ -708,7 +708,6 @@ const MapCard = class {
|
|
708
708
|
*/
|
709
709
|
async componentWillLoad() {
|
710
710
|
await this._initModules();
|
711
|
-
this.esriConfig.portalUrl = "https://holistic.mapsdevext.arcgis.com";
|
712
711
|
}
|
713
712
|
/**
|
714
713
|
* Renders the component.
|
@@ -729,16 +728,14 @@ const MapCard = class {
|
|
729
728
|
* @protected
|
730
729
|
*/
|
731
730
|
async _initModules() {
|
732
|
-
const [WebMap, MapView, Home
|
731
|
+
const [WebMap, MapView, Home] = await loadModules.loadModules([
|
733
732
|
"esri/WebMap",
|
734
733
|
"esri/views/MapView",
|
735
|
-
"esri/widgets/Home"
|
736
|
-
"esri/config"
|
734
|
+
"esri/widgets/Home"
|
737
735
|
]);
|
738
736
|
this.WebMap = WebMap;
|
739
737
|
this.MapView = MapView;
|
740
738
|
this.Home = Home;
|
741
|
-
this.esriConfig = esriConfig;
|
742
739
|
}
|
743
740
|
/**
|
744
741
|
* Load the webmap for the provided webMapInfo
|
@@ -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
|
}
|