@instructure/ui-date-time-input 8.12.1-snapshot.7 → 8.13.1-snapshot.9
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: (
|
|
37
|
-
|
|
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
|
|
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: (
|
|
48
|
-
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
3
|
+
"version": "8.13.1-snapshot.9+f32ba918e",
|
|
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.
|
|
28
|
-
"@instructure/ui-test-locator": "8.
|
|
29
|
-
"@instructure/ui-test-utils": "8.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.13.1-snapshot.9+f32ba918e",
|
|
28
|
+
"@instructure/ui-test-locator": "8.13.1-snapshot.9+f32ba918e",
|
|
29
|
+
"@instructure/ui-test-utils": "8.13.1-snapshot.9+f32ba918e"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/debounce": "8.
|
|
34
|
-
"@instructure/emotion": "8.
|
|
35
|
-
"@instructure/ui-a11y-content": "8.
|
|
36
|
-
"@instructure/ui-buttons": "8.
|
|
37
|
-
"@instructure/ui-calendar": "8.
|
|
38
|
-
"@instructure/ui-date-input": "8.
|
|
39
|
-
"@instructure/ui-form-field": "8.
|
|
40
|
-
"@instructure/ui-i18n": "8.
|
|
41
|
-
"@instructure/ui-icons": "8.
|
|
42
|
-
"@instructure/ui-prop-types": "8.
|
|
43
|
-
"@instructure/ui-react-utils": "8.
|
|
44
|
-
"@instructure/ui-testable": "8.
|
|
45
|
-
"@instructure/ui-time-select": "8.
|
|
46
|
-
"@instructure/ui-utils": "8.
|
|
33
|
+
"@instructure/debounce": "8.13.1-snapshot.9+f32ba918e",
|
|
34
|
+
"@instructure/emotion": "8.13.1-snapshot.9+f32ba918e",
|
|
35
|
+
"@instructure/ui-a11y-content": "8.13.1-snapshot.9+f32ba918e",
|
|
36
|
+
"@instructure/ui-buttons": "8.13.1-snapshot.9+f32ba918e",
|
|
37
|
+
"@instructure/ui-calendar": "8.13.1-snapshot.9+f32ba918e",
|
|
38
|
+
"@instructure/ui-date-input": "8.13.1-snapshot.9+f32ba918e",
|
|
39
|
+
"@instructure/ui-form-field": "8.13.1-snapshot.9+f32ba918e",
|
|
40
|
+
"@instructure/ui-i18n": "8.13.1-snapshot.9+f32ba918e",
|
|
41
|
+
"@instructure/ui-icons": "8.13.1-snapshot.9+f32ba918e",
|
|
42
|
+
"@instructure/ui-prop-types": "8.13.1-snapshot.9+f32ba918e",
|
|
43
|
+
"@instructure/ui-react-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
44
|
+
"@instructure/ui-testable": "8.13.1-snapshot.9+f32ba918e",
|
|
45
|
+
"@instructure/ui-time-select": "8.13.1-snapshot.9+f32ba918e",
|
|
46
|
+
"@instructure/ui-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
47
47
|
"prop-types": "^15"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "f32ba918e4d3ce76c6ee95c856584d00a9d80958"
|
|
57
57
|
}
|