@oceanbase/ui 0.4.18 → 0.4.19
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/dist/ui.min.js +1 -1
- package/es/DateRanger/PickerPanel.js +1 -1
- package/es/DateRanger/constant/index.d.ts +1 -0
- package/es/DateRanger/constant/index.js +10 -0
- package/es/DateRanger/index.d.ts +1 -0
- package/es/DateRanger/index.js +2 -1
- package/lib/DateRanger/PickerPanel.js +1 -1
- package/lib/DateRanger/constant/index.d.ts +1 -0
- package/lib/DateRanger/constant/index.js +12 -0
- package/lib/DateRanger/index.d.ts +1 -0
- package/lib/DateRanger/index.js +1 -0
- package/package.json +4 -5
|
@@ -119,7 +119,7 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
|
|
|
119
119
|
var formatValues = _toConsumableArray(calendarValue).sort(function (a, b) {
|
|
120
120
|
return (a === null || a === void 0 ? void 0 : a.valueOf()) - (b === null || b === void 0 ? void 0 : b.valueOf());
|
|
121
121
|
}).map(function (item) {
|
|
122
|
-
return item.format(DATE_FORMAT);
|
|
122
|
+
return item === null || item === void 0 ? void 0 : item.format(DATE_FORMAT);
|
|
123
123
|
});
|
|
124
124
|
var _Form$useForm = Form.useForm(),
|
|
125
125
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
@@ -25,6 +25,7 @@ export declare const YESTERDAY: RangeOption;
|
|
|
25
25
|
export declare const LAST_1_DAY: RangeOption;
|
|
26
26
|
export declare const LAST_3_DAYS: RangeOption;
|
|
27
27
|
export declare const LAST_7_DAYS: RangeOption;
|
|
28
|
+
export declare const LAST_30_DAYS: RangeOption;
|
|
28
29
|
export declare const THIS_WEEK: RangeOption;
|
|
29
30
|
export declare const LAST_WEEK: RangeOption;
|
|
30
31
|
export declare const THIS_MONTH: RangeOption;
|
|
@@ -169,6 +169,16 @@ export var LAST_7_DAYS = {
|
|
|
169
169
|
return [current.clone().subtract(7, 'days'), current.clone()];
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
+
export var LAST_30_DAYS = {
|
|
173
|
+
label: '近 30 天',
|
|
174
|
+
enLabel: 'Last 30 Days',
|
|
175
|
+
rangeLabel: '30d',
|
|
176
|
+
name: 'LAST_30_DAYS',
|
|
177
|
+
range: function range() {
|
|
178
|
+
var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : moment();
|
|
179
|
+
return [current.clone().subtract(30, 'days'), current.clone()];
|
|
180
|
+
}
|
|
181
|
+
};
|
|
172
182
|
export var THIS_WEEK = {
|
|
173
183
|
label: '近一周',
|
|
174
184
|
enLabel: 'Nearly a week',
|
package/es/DateRanger/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare const DateRanger: import("react").ForwardRefExoticComponent<import("./Ra
|
|
|
15
15
|
LAST_1_DAY: import("./typing").RangeOption;
|
|
16
16
|
LAST_3_DAYS: import("./typing").RangeOption;
|
|
17
17
|
LAST_7_DAYS: import("./typing").RangeOption;
|
|
18
|
+
LAST_30_DAYS: import("./typing").RangeOption;
|
|
18
19
|
YESTERDAY: import("./typing").RangeOption;
|
|
19
20
|
THIS_WEEK: import("./typing").RangeOption;
|
|
20
21
|
LAST_WEEK: import("./typing").RangeOption;
|
package/es/DateRanger/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LAST_1_DAY, LAST_3_DAYS, LAST_7_DAYS, LAST_MONTH, LAST_WEEK, LAST_YEAR, NEAR_10_MINUTES, NEAR_12_HOURS, NEAR_1_HOURS, NEAR_1_MINUTES, NEAR_20_MINUTES, NEAR_2_HOURS, NEAR_30_MINUTES, NEAR_3_HOURS, NEAR_5_MINUTES, NEAR_6_HOURS, NEXT_YEAR, THIS_MONTH, THIS_WEEK, THIS_YEAR, TODAY, YESTERDAY } from "./constant";
|
|
1
|
+
import { LAST_1_DAY, LAST_3_DAYS, LAST_7_DAYS, LAST_30_DAYS, LAST_MONTH, LAST_WEEK, LAST_YEAR, NEAR_10_MINUTES, NEAR_12_HOURS, NEAR_1_HOURS, NEAR_1_MINUTES, NEAR_20_MINUTES, NEAR_2_HOURS, NEAR_30_MINUTES, NEAR_3_HOURS, NEAR_5_MINUTES, NEAR_6_HOURS, NEXT_YEAR, THIS_MONTH, THIS_WEEK, THIS_YEAR, TODAY, YESTERDAY } from "./constant";
|
|
2
2
|
import InternalDateRanger from "./Ranger";
|
|
3
3
|
export * from "./Ranger";
|
|
4
4
|
var DateRanger = Object.assign(InternalDateRanger, {
|
|
@@ -16,6 +16,7 @@ var DateRanger = Object.assign(InternalDateRanger, {
|
|
|
16
16
|
LAST_1_DAY: LAST_1_DAY,
|
|
17
17
|
LAST_3_DAYS: LAST_3_DAYS,
|
|
18
18
|
LAST_7_DAYS: LAST_7_DAYS,
|
|
19
|
+
LAST_30_DAYS: LAST_30_DAYS,
|
|
19
20
|
YESTERDAY: YESTERDAY,
|
|
20
21
|
THIS_WEEK: THIS_WEEK,
|
|
21
22
|
LAST_WEEK: LAST_WEEK,
|
|
@@ -110,7 +110,7 @@ var InternalPickerPanel = (props) => {
|
|
|
110
110
|
const formatValues = [...calendarValue].sort((a, b) => {
|
|
111
111
|
return (a == null ? void 0 : a.valueOf()) - (b == null ? void 0 : b.valueOf());
|
|
112
112
|
}).map((item) => {
|
|
113
|
-
return item.format(DATE_FORMAT);
|
|
113
|
+
return item == null ? void 0 : item.format(DATE_FORMAT);
|
|
114
114
|
});
|
|
115
115
|
const [form] = import_design.Form.useForm();
|
|
116
116
|
const [_sDate, _eDate] = formatValues;
|
|
@@ -25,6 +25,7 @@ export declare const YESTERDAY: RangeOption;
|
|
|
25
25
|
export declare const LAST_1_DAY: RangeOption;
|
|
26
26
|
export declare const LAST_3_DAYS: RangeOption;
|
|
27
27
|
export declare const LAST_7_DAYS: RangeOption;
|
|
28
|
+
export declare const LAST_30_DAYS: RangeOption;
|
|
28
29
|
export declare const THIS_WEEK: RangeOption;
|
|
29
30
|
export declare const LAST_WEEK: RangeOption;
|
|
30
31
|
export declare const THIS_MONTH: RangeOption;
|
|
@@ -37,6 +37,7 @@ __export(constant_exports, {
|
|
|
37
37
|
DATE_TIME_SECOND_FORMAT: () => DATE_TIME_SECOND_FORMAT,
|
|
38
38
|
DATE_TIME_SECOND_FORMAT_CN: () => DATE_TIME_SECOND_FORMAT_CN,
|
|
39
39
|
LAST_1_DAY: () => LAST_1_DAY,
|
|
40
|
+
LAST_30_DAYS: () => LAST_30_DAYS,
|
|
40
41
|
LAST_3_DAYS: () => LAST_3_DAYS,
|
|
41
42
|
LAST_7_DAYS: () => LAST_7_DAYS,
|
|
42
43
|
LAST_MONTH: () => LAST_MONTH,
|
|
@@ -234,6 +235,16 @@ var LAST_7_DAYS = {
|
|
|
234
235
|
current.clone()
|
|
235
236
|
]
|
|
236
237
|
};
|
|
238
|
+
var LAST_30_DAYS = {
|
|
239
|
+
label: "近 30 天",
|
|
240
|
+
enLabel: "Last 30 Days",
|
|
241
|
+
rangeLabel: "30d",
|
|
242
|
+
name: "LAST_30_DAYS",
|
|
243
|
+
range: (current = (0, import_moment.default)()) => [
|
|
244
|
+
current.clone().subtract(30, "days"),
|
|
245
|
+
current.clone()
|
|
246
|
+
]
|
|
247
|
+
};
|
|
237
248
|
var THIS_WEEK = {
|
|
238
249
|
label: "近一周",
|
|
239
250
|
enLabel: "Nearly a week",
|
|
@@ -337,6 +348,7 @@ var NEAR_TIME_LIST = [
|
|
|
337
348
|
DATE_TIME_SECOND_FORMAT,
|
|
338
349
|
DATE_TIME_SECOND_FORMAT_CN,
|
|
339
350
|
LAST_1_DAY,
|
|
351
|
+
LAST_30_DAYS,
|
|
340
352
|
LAST_3_DAYS,
|
|
341
353
|
LAST_7_DAYS,
|
|
342
354
|
LAST_MONTH,
|
|
@@ -15,6 +15,7 @@ declare const DateRanger: import("react").ForwardRefExoticComponent<import("./Ra
|
|
|
15
15
|
LAST_1_DAY: import("./typing").RangeOption;
|
|
16
16
|
LAST_3_DAYS: import("./typing").RangeOption;
|
|
17
17
|
LAST_7_DAYS: import("./typing").RangeOption;
|
|
18
|
+
LAST_30_DAYS: import("./typing").RangeOption;
|
|
18
19
|
YESTERDAY: import("./typing").RangeOption;
|
|
19
20
|
THIS_WEEK: import("./typing").RangeOption;
|
|
20
21
|
LAST_WEEK: import("./typing").RangeOption;
|
package/lib/DateRanger/index.js
CHANGED
|
@@ -51,6 +51,7 @@ var DateRanger = Object.assign(import_Ranger.default, {
|
|
|
51
51
|
LAST_1_DAY: import_constant.LAST_1_DAY,
|
|
52
52
|
LAST_3_DAYS: import_constant.LAST_3_DAYS,
|
|
53
53
|
LAST_7_DAYS: import_constant.LAST_7_DAYS,
|
|
54
|
+
LAST_30_DAYS: import_constant.LAST_30_DAYS,
|
|
54
55
|
YESTERDAY: import_constant.YESTERDAY,
|
|
55
56
|
THIS_WEEK: import_constant.THIS_WEEK,
|
|
56
57
|
LAST_WEEK: import_constant.LAST_WEEK,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
],
|
|
33
33
|
"sideEffects": [
|
|
34
34
|
"**/*.less",
|
|
35
|
-
"**/*.css"
|
|
36
|
-
"es/index.js"
|
|
35
|
+
"**/*.css"
|
|
37
36
|
],
|
|
38
37
|
"scripts": {
|
|
39
38
|
"build": "NODE_OPTIONS=--max_old_space_size=4096 father build"
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
"@ant-design/cssinjs": "^1.24.0",
|
|
43
42
|
"@ant-design/pro-components": "^2.8.10",
|
|
44
43
|
"@antv/g6": "3.4.10",
|
|
45
|
-
"@oceanbase/design": "^0.4.
|
|
44
|
+
"@oceanbase/design": "^0.4.16",
|
|
46
45
|
"@oceanbase/icons": "^0.4.7",
|
|
47
46
|
"@oceanbase/util": "^0.4.4",
|
|
48
47
|
"ahooks": "^2.10.14",
|
|
@@ -71,5 +70,5 @@
|
|
|
71
70
|
"react": ">=16.9.0",
|
|
72
71
|
"react-dom": ">=16.9.0"
|
|
73
72
|
},
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "42879f277f4c72e7254f121861f9e8b8a8e024ce"
|
|
75
74
|
}
|