@instructure/ui-time-select 8.12.1-snapshot.45 → 8.12.1-snapshot.51
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/es/TimeSelect/index.js
CHANGED
|
@@ -107,9 +107,8 @@ let TimeSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Time
|
|
|
107
107
|
(_this$props$onHideOpt = (_this$props4 = this.props).onHideOptions) === null || _this$props$onHideOpt === void 0 ? void 0 : _this$props$onHideOpt.call(_this$props4, event);
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
this.handleHighlightOption = (event, {
|
|
111
|
-
id
|
|
112
|
-
}) => {
|
|
110
|
+
this.handleHighlightOption = (event, _ref) => {
|
|
111
|
+
let id = _ref.id;
|
|
113
112
|
if (id === this._emptyOptionId) return;
|
|
114
113
|
const type = event.type;
|
|
115
114
|
const option = this.getOption('id', id).label;
|
|
@@ -119,11 +118,11 @@ let TimeSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Time
|
|
|
119
118
|
}));
|
|
120
119
|
};
|
|
121
120
|
|
|
122
|
-
this.handleSelectOption = (event, {
|
|
123
|
-
id
|
|
124
|
-
}) => {
|
|
121
|
+
this.handleSelectOption = (event, _ref2) => {
|
|
125
122
|
var _this$props$onHideOpt2, _this$props6;
|
|
126
123
|
|
|
124
|
+
let id = _ref2.id;
|
|
125
|
+
|
|
127
126
|
if (id === this._emptyOptionId) {
|
|
128
127
|
this.setState({
|
|
129
128
|
isShowingOptions: false
|
|
@@ -288,7 +287,8 @@ let TimeSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Time
|
|
|
288
287
|
return void 0;
|
|
289
288
|
}
|
|
290
289
|
|
|
291
|
-
getOption(field, value
|
|
290
|
+
getOption(field, value) {
|
|
291
|
+
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.state.options;
|
|
292
292
|
return options.find(option => option[field] === value);
|
|
293
293
|
}
|
|
294
294
|
|
package/es/TimeSelect/props.js
CHANGED
|
@@ -111,7 +111,7 @@ const propTypes = {
|
|
|
111
111
|
* Displays messages and validation for the input. It should be an object
|
|
112
112
|
* with the following shape:
|
|
113
113
|
* `{
|
|
114
|
-
* text: PropTypes.
|
|
114
|
+
* text: PropTypes.node,
|
|
115
115
|
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
116
116
|
* }`
|
|
117
117
|
*/
|
package/lib/TimeSelect/index.js
CHANGED
|
@@ -111,9 +111,8 @@ let TimeSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
|
|
|
111
111
|
(_this$props$onHideOpt = (_this$props4 = this.props).onHideOptions) === null || _this$props$onHideOpt === void 0 ? void 0 : _this$props$onHideOpt.call(_this$props4, event);
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
this.handleHighlightOption = (event, {
|
|
115
|
-
id
|
|
116
|
-
}) => {
|
|
114
|
+
this.handleHighlightOption = (event, _ref) => {
|
|
115
|
+
let id = _ref.id;
|
|
117
116
|
if (id === this._emptyOptionId) return;
|
|
118
117
|
const type = event.type;
|
|
119
118
|
const option = this.getOption('id', id).label;
|
|
@@ -123,11 +122,11 @@ let TimeSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
|
|
|
123
122
|
}));
|
|
124
123
|
};
|
|
125
124
|
|
|
126
|
-
this.handleSelectOption = (event, {
|
|
127
|
-
id
|
|
128
|
-
}) => {
|
|
125
|
+
this.handleSelectOption = (event, _ref2) => {
|
|
129
126
|
var _this$props$onHideOpt2, _this$props6;
|
|
130
127
|
|
|
128
|
+
let id = _ref2.id;
|
|
129
|
+
|
|
131
130
|
if (id === this._emptyOptionId) {
|
|
132
131
|
this.setState({
|
|
133
132
|
isShowingOptions: false
|
|
@@ -293,7 +292,8 @@ let TimeSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
|
|
|
293
292
|
return void 0;
|
|
294
293
|
}
|
|
295
294
|
|
|
296
|
-
getOption(field, value
|
|
295
|
+
getOption(field, value) {
|
|
296
|
+
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.state.options;
|
|
297
297
|
return options.find(option => option[field] === value);
|
|
298
298
|
}
|
|
299
299
|
|
package/lib/TimeSelect/props.js
CHANGED
|
@@ -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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -125,7 +125,7 @@ const propTypes = {
|
|
|
125
125
|
* Displays messages and validation for the input. It should be an object
|
|
126
126
|
* with the following shape:
|
|
127
127
|
* `{
|
|
128
|
-
* text: PropTypes.
|
|
128
|
+
* text: PropTypes.node,
|
|
129
129
|
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
130
130
|
* }`
|
|
131
131
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-time-select",
|
|
3
|
-
"version": "8.12.1-snapshot.
|
|
3
|
+
"version": "8.12.1-snapshot.51+4d3697334",
|
|
4
4
|
"description": "A component for selecting time values.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.12.1-snapshot.
|
|
29
|
-
"@instructure/ui-form-field": "8.12.1-snapshot.
|
|
30
|
-
"@instructure/ui-i18n": "8.12.1-snapshot.
|
|
31
|
-
"@instructure/ui-position": "8.12.1-snapshot.
|
|
32
|
-
"@instructure/ui-prop-types": "8.12.1-snapshot.
|
|
33
|
-
"@instructure/ui-react-utils": "8.12.1-snapshot.
|
|
34
|
-
"@instructure/ui-select": "8.12.1-snapshot.
|
|
35
|
-
"@instructure/ui-test-locator": "8.12.1-snapshot.
|
|
36
|
-
"@instructure/ui-testable": "8.12.1-snapshot.
|
|
37
|
-
"@instructure/uid": "8.12.1-snapshot.
|
|
28
|
+
"@instructure/console": "8.12.1-snapshot.51+4d3697334",
|
|
29
|
+
"@instructure/ui-form-field": "8.12.1-snapshot.51+4d3697334",
|
|
30
|
+
"@instructure/ui-i18n": "8.12.1-snapshot.51+4d3697334",
|
|
31
|
+
"@instructure/ui-position": "8.12.1-snapshot.51+4d3697334",
|
|
32
|
+
"@instructure/ui-prop-types": "8.12.1-snapshot.51+4d3697334",
|
|
33
|
+
"@instructure/ui-react-utils": "8.12.1-snapshot.51+4d3697334",
|
|
34
|
+
"@instructure/ui-select": "8.12.1-snapshot.51+4d3697334",
|
|
35
|
+
"@instructure/ui-test-locator": "8.12.1-snapshot.51+4d3697334",
|
|
36
|
+
"@instructure/ui-testable": "8.12.1-snapshot.51+4d3697334",
|
|
37
|
+
"@instructure/uid": "8.12.1-snapshot.51+4d3697334",
|
|
38
38
|
"prop-types": "^15"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@instructure/ui-babel-preset": "8.12.1-snapshot.
|
|
42
|
-
"@instructure/ui-test-utils": "8.12.1-snapshot.
|
|
41
|
+
"@instructure/ui-babel-preset": "8.12.1-snapshot.51+4d3697334",
|
|
42
|
+
"@instructure/ui-test-utils": "8.12.1-snapshot.51+4d3697334",
|
|
43
43
|
"moment-timezone": "^0.5.33"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "4d369733414715a70bae0628378e8d82214eab3e"
|
|
53
53
|
}
|
package/src/TimeSelect/props.ts
CHANGED
|
@@ -153,7 +153,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
153
153
|
* Displays messages and validation for the input. It should be an object
|
|
154
154
|
* with the following shape:
|
|
155
155
|
* `{
|
|
156
|
-
* text: PropTypes.
|
|
156
|
+
* text: PropTypes.node,
|
|
157
157
|
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
158
158
|
* }`
|
|
159
159
|
*/
|
|
@@ -36,7 +36,7 @@ declare class TimeSelect extends Component<TimeSelectProps, TimeSelectState> {
|
|
|
36
36
|
width?: string | undefined;
|
|
37
37
|
optionsMaxWidth?: string | undefined;
|
|
38
38
|
visibleOptionsCount?: number | undefined;
|
|
39
|
-
messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
|
|
39
|
+
messages?: import("@instructure/ui-form-field/types/FormPropTypes").FormMessage[] | undefined;
|
|
40
40
|
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
41
41
|
constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
|
|
42
42
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -67,7 +67,7 @@ declare class TimeSelect extends Component<TimeSelectProps, TimeSelectState> {
|
|
|
67
67
|
width?: string | undefined;
|
|
68
68
|
optionsMaxWidth?: string | undefined;
|
|
69
69
|
visibleOptionsCount?: number | undefined;
|
|
70
|
-
messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
|
|
70
|
+
messages?: import("@instructure/ui-form-field/types/FormPropTypes").FormMessage[] | undefined;
|
|
71
71
|
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
72
72
|
constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
|
|
73
73
|
onChange?: ((...args: any[]) => any) | undefined;
|