@desynova-digital/components 8.19.58 → 8.19.60

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.
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.timeToSeconds = timeToSeconds;
7
+ function timeToSeconds() {
8
+ var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '00:00:00:00';
9
+ var frameRate = arguments.length > 1 ? arguments[1] : undefined;
10
+ var timeObj = time.split(':'); // split it at the colons
11
+
12
+ // minutes are worth 60 seconds. Hours are worth 60 minutes.
13
+ var seconds = +timeObj[0] * 60 * 60 + +timeObj[1] * 60 + +timeObj[2];
14
+ if (timeObj.length > 3 && frameRate) {
15
+ var frames = timeObj[3] * (1 / frameRate);
16
+ seconds += frames;
17
+ }
18
+ return seconds;
19
+ }
@@ -14,7 +14,7 @@ var _timeCodeInput2 = _interopRequireDefault(_timeCodeInput);
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
 
17
- (0, _react3.storiesOf)("InputText").add("dark theme", function () {
17
+ (0, _react3.storiesOf)("TimeCodeInput").add("dark theme", function () {
18
18
  return _react2.default.createElement(
19
19
  _storyHelpers.Example,
20
20
  { title: "Appearances" },
@@ -16,7 +16,7 @@ var _styledComponents = require('styled-components');
16
16
 
17
17
  var _styledComponents2 = _interopRequireDefault(_styledComponents);
18
18
 
19
- var _utils = require('@desynova-digital/player/utils');
19
+ var _utils = require('../../_helpers/utils');
20
20
 
21
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
22
 
@@ -101,6 +101,8 @@ var TimeCodeInput = function TimeCodeInput(_ref) {
101
101
  document.activeElement.blur();
102
102
  }
103
103
  };
104
+ checkIfTimeValid(inputValue);
105
+ setCustomInputValue(inputValue);
104
106
  document.addEventListener('keydown', handleEscapeKey);
105
107
  return function () {
106
108
  document.removeEventListener('keydown', handleEscapeKey);
@@ -639,7 +639,7 @@ var Table = function (_Component) {
639
639
 
640
640
  _this.resetSearchTextAndFilters = function () {
641
641
  _this.handleInputChange("");
642
- _this._filterRef.current.resetSelectedUserFilter();
642
+ _this._filterRef && _this._filterRef.current && this_filterRef.current.resetSelectedUserFilter();
643
643
  };
644
644
 
645
645
  _this.handleDebounce = (0, _lodash.debounce)(function (text) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "8.19.58",
3
+ "version": "8.19.60",
4
4
  "description": "Components for Desynova Digital",
5
5
  "main": "index.js",
6
6
  "author": "desynova-digital",
7
7
  "license": "MIT",
8
8
  "repository": "desynova-digital",
9
9
  "dependencies": {
10
- "@desynova-digital/tokens": "8.19.58",
10
+ "@desynova-digital/tokens": "8.19.60",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },