@instructure/ui-time-select 8.12.1-snapshot.44 → 8.12.1-snapshot.50

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.
@@ -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, options = this.state.options) {
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
 
@@ -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, options = this.state.options) {
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
 
@@ -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 _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-time-select",
3
- "version": "8.12.1-snapshot.44+6f00103af",
3
+ "version": "8.12.1-snapshot.50+3786369ec",
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.44+6f00103af",
29
- "@instructure/ui-form-field": "8.12.1-snapshot.44+6f00103af",
30
- "@instructure/ui-i18n": "8.12.1-snapshot.44+6f00103af",
31
- "@instructure/ui-position": "8.12.1-snapshot.44+6f00103af",
32
- "@instructure/ui-prop-types": "8.12.1-snapshot.44+6f00103af",
33
- "@instructure/ui-react-utils": "8.12.1-snapshot.44+6f00103af",
34
- "@instructure/ui-select": "8.12.1-snapshot.44+6f00103af",
35
- "@instructure/ui-test-locator": "8.12.1-snapshot.44+6f00103af",
36
- "@instructure/ui-testable": "8.12.1-snapshot.44+6f00103af",
37
- "@instructure/uid": "8.12.1-snapshot.44+6f00103af",
28
+ "@instructure/console": "8.12.1-snapshot.50+3786369ec",
29
+ "@instructure/ui-form-field": "8.12.1-snapshot.50+3786369ec",
30
+ "@instructure/ui-i18n": "8.12.1-snapshot.50+3786369ec",
31
+ "@instructure/ui-position": "8.12.1-snapshot.50+3786369ec",
32
+ "@instructure/ui-prop-types": "8.12.1-snapshot.50+3786369ec",
33
+ "@instructure/ui-react-utils": "8.12.1-snapshot.50+3786369ec",
34
+ "@instructure/ui-select": "8.12.1-snapshot.50+3786369ec",
35
+ "@instructure/ui-test-locator": "8.12.1-snapshot.50+3786369ec",
36
+ "@instructure/ui-testable": "8.12.1-snapshot.50+3786369ec",
37
+ "@instructure/uid": "8.12.1-snapshot.50+3786369ec",
38
38
  "prop-types": "^15"
39
39
  },
40
40
  "devDependencies": {
41
- "@instructure/ui-babel-preset": "8.12.1-snapshot.44+6f00103af",
42
- "@instructure/ui-test-utils": "8.12.1-snapshot.44+6f00103af",
41
+ "@instructure/ui-babel-preset": "8.12.1-snapshot.50+3786369ec",
42
+ "@instructure/ui-test-utils": "8.12.1-snapshot.50+3786369ec",
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": "6f00103af2fc970bbdcc8c2505413e42257afef4"
52
+ "gitHead": "3786369ec892bc0f716844828cc2729447adb8be"
53
53
  }