@mailstep/design-system 0.7.31-beta.5 → 0.7.31-beta.6
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/package.json +1 -1
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/pickerRangeToString.js +4 -2
- package/ui/Blocks/CommonGrid/store/index.js +1 -0
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +4 -0
- package/ui/index.es.js +6993 -6998
- package/ui/index.umd.js +398 -398
package/package.json
CHANGED
package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/pickerRangeToString.js
CHANGED
|
@@ -6,10 +6,12 @@ export var pickerRangeToString = function (values, others) {
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
if (values === void 0) { values = []; }
|
|
8
8
|
if (((_a = others === null || others === void 0 ? void 0 : others[0]) === null || _a === void 0 ? void 0 : _a.dateTypeRepeater) || ((_b = others === null || others === void 0 ? void 0 : others[1]) === null || _b === void 0 ? void 0 : _b.dateTypeRepeater)) {
|
|
9
|
+
console.log('others: ', others);
|
|
9
10
|
return others
|
|
10
11
|
.map(function (other, i) {
|
|
11
|
-
if (!other)
|
|
12
|
-
return
|
|
12
|
+
if (!(other === null || other === void 0 ? void 0 : other.dateTypeRepeater)) {
|
|
13
|
+
return values[i] && DateTime.fromJSDate(values[i]).toFormat('dd.LL.yyyy HH:mm');
|
|
14
|
+
}
|
|
13
15
|
var repeaterDate = DatePickerRepeatTrans[other === null || other === void 0 ? void 0 : other.dateTypeRepeater];
|
|
14
16
|
var repeaterTime = i === 0 ? TimePickerRepeatTrans.from : TimePickerRepeatTrans.to;
|
|
15
17
|
var time = (other === null || other === void 0 ? void 0 : other.time) ? "".concat(String(other === null || other === void 0 ? void 0 : other.time.h).padStart(2, '0'), ":").concat(String(other === null || other === void 0 ? void 0 : other.time.m).padStart(2, '0')) : '';
|
|
@@ -69,6 +69,7 @@ export default (function (state, action) {
|
|
|
69
69
|
// if this grid is not yet in store, initialize
|
|
70
70
|
draft[gridName] = __assign({}, initialState);
|
|
71
71
|
}
|
|
72
|
+
console.log('state: ', state);
|
|
72
73
|
switch (action.type) {
|
|
73
74
|
case actionTypes.init:
|
|
74
75
|
var defaultSorting = action.initProps.defaultSorting;
|
|
@@ -39,6 +39,10 @@ export var Timepicker = function (_a) {
|
|
|
39
39
|
useEffect(function () {
|
|
40
40
|
!!value && setTime('minutes', minutes);
|
|
41
41
|
}, [minutes]);
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
!!value && setHours(initialHours);
|
|
44
|
+
!!value && setMinutes(initialMinutes);
|
|
45
|
+
}, [!!value, initialHours, initialMinutes]);
|
|
42
46
|
var timeValue = "".concat(hours.toString().padStart(2, '0'), ":").concat(minutes.toString().padStart(2, '0'));
|
|
43
47
|
return (_jsx(x.div, { borderTop: "1px solid", borderColor: "lightGray2", pt: "8px", mb: "8px", children: _jsxs(FooterRow, { disabled: disabled, children: [_jsxs(x.div, { children: [_jsx(Icon, { icon: "clock" }), _jsx(FooterRowLabel, { children: i18n._({ id: 'dataGrid.filterCell.time', message: 'Time' }) })] }), _jsxs(x.div, { display: "flex", alignItems: "center", children: [_jsxs("b", { children: [isSecondDatePicker ? TimePickerRepeatTrans[TimePickerRepeat.TO] : TimePickerRepeatTrans[TimePickerRepeat.FROM], ":", ' '] }), _jsx(TimeInput, { type: "time", onChange: onChange, disabled: disabled, value: timeValue })] })] }) }));
|
|
44
48
|
};
|