assui 2.0.143 → 2.0.146

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.
Files changed (43) hide show
  1. package/es/button-drawer/index.d.ts +5 -5
  2. package/es/button-drawer/index.js +2 -1
  3. package/es/index.d.ts +0 -2
  4. package/es/index.js +0 -1
  5. package/es/label-customize-range-picker/defaultRadioList.d.ts +8 -0
  6. package/es/label-customize-range-picker/defaultRadioList.js +74 -0
  7. package/es/label-customize-range-picker/index.d.ts +4 -7
  8. package/es/label-customize-range-picker/index.js +11 -17
  9. package/es/label-number-input/style/index.css +11 -11
  10. package/es/label-number-input/style/index.less +40 -40
  11. package/lib/button-drawer/index.d.ts +5 -5
  12. package/lib/button-drawer/index.js +3 -1
  13. package/lib/index.d.ts +0 -2
  14. package/lib/index.js +0 -9
  15. package/lib/label-customize-range-picker/defaultRadioList.d.ts +8 -0
  16. package/lib/label-customize-range-picker/defaultRadioList.js +87 -0
  17. package/lib/label-customize-range-picker/index.d.ts +4 -7
  18. package/lib/label-customize-range-picker/index.js +11 -18
  19. package/lib/label-number-input/style/index.css +11 -11
  20. package/lib/label-number-input/style/index.less +40 -40
  21. package/package.json +2 -2
  22. package/es/label-customize-range-picker/getDateScope.d.ts +0 -45
  23. package/es/label-customize-range-picker/getDateScope.js +0 -85
  24. package/es/label-customize-range-picker/getRadioList.d.ts +0 -10
  25. package/es/label-customize-range-picker/getRadioList.js +0 -49
  26. package/es/label-desc-item/demo/index.less +0 -9
  27. package/es/label-desc-item/index.d.ts +0 -13
  28. package/es/label-desc-item/index.js +0 -22
  29. package/es/label-desc-item/style/index.css +0 -23
  30. package/es/label-desc-item/style/index.d.ts +0 -1
  31. package/es/label-desc-item/style/index.js +0 -1
  32. package/es/label-desc-item/style/index.less +0 -26
  33. package/lib/label-customize-range-picker/getDateScope.d.ts +0 -45
  34. package/lib/label-customize-range-picker/getDateScope.js +0 -99
  35. package/lib/label-customize-range-picker/getRadioList.d.ts +0 -10
  36. package/lib/label-customize-range-picker/getRadioList.js +0 -55
  37. package/lib/label-desc-item/demo/index.less +0 -9
  38. package/lib/label-desc-item/index.d.ts +0 -13
  39. package/lib/label-desc-item/index.js +0 -35
  40. package/lib/label-desc-item/style/index.css +0 -23
  41. package/lib/label-desc-item/style/index.d.ts +0 -1
  42. package/lib/label-desc-item/style/index.js +0 -7
  43. package/lib/label-desc-item/style/index.less +0 -26
@@ -9,51 +9,51 @@
9
9
 
10
10
  @font-weight-500: 500;
11
11
 
