@oceanbase/ui 0.4.18 → 1.0.0-alpha.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.
@@ -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',
@@ -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;
@@ -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,
@@ -1,10 +1,7 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import { genLargeStyle } from '@oceanbase/design';
8
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
9
6
  export var genCompactStyle = function genCompactStyle(componentCls) {
10
7
  var subComponentCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -24,13 +21,13 @@ export var genFooterToolbarStyle = function genFooterToolbarStyle(token) {
24
21
  borderRadius = token.borderRadius,
25
22
  boxShadowSecondary = token.boxShadowSecondary,
26
23
  controlHeightLG = token.controlHeightLG;
27
- return _defineProperty({}, "".concat(componentCls), _objectSpread({
24
+ return _defineProperty({}, "".concat(componentCls), {
28
25
  width: '100%',
29
26
  backgroundColor: colorBgBase,
30
27
  borderRadius: borderRadius,
31
28
  boxShadow: boxShadowSecondary,
32
29
  borderBlockStart: 'none'
33
- }, genLargeStyle(token)));
30
+ });
34
31
  };
35
32
  export default (function (prefixCls) {
36
33
  var useStyle = genComponentStyleHook('FooterToolbar', function (token) {
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import { genLargeStyle } from '@oceanbase/design';
8
7
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
9
8
  import { genFooterToolbarStyle } from "../../FooterToolbar/style";
10
9
  export var genPageContainerStyle = function genPageContainerStyle(token) {
@@ -41,11 +40,11 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
41
40
  cursor: 'pointer',
42
41
  fontSize: token.fontSizeLG,
43
42
  marginTop: token.marginXXS
44
- }), "".concat(antCls, "-page-header-heading-extra"), _objectSpread({
43
+ }), "".concat(antCls, "-page-header-heading-extra"), {
45
44
  height: height,
46
45
  lineHeight: lineHeight,
47
46
  marginBlock: 0
48
- }, genLargeStyle(token))), "".concat(antCls, "-page-header-footer"), {
47
+ }), "".concat(antCls, "-page-header-footer"), {
49
48
  marginBlockStart: 0
50
49
  })), "".concat(componentCls, "-children-container"), _defineProperty({
51
50
  paddingInline: paddingLG,
@@ -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;
@@ -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,
@@ -24,7 +24,6 @@ __export(style_exports, {
24
24
  genFooterToolbarStyle: () => genFooterToolbarStyle
25
25
  });
26
26
  module.exports = __toCommonJS(style_exports);
27
- var import_design = require("@oceanbase/design");
28
27
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
29
28
  var genCompactStyle = (componentCls, subComponentCls = "") => {
30
29
  return {
@@ -49,8 +48,7 @@ var genFooterToolbarStyle = (token) => {
49
48
  backgroundColor: colorBgBase,
50
49
  borderRadius,
51
50
  boxShadow: boxShadowSecondary,
52
- borderBlockStart: "none",
53
- ...(0, import_design.genLargeStyle)(token)
51
+ borderBlockStart: "none"
54
52
  }
55
53
  };
56
54
  };
@@ -23,7 +23,6 @@ __export(style_exports, {
23
23
  genPageContainerStyle: () => genPageContainerStyle
24
24
  });
25
25
  module.exports = __toCommonJS(style_exports);
26
- var import_design = require("@oceanbase/design");
27
26
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
28
27
  var import_style = require("../../FooterToolbar/style");
29
28
  var genPageContainerStyle = (token) => {
@@ -72,9 +71,7 @@ var genPageContainerStyle = (token) => {
72
71
  [`${antCls}-page-header-heading-extra`]: {
73
72
  height,
74
73
  lineHeight,
75
- marginBlock: 0,
76
- // extra operation style
77
- ...(0, import_design.genLargeStyle)(token)
74
+ marginBlock: 0
78
75
  },
79
76
  [`${antCls}-page-header-footer`]: {
80
77
  marginBlockStart: 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.4.18",
3
+ "version": "1.0.0-alpha.0",
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,12 +41,12 @@
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.15",
44
+ "@oceanbase/design": "^1.0.0-alpha.0",
46
45
  "@oceanbase/icons": "^0.4.7",
47
46
  "@oceanbase/util": "^0.4.4",
48
47
  "ahooks": "^2.10.14",
49
48
  "classnames": "^2.5.1",
50
- "dayjs": "^1.11.13",
49
+ "dayjs": "^1.11.18",
51
50
  "diff": "^5.2.0",
52
51
  "highlight.js": "^11.11.1",
53
52
  "highlightjs-solidity": "^2.0.6",
@@ -71,5 +70,5 @@
71
70
  "react": ">=16.9.0",
72
71
  "react-dom": ">=16.9.0"
73
72
  },
74
- "gitHead": "b88518b0f25b30d616d829813ba50eff7830499a"
73
+ "gitHead": "1aff1c2acc2b9494ff83a86ed597b9f46a08f59c"
75
74
  }