@reltio/components 1.4.1893 → 1.4.1894

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.
@@ -77,10 +77,29 @@ var DateEditor = function (_a) {
77
77
  },
78
78
  InputLabelProps: { shrink: !(0, ramda_1.isNil)(label) }
79
79
  },
80
- popper: { placement: 'bottom-start' },
80
+ popper: {
81
+ placement: 'bottom-start',
82
+ modifiers: [
83
+ {
84
+ name: 'viewHeightModifier',
85
+ enabled: true,
86
+ phase: 'beforeWrite',
87
+ fn: function (_a) {
88
+ var state = _a.state;
89
+ state.styles.popper.height = '358px';
90
+ if (state.placement.includes('top-start')) {
91
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'flex', alignItems: 'flex-end' });
92
+ }
93
+ if (state.placement.includes('bottom')) {
94
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'block' });
95
+ }
96
+ }
97
+ }
98
+ ]
99
+ },
81
100
  inputAdornment: { position: 'end', className: styles.adornedEnd }
82
101
  };
83
102
  var editorSlotProps = (0, ramda_1.mergeDeepLeft)(slotProps, basicSlotProps);
84
- return (react_1.default.createElement(DatePicker_1.DatePicker, __assign({ format: format || moment_1.default.localeData().longDateFormat('L'), slotProps: editorSlotProps, views: ['year', 'month', 'day'], label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange }, otherProps)));
103
+ return (react_1.default.createElement(DatePicker_1.DatePicker, __assign({ format: format || moment_1.default.localeData().longDateFormat('L'), slotProps: editorSlotProps, views: ['year', 'month', 'day'], label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange, reduceAnimations: true }, otherProps)));
85
104
  };
86
105
  exports.DateEditor = DateEditor;
@@ -53,7 +53,26 @@ var TimestampEditor = function (_a) {
53
53
  },
54
54
  InputLabelProps: { shrink: !(0, ramda_1.isNil)(label) }
55
55
  },
56
- popper: { placement: 'bottom-start' },
56
+ popper: {
57
+ placement: 'bottom-start',
58
+ modifiers: [
59
+ {
60
+ name: 'viewHeightModifier',
61
+ enabled: true,
62
+ phase: 'beforeWrite',
63
+ fn: function (_a) {
64
+ var state = _a.state;
65
+ state.styles.popper.height = '358px';
66
+ if (state.placement.includes('top-start')) {
67
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'flex', alignItems: 'flex-end' });
68
+ }
69
+ if (state.placement.includes('bottom')) {
70
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'block' });
71
+ }
72
+ }
73
+ }
74
+ ]
75
+ },
57
76
  inputAdornment: { position: 'end', className: styles.adornedEnd }
58
77
  };
59
78
  var editorSlotProps = (0, ramda_1.mergeDeepLeft)(slotProps, basicSlotProps);
@@ -61,6 +80,6 @@ var TimestampEditor = function (_a) {
61
80
  hours: timeViewRenderers_1.renderTimeViewClock,
62
81
  minutes: timeViewRenderers_1.renderTimeViewClock,
63
82
  seconds: timeViewRenderers_1.renderTimeViewClock
64
- }, label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange }, otherProps)));
83
+ }, label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange, reduceAnimations: true }, otherProps)));
65
84
  };
66
85
  exports.TimestampEditor = TimestampEditor;
@@ -48,9 +48,28 @@ export var DateEditor = function (_a) {
48
48
  },
49
49
  InputLabelProps: { shrink: !isNil(label) }
50
50
  },
51
- popper: { placement: 'bottom-start' },
51
+ popper: {
52
+ placement: 'bottom-start',
53
+ modifiers: [
54
+ {
55
+ name: 'viewHeightModifier',
56
+ enabled: true,
57
+ phase: 'beforeWrite',
58
+ fn: function (_a) {
59
+ var state = _a.state;
60
+ state.styles.popper.height = '358px';
61
+ if (state.placement.includes('top-start')) {
62
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'flex', alignItems: 'flex-end' });
63
+ }
64
+ if (state.placement.includes('bottom')) {
65
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'block' });
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ },
52
71
  inputAdornment: { position: 'end', className: styles.adornedEnd }
53
72
  };
54
73
  var editorSlotProps = mergeDeepLeft(slotProps, basicSlotProps);
55
- return (React.createElement(DatePicker, __assign({ format: format || moment.localeData().longDateFormat('L'), slotProps: editorSlotProps, views: ['year', 'month', 'day'], label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange }, otherProps)));
74
+ return (React.createElement(DatePicker, __assign({ format: format || moment.localeData().longDateFormat('L'), slotProps: editorSlotProps, views: ['year', 'month', 'day'], label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange, reduceAnimations: true }, otherProps)));
56
75
  };
@@ -47,7 +47,26 @@ export var TimestampEditor = function (_a) {
47
47
  },
48
48
  InputLabelProps: { shrink: !isNil(label) }
49
49
  },
50
- popper: { placement: 'bottom-start' },
50
+ popper: {
51
+ placement: 'bottom-start',
52
+ modifiers: [
53
+ {
54
+ name: 'viewHeightModifier',
55
+ enabled: true,
56
+ phase: 'beforeWrite',
57
+ fn: function (_a) {
58
+ var state = _a.state;
59
+ state.styles.popper.height = '358px';
60
+ if (state.placement.includes('top-start')) {
61
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'flex', alignItems: 'flex-end' });
62
+ }
63
+ if (state.placement.includes('bottom')) {
64
+ state.styles.popper = __assign(__assign({}, state.styles.popper), { display: 'block' });
65
+ }
66
+ }
67
+ }
68
+ ]
69
+ },
51
70
  inputAdornment: { position: 'end', className: styles.adornedEnd }
52
71
  };
53
72
  var editorSlotProps = mergeDeepLeft(slotProps, basicSlotProps);
@@ -55,5 +74,5 @@ export var TimestampEditor = function (_a) {
55
74
  hours: renderTimeViewClock,
56
75
  minutes: renderTimeViewClock,
57
76
  seconds: renderTimeViewClock
58
- }, label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange }, otherProps)));
77
+ }, label: label, value: editorValue, minDate: editorMinDate, maxDate: editorMaxDate, onError: onError, onChange: handleChange, reduceAnimations: true }, otherProps)));
59
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1893",
3
+ "version": "1.4.1894",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",