@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.31-beta.5",
3
+ "version": "0.7.31-beta.6",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -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 false;
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
  };