@synerise/ds-date-picker 0.10.43 → 0.10.45

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
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.10.45](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.44...@synerise/ds-date-picker@0.10.45) (2024-04-29)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-date-picker
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.10.44](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.43...@synerise/ds-date-picker@0.10.44) (2024-04-15)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-date-picker
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.10.43](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.42...@synerise/ds-date-picker@0.10.43) (2024-04-05)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-date-picker
@@ -1,5 +1,3 @@
1
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2
-
3
1
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
4
2
 
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -30,8 +28,6 @@ function getCells(cursor) {
30
28
  }
31
29
 
32
30
  var DecadePicker = /*#__PURE__*/function (_React$PureComponent) {
33
- _inheritsLoose(DecadePicker, _React$PureComponent);
34
-
35
31
  function DecadePicker() {
36
32
  var _this;
37
33
 
@@ -41,9 +37,9 @@ var DecadePicker = /*#__PURE__*/function (_React$PureComponent) {
41
37
 
42
38
  _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
43
39
 
44
- _defineProperty(_assertThisInitialized(_this), "state", getInitialState(_this.props));
40
+ _defineProperty(_this, "state", getInitialState(_this.props));
45
41
 
46
- _defineProperty(_assertThisInitialized(_this), "handleLongPrev", function () {
42
+ _defineProperty(_this, "handleLongPrev", function () {
47
43
  var cursor = _this.state.cursor;
48
44
 
49
45
  _this.setState({
@@ -51,7 +47,7 @@ var DecadePicker = /*#__PURE__*/function (_React$PureComponent) {
51
47
  });
52
48
  });
53
49
 
54
- _defineProperty(_assertThisInitialized(_this), "handleLongNext", function () {
50
+ _defineProperty(_this, "handleLongNext", function () {
55
51
  var cursor = _this.state.cursor;
56
52
 
57
53
  _this.setState({
@@ -59,7 +55,7 @@ var DecadePicker = /*#__PURE__*/function (_React$PureComponent) {
59
55
  });
60
56
  });
61
57
 
62
- _defineProperty(_assertThisInitialized(_this), "handleCellClick", function (isoDate) {
58
+ _defineProperty(_this, "handleCellClick", function (isoDate) {
63
59
  var onChange = _this.props.onChange;
64
60
 
65
61
  if (isoDate === -1) {
@@ -80,6 +76,8 @@ var DecadePicker = /*#__PURE__*/function (_React$PureComponent) {
80
76
  return _this;
81
77
  }
82
78
 
79
+ _inheritsLoose(DecadePicker, _React$PureComponent);
80
+
83
81
  var _proto = DecadePicker.prototype;
84
82
 
85
83
  _proto.getSnapshotBeforeUpdate = function getSnapshotBeforeUpdate(prevProps) {
@@ -1,5 +1,3 @@
1
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2
-
3
1
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
4
2
 
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -9,8 +7,6 @@ import classNames from 'classnames';
9
7
  import * as S from './GridPicker.styles';
10
8
 
11
9
  var GridPicker = /*#__PURE__*/function (_React$PureComponent) {
12
- _inheritsLoose(GridPicker, _React$PureComponent);
13
-
14
10
  function GridPicker() {
15
11
  var _this;
16
12
 
@@ -20,13 +16,13 @@ var GridPicker = /*#__PURE__*/function (_React$PureComponent) {
20
16
 
21
17
  _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
22
18
 
23
- _defineProperty(_assertThisInitialized(_this), "handleCellClick", function (cell) {
19
+ _defineProperty(_this, "handleCellClick", function (cell) {
24
20
  if (cell.disabled) return;
25
21
  var onCellClick = _this.props.onCellClick;
26
22
  onCellClick && onCellClick(cell.key);
27
23
  });
28
24
 
29
- _defineProperty(_assertThisInitialized(_this), "renderCell", function (cell) {
25
+ _defineProperty(_this, "renderCell", function (cell) {
30
26
  var selectedKey = _this.props.selectedKey;
31
27
  var key = cell.key,
32
28
  text = cell.text,
@@ -51,6 +47,8 @@ var GridPicker = /*#__PURE__*/function (_React$PureComponent) {
51
47
  return _this;
52
48
  }
53
49
 
50
+ _inheritsLoose(GridPicker, _React$PureComponent);
51
+
54
52
  var _proto = GridPicker.prototype;
55
53
 
56
54
  _proto.render = function render() {
@@ -1,5 +1,3 @@
1
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2
-
3
1
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
4
2
 
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -35,8 +33,6 @@ function getCells(cursor, min, max, locale) {
35
33
  }
36
34
 
37
35
  var MonthPicker = /*#__PURE__*/function (_React$PureComponent) {
38
- _inheritsLoose(MonthPicker, _React$PureComponent);
39
-
40
36
  function MonthPicker() {
41
37
  var _this;
42
38
 
@@ -46,9 +42,9 @@ var MonthPicker = /*#__PURE__*/function (_React$PureComponent) {
46
42
 
47
43
  _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
48
44
 
49
- _defineProperty(_assertThisInitialized(_this), "state", getInitialState(_this.props));
45
+ _defineProperty(_this, "state", getInitialState(_this.props));
50
46
 
51
- _defineProperty(_assertThisInitialized(_this), "handleLongPrev", function () {
47
+ _defineProperty(_this, "handleLongPrev", function () {
52
48
  var cursor = _this.state.cursor;
53
49
 
54
50
  _this.setState({
@@ -56,7 +52,7 @@ var MonthPicker = /*#__PURE__*/function (_React$PureComponent) {
56
52
  });
57
53
  });
58
54
 
59
- _defineProperty(_assertThisInitialized(_this), "handleLongNext", function () {
55
+ _defineProperty(_this, "handleLongNext", function () {
60
56
  var cursor = _this.state.cursor;
61
57
 
62
58
  _this.setState({
@@ -67,6 +63,8 @@ var MonthPicker = /*#__PURE__*/function (_React$PureComponent) {
67
63
  return _this;
68
64
  }
69
65
 
66
+ _inheritsLoose(MonthPicker, _React$PureComponent);
67
+
70
68
  var _proto = MonthPicker.prototype;
71
69
 
72
70
  _proto.getSnapshotBeforeUpdate = function getSnapshotBeforeUpdate(prevProps) {
@@ -1,5 +1,3 @@
1
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2
-
3
1
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
4
2
 
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -32,8 +30,6 @@ function getCells(cursor) {
32
30
  }
33
31
 
34
32
  var YearPicker = /*#__PURE__*/function (_React$PureComponent) {
35
- _inheritsLoose(YearPicker, _React$PureComponent);
36
-
37
33
  function YearPicker() {
38
34
  var _this;
39
35
 
@@ -43,9 +39,9 @@ var YearPicker = /*#__PURE__*/function (_React$PureComponent) {
43
39
 
44
40
  _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
45
41
 
46
- _defineProperty(_assertThisInitialized(_this), "state", getInitialState(_this.props));
42
+ _defineProperty(_this, "state", getInitialState(_this.props));
47
43
 
48
- _defineProperty(_assertThisInitialized(_this), "handleLongPrev", function () {
44
+ _defineProperty(_this, "handleLongPrev", function () {
49
45
  var cursor = _this.state.cursor;
50
46
 
51
47
  _this.setState({
@@ -53,7 +49,7 @@ var YearPicker = /*#__PURE__*/function (_React$PureComponent) {
53
49
  });
54
50
  });
55
51
 
56
- _defineProperty(_assertThisInitialized(_this), "handleLongNext", function () {
52
+ _defineProperty(_this, "handleLongNext", function () {
57
53
  var cursor = _this.state.cursor;
58
54
 
59
55
  _this.setState({
@@ -61,7 +57,7 @@ var YearPicker = /*#__PURE__*/function (_React$PureComponent) {
61
57
  });
62
58
  });
63
59
 
64
- _defineProperty(_assertThisInitialized(_this), "handleCellClick", function (isoDate) {
60
+ _defineProperty(_this, "handleCellClick", function (isoDate) {
65
61
  var onChange = _this.props.onChange;
66
62
 
67
63
  if (isoDate === -1) {
@@ -82,6 +78,8 @@ var YearPicker = /*#__PURE__*/function (_React$PureComponent) {
82
78
  return _this;
83
79
  }
84
80
 
81
+ _inheritsLoose(YearPicker, _React$PureComponent);
82
+
85
83
  var _proto = YearPicker.prototype;
86
84
 
87
85
  _proto.getSnapshotBeforeUpdate = function getSnapshotBeforeUpdate(prevProps) {
@@ -1,5 +1,3 @@
1
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2
-
3
1
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
4
2
 
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -19,14 +17,12 @@ import { fnsStartOfMonth, fnsSetYear, fnsSetMonth, fnsSetDate, fnsStartOfDay, fn
19
17
  import { changeDayWithHoursPreserved } from '../utils';
20
18
 
21
19
  var RawDatePicker = /*#__PURE__*/function (_React$Component) {
22
- _inheritsLoose(RawDatePicker, _React$Component);
23
-
24
20
  function RawDatePicker(props) {
25
21
  var _this;
26
22
 
27
23
  _this = _React$Component.call(this, props) || this; // eslint-disable-next-line react/state-in-constructor
28
24
 
29
- _defineProperty(_assertThisInitialized(_this), "handleChange", function (value) {
25
+ _defineProperty(_this, "handleChange", function (value) {
30
26
  var onValueChange = _this.props.onValueChange;
31
27
  var _this$state = _this.state,
32
28
  mode = _this$state.mode,
@@ -51,19 +47,19 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
51
47
  }
52
48
  });
53
49
 
54
- _defineProperty(_assertThisInitialized(_this), "handleDayMouseEnter", function (day) {
50
+ _defineProperty(_this, "handleDayMouseEnter", function (day) {
55
51
  return _this.setState({
56
52
  enteredTo: day
57
53
  });
58
54
  });
59
55
 
60
- _defineProperty(_assertThisInitialized(_this), "handleDayMouseLeave", function () {
56
+ _defineProperty(_this, "handleDayMouseLeave", function () {
61
57
  return _this.setState({
62
58
  enteredTo: undefined
63
59
  });
64
60
  });
65
61
 
66
- _defineProperty(_assertThisInitialized(_this), "handleDayClick", function (day, modifiers) {
62
+ _defineProperty(_this, "handleDayClick", function (day, modifiers) {
67
63
  var _this$state2 = _this.state,
68
64
  isChanged = _this$state2.changed,
69
65
  value = _this$state2.value;
@@ -88,13 +84,13 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
88
84
  !!showTime && _this.handleModeSwitch('time');
89
85
  });
90
86
 
91
- _defineProperty(_assertThisInitialized(_this), "handleModeSwitch", function (mode) {
87
+ _defineProperty(_this, "handleModeSwitch", function (mode) {
92
88
  return _this.setState({
93
89
  mode: mode
94
90
  });
95
91
  });
96
92
 
97
- _defineProperty(_assertThisInitialized(_this), "handleApply", function (date) {
93
+ _defineProperty(_this, "handleApply", function (date) {
98
94
  var onApply = _this.props.onApply;
99
95
  if (!onApply) return;
100
96
  var value = _this.state.value;
@@ -112,21 +108,21 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
112
108
  _this.handleModeSwitch('date');
113
109
  });
114
110
 
115
- _defineProperty(_assertThisInitialized(_this), "handleMonthChange", function (month, mode) {
111
+ _defineProperty(_this, "handleMonthChange", function (month, mode) {
116
112
  return _this.setState({
117
113
  month: month,
118
114
  mode: mode
119
115
  });
120
116
  });
121
117
 
122
- _defineProperty(_assertThisInitialized(_this), "renderDay", function (day) {
118
+ _defineProperty(_this, "renderDay", function (day) {
123
119
  var text = day.getDate();
124
120
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DayBackground, null), /*#__PURE__*/React.createElement(DayText, {
125
121
  "data-attr": text
126
122
  }, text), /*#__PURE__*/React.createElement(DayForeground, null));
127
123
  });
128
124
 
129
- _defineProperty(_assertThisInitialized(_this), "renderYearPicker", function () {
125
+ _defineProperty(_this, "renderYearPicker", function () {
130
126
  var month = _this.state.month;
131
127
  return /*#__PURE__*/React.createElement(YearPicker, {
132
128
  value: month,
@@ -136,7 +132,7 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
136
132
  });
137
133
  });
138
134
 
139
- _defineProperty(_assertThisInitialized(_this), "renderMonthPicker", function () {
135
+ _defineProperty(_this, "renderMonthPicker", function () {
140
136
  var month = _this.state.month;
141
137
  return /*#__PURE__*/React.createElement(MonthPicker, {
142
138
  value: month,
@@ -146,7 +142,7 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
146
142
  });
147
143
  });
148
144
 
149
- _defineProperty(_assertThisInitialized(_this), "renderDayPicker", function () {
145
+ _defineProperty(_this, "renderDayPicker", function () {
150
146
  var _this$state3 = _this.state,
151
147
  value = _this$state3.value,
152
148
  enteredTo = _this$state3.enteredTo;
@@ -185,7 +181,7 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
185
181
  });
186
182
  });
187
183
 
188
- _defineProperty(_assertThisInitialized(_this), "handleDaySwitch", function (day) {
184
+ _defineProperty(_this, "handleDaySwitch", function (day) {
189
185
  var disabledDates = _this.props.disabledDates; // @ts-ignore
190
186
 
191
187
  _this.handleDayClick(day, {
@@ -193,7 +189,7 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
193
189
  });
194
190
  });
195
191
 
196
- _defineProperty(_assertThisInitialized(_this), "renderTimePicker", function () {
192
+ _defineProperty(_this, "renderTimePicker", function () {
197
193
  var value = _this.state.value;
198
194
  var _this$props2 = _this.props,
199
195
  disabledHours = _this$props2.disabledHours,
@@ -232,6 +228,8 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
232
228
  return _this;
233
229
  }
234
230
 
231
+ _inheritsLoose(RawDatePicker, _React$Component);
232
+
235
233
  var _proto = RawDatePicker.prototype;
236
234
 
237
235
  _proto.getTexts = function getTexts() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-date-picker",
3
- "version": "0.10.43",
3
+ "version": "0.10.45",
4
4
  "description": "DatePicker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,14 +34,14 @@
34
34
  "types": "dist/index.d.ts",
35
35
  "dependencies": {
36
36
  "@date-fns/upgrade": "^1.0.3",
37
- "@synerise/ds-button": "^0.19.6",
37
+ "@synerise/ds-button": "^0.19.7",
38
38
  "@synerise/ds-data-format": "^0.4.8",
39
- "@synerise/ds-dropdown": "^0.17.104",
40
- "@synerise/ds-icon": "^0.60.6",
41
- "@synerise/ds-input": "^0.20.5",
42
- "@synerise/ds-time-picker": "^0.10.2",
43
- "@synerise/ds-tooltip": "^0.14.24",
44
- "@synerise/ds-utils": "^0.26.2",
39
+ "@synerise/ds-dropdown": "^0.17.106",
40
+ "@synerise/ds-icon": "^0.60.7",
41
+ "@synerise/ds-input": "^0.20.7",
42
+ "@synerise/ds-time-picker": "^0.10.4",
43
+ "@synerise/ds-tooltip": "^0.14.25",
44
+ "@synerise/ds-utils": "^0.26.3",
45
45
  "classnames": "2.3.2",
46
46
  "date-fns": "2.16.1",
47
47
  "lodash": "^4.17.20",
@@ -55,5 +55,5 @@
55
55
  "react": ">=16.9.0 < 17.0.0",
56
56
  "styled-components": "5.0.1"
57
57
  },
58
- "gitHead": "84c9ff34c60369cc819ab1d4307373fafaf06462"
58
+ "gitHead": "6f0dc42ae79cea009e60fdb1f91ef72dcc82998e"
59
59
  }