@desynova-digital/components 9.1.23 → 9.1.24
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/_helpers/utils.js
CHANGED
|
@@ -74,7 +74,7 @@ var convertHHMMSSmmm_to_HHMMSSFF = exports.convertHHMMSSmmm_to_HHMMSSFF = functi
|
|
|
74
74
|
_timecode$split4 = (0, _slicedToArray2["default"])(_timecode$split3, 2),
|
|
75
75
|
mainTime = _timecode$split4[0],
|
|
76
76
|
_timecode$split4$ = _timecode$split4[1],
|
|
77
|
-
msPart = _timecode$split4$ === void 0 ?
|
|
77
|
+
msPart = _timecode$split4$ === void 0 ? 0 : _timecode$split4$;
|
|
78
78
|
var parts = mainTime.split(":").map(Number);
|
|
79
79
|
var _parts = (0, _slicedToArray2["default"])(parts, 3),
|
|
80
80
|
_parts$ = _parts[0],
|
|
@@ -83,7 +83,7 @@ var convertHHMMSSmmm_to_HHMMSSFF = exports.convertHHMMSSmmm_to_HHMMSSFF = functi
|
|
|
83
83
|
mm = _parts$2 === void 0 ? 0 : _parts$2,
|
|
84
84
|
_parts$3 = _parts[2],
|
|
85
85
|
ss = _parts$3 === void 0 ? 0 : _parts$3;
|
|
86
|
-
var mmm = parseInt(msPart
|
|
86
|
+
var mmm = parseInt(msPart, 10); // ensure 3 digits
|
|
87
87
|
|
|
88
88
|
var clampedMs = Math.min(Math.max(mmm, 0), 999);
|
|
89
89
|
var frame = Math.ceil(clampedMs / 1000 * fps);
|
|
@@ -58,7 +58,7 @@ var TimeCodeMSInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
58
58
|
inputTitle = _ref.inputTitle,
|
|
59
59
|
_ref$checkBaiscError = _ref.checkBaiscError,
|
|
60
60
|
checkBaiscError = _ref$checkBaiscError === void 0 ? false : _ref$checkBaiscError;
|
|
61
|
-
var _useState = (0, _react.useState)((0, _utils.convertHHMMSSFF_to_HHMMSSmmm)(inputValue, frameRate) || "00:00:00
|
|
61
|
+
var _useState = (0, _react.useState)((0, _utils.convertHHMMSSFF_to_HHMMSSmmm)(inputValue, frameRate) || "00:00:00.000"),
|
|
62
62
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
63
63
|
customInputValue = _useState2[0],
|
|
64
64
|
setCustomInputValue = _useState2[1];
|
|
@@ -80,11 +80,11 @@ var TimeCodeMSInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
80
80
|
} else if (cleanedTime.length <= 6) {
|
|
81
81
|
formattedTime = "".concat(cleanedTime.slice(0, 2), ":").concat(cleanedTime.slice(2, 4), ":").concat(cleanedTime.slice(4));
|
|
82
82
|
} else {
|
|
83
|
-
formattedTime = "".concat(cleanedTime.slice(0, 2), ":").concat(cleanedTime.slice(2, 4), ":").concat(cleanedTime.slice(4, 6), "
|
|
83
|
+
formattedTime = "".concat(cleanedTime.slice(0, 2), ":").concat(cleanedTime.slice(2, 4), ":").concat(cleanedTime.slice(4, 6), ".").concat(cleanedTime.slice(6, 9));
|
|
84
84
|
}
|
|
85
85
|
e.target.value = formattedTime;
|
|
86
86
|
var newCursorPosition = cursorPosition;
|
|
87
|
-
if (inputTime.length >= formattedTime.length && inputTime[cursorPosition - 1] === ":") {
|
|
87
|
+
if (inputTime.length >= formattedTime.length && inputTime[cursorPosition - 1] === ":" || inputTime[cursorPosition - 1] === ".") {
|
|
88
88
|
newCursorPosition = cursorPosition;
|
|
89
89
|
} else if (cursorPosition % 3 === 0 && cursorPosition !== 0) {
|
|
90
90
|
newCursorPosition = cursorPosition + 1;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.24",
|
|
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": "9.1.
|
|
10
|
+
"@desynova-digital/tokens": "9.1.24",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|