@douyinfe/semi-foundation 2.48.0-beta.0 → 2.48.0
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.
|
@@ -22,7 +22,7 @@ const parseToDate = function (input) {
|
|
|
22
22
|
let dateFnsLocale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _locale.zhCN;
|
|
23
23
|
if (input instanceof Date) {
|
|
24
24
|
return input;
|
|
25
|
-
} else if (typeof input === 'number'
|
|
25
|
+
} else if (typeof input === 'number') {
|
|
26
26
|
return new Date((0, _toNumber2.default)(input));
|
|
27
27
|
} else if (typeof input === 'string') {
|
|
28
28
|
let curDate = new Date();
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* https://github.com/react-component/tree
|
|
4
4
|
*/
|
|
5
5
|
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
6
|
-
|
|
6
|
+
import type { KeyMapProps } from './treeUtil';
|
|
7
|
+
export type { KeyMapProps };
|
|
7
8
|
export interface BasicTreeNodeProps {
|
|
8
9
|
[x: string]: any;
|
|
9
10
|
expanded?: boolean;
|
|
@@ -15,7 +15,7 @@ export const parseToDate = function (input) {
|
|
|
15
15
|
let dateFnsLocale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultLocale;
|
|
16
16
|
if (input instanceof Date) {
|
|
17
17
|
return input;
|
|
18
|
-
} else if (typeof input === 'number'
|
|
18
|
+
} else if (typeof input === 'number') {
|
|
19
19
|
return new Date(_toNumber(input));
|
|
20
20
|
} else if (typeof input === 'string') {
|
|
21
21
|
let curDate = new Date();
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* https://github.com/react-component/tree
|
|
4
4
|
*/
|
|
5
5
|
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
6
|
-
|
|
6
|
+
import type { KeyMapProps } from './treeUtil';
|
|
7
|
+
export type { KeyMapProps };
|
|
7
8
|
export interface BasicTreeNodeProps {
|
|
8
9
|
[x: string]: any;
|
|
9
10
|
expanded?: boolean;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.48.0
|
|
3
|
+
"version": "2.48.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.48.0
|
|
10
|
+
"@douyinfe/semi-animation": "2.48.0",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "6f3b0957a0fbd5b5cf5a2187782bac2f767162b3",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
|
@@ -14,7 +14,7 @@ import { zhCN as defaultLocale } from 'date-fns/locale';
|
|
|
14
14
|
export const parseToDate = (input: string | Date | number, formatToken = strings.DEFAULT_FORMAT, dateFnsLocale = defaultLocale) => {
|
|
15
15
|
if (input instanceof Date) {
|
|
16
16
|
return input;
|
|
17
|
-
} else if (typeof input === 'number'
|
|
17
|
+
} else if (typeof input === 'number') {
|
|
18
18
|
return new Date(toNumber(input));
|
|
19
19
|
} else if (typeof input === 'string') {
|
|
20
20
|
let curDate = new Date();
|
package/tree/foundation.ts
CHANGED