@instructure/ui-date-time-input 8.12.1-snapshot.7 → 8.13.0

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,10 @@
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.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-date-time-input
9
+
6
10
  # [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
7
11
 
8
12
  ### Features
@@ -33,6 +33,10 @@ import { TimeSelectLocator } from '@instructure/ui-time-select/es/TimeSelect/Tim
33
33
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
34
34
 
35
35
  export const DateTimeInputLocator = locator(DateTimeInput.selector, {
36
- findDateInput: (...args) => DateInputLocator.find(...args),
37
- findTimeInput: (...args) => TimeSelectLocator.find(...args)
36
+ findDateInput: function () {
37
+ return DateInputLocator.find(...arguments);
38
+ },
39
+ findTimeInput: function () {
40
+ return TimeSelectLocator.find(...arguments);
41
+ }
38
42
  });
@@ -67,9 +67,8 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_temp = _class2 = class D
67
67
  });
68
68
  };
69
69
 
70
- this.handleDayClick = (event, {
71
- date
72
- }) => {
70
+ this.handleDayClick = (event, _ref) => {
71
+ let date = _ref.date;
73
72
  const dateParsed = DateTime.parse(date, this.locale(), this.timezone());
74
73
  this.updateStateBasedOnDateInput(dateParsed, event);
75
74
  };
@@ -233,7 +232,9 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_temp = _class2 = class D
233
232
  }
234
233
  }
235
234
 
236
- recalculateState(dateStr, doNotChangeDate = false, doNotChangeTime = false) {
235
+ recalculateState(dateStr) {
236
+ let doNotChangeDate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
237
+ let doNotChangeTime = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
237
238
  let errorMsg;
238
239
 
239
240
  if (dateStr) {
@@ -44,7 +44,11 @@ var _TimeSelectLocator = require("@instructure/ui-time-select/lib/TimeSelect/Tim
44
44
  /* eslint-enable no-restricted-imports */
45
45
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
46
46
  const DateTimeInputLocator = (0, _locator.locator)(_index.DateTimeInput.selector, {
47
- findDateInput: (...args) => _DateInputLocator.DateInputLocator.find(...args),
48
- findTimeInput: (...args) => _TimeSelectLocator.TimeSelectLocator.find(...args)
47
+ findDateInput: function () {
48
+ return _DateInputLocator.DateInputLocator.find(...arguments);
49
+ },
50
+ findTimeInput: function () {
51
+ return _TimeSelectLocator.TimeSelectLocator.find(...arguments);
52
+ }
49
53
  });
50
54
  exports.DateTimeInputLocator = DateTimeInputLocator;
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.DateTimeInput = exports.default = void 0;
8
+ exports.default = exports.DateTimeInput = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
@@ -70,9 +70,9 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _c
70
70
  });
71
71
  };
72
72
 
73
- this.handleDayClick = (event, {
74
- date
75
- }) => {
73
+ this.handleDayClick = (event, _ref) => {
74
+ let date = _ref.date;
75
+
76
76
  const dateParsed = _DateTime.DateTime.parse(date, this.locale(), this.timezone());
77
77
 
78
78
  this.updateStateBasedOnDateInput(dateParsed, event);
@@ -237,7 +237,9 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _c
237
237
  }
238
238
  }
239
239
 
240
- recalculateState(dateStr, doNotChangeDate = false, doNotChangeTime = false) {
240
+ recalculateState(dateStr) {
241
+ let doNotChangeDate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
242
+ let doNotChangeTime = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
241
243
  let errorMsg;
242
244
 
243
245
  if (dateStr) {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-date-time-input",
3
- "version": "8.12.1-snapshot.7+1e7ac8219",
3
+ "version": "8.13.0",
4
4
  "description": "A UI component that allows to select date and time.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -24,26 +24,26 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@instructure/ui-babel-preset": "8.12.1-snapshot.7+1e7ac8219",
28
- "@instructure/ui-test-locator": "8.12.1-snapshot.7+1e7ac8219",
29
- "@instructure/ui-test-utils": "8.12.1-snapshot.7+1e7ac8219"
27
+ "@instructure/ui-babel-preset": "8.13.0",
28
+ "@instructure/ui-test-locator": "8.13.0",
29
+ "@instructure/ui-test-utils": "8.13.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/debounce": "8.12.1-snapshot.7+1e7ac8219",
34
- "@instructure/emotion": "8.12.1-snapshot.7+1e7ac8219",
35
- "@instructure/ui-a11y-content": "8.12.1-snapshot.7+1e7ac8219",
36
- "@instructure/ui-buttons": "8.12.1-snapshot.7+1e7ac8219",
37
- "@instructure/ui-calendar": "8.12.1-snapshot.7+1e7ac8219",
38
- "@instructure/ui-date-input": "8.12.1-snapshot.7+1e7ac8219",
39
- "@instructure/ui-form-field": "8.12.1-snapshot.7+1e7ac8219",
40
- "@instructure/ui-i18n": "8.12.1-snapshot.7+1e7ac8219",
41
- "@instructure/ui-icons": "8.12.1-snapshot.7+1e7ac8219",
42
- "@instructure/ui-prop-types": "8.12.1-snapshot.7+1e7ac8219",
43
- "@instructure/ui-react-utils": "8.12.1-snapshot.7+1e7ac8219",
44
- "@instructure/ui-testable": "8.12.1-snapshot.7+1e7ac8219",
45
- "@instructure/ui-time-select": "8.12.1-snapshot.7+1e7ac8219",
46
- "@instructure/ui-utils": "8.12.1-snapshot.7+1e7ac8219",
33
+ "@instructure/debounce": "8.13.0",
34
+ "@instructure/emotion": "8.13.0",
35
+ "@instructure/ui-a11y-content": "8.13.0",
36
+ "@instructure/ui-buttons": "8.13.0",
37
+ "@instructure/ui-calendar": "8.13.0",
38
+ "@instructure/ui-date-input": "8.13.0",
39
+ "@instructure/ui-form-field": "8.13.0",
40
+ "@instructure/ui-i18n": "8.13.0",
41
+ "@instructure/ui-icons": "8.13.0",
42
+ "@instructure/ui-prop-types": "8.13.0",
43
+ "@instructure/ui-react-utils": "8.13.0",
44
+ "@instructure/ui-testable": "8.13.0",
45
+ "@instructure/ui-time-select": "8.13.0",
46
+ "@instructure/ui-utils": "8.13.0",
47
47
  "prop-types": "^15"
48
48
  },
49
49
  "peerDependencies": {
@@ -52,6 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "sideEffects": false,
56
- "gitHead": "1e7ac821932a91fe9ef761c96f747c7ea1f3925a"
55
+ "sideEffects": false
57
56
  }
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.