react-picky-date-time 1.9.1 → 2.0.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.
- package/.all-contributorsrc +28 -0
- package/CHANGELOG.md +6 -0
- package/README.md +32 -1
- package/lib/Calendar/index.d.ts +15 -0
- package/lib/Clock/index.d.ts +15 -0
- package/lib/ReactPickyDateTime.d.ts +27 -0
- package/lib/components/index.js +1 -326
- package/lib/constValue.d.ts +38 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.global.d.ts +2 -0
- package/lib/locale.d.ts +11 -0
- package/lib/react-picky-date-time.css +1 -1
- package/lib/react-picky-date-time.css.map +1 -1
- package/lib/react-picky-date-time.js +1 -1
- package/lib/react-picky-date-time.js.map +1 -1
- package/lib/react-picky-date-time.min.css +1 -1
- package/lib/react-picky-date-time.min.css.map +1 -1
- package/lib/react-picky-date-time.min.js +1 -1
- package/lib/react-picky-date-time.min.js.map +1 -1
- package/lib/utils.d.ts +20 -0
- package/package.json +61 -52
- package/lib/components/Calendar/index.js +0 -937
- package/lib/components/Clock/index.js +0 -1080
- package/lib/components/constValue.js +0 -213
- package/lib/components/index.umd.js +0 -17
- package/lib/components/locale.js +0 -77
- package/lib/components/utils.js +0 -72
package/lib/utils.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const cx: (...params: Array<any>) => string;
|
|
2
|
+
export declare const isValidDate: (str: string) => boolean;
|
|
3
|
+
export declare const isValidDates: (arr: Array<string>) => boolean;
|
|
4
|
+
export declare const useWillUnmount: (f: Function) => void;
|
|
5
|
+
export declare const usePrevious: (value: any) => undefined;
|
|
6
|
+
export declare const formatClockNumber: (value: number) => string;
|
|
7
|
+
export declare const isValidTime: (value: string) => {
|
|
8
|
+
hour?: undefined;
|
|
9
|
+
minute?: undefined;
|
|
10
|
+
second?: undefined;
|
|
11
|
+
meridiem?: undefined;
|
|
12
|
+
hourText?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
hour: string;
|
|
15
|
+
minute: string;
|
|
16
|
+
second: string;
|
|
17
|
+
meridiem: string;
|
|
18
|
+
hourText: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const animationInterval: (ms: number, signal: any, callback: Function) => void;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-picky-date-time",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A react component for date time picker.",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "./lib/index.d.ts",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "git+https://github.com/edwardfxiao/react-picky-date-time.git"
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
"date-picker",
|
|
18
19
|
"timepicker",
|
|
19
20
|
"time-picker",
|
|
20
|
-
"calendar"
|
|
21
|
+
"calendar",
|
|
22
|
+
"react-picky-date-time"
|
|
21
23
|
],
|
|
22
24
|
"author": "Edward Xiao",
|
|
23
25
|
"license": "MIT",
|
|
@@ -26,19 +28,13 @@
|
|
|
26
28
|
},
|
|
27
29
|
"homepage": "https://github.com/edwardfxiao/react-picky-date-time#readme",
|
|
28
30
|
"scripts": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"build_umd_min": "./node_modules/.bin/webpack --config ./webpack/umd.global.config.js --env build",
|
|
37
|
-
"server_dev": "NODE_ENV=server node_modules/.bin/webpack-dev-server --config ./webpack/development.config.js",
|
|
38
|
-
"server_prod": "NODE_ENV=server node_modules/.bin/webpack-dev-server --config ./webpack/production.config.js",
|
|
39
|
-
"clean": "rimraf dist lib",
|
|
40
|
-
"compile_webpack": "npm run clean && npm run build_umd && npm run build_umd_min",
|
|
41
|
-
"compile": "npm run clean && npm run compile_webpack && npm run babel"
|
|
31
|
+
"tslint": "tslint -c tslint.json 'src/**/*.{ts,tsx}'",
|
|
32
|
+
"build_gh_page": "rm -rf lib && rm -rf dist && NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack/production.config.babel.js --progress",
|
|
33
|
+
"umd_local": "./node_modules/.bin/webpack --config ./webpack/umd.local.config.babel.js",
|
|
34
|
+
"umd_global": "./node_modules/.bin/webpack --config ./webpack/umd.global.config.babel.js",
|
|
35
|
+
"umd_global_min": "./node_modules/.bin/webpack --config ./webpack/umd.global.config.babel.js --env minify",
|
|
36
|
+
"dev": "node_modules/.bin/webpack-dev-server --config ./webpack/development.config.babel.js",
|
|
37
|
+
"compile": "rimraf dist lib && npm run umd_global && npm run umd_global_min && npm run umd_local && rm ./lib/components/*.css"
|
|
42
38
|
},
|
|
43
39
|
"peerDependencies": {
|
|
44
40
|
"react": ">= 16.8.6",
|
|
@@ -46,53 +42,66 @@
|
|
|
46
42
|
"react-transition-group": ">= 4.2.2"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
49
|
-
"@babel/cli": "^7.
|
|
50
|
-
"@babel/core": "^7.
|
|
51
|
-
"@babel/
|
|
52
|
-
"@babel/
|
|
53
|
-
"@babel/preset-
|
|
54
|
-
"
|
|
55
|
-
"babel-
|
|
56
|
-
"babel
|
|
57
|
-
"
|
|
45
|
+
"@babel/cli": "^7.17.0",
|
|
46
|
+
"@babel/core": "^7.17.2",
|
|
47
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
48
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
49
|
+
"@babel/preset-env": "^7.16.11",
|
|
50
|
+
"@babel/preset-react": "^7.16.7",
|
|
51
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
52
|
+
"@babel/register": "^7.17.0",
|
|
53
|
+
"@swc/core": "^1.2.139",
|
|
54
|
+
"@swc/wasm": "^1.2.139",
|
|
55
|
+
"@types/jest": "^27.4.0",
|
|
56
|
+
"@types/react": "^16.8.14",
|
|
57
|
+
"@types/react-dom": "^16.8.4",
|
|
58
|
+
"@types/react-transition-group": "^4.4.4",
|
|
59
|
+
"babel-jest": "^27.5.1",
|
|
60
|
+
"babel-loader": "^8.2.3",
|
|
58
61
|
"babel-plugin-css-modules-transform": "^1.6.2",
|
|
59
|
-
"
|
|
60
|
-
"babel-preset-env": "^1.7.0",
|
|
61
|
-
"babel-preset-es2015": "^6.24.1",
|
|
62
|
-
"babel-preset-react": "^6.16.0",
|
|
62
|
+
"bufferutil": "^4.0.6",
|
|
63
63
|
"chai": "^4.2.0",
|
|
64
|
-
"
|
|
65
|
-
"coveralls": "^3.
|
|
66
|
-
"css-loader": "^
|
|
67
|
-
"cssnano": "^
|
|
64
|
+
"core-js": "^3.21.0",
|
|
65
|
+
"coveralls": "^3.1.1",
|
|
66
|
+
"css-loader": "^6.4.0",
|
|
67
|
+
"cssnano": "^5.0.8",
|
|
68
68
|
"enzyme": "^3.10.0",
|
|
69
69
|
"enzyme-adapter-react-16": "^1.13.2",
|
|
70
|
-
"
|
|
71
|
-
"eslint
|
|
72
|
-
"eslint-plugin-react": "^
|
|
73
|
-
"eslint-plugin-react-hooks": "^
|
|
74
|
-
"
|
|
75
|
-
"
|
|
70
|
+
"esbuild": "^0.14.21",
|
|
71
|
+
"eslint": "^8.0.1",
|
|
72
|
+
"eslint-plugin-react": "^7.26.1",
|
|
73
|
+
"eslint-plugin-react-hooks": "^4.2.0",
|
|
74
|
+
"eslint-webpack-plugin": "^3.1.1",
|
|
75
|
+
"file-loader": "^6.2.0",
|
|
76
|
+
"html-webpack-plugin": "^5.4.0",
|
|
76
77
|
"identity-obj-proxy": "^3.0.0",
|
|
77
78
|
"inline-style-prefix-all": "^2.0.2",
|
|
78
|
-
"jest": "^
|
|
79
|
-
"mini-css-extract-plugin": "^
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"postcss-
|
|
83
|
-
"postcss-
|
|
84
|
-
"postcss-
|
|
79
|
+
"jest": "^27.4.0",
|
|
80
|
+
"mini-css-extract-plugin": "^2.4.3",
|
|
81
|
+
"node-notifier": "^10.0.1",
|
|
82
|
+
"open-color": "^1.9.1",
|
|
83
|
+
"postcss-css-variables": "^0.17.0",
|
|
84
|
+
"postcss-custom-properties": "^9.1.1",
|
|
85
|
+
"postcss-import": "^14.0.2",
|
|
86
|
+
"postcss-loader": "^6.2.0",
|
|
87
|
+
"postcss-preset-env": "^7.3.1",
|
|
88
|
+
"postcss-simple-vars": "^6.0.3",
|
|
85
89
|
"prismjs": "^1.16.0",
|
|
86
90
|
"react": "^16.8.6",
|
|
87
91
|
"react-dom": "^16.8.6",
|
|
88
|
-
"react-markdown": "^
|
|
92
|
+
"react-markdown": "^8.0.0",
|
|
89
93
|
"react-transition-group": "^4.4.2",
|
|
94
|
+
"regenerator-runtime": "^0.13.9",
|
|
90
95
|
"rimraf": "^3.0.2",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
96
|
+
"ts-jest": "^27.1.3",
|
|
97
|
+
"ts-loader": "^9.2.6",
|
|
98
|
+
"ts-node": "^10.5.0",
|
|
99
|
+
"typescript": "^4.5.5",
|
|
100
|
+
"url-loader": "^4.1.1",
|
|
101
|
+
"utf-8-validate": "^5.0.8",
|
|
102
|
+
"webpack": "^5.68.0",
|
|
103
|
+
"webpack-assets-manifest": "^5.1.0",
|
|
104
|
+
"webpack-cli": "^4.9.2",
|
|
105
|
+
"webpack-dev-server": "^4.7.4"
|
|
97
106
|
}
|
|
98
107
|
}
|