@dexteel/mesf-core 4.7.2 → 4.7.3
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
|
+
## 4.7.3
|
|
3
|
+
- Trendings: Fix date time navigation when the scope is 'custom'. Navigator takes difference between start date and end date
|
|
2
4
|
## 4.7.2
|
|
3
5
|
- Trending: Fix repeated tags bug. When you select a tag that was already in the view, you get an error message
|
|
4
6
|
- MESF: Add a button in the navbar to go to /trendings
|
package/dist/index.esm.js
CHANGED
|
@@ -11064,8 +11064,12 @@ var CustomOptionsComponent = function (_a) {
|
|
|
11064
11064
|
};
|
|
11065
11065
|
|
|
11066
11066
|
var dateNavigator = function (startDate, endDate, scope, operator) {
|
|
11067
|
-
if (scope === "custom")
|
|
11068
|
-
|
|
11067
|
+
if (scope === "custom") {
|
|
11068
|
+
var durationInMs = moment(endDate).diff(moment(startDate));
|
|
11069
|
+
var newStartDate = moment(startDate)[operator](durationInMs).toDate();
|
|
11070
|
+
var newEndDate = moment(endDate)[operator](durationInMs).toDate();
|
|
11071
|
+
return { newStartDate: newStartDate, newEndDate: newEndDate };
|
|
11072
|
+
}
|
|
11069
11073
|
else {
|
|
11070
11074
|
var _a = scope.split(" "), quantity = _a[0], duration = _a[1];
|
|
11071
11075
|
var newStartDate = moment(startDate)[operator](quantity, duration[0]).toDate();
|