@elliemae/ds-time-picker 2.4.2-rc.9 → 2.4.3-rc.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.
@@ -2,7 +2,6 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _jsx = require('@babel/runtime/helpers/jsx');
5
- require('core-js/modules/web.dom-collections.iterator.js');
6
5
  require('core-js/modules/esnext.async-iterator.find.js');
7
6
  require('core-js/modules/esnext.iterator.constructor.js');
8
7
  require('core-js/modules/esnext.iterator.find.js');
@@ -322,7 +321,7 @@ class PickerPanel extends React.Component {
322
321
  innerRef: this.selectedOptionRef
323
322
  }, void 0, _SelectedCircle || (_SelectedCircle = /*#__PURE__*/_jsx__default["default"](SelectedCircle, {}))), /*#__PURE__*/_jsx__default["default"](ArrowButtonContainer, {}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSButton__default["default"], _objectSpread(_objectSpread({}, arrowProps), {}, {
324
323
  "aria-label": "Chevron Up",
325
- "data-testid": "".concat(type, "-chevron-up"),
324
+ "data-testid": `${type}-chevron-up`,
326
325
  disabled: activeIndex <= 0,
327
326
  icon: _ChevronSmallUp || (_ChevronSmallUp = /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallUp, {})),
328
327
  onClick: this.handleStepMoveUp,
@@ -333,10 +332,10 @@ class PickerPanel extends React.Component {
333
332
  height: this.listHeight
334
333
  }
335
334
  }, void 0, /*#__PURE__*/_jsx__default["default"](PickerItemList, {
336
- "data-testid": "".concat(type, "-list"),
335
+ "data-testid": `${type}-list`,
337
336
  innerRef: this.pickerListRef,
338
337
  style: {
339
- transform: "translateY(".concat(listYPosition, "px)")
338
+ transform: `translateY(${listYPosition}px)`
340
339
  }
341
340
  }, void 0, options.map((option, index) => {
342
341
  const value = this.getOptionValue(option);
@@ -351,19 +350,19 @@ class PickerPanel extends React.Component {
351
350
  to
352
351
  } = disabledTimes;
353
352
 
354
- if (type === 'hour' && valueFormatted >= (from === null || from === void 0 ? void 0 : from.hour) && valueFormatted < (to === null || to === void 0 ? void 0 : to.hour) || type === 'minutes' && value >= (from === null || from === void 0 ? void 0 : from.min) && value < (to === null || to === void 0 ? void 0 : to.min)) {
353
+ if (type === 'hour' && valueFormatted >= from?.hour && valueFormatted < to?.hour || type === 'minutes' && value >= from?.min && value < to?.min) {
355
354
  disabled = true;
356
355
  }
357
356
 
358
- if (type === 'minutes' && ((time === null || time === void 0 ? void 0 : time.hour()) > (to === null || to === void 0 ? void 0 : to.hour) || (time === null || time === void 0 ? void 0 : time.hour()) < (from === null || from === void 0 ? void 0 : from.hour))) {
357
+ if (type === 'minutes' && (time?.hour() > to?.hour || time?.hour() < from?.hour)) {
359
358
  disabled = false;
360
359
  }
361
360
 
362
- if (label === 'am' && (from === null || from === void 0 ? void 0 : from.hour) == 0 && (to === null || to === void 0 ? void 0 : to.hour) >= 12) {
361
+ if (label === 'am' && from?.hour == 0 && to?.hour >= 12) {
363
362
  disabled = true;
364
363
  }
365
364
 
366
- if (label === 'pm' && (to === null || to === void 0 ? void 0 : to.hour) == 24) {
365
+ if (label === 'pm' && to?.hour == 24) {
367
366
  disabled = true;
368
367
  }
369
368
  }
@@ -381,7 +380,7 @@ class PickerPanel extends React.Component {
381
380
  }, value, label);
382
381
  }))), /*#__PURE__*/_jsx__default["default"](ArrowButtonContainer, {}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSButton__default["default"], _objectSpread(_objectSpread({}, arrowProps), {}, {
383
382
  "aria-label": "Chevron Down",
384
- "data-testid": "".concat(type, "-chevron-down"),
383
+ "data-testid": `${type}-chevron-down`,
385
384
  disabled: activeIndex >= options.length - 1,
386
385
  icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallDown, {})),
387
386
  onClick: this.handleStepMoveDown,
@@ -1,14 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
4
- var _jsx = require('@babel/runtime/helpers/jsx');
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
3
  require('core-js/modules/esnext.async-iterator.filter.js');
8
4
  require('core-js/modules/esnext.iterator.constructor.js');
9
5
  require('core-js/modules/esnext.iterator.filter.js');
10
6
  require('core-js/modules/esnext.async-iterator.for-each.js');
11
7
  require('core-js/modules/esnext.iterator.for-each.js');
8
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
9
+ var _jsx = require('@babel/runtime/helpers/jsx');
10
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
11
  var React = require('react');
13
12
  var moment = require('moment');
14
13
  var memoizeOne = require('memoize-one');
@@ -123,7 +122,7 @@ const TimePickerImpl = _ref2 => {
123
122
  to: utils.convertTimeString(disabledTimes.to)
124
123
  };
125
124
  return /*#__PURE__*/_jsx__default["default"](TimePickerContainer, {
126
- className: "".concat(className, " variant-").concat(!disabled ? 'default' : 'disabled'),
125
+ className: `${className} variant-${!disabled ? 'default' : 'disabled'}`,
127
126
  containerProps: containerProps,
128
127
  disabled: disabled,
129
128
  rightAddon: /*#__PURE__*/_jsx__default["default"](TimePickerDropdown, {
@@ -4,7 +4,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
4
  import 'core-js/modules/esnext.iterator.for-each.js';
5
5
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
6
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import 'core-js/modules/web.dom-collections.iterator.js';
8
7
  import 'core-js/modules/esnext.async-iterator.find.js';
9
8
  import 'core-js/modules/esnext.iterator.constructor.js';
10
9
  import 'core-js/modules/esnext.iterator.find.js';
@@ -312,7 +311,7 @@ class PickerPanel extends Component {
312
311
  innerRef: this.selectedOptionRef
313
312
  }, void 0, _SelectedCircle || (_SelectedCircle = /*#__PURE__*/_jsx(SelectedCircle, {}))), /*#__PURE__*/_jsx(ArrowButtonContainer, {}, void 0, /*#__PURE__*/jsx(DSButton, _objectSpread(_objectSpread({}, arrowProps), {}, {
314
313
  "aria-label": "Chevron Up",
315
- "data-testid": "".concat(type, "-chevron-up"),
314
+ "data-testid": `${type}-chevron-up`,
316
315
  disabled: activeIndex <= 0,
317
316
  icon: _ChevronSmallUp || (_ChevronSmallUp = /*#__PURE__*/_jsx(ChevronSmallUp, {})),
318
317
  onClick: this.handleStepMoveUp,
@@ -323,10 +322,10 @@ class PickerPanel extends Component {
323
322
  height: this.listHeight
324
323
  }
325
324
  }, void 0, /*#__PURE__*/_jsx(PickerItemList, {
326
- "data-testid": "".concat(type, "-list"),
325
+ "data-testid": `${type}-list`,
327
326
  innerRef: this.pickerListRef,
328
327
  style: {
329
- transform: "translateY(".concat(listYPosition, "px)")
328
+ transform: `translateY(${listYPosition}px)`
330
329
  }
331
330
  }, void 0, options.map((option, index) => {
332
331
  const value = this.getOptionValue(option);
@@ -341,19 +340,19 @@ class PickerPanel extends Component {
341
340
  to
342
341
  } = disabledTimes;
343
342
 
344
- if (type === 'hour' && valueFormatted >= (from === null || from === void 0 ? void 0 : from.hour) && valueFormatted < (to === null || to === void 0 ? void 0 : to.hour) || type === 'minutes' && value >= (from === null || from === void 0 ? void 0 : from.min) && value < (to === null || to === void 0 ? void 0 : to.min)) {
343
+ if (type === 'hour' && valueFormatted >= from?.hour && valueFormatted < to?.hour || type === 'minutes' && value >= from?.min && value < to?.min) {
345
344
  disabled = true;
346
345
  }
347
346
 
348
- if (type === 'minutes' && ((time === null || time === void 0 ? void 0 : time.hour()) > (to === null || to === void 0 ? void 0 : to.hour) || (time === null || time === void 0 ? void 0 : time.hour()) < (from === null || from === void 0 ? void 0 : from.hour))) {
347
+ if (type === 'minutes' && (time?.hour() > to?.hour || time?.hour() < from?.hour)) {
349
348
  disabled = false;
350
349
  }
351
350
 
352
- if (label === 'am' && (from === null || from === void 0 ? void 0 : from.hour) == 0 && (to === null || to === void 0 ? void 0 : to.hour) >= 12) {
351
+ if (label === 'am' && from?.hour == 0 && to?.hour >= 12) {
353
352
  disabled = true;
354
353
  }
355
354
 
356
- if (label === 'pm' && (to === null || to === void 0 ? void 0 : to.hour) == 24) {
355
+ if (label === 'pm' && to?.hour == 24) {
357
356
  disabled = true;
358
357
  }
359
358
  }
@@ -371,7 +370,7 @@ class PickerPanel extends Component {
371
370
  }, value, label);
372
371
  }))), /*#__PURE__*/_jsx(ArrowButtonContainer, {}, void 0, /*#__PURE__*/jsx(DSButton, _objectSpread(_objectSpread({}, arrowProps), {}, {
373
372
  "aria-label": "Chevron Down",
374
- "data-testid": "".concat(type, "-chevron-down"),
373
+ "data-testid": `${type}-chevron-down`,
375
374
  disabled: activeIndex >= options.length - 1,
376
375
  icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx(ChevronSmallDown, {})),
377
376
  onClick: this.handleStepMoveDown,
@@ -6,7 +6,6 @@ import 'core-js/modules/esnext.iterator.for-each.js';
6
6
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
7
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
8
8
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
9
- import 'core-js/modules/web.dom-collections.iterator.js';
10
9
  import { useState, useRef, useEffect } from 'react';
11
10
  import moment from 'moment';
12
11
  import memoizeOne from 'memoize-one';
@@ -113,7 +112,7 @@ const TimePickerImpl = _ref2 => {
113
112
  to: convertTimeString(disabledTimes.to)
114
113
  };
115
114
  return /*#__PURE__*/_jsx(TimePickerContainer, {
116
- className: "".concat(className, " variant-").concat(!disabled ? 'default' : 'disabled'),
115
+ className: `${className} variant-${!disabled ? 'default' : 'disabled'}`,
117
116
  containerProps: containerProps,
118
117
  disabled: disabled,
119
118
  rightAddon: /*#__PURE__*/_jsx(TimePickerDropdown, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-time-picker",
3
- "version": "2.4.2-rc.9",
3
+ "version": "2.4.3-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Time Picker",
6
6
  "module": "./esm/index.js",
@@ -64,12 +64,12 @@
64
64
  "build": "node ../../scripts/build/build.js"
65
65
  },
66
66
  "dependencies": {
67
- "@elliemae/ds-button": "2.4.2-rc.9",
68
- "@elliemae/ds-classnames": "2.4.2-rc.9",
69
- "@elliemae/ds-form": "2.4.2-rc.9",
70
- "@elliemae/ds-icons": "2.4.2-rc.9",
71
- "@elliemae/ds-popper": "2.4.2-rc.9",
72
- "@elliemae/ds-utilities": "2.4.2-rc.9",
67
+ "@elliemae/ds-button": "2.4.3-rc.2",
68
+ "@elliemae/ds-classnames": "2.4.3-rc.2",
69
+ "@elliemae/ds-form": "2.4.3-rc.2",
70
+ "@elliemae/ds-icons": "2.4.3-rc.2",
71
+ "@elliemae/ds-popper": "2.4.3-rc.2",
72
+ "@elliemae/ds-utilities": "2.4.3-rc.2",
73
73
  "memoize-one": "~5.1.1",
74
74
  "moment": "~2.29.1",
75
75
  "prop-types": "~15.7.2",