assui 3.1.95 → 3.1.97
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/es/count-down/index.d.ts +8 -0
- package/es/count-down/index.js +42 -0
- package/es/count-down/style/index.d.ts +0 -0
- package/es/count-down/style/index.js +0 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/lib/count-down/index.d.ts +8 -0
- package/lib/count-down/index.js +52 -0
- package/lib/count-down/style/index.d.ts +0 -0
- package/lib/count-down/style/index.js +0 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -1
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Options, FormattedRes } from 'ahooks/lib/useCountDown';
|
|
3
|
+
export type CountDownProps = {
|
|
4
|
+
options: Options;
|
|
5
|
+
render?: (res: FormattedRes, countDown: number) => React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const CountDown: React.FC<CountDownProps>;
|
|
8
|
+
export default CountDown;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __read = this && this.__read || function (o, n) {
|
|
2
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
+
if (!m) return o;
|
|
4
|
+
var i = m.call(o),
|
|
5
|
+
r,
|
|
6
|
+
ar = [],
|
|
7
|
+
e;
|
|
8
|
+
try {
|
|
9
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
e = {
|
|
12
|
+
error: error
|
|
13
|
+
};
|
|
14
|
+
} finally {
|
|
15
|
+
try {
|
|
16
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17
|
+
} finally {
|
|
18
|
+
if (e) throw e.error;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return ar;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import useCountDown from "ahooks/es/useCountDown";
|
|
25
|
+
import isFunction from 'lodash/isFunction';
|
|
26
|
+
var CountDown = function CountDown(_a) {
|
|
27
|
+
var options = _a.options,
|
|
28
|
+
render = _a.render;
|
|
29
|
+
var _b = __read(useCountDown(options), 2),
|
|
30
|
+
countDown = _b[0],
|
|
31
|
+
formattedRes = _b[1];
|
|
32
|
+
var days = formattedRes.days,
|
|
33
|
+
hours = formattedRes.hours,
|
|
34
|
+
minutes = formattedRes.minutes,
|
|
35
|
+
seconds = formattedRes.seconds,
|
|
36
|
+
milliseconds = formattedRes.milliseconds;
|
|
37
|
+
if (isFunction(render)) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, render(formattedRes, countDown));
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", null, days, " days ", hours, " hours ", minutes, " minutes ", seconds, " seconds ", milliseconds);
|
|
41
|
+
};
|
|
42
|
+
export default CountDown;
|
|
File without changes
|
|
File without changes
|
package/es/index.d.ts
CHANGED
|
@@ -86,3 +86,5 @@ export type { ComplexValSelectProps } from './complex-val-select';
|
|
|
86
86
|
export { default as ComplexValSelect } from './complex-val-select';
|
|
87
87
|
export type { CountUpProps } from './count-up';
|
|
88
88
|
export { default as CountUp } from './count-up';
|
|
89
|
+
export type { CountDownProps } from './count-down';
|
|
90
|
+
export { default as CountDown } from './count-down';
|
package/es/index.js
CHANGED
|
@@ -43,4 +43,5 @@ export { default as Flex } from './flex';
|
|
|
43
43
|
export { default as LabelConditionSelectInput } from './label-condition-select-input';
|
|
44
44
|
export { default as MultipartUpload } from './multipart-upload';
|
|
45
45
|
export { default as ComplexValSelect } from './complex-val-select';
|
|
46
|
-
export { default as CountUp } from './count-up';
|
|
46
|
+
export { default as CountUp } from './count-up';
|
|
47
|
+
export { default as CountDown } from './count-down';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Options, FormattedRes } from 'ahooks/lib/useCountDown';
|
|
3
|
+
export type CountDownProps = {
|
|
4
|
+
options: Options;
|
|
5
|
+
render?: (res: FormattedRes, countDown: number) => React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const CountDown: React.FC<CountDownProps>;
|
|
8
|
+
export default CountDown;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __read = this && this.__read || function (o, n) {
|
|
4
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
|
+
if (!m) return o;
|
|
6
|
+
var i = m.call(o),
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
10
|
+
try {
|
|
11
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
e = {
|
|
14
|
+
error: error
|
|
15
|
+
};
|
|
16
|
+
} finally {
|
|
17
|
+
try {
|
|
18
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
19
|
+
} finally {
|
|
20
|
+
if (e) throw e.error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
26
|
+
return mod && mod.__esModule ? mod : {
|
|
27
|
+
"default": mod
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", {
|
|
31
|
+
value: true
|
|
32
|
+
});
|
|
33
|
+
var react_1 = __importDefault(require("react"));
|
|
34
|
+
var useCountDown_1 = __importDefault(require("ahooks/lib/useCountDown"));
|
|
35
|
+
var isFunction_1 = __importDefault(require("lodash/isFunction"));
|
|
36
|
+
var CountDown = function CountDown(_a) {
|
|
37
|
+
var options = _a.options,
|
|
38
|
+
render = _a.render;
|
|
39
|
+
var _b = __read((0, useCountDown_1["default"])(options), 2),
|
|
40
|
+
countDown = _b[0],
|
|
41
|
+
formattedRes = _b[1];
|
|
42
|
+
var days = formattedRes.days,
|
|
43
|
+
hours = formattedRes.hours,
|
|
44
|
+
minutes = formattedRes.minutes,
|
|
45
|
+
seconds = formattedRes.seconds,
|
|
46
|
+
milliseconds = formattedRes.milliseconds;
|
|
47
|
+
if ((0, isFunction_1["default"])(render)) {
|
|
48
|
+
return react_1["default"].createElement(react_1["default"].Fragment, null, render(formattedRes, countDown));
|
|
49
|
+
}
|
|
50
|
+
return react_1["default"].createElement("div", null, days, " days ", hours, " hours ", minutes, " minutes ", seconds, " seconds ", milliseconds);
|
|
51
|
+
};
|
|
52
|
+
exports["default"] = CountDown;
|
|
File without changes
|
|
File without changes
|
package/lib/index.d.ts
CHANGED
|
@@ -86,3 +86,5 @@ export type { ComplexValSelectProps } from './complex-val-select';
|
|
|
86
86
|
export { default as ComplexValSelect } from './complex-val-select';
|
|
87
87
|
export type { CountUpProps } from './count-up';
|
|
88
88
|
export { default as CountUp } from './count-up';
|
|
89
|
+
export type { CountDownProps } from './count-down';
|
|
90
|
+
export { default as CountDown } from './count-down';
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", {
|
|
9
9
|
value: true
|
|
10
10
|
});
|
|
11
|
-
exports.CountUp = exports.ComplexValSelect = exports.MultipartUpload = exports.LabelConditionSelectInput = exports.Flex = exports.Resizable = exports.BeautifulDnd = exports.RichTextEditor = exports.LabelCustomizeRangePicker = exports.TableCol = exports.LabelTreeSelect = exports.LabelConditionInput = exports.LabelNumberInput = exports.LabelAutoComplete = exports.LabelDatePicker = exports.LabelRangePicker = exports.JsonEditor = exports.AreaText = exports.LabelTextArea = exports.ASelect = exports.LabelSelect = exports.ColorSelect = exports.LabelInput = exports.TextInput = exports.TextArea = exports.SplitPane = exports.sortableHoc = exports.SingleImgUpload = exports.RcTransitionGroup = exports.RcQRcode = exports.RcEcharts = exports.StepNumberInput = exports.LabelRangeNumber = exports.NumberInput = exports.RcMotion = exports.KeepTab = exports.ImgCrop = exports.HighlightWords = exports.HighlightTextarea = exports.CopyToClipboard = exports.NumberFormatInput = exports.ConfigProvider = exports.ConditionSelectInput = exports.ConditionInput = exports.ButtonModal = exports.ButtonDrawer = void 0;
|
|
11
|
+
exports.CountDown = exports.CountUp = exports.ComplexValSelect = exports.MultipartUpload = exports.LabelConditionSelectInput = exports.Flex = exports.Resizable = exports.BeautifulDnd = exports.RichTextEditor = exports.LabelCustomizeRangePicker = exports.TableCol = exports.LabelTreeSelect = exports.LabelConditionInput = exports.LabelNumberInput = exports.LabelAutoComplete = exports.LabelDatePicker = exports.LabelRangePicker = exports.JsonEditor = exports.AreaText = exports.LabelTextArea = exports.ASelect = exports.LabelSelect = exports.ColorSelect = exports.LabelInput = exports.TextInput = exports.TextArea = exports.SplitPane = exports.sortableHoc = exports.SingleImgUpload = exports.RcTransitionGroup = exports.RcQRcode = exports.RcEcharts = exports.StepNumberInput = exports.LabelRangeNumber = exports.NumberInput = exports.RcMotion = exports.KeepTab = exports.ImgCrop = exports.HighlightWords = exports.HighlightTextarea = exports.CopyToClipboard = exports.NumberFormatInput = exports.ConfigProvider = exports.ConditionSelectInput = exports.ConditionInput = exports.ButtonModal = exports.ButtonDrawer = void 0;
|
|
12
12
|
var button_drawer_1 = require("./button-drawer");
|
|
13
13
|
Object.defineProperty(exports, "ButtonDrawer", {
|
|
14
14
|
enumerable: true,
|
|
@@ -330,4 +330,11 @@ Object.defineProperty(exports, "CountUp", {
|
|
|
330
330
|
get: function get() {
|
|
331
331
|
return __importDefault(count_up_1)["default"];
|
|
332
332
|
}
|
|
333
|
+
});
|
|
334
|
+
var count_down_1 = require("./count-down");
|
|
335
|
+
Object.defineProperty(exports, "CountDown", {
|
|
336
|
+
enumerable: true,
|
|
337
|
+
get: function get() {
|
|
338
|
+
return __importDefault(count_down_1)["default"];
|
|
339
|
+
}
|
|
333
340
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.97",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/react-beautiful-dnd": "^13.1.2",
|
|
36
36
|
"@types/react-color": "^3.0.6",
|
|
37
37
|
"@types/react-resizable": "^3.0.0",
|
|
38
|
-
"a-icons": "^1.1.
|
|
38
|
+
"a-icons": "^1.1.77",
|
|
39
39
|
"aa-utils": "^2.1.26",
|
|
40
40
|
"ahooks": "^3.0.8",
|
|
41
41
|
"bignumber.js": "^9.0.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"node": ">=10.0.0"
|
|
83
83
|
},
|
|
84
84
|
"license": "MIT",
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "33ec51bcbad408ca92f67f0dce34a7e905821721"
|
|
86
86
|
}
|