@alfalab/core-components-time-input 2.1.0 → 2.1.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.
- package/Component.js +4 -6
- package/cssm/Component.js +4 -6
- package/cssm/index.js +1 -3
- package/cssm/utils/format.d.ts +1 -1
- package/cssm/utils/format.js +0 -2
- package/cssm/utils/index.js +0 -2
- package/esm/index.js +1 -1
- package/esm/utils/format.d.ts +1 -1
- package/index.js +1 -3
- package/modern/index.js +2 -2
- package/modern/utils/format.d.ts +1 -1
- package/package.json +3 -3
- package/utils/format.d.ts +1 -1
- package/utils/format.js +0 -2
- package/utils/index.js +0 -2
package/Component.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
7
5
|
var utils_format = require('./utils/format.js');
|
|
8
6
|
|
|
9
|
-
function
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
8
|
|
|
11
|
-
var React__default = /*#__PURE__*/
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
10
|
|
|
13
11
|
/******************************************************************************
|
|
14
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -50,7 +48,7 @@ function __rest(s, e) {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
/* eslint-disable no-useless-escape */
|
|
53
|
-
var TimeInput = React__default
|
|
51
|
+
var TimeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
54
52
|
var _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, propValue = _a.value, onChange = _a.onChange, onComplete = _a.onComplete, className = _a.className, restProps = __rest(_a, ["defaultValue", "value", "onChange", "onComplete", "className"]);
|
|
55
53
|
var _c = React.useState(propValue || defaultValue), value = _c[0], setValue = _c[1];
|
|
56
54
|
var handleChange = function (event) {
|
|
@@ -85,7 +83,7 @@ var TimeInput = React__default['default'].forwardRef(function (_a, ref) {
|
|
|
85
83
|
var handleClearClick = function () {
|
|
86
84
|
setValue('');
|
|
87
85
|
};
|
|
88
|
-
return (React__default
|
|
86
|
+
return (React__default.default.createElement(coreComponentsInput.Input, __assign({}, restProps, { ref: ref, value: value, className: className, onChange: handleChange, onClear: handleClearClick })));
|
|
89
87
|
});
|
|
90
88
|
|
|
91
89
|
exports.TimeInput = TimeInput;
|
package/cssm/Component.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var coreComponentsInput = require('@alfalab/core-components-input/cssm');
|
|
7
5
|
var utils_format = require('./utils/format.js');
|
|
8
6
|
|
|
9
|
-
function
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
8
|
|
|
11
|
-
var React__default = /*#__PURE__*/
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
10
|
|
|
13
11
|
/******************************************************************************
|
|
14
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -50,7 +48,7 @@ function __rest(s, e) {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
/* eslint-disable no-useless-escape */
|
|
53
|
-
var TimeInput = React__default
|
|
51
|
+
var TimeInput = React__default.default.forwardRef(function (_a, ref) {
|
|
54
52
|
var _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, propValue = _a.value, onChange = _a.onChange, onComplete = _a.onComplete, className = _a.className, restProps = __rest(_a, ["defaultValue", "value", "onChange", "onComplete", "className"]);
|
|
55
53
|
var _c = React.useState(propValue || defaultValue), value = _c[0], setValue = _c[1];
|
|
56
54
|
var handleChange = function (event) {
|
|
@@ -85,7 +83,7 @@ var TimeInput = React__default['default'].forwardRef(function (_a, ref) {
|
|
|
85
83
|
var handleClearClick = function () {
|
|
86
84
|
setValue('');
|
|
87
85
|
};
|
|
88
|
-
return (React__default
|
|
86
|
+
return (React__default.default.createElement(coreComponentsInput.Input, __assign({}, restProps, { ref: ref, value: value, className: className, onChange: handleChange, onClear: handleClearClick })));
|
|
89
87
|
});
|
|
90
88
|
|
|
91
89
|
exports.TimeInput = TimeInput;
|
package/cssm/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var Component = require('./Component.js');
|
|
4
|
+
var utils_format = require('./utils/format.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('@alfalab/core-components-input/cssm');
|
|
8
|
-
var utils_format = require('./utils/format.js');
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
|
package/cssm/utils/format.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const DATE_MASK: (string | RegExp)[];
|
|
2
2
|
declare const isCompleteTimeInput: (input: string) => boolean;
|
|
3
3
|
declare const isValidTimeFormat: (value: string) => boolean;
|
|
4
|
-
declare const isValidInputValue: (inputValue?: string
|
|
4
|
+
declare const isValidInputValue: (inputValue?: string) => boolean;
|
|
5
5
|
declare const format: (value: string) => string;
|
|
6
6
|
export { DATE_MASK, isCompleteTimeInput, isValidTimeFormat, isValidInputValue, format };
|
package/cssm/utils/format.js
CHANGED
package/cssm/utils/index.js
CHANGED
package/esm/index.js
CHANGED
package/esm/utils/format.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const DATE_MASK: (string | RegExp)[];
|
|
2
2
|
declare const isCompleteTimeInput: (input: string) => boolean;
|
|
3
3
|
declare const isValidTimeFormat: (value: string) => boolean;
|
|
4
|
-
declare const isValidInputValue: (inputValue?: string
|
|
4
|
+
declare const isValidInputValue: (inputValue?: string) => boolean;
|
|
5
5
|
declare const format: (value: string) => string;
|
|
6
6
|
export { DATE_MASK, isCompleteTimeInput, isValidTimeFormat, isValidInputValue, format };
|
package/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var Component = require('./Component.js');
|
|
4
|
+
var utils_format = require('./utils/format.js');
|
|
6
5
|
require('react');
|
|
7
6
|
require('@alfalab/core-components-input');
|
|
8
|
-
var utils_format = require('./utils/format.js');
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
|
package/modern/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
export { TimeInput } from './Component.js';
|
|
2
|
+
export { isValidInputValue } from './utils/format.js';
|
|
1
3
|
import 'react';
|
|
2
4
|
import '@alfalab/core-components-input/modern';
|
|
3
|
-
export { isValidInputValue } from './utils/format.js';
|
|
4
|
-
export { TimeInput } from './Component.js';
|
package/modern/utils/format.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const DATE_MASK: (string | RegExp)[];
|
|
2
2
|
declare const isCompleteTimeInput: (input: string) => boolean;
|
|
3
3
|
declare const isValidTimeFormat: (value: string) => boolean;
|
|
4
|
-
declare const isValidInputValue: (inputValue?: string
|
|
4
|
+
declare const isValidInputValue: (inputValue?: string) => boolean;
|
|
5
5
|
declare const format: (value: string) => string;
|
|
6
6
|
export { DATE_MASK, isCompleteTimeInput, isValidTimeFormat, isValidInputValue, format };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-time-input",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-input": "^11.1.
|
|
19
|
-
"@alfalab/core-components-icon-button": "^6.0.
|
|
18
|
+
"@alfalab/core-components-input": "^11.1.2",
|
|
19
|
+
"@alfalab/core-components-icon-button": "^6.0.2"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/utils/format.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const DATE_MASK: (string | RegExp)[];
|
|
2
2
|
declare const isCompleteTimeInput: (input: string) => boolean;
|
|
3
3
|
declare const isValidTimeFormat: (value: string) => boolean;
|
|
4
|
-
declare const isValidInputValue: (inputValue?: string
|
|
4
|
+
declare const isValidInputValue: (inputValue?: string) => boolean;
|
|
5
5
|
declare const format: (value: string) => string;
|
|
6
6
|
export { DATE_MASK, isCompleteTimeInput, isValidTimeFormat, isValidInputValue, format };
|
package/utils/format.js
CHANGED