12
- .label-number-input {
13
- z-index: 1;
12
+ .label-number-input-warper {
13
+ position: relative;
14
14
  width: 100%;
15
15
  height: 100%;
16
- padding: 19px 15px 2px 15px;
17
- color: @color_263241;
18
- font-size: @font-size-base;
19
- line-height: 16px;
20
- border: 0;
21
- outline: 0;
22
-
23
- &:focus + label,
24
- &:not([data-value='0']) + label {
25
- transform: translateY(@labelTextLabeltranslateY) scale(@labelTextLabelScale);
26
- }
27
-
28
- &-field {
29
- height: 45px;
30
- overflow: hidden;
31
- border: 1px solid @color_e5e5e5;
32
- border-radius: 8px;
33
- transition: border 0.3s;
34
- }
35
16
 
36
- &-focused {
37
- border-color: @labelFocusBorderColor;
38
- }
39
-
40
- &-warper {
41
- position: relative;
17
+ .label-number-input {
18
+ z-index: 1;
42
19
  width: 100%;
43
20
  height: 100%;
44
- }
45
-
46
- &-text {
47
- position: absolute;
48
- top: 12px;
49
- left: 15px;
50
- z-index: 2;
51
- height: 20px;
52
- color: @color_9aa5b5;
21
+ padding: 19px 15px 2px 15px;
22
+ color: @color_263241;
53
23
  font-size: @font-size-base;
54
- line-height: 20px;
55
- transform-origin: top left;
56
- cursor: text;
57
- transition: all 0.2s ease-out;
24
+ line-height: 16px;
25
+ border: 0;
26
+ outline: 0;
27
+
28
+ &:focus + label,
29
+ &:not([data-value='0']) + label {
30
+ transform: translateY(@labelTextLabeltranslateY) scale(@labelTextLabelScale);
31
+ }
32
+
33
+ &-field {
34
+ height: 45px;
35
+ overflow: hidden;
36
+ border: 1px solid @color_e5e5e5;
37
+ border-radius: 8px;
38
+ transition: border 0.3s;
39
+ }
40
+
41
+ &-focused {
42
+ border-color: @labelFocusBorderColor;
43
+ }
44
+
45
+ &-text {
46
+ position: absolute;
47
+ top: 12px;
48
+ left: 15px;
49
+ z-index: 2;
50
+ height: 20px;
51
+ color: @color_9aa5b5;
52
+ font-size: @font-size-base;
53
+ line-height: 20px;
54
+ transform-origin: top left;
55
+ cursor: text;
56
+ transition: all 0.2s ease-out;
57
+ }
58
58
  }
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.0.143",
3
+ "version": "2.0.146",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -69,5 +69,5 @@
69
69
  "node": ">=10.0.0"
70
70
  },
71
71
  "license": "MIT",
72
- "gitHead": "25f77afda3f617fbf62eaf6e9dce5be5105d44a9"
72
+ "gitHead": "200764968459a9868bf0ab44d472c15c76df465a"
73
73
  }
@@ -1,45 +0,0 @@
1
- import moment from 'moment';
2
- export declare enum dateTypeEnum {
3
- TODAY = 1,
4
- YESTERDAY = 2,
5
- WEEK = 3,
6
- LAST_WEEK = 4,
7
- MONTH = 5,
8
- LAST_MONTH = 6,
9
- QUARTER = 7,
10
- LAST_QUARTER = 8,
11
- BEFORE_7_DAY = 9,
12
- BEFORE_14_DAY = 10,
13
- BEFORE_30_DAY = 11,
14
- BEFORE_90_DAY = 12,
15
- BEFORE_180_DAY = 13,
16
- BEFORE_365_DAY = 14,
17
- PAST_7_DAY = 15,
18
- FUTURE_7_DAY = 16,
19
- TOMORROW = 17
20
- }
21
- export declare const useDateScope: () => {
22
- dateScopeList: {
23
- key: dateTypeEnum;
24
- value: moment.Moment[];
25
- }[];
26
- dateScopeMap: {
27
- 1: moment.Moment[];
28
- 2: moment.Moment[];
29
- 3: moment.Moment[];
30
- 4: moment.Moment[];
31
- 5: moment.Moment[];
32
- 6: moment.Moment[];
33
- 7: moment.Moment[];
34
- 8: moment.Moment[];
35
- 9: moment.Moment[];
36
- 10: moment.Moment[];
37
- 11: moment.Moment[];
38
- 12: moment.Moment[];
39
- 13: moment.Moment[];
40
- 14: moment.Moment[];
41
- 15: moment.Moment[];
42
- 17: moment.Moment[];
43
- 16: moment.Moment[];
44
- };
45
- };
@@ -1,85 +0,0 @@
1
- import moment from 'moment';
2
- var now = moment();
3
- export var dateTypeEnum;
4
-
5
- (function (dateTypeEnum) {
6
- dateTypeEnum[dateTypeEnum["TODAY"] = 1] = "TODAY";
7
- dateTypeEnum[dateTypeEnum["YESTERDAY"] = 2] = "YESTERDAY";
8
- dateTypeEnum[dateTypeEnum["WEEK"] = 3] = "WEEK";
9
- dateTypeEnum[dateTypeEnum["LAST_WEEK"] = 4] = "LAST_WEEK";
10
- dateTypeEnum[dateTypeEnum["MONTH"] = 5] = "MONTH";
11
- dateTypeEnum[dateTypeEnum["LAST_MONTH"] = 6] = "LAST_MONTH";
12
- dateTypeEnum[dateTypeEnum["QUARTER"] = 7] = "QUARTER";
13
- dateTypeEnum[dateTypeEnum["LAST_QUARTER"] = 8] = "LAST_QUARTER";
14
- dateTypeEnum[dateTypeEnum["BEFORE_7_DAY"] = 9] = "BEFORE_7_DAY";
15
- dateTypeEnum[dateTypeEnum["BEFORE_14_DAY"] = 10] = "BEFORE_14_DAY";
16
- dateTypeEnum[dateTypeEnum["BEFORE_30_DAY"] = 11] = "BEFORE_30_DAY";
17
- dateTypeEnum[dateTypeEnum["BEFORE_90_DAY"] = 12] = "BEFORE_90_DAY";
18
- dateTypeEnum[dateTypeEnum["BEFORE_180_DAY"] = 13] = "BEFORE_180_DAY";
19
- dateTypeEnum[dateTypeEnum["BEFORE_365_DAY"] = 14] = "BEFORE_365_DAY";
20
- dateTypeEnum[dateTypeEnum["PAST_7_DAY"] = 15] = "PAST_7_DAY";
21
- dateTypeEnum[dateTypeEnum["FUTURE_7_DAY"] = 16] = "FUTURE_7_DAY";
22
- dateTypeEnum[dateTypeEnum["TOMORROW"] = 17] = "TOMORROW";
23
- })(dateTypeEnum || (dateTypeEnum = {}));
24
-
25
- export var useDateScope = function useDateScope() {
26
- var _a;
27
-
28
- var dateScopeList = [{
29
- key: dateTypeEnum.TODAY,
30
- value: [now, now]
31
- }, {
32
- key: dateTypeEnum.YESTERDAY,
33
- value: [now.clone().subtract(1, 'day'), now.clone().subtract(1, 'day').endOf('day')]
34
- }, {
35
- key: dateTypeEnum.WEEK,
36
- value: [now.clone().startOf('week'), now.clone().endOf('week')]
37
- }, {
38
- key: dateTypeEnum.LAST_WEEK,
39
- value: [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')]
40
- }, {
41
- key: dateTypeEnum.MONTH,
42
- value: [now.clone().startOf('month'), now.clone().endOf('month')]
43
- }, {
44
- key: dateTypeEnum.LAST_MONTH,
45
- value: [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')]
46
- }, {
47
- key: dateTypeEnum.QUARTER,
48
- value: [now.clone().startOf('quarter'), now.clone().endOf('quarter')]
49
- }, {
50
- key: dateTypeEnum.LAST_QUARTER,
51
- value: [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')]
52
- }, {
53
- key: dateTypeEnum.BEFORE_7_DAY,
54
- value: [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')]
55
- }, {
56
- key: dateTypeEnum.BEFORE_14_DAY,
57
- value: [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')]
58
- }, {
59
- key: dateTypeEnum.BEFORE_30_DAY,
60
- value: [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')]
61
- }, {
62
- key: dateTypeEnum.BEFORE_90_DAY,
63
- value: [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')]
64
- }, {
65
- key: dateTypeEnum.BEFORE_180_DAY,
66
- value: [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')]
67
- }, {
68
- key: dateTypeEnum.BEFORE_365_DAY,
69
- value: [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')]
70
- }, {
71
- key: dateTypeEnum.PAST_7_DAY,
72
- value: [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')]
73
- }, {
74
- key: dateTypeEnum.TOMORROW,
75
- value: [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
76
- }, {
77
- key: dateTypeEnum.FUTURE_7_DAY,
78
- value: [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
79
- }];
80
- var dateScopeMap = (_a = {}, _a[dateTypeEnum.TODAY] = [now.clone().startOf('day'), now.clone().endOf('day')], _a[dateTypeEnum.YESTERDAY] = [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.WEEK] = [now.clone().startOf('week'), now.clone().endOf('week')], _a[dateTypeEnum.LAST_WEEK] = [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')], _a[dateTypeEnum.MONTH] = [now.clone().startOf('month'), now.clone().endOf('month')], _a[dateTypeEnum.LAST_MONTH] = [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')], _a[dateTypeEnum.QUARTER] = [now.clone().startOf('quarter'), now.clone().endOf('quarter')], _a[dateTypeEnum.LAST_QUARTER] = [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')], _a[dateTypeEnum.BEFORE_7_DAY] = [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_14_DAY] = [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_30_DAY] = [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_90_DAY] = [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_180_DAY] = [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_365_DAY] = [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.PAST_7_DAY] = [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.TOMORROW] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a[dateTypeEnum.FUTURE_7_DAY] = [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a);
81
- return {
82
- dateScopeList: dateScopeList,
83
- dateScopeMap: dateScopeMap
84
- };
85
- };
@@ -1,10 +0,0 @@
1
- import { dateTypeEnum } from './getDateScope';
2
- export declare type RadioListType = {
3
- key: dateTypeEnum;
4
- text: string;
5
- };
6
- declare const getRadioList: () => {
7
- key: dateTypeEnum;
8
- text: string;
9
- }[];
10
- export default getRadioList;
@@ -1,49 +0,0 @@
1
- import { dateTypeEnum } from './getDateScope';
2
-
3
- var getRadioList = function getRadioList() {
4
- return [{
5
- key: dateTypeEnum.TODAY,
6
- text: '今日'
7
- }, {
8
- key: dateTypeEnum.YESTERDAY,
9
- text: '昨日'
10
- }, {
11
- key: dateTypeEnum.WEEK,
12
- text: '本周'
13
- }, {
14
- key: dateTypeEnum.LAST_WEEK,
15
- text: '上周'
16
- }, {
17
- key: dateTypeEnum.MONTH,
18
- text: '本月'
19
- }, {
20
- key: dateTypeEnum.LAST_MONTH,
21
- text: '上月'
22
- }, {
23
- key: dateTypeEnum.QUARTER,
24
- text: '本季度'
25
- }, {
26
- key: dateTypeEnum.LAST_QUARTER,
27
- text: '上季度'
28
- }, {
29
- key: dateTypeEnum.BEFORE_7_DAY,
30
- text: '最近7天'
31
- }, {
32
- key: dateTypeEnum.BEFORE_14_DAY,
33
- text: '最近14天'
34
- }, {
35
- key: dateTypeEnum.BEFORE_30_DAY,
36
- text: '最近30天'
37
- }, {
38
- key: dateTypeEnum.BEFORE_90_DAY,
39
- text: '最近90天'
40
- }, {
41
- key: dateTypeEnum.BEFORE_180_DAY,
42
- text: '最近180天'
43
- }, {
44
- key: dateTypeEnum.BEFORE_365_DAY,
45
- text: '最近365天'
46
- }];
47
- };
48
-
49
- export default getRadioList;
@@ -1,9 +0,0 @@
1
- .label-desc {
2
- margin-top: 10px;
3
-
4
- :global {
5
- .desc-item-label {
6
- color: #ff6b00;
7
- }
8
- }
9
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export declare type LabelDescItemProps = {
3
- /** 自定义class */
4
- className?: string;
5
- /** label 标签的文本 */
6
- label?: React.ReactNode;
7
- /** descItem的value */
8
- value?: React.ReactNode;
9
- /** 带有后缀的 item */
10
- suffix?: React.ReactNode;
11
- };
12
- declare const LabelDescItem: React.FC<LabelDescItemProps>;
13
- export default LabelDescItem;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import classNames from 'classnames';
3
-
4
- var LabelDescItem = function LabelDescItem(props) {
5
- var className = props.className,
6
- label = props.label,
7
- value = props.value,
8
- suffix = props.suffix;
9
- return /*#__PURE__*/React.createElement("div", {
10
- className: classNames('desc-item', className)
11
- }, /*#__PURE__*/React.createElement("div", {
12
- className: "desc-item-left-content"
13
- }, label && /*#__PURE__*/React.createElement("div", {
14
- className: "desc-item-label"
15
- }, label), /*#__PURE__*/React.createElement("div", {
16
- className: "desc-item-value"
17
- }, value)), suffix && /*#__PURE__*/React.createElement("div", {
18
- className: "desc-item-value"
19
- }, suffix));
20
- };
21
-
22
- export default LabelDescItem;
@@ -1,23 +0,0 @@
1
- .desc-item {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- padding: 17px 16px;
6
- overflow: hidden;
7
- background-color: #f8f8f8;
8
- border-radius: 12px;
9
- }
10
- .desc-item-left-content {
11
- display: flex;
12
- flex-shrink: 0;
13
- align-items: center;
14
- }
15
- .desc-item-label {
16
- flex-shrink: 0;
17
- margin-right: 10px;
18
- color: #b3b3b3;
19
- font-weight: 500;
20
- }
21
- .desc-item-value {
22
- font-weight: 500;
23
- }
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,26 +0,0 @@
1
- .desc-item {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- padding: 17px 16px;
6
- overflow: hidden;
7
- background-color: #f8f8f8;
8
- border-radius: 12px;
9
-
10
- &-left-content {
11
- display: flex;
12
- flex-shrink: 0;
13
- align-items: center;
14
- }
15
-
16
- &-label {
17
- flex-shrink: 0;
18
- margin-right: 10px;
19
- color: #b3b3b3;
20
- font-weight: 500;
21
- }
22
-
23
- &-value {
24
- font-weight: 500;
25
- }
26
- }
@@ -1,45 +0,0 @@
1
- import moment from 'moment';
2
- export declare enum dateTypeEnum {
3
- TODAY = 1,
4
- YESTERDAY = 2,
5
- WEEK = 3,
6
- LAST_WEEK = 4,
7
- MONTH = 5,
8
- LAST_MONTH = 6,
9
- QUARTER = 7,
10
- LAST_QUARTER = 8,
11
- BEFORE_7_DAY = 9,
12
- BEFORE_14_DAY = 10,
13
- BEFORE_30_DAY = 11,
14
- BEFORE_90_DAY = 12,
15
- BEFORE_180_DAY = 13,
16
- BEFORE_365_DAY = 14,
17
- PAST_7_DAY = 15,
18
- FUTURE_7_DAY = 16,
19
- TOMORROW = 17
20
- }
21
- export declare const useDateScope: () => {
22
- dateScopeList: {
23
- key: dateTypeEnum;
24
- value: moment.Moment[];
25
- }[];
26
- dateScopeMap: {
27
- 1: moment.Moment[];
28
- 2: moment.Moment[];
29
- 3: moment.Moment[];
30
- 4: moment.Moment[];
31
- 5: moment.Moment[];
32
- 6: moment.Moment[];
33
- 7: moment.Moment[];
34
- 8: moment.Moment[];
35
- 9: moment.Moment[];
36
- 10: moment.Moment[];
37
- 11: moment.Moment[];
38
- 12: moment.Moment[];
39
- 13: moment.Moment[];
40
- 14: moment.Moment[];
41
- 15: moment.Moment[];
42
- 17: moment.Moment[];
43
- 16: moment.Moment[];
44
- };
45
- };
@@ -1,99 +0,0 @@
1
- "use strict";
2
-
3
- var __importDefault = this && this.__importDefault || function (mod) {
4
- return mod && mod.__esModule ? mod : {
5
- "default": mod
6
- };
7
- };
8
-
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- exports.useDateScope = exports.dateTypeEnum = void 0;
13
-
14
- var moment_1 = __importDefault(require("moment"));
15
-
16
- var now = moment_1["default"]();
17
- var dateTypeEnum;
18
-
19
- (function (dateTypeEnum) {
20
- dateTypeEnum[dateTypeEnum["TODAY"] = 1] = "TODAY";
21
- dateTypeEnum[dateTypeEnum["YESTERDAY"] = 2] = "YESTERDAY";
22
- dateTypeEnum[dateTypeEnum["WEEK"] = 3] = "WEEK";
23
- dateTypeEnum[dateTypeEnum["LAST_WEEK"] = 4] = "LAST_WEEK";
24
- dateTypeEnum[dateTypeEnum["MONTH"] = 5] = "MONTH";
25
- dateTypeEnum[dateTypeEnum["LAST_MONTH"] = 6] = "LAST_MONTH";
26
- dateTypeEnum[dateTypeEnum["QUARTER"] = 7] = "QUARTER";
27
- dateTypeEnum[dateTypeEnum["LAST_QUARTER"] = 8] = "LAST_QUARTER";
28
- dateTypeEnum[dateTypeEnum["BEFORE_7_DAY"] = 9] = "BEFORE_7_DAY";
29
- dateTypeEnum[dateTypeEnum["BEFORE_14_DAY"] = 10] = "BEFORE_14_DAY";
30
- dateTypeEnum[dateTypeEnum["BEFORE_30_DAY"] = 11] = "BEFORE_30_DAY";
31
- dateTypeEnum[dateTypeEnum["BEFORE_90_DAY"] = 12] = "BEFORE_90_DAY";
32
- dateTypeEnum[dateTypeEnum["BEFORE_180_DAY"] = 13] = "BEFORE_180_DAY";
33
- dateTypeEnum[dateTypeEnum["BEFORE_365_DAY"] = 14] = "BEFORE_365_DAY";
34
- dateTypeEnum[dateTypeEnum["PAST_7_DAY"] = 15] = "PAST_7_DAY";
35
- dateTypeEnum[dateTypeEnum["FUTURE_7_DAY"] = 16] = "FUTURE_7_DAY";
36
- dateTypeEnum[dateTypeEnum["TOMORROW"] = 17] = "TOMORROW";
37
- })(dateTypeEnum = exports.dateTypeEnum || (exports.dateTypeEnum = {}));
38
-
39
- exports.useDateScope = function () {
40
- var _a;
41
-
42
- var dateScopeList = [{
43
- key: dateTypeEnum.TODAY,
44
- value: [now, now]
45
- }, {
46
- key: dateTypeEnum.YESTERDAY,
47
- value: [now.clone().subtract(1, 'day'), now.clone().subtract(1, 'day').endOf('day')]
48
- }, {
49
- key: dateTypeEnum.WEEK,
50
- value: [now.clone().startOf('week'), now.clone().endOf('week')]
51
- }, {
52
- key: dateTypeEnum.LAST_WEEK,
53
- value: [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')]
54
- }, {
55
- key: dateTypeEnum.MONTH,
56
- value: [now.clone().startOf('month'), now.clone().endOf('month')]
57
- }, {
58
- key: dateTypeEnum.LAST_MONTH,
59
- value: [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')]
60
- }, {
61
- key: dateTypeEnum.QUARTER,
62
- value: [now.clone().startOf('quarter'), now.clone().endOf('quarter')]
63
- }, {
64
- key: dateTypeEnum.LAST_QUARTER,
65
- value: [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')]
66
- }, {
67
- key: dateTypeEnum.BEFORE_7_DAY,
68
- value: [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')]
69
- }, {
70
- key: dateTypeEnum.BEFORE_14_DAY,
71
- value: [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')]
72
- }, {
73
- key: dateTypeEnum.BEFORE_30_DAY,
74
- value: [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')]
75
- }, {
76
- key: dateTypeEnum.BEFORE_90_DAY,
77
- value: [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')]
78
- }, {
79
- key: dateTypeEnum.BEFORE_180_DAY,
80
- value: [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')]
81
- }, {
82
- key: dateTypeEnum.BEFORE_365_DAY,
83
- value: [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')]
84
- }, {
85
- key: dateTypeEnum.PAST_7_DAY,
86
- value: [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')]
87
- }, {
88
- key: dateTypeEnum.TOMORROW,
89
- value: [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
90
- }, {
91
- key: dateTypeEnum.FUTURE_7_DAY,
92
- value: [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
93
- }];
94
- var dateScopeMap = (_a = {}, _a[dateTypeEnum.TODAY] = [now.clone().startOf('day'), now.clone().endOf('day')], _a[dateTypeEnum.YESTERDAY] = [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.WEEK] = [now.clone().startOf('week'), now.clone().endOf('week')], _a[dateTypeEnum.LAST_WEEK] = [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')], _a[dateTypeEnum.MONTH] = [now.clone().startOf('month'), now.clone().endOf('month')], _a[dateTypeEnum.LAST_MONTH] = [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')], _a[dateTypeEnum.QUARTER] = [now.clone().startOf('quarter'), now.clone().endOf('quarter')], _a[dateTypeEnum.LAST_QUARTER] = [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')], _a[dateTypeEnum.BEFORE_7_DAY] = [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_14_DAY] = [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_30_DAY] = [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_90_DAY] = [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_180_DAY] = [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_365_DAY] = [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.PAST_7_DAY] = [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.TOMORROW] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a[dateTypeEnum.FUTURE_7_DAY] = [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a);
95
- return {
96
- dateScopeList: dateScopeList,
97
- dateScopeMap: dateScopeMap
98
- };
99
- };
@@ -1,10 +0,0 @@
1
- import { dateTypeEnum } from './getDateScope';
2
- export declare type RadioListType = {
3
- key: dateTypeEnum;
4
- text: string;
5
- };
6
- declare const getRadioList: () => {
7
- key: dateTypeEnum;
8
- text: string;
9
- }[];
10
- export default getRadioList;
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var getDateScope_1 = require("./getDateScope");
8
-
9
- var getRadioList = function getRadioList() {
10
- return [{
11
- key: getDateScope_1.dateTypeEnum.TODAY,
12
- text: '今日'
13
- }, {
14
- key: getDateScope_1.dateTypeEnum.YESTERDAY,
15
- text: '昨日'
16
- }, {
17
- key: getDateScope_1.dateTypeEnum.WEEK,
18
- text: '本周'
19
- }, {
20
- key: getDateScope_1.dateTypeEnum.LAST_WEEK,
21
- text: '上周'
22
- }, {
23
- key: getDateScope_1.dateTypeEnum.MONTH,
24
- text: '本月'
25
- }, {
26
- key: getDateScope_1.dateTypeEnum.LAST_MONTH,
27
- text: '上月'
28
- }, {
29
- key: getDateScope_1.dateTypeEnum.QUARTER,
30
- text: '本季度'
31
- }, {
32
- key: getDateScope_1.dateTypeEnum.LAST_QUARTER,
33
- text: '上季度'
34
- }, {
35
- key: getDateScope_1.dateTypeEnum.BEFORE_7_DAY,
36
- text: '最近7天'
37
- }, {
38
- key: getDateScope_1.dateTypeEnum.BEFORE_14_DAY,
39
- text: '最近14天'
40
- }, {
41
- key: getDateScope_1.dateTypeEnum.BEFORE_30_DAY,
42
- text: '最近30天'
43
- }, {
44
- key: getDateScope_1.dateTypeEnum.BEFORE_90_DAY,
45
- text: '最近90天'
46
- }, {
47
- key: getDateScope_1.dateTypeEnum.BEFORE_180_DAY,
48
- text: '最近180天'
49
- }, {
50
- key: getDateScope_1.dateTypeEnum.BEFORE_365_DAY,
51
- text: '最近365天'
52
- }];
53
- };
54
-
55
- exports["default"] = getRadioList;
@@ -1,9 +0,0 @@
1
- .label-desc {
2
- margin-top: 10px;
3
-
4
- :global {
5
- .desc-item-label {
6
- color: #ff6b00;
7
- }
8
- }
9
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export declare type LabelDescItemProps = {
3
- /** 自定义class */
4
- className?: string;
5
- /** label 标签的文本 */
6
- label?: React.ReactNode;
7
- /** descItem的value */
8
- value?: React.ReactNode;
9
- /** 带有后缀的 item */
10
- suffix?: React.ReactNode;
11
- };
12
- declare const LabelDescItem: React.FC<LabelDescItemProps>;
13
- export default LabelDescItem;