@instructure/ui-date-time-input 8.38.1 → 8.38.2-snapshot-2

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,14 @@
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
+ ## [8.38.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.38.2-snapshot-2) (2023-07-06)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-date-time-input
9
+
10
+
11
+
12
+
13
+
6
14
  ## [8.38.1](https://github.com/instructure/instructure-ui/compare/v8.38.0...v8.38.1) (2023-06-13)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-date-time-input
@@ -42,18 +42,16 @@ category: components
42
42
  @tsProps
43
43
  **/
44
44
  let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeInput extends Component {
45
- // extra verbose localized date and time
46
-
47
- // This is used by Tooltip for positioning
48
-
49
45
  constructor(props) {
50
46
  super(props);
51
47
  // State needs to be calculated because render could be called before
52
48
  // componentDidMount()
53
49
  this.ref = null;
50
+ // This is used by Tooltip for positioning
54
51
  this.handleRef = el => {
55
52
  this.ref = el;
56
53
  };
54
+ // Called when the user enters text into dateInput
57
55
  this.handleDateTextChange = (_event, date) => {
58
56
  const dateParsed = this.tryParseDate(date.value);
59
57
  this.setState({
@@ -63,6 +61,7 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
63
61
  renderedDate: dateParsed ? dateParsed.clone() : DateTime.now(this.locale(), this.timezone())
64
62
  });
65
63
  };
64
+ // date is returned es a ISO string, like 2021-09-14T22:00:00.000Z
66
65
  this.handleDayClick = (event, _ref) => {
67
66
  let date = _ref.date;
68
67
  const dateParsed = DateTime.parse(date, this.locale(), this.timezone());
@@ -296,16 +295,10 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
296
295
  }
297
296
  return disabledDates(date.toISOString());
298
297
  }
299
-
300
- // Called when the user enters text into dateInput
301
-
302
298
  tryParseDate(val) {
303
299
  const parsed = DateTime.parse(val, this.locale(), this.timezone());
304
300
  return parsed.isValid() ? parsed : null;
305
301
  }
306
-
307
- // date is returned es a ISO string, like 2021-09-14T22:00:00.000Z
308
-
309
302
  updateStateBasedOnDateInput(dateParsed, event) {
310
303
  let newState;
311
304
  if (dateParsed && this.state.timeSelectValue && (!this.state.dateInputText || this.state.dateInputText == '')) {
@@ -50,18 +50,16 @@ category: components
50
50
  @tsProps
51
51
  **/
52
52
  let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 = class DateTimeInput extends _react.Component {
53
- // extra verbose localized date and time
54
-
55
- // This is used by Tooltip for positioning
56
-
57
53
  constructor(props) {
58
54
  super(props);
59
55
  // State needs to be calculated because render could be called before
60
56
  // componentDidMount()
61
57
  this.ref = null;
58
+ // This is used by Tooltip for positioning
62
59
  this.handleRef = el => {
63
60
  this.ref = el;
64
61
  };
62
+ // Called when the user enters text into dateInput
65
63
  this.handleDateTextChange = (_event, date) => {
66
64
  const dateParsed = this.tryParseDate(date.value);
67
65
  this.setState({
@@ -71,6 +69,7 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
71
69
  renderedDate: dateParsed ? dateParsed.clone() : _DateTime.DateTime.now(this.locale(), this.timezone())
72
70
  });
73
71
  };
72
+ // date is returned es a ISO string, like 2021-09-14T22:00:00.000Z
74
73
  this.handleDayClick = (event, _ref) => {
75
74
  let date = _ref.date;
76
75
  const dateParsed = _DateTime.DateTime.parse(date, this.locale(), this.timezone());
@@ -304,16 +303,10 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
304
303
  }
305
304
  return disabledDates(date.toISOString());
306
305
  }
307
-
308
- // Called when the user enters text into dateInput
309
-
310
306
  tryParseDate(val) {
311
307
  const parsed = _DateTime.DateTime.parse(val, this.locale(), this.timezone());
312
308
  return parsed.isValid() ? parsed : null;
313
309
  }
314
-
315
- // date is returned es a ISO string, like 2021-09-14T22:00:00.000Z
316
-
317
310
  updateStateBasedOnDateInput(dateParsed, event) {
318
311
  let newState;
319
312
  if (dateParsed && this.state.timeSelectValue && (!this.state.dateInputText || this.state.dateInputText == '')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-date-time-input",
3
- "version": "8.38.1",
3
+ "version": "8.38.2-snapshot-2",
4
4
  "description": "A UI component that allows to select date and time.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,26 +23,26 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.38.1",
27
- "@instructure/ui-test-locator": "8.38.1",
28
- "@instructure/ui-test-utils": "8.38.1"
26
+ "@instructure/ui-babel-preset": "8.38.2-snapshot-2",
27
+ "@instructure/ui-test-locator": "8.38.2-snapshot-2",
28
+ "@instructure/ui-test-utils": "8.38.2-snapshot-2"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/runtime": "^7.21.0",
32
- "@instructure/debounce": "8.38.1",
33
- "@instructure/emotion": "8.38.1",
34
- "@instructure/ui-a11y-content": "8.38.1",
35
- "@instructure/ui-buttons": "8.38.1",
36
- "@instructure/ui-calendar": "8.38.1",
37
- "@instructure/ui-date-input": "8.38.1",
38
- "@instructure/ui-form-field": "8.38.1",
39
- "@instructure/ui-i18n": "8.38.1",
40
- "@instructure/ui-icons": "8.38.1",
41
- "@instructure/ui-prop-types": "8.38.1",
42
- "@instructure/ui-react-utils": "8.38.1",
43
- "@instructure/ui-testable": "8.38.1",
44
- "@instructure/ui-time-select": "8.38.1",
45
- "@instructure/ui-utils": "8.38.1",
31
+ "@babel/runtime": "^7.22.5",
32
+ "@instructure/debounce": "8.38.2-snapshot-2",
33
+ "@instructure/emotion": "8.38.2-snapshot-2",
34
+ "@instructure/ui-a11y-content": "8.38.2-snapshot-2",
35
+ "@instructure/ui-buttons": "8.38.2-snapshot-2",
36
+ "@instructure/ui-calendar": "8.38.2-snapshot-2",
37
+ "@instructure/ui-date-input": "8.38.2-snapshot-2",
38
+ "@instructure/ui-form-field": "8.38.2-snapshot-2",
39
+ "@instructure/ui-i18n": "8.38.2-snapshot-2",
40
+ "@instructure/ui-icons": "8.38.2-snapshot-2",
41
+ "@instructure/ui-prop-types": "8.38.2-snapshot-2",
42
+ "@instructure/ui-react-utils": "8.38.2-snapshot-2",
43
+ "@instructure/ui-testable": "8.38.2-snapshot-2",
44
+ "@instructure/ui-time-select": "8.38.2-snapshot-2",
45
+ "@instructure/ui-utils": "8.38.2-snapshot-2",
46
46
  "prop-types": "^15.8.1"
47
47
  },
48
48
  "peerDependencies": {