@arim-aisdc/public-components 1.0.0 → 2.0.2

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 (37) hide show
  1. package/dist/assets/images/data.empty-dark.svg +45 -0
  2. package/dist/components/BaseInfo/BaseInfo.js +2 -3
  3. package/dist/components/CenterModal/CenterModal.js +5 -4
  4. package/dist/components/ColorSelector/ColorSelector.js +2 -3
  5. package/dist/components/CustomForm/CustomForm.js +48 -76
  6. package/dist/components/Drawer/Drawer.js +50 -69
  7. package/dist/components/Drawer/type.d.ts +1 -0
  8. package/dist/components/Filter/FilterInputNumber/index.js +2 -3
  9. package/dist/components/Filter/FilterRadio/index.js +4 -7
  10. package/dist/components/Filter/FilterSelect/index.js +3 -4
  11. package/dist/components/Filter/FilterSlider/index.js +2 -3
  12. package/dist/components/Filter/FilterSwitch/index.js +2 -3
  13. package/dist/components/GlobalTip/MessageTip/MessageTip.js +2 -3
  14. package/dist/components/GlobalTip/ModalTip/ModalTip.d.ts +1 -0
  15. package/dist/components/GlobalTip/ModalTip/ModalTip.js +13 -10
  16. package/dist/components/Permission/NoPermission.js +3 -6
  17. package/dist/components/QueryFilter/QueryFilter.js +92 -91
  18. package/dist/components/SchemaForm/SchemaForm.js +2 -3
  19. package/dist/components/SchemaForm/utils.js +3 -3
  20. package/dist/components/TableMax/TableBody/Row.js +2 -3
  21. package/dist/components/TableMax/TableBody/index.js +2 -3
  22. package/dist/components/TableMax/TableHeader/Cell.js +2 -3
  23. package/dist/components/TableMax/TableMax.js +10 -17
  24. package/dist/components/TableMax/components/ColumnEdit/components/numberRange/index.js +3 -4
  25. package/dist/components/TableMax/components/ColumnEdit/index.js +8 -19
  26. package/dist/components/TableMax/components/ColumnFilter/FilterDateRange/index.js +10 -11
  27. package/dist/components/TableMax/components/ColumnFilter/MultipleSelect/index.js +2 -3
  28. package/dist/components/TableMax/components/ColumnFilter/SingleSelect/index.js +2 -3
  29. package/dist/components/TableMax/components/ColumnFilter/index.js +9 -16
  30. package/dist/components/TableMax/components/ColumnSetting/index.js +5 -10
  31. package/dist/components/TableMax/components/ColumnSort/customSortFns.d.ts +8 -8
  32. package/dist/components/TableMax/components/ColumnSort/customSortFns.js +3 -3
  33. package/dist/components/TableMax/components/PaginationV2/index.js +3 -6
  34. package/dist/components/TableMax/utils.js +3 -3
  35. package/dist/components/ThemeProvider/ThemeProvider.js +6 -6
  36. package/dist/utils/request.js +4 -7
  37. package/package.json +6 -6
@@ -1,12 +1,4 @@
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
- import "antd/es/pagination/style";
3
- import _Pagination from "antd/es/pagination";
4
- import "antd/es/button/style";
5
- import _Button from "antd/es/button";
6
- import "antd/es/checkbox/style";
7
- import _Checkbox from "antd/es/checkbox";
8
- import "antd/es/form/style";
9
- import _Form from "antd/es/form";
10
2
  var _this = this;
11
3
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
12
4
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -29,9 +21,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
29
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
22
  import { MinusSquareOutlined, PlusSquareOutlined } from '@ant-design/icons';
31
23
  import { getCoreRowModel, getExpandedRowModel, getFacetedUniqueValues, getFilteredRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';
24
+ import { Button, Checkbox, Form, Pagination } from 'antd';
32
25
  import { produce } from 'immer';
33
26
  import { cloneDeep, debounce } from 'lodash';
34
- import moment from 'moment';
27
+ import dayjs from 'dayjs';
35
28
  import React, { createContext, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
36
29
  import { DndProvider } from 'react-dnd';
37
30
  import { HTML5Backend } from 'react-dnd-html5-backend';
@@ -301,7 +294,7 @@ var TableMax = function TableMax(_ref) {
301
294
  _useState32 = _slicedToArray(_useState31, 2),
302
295
  enableFilters = _useState32[0],
303
296
  setEnableFilters = _useState32[1];
304
- var _Form$useForm = _Form.useForm(),
297
+ var _Form$useForm = Form.useForm(),
305
298
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
306
299
  form = _Form$useForm2[0];
307
300
 
@@ -522,7 +515,7 @@ var TableMax = function TableMax(_ref) {
522
515
  tooltip: false,
523
516
  header: function header(_ref3) {
524
517
  var table = _ref3.table;
525
- return /*#__PURE__*/_jsx(_Checkbox, {
518
+ return /*#__PURE__*/_jsx(Checkbox, {
526
519
  checked: table.getIsAllRowsSelected(),
527
520
  indeterminate: table.getIsSomeRowsSelected(),
528
521
  onChange: selectAllChange.bind(_this, table),
@@ -535,7 +528,7 @@ var TableMax = function TableMax(_ref) {
535
528
  cell: function cell(_ref4) {
536
529
  var row = _ref4.row,
537
530
  table = _ref4.table;
538
- return /*#__PURE__*/_jsx(_Checkbox, {
531
+ return /*#__PURE__*/_jsx(Checkbox, {
539
532
  checked: row.getIsSelected(),
540
533
  disabled: !row.getCanSelect(),
541
534
  indeterminate: row.getIsSomeSelected(),
@@ -844,7 +837,7 @@ var TableMax = function TableMax(_ref) {
844
837
  (_Object$keys = Object.keys(rowOriginal)) === null || _Object$keys === void 0 || _Object$keys.forEach(function (item) {
845
838
  var _columnsMap$item, _columnsMap$item2;
846
839
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
847
- ((_columnsMap$item = columnsMap[item]) === null || _columnsMap$item === void 0 ? void 0 : _columnsMap$item.editComType) === InputType.DatePicker ? formData[item] = rowOriginal[item] ? moment(rowOriginal[item]) : null : (_columnsMap$item2 = columnsMap[item]) !== null && _columnsMap$item2 !== void 0 && _columnsMap$item2.shouldConvert ? formData[item] = columnsMap[item].shouldConvert(rowOriginal[item]) : formData[item] = rowOriginal[item];
840
+ ((_columnsMap$item = columnsMap[item]) === null || _columnsMap$item === void 0 ? void 0 : _columnsMap$item.editComType) === InputType.DatePicker ? formData[item] = rowOriginal[item] ? dayjs(rowOriginal[item]) : null : (_columnsMap$item2 = columnsMap[item]) !== null && _columnsMap$item2 !== void 0 && _columnsMap$item2.shouldConvert ? formData[item] = columnsMap[item].shouldConvert(rowOriginal[item]) : formData[item] = rowOriginal[item];
848
841
  });
849
842
  form.setFieldsValue(formData);
850
843
  };
@@ -1049,7 +1042,7 @@ var TableMax = function TableMax(_ref) {
1049
1042
  tableTooltip: tableTooltip
1050
1043
  };
1051
1044
  console.log('columnsSizeMap render');
1052
- return /*#__PURE__*/_jsx(_Form, {
1045
+ return /*#__PURE__*/_jsx(Form, {
1053
1046
  form: form,
1054
1047
  component: false,
1055
1048
  children: /*#__PURE__*/_jsx(DndProvider, {
@@ -1075,14 +1068,14 @@ var TableMax = function TableMax(_ref) {
1075
1068
  className: "table-max-header-right",
1076
1069
  children: /*#__PURE__*/_jsxs("span", {
1077
1070
  className: "handleRightEditBtn",
1078
- children: [/*#__PURE__*/_jsx(_Button, {
1071
+ children: [/*#__PURE__*/_jsx(Button, {
1079
1072
  type: "default",
1080
1073
  onClick: handleClickCancelEdit,
1081
1074
  style: {
1082
1075
  marginRight: 12
1083
1076
  },
1084
1077
  children: "\u53D6\u6D88"
1085
- }), /*#__PURE__*/_jsx(_Button, {
1078
+ }), /*#__PURE__*/_jsx(Button, {
1086
1079
  type: "primary",
1087
1080
  onClick: save,
1088
1081
  children: "\u4FDD\u5B58"
@@ -1182,7 +1175,7 @@ var TableMax = function TableMax(_ref) {
1182
1175
  pageSize: size
1183
1176
  });
1184
1177
  }
1185
- }) : /*#__PURE__*/_jsx(_Pagination, {
1178
+ }) : /*#__PURE__*/_jsx(Pagination, {
1186
1179
  pageSize: pageSize,
1187
1180
  total: totalCount,
1188
1181
  defaultPageSize: pageSize,
@@ -1,5 +1,4 @@
1
- import "antd/es/input-number/style";
2
- import _InputNumber from "antd/es/input-number";
1
+ import { InputNumber } from 'antd';
3
2
  import "./index.less";
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
5
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -9,7 +8,7 @@ var NumberRange = function NumberRange(_ref) {
9
8
  _onChange = _ref.onChange;
10
9
  return /*#__PURE__*/_jsxs("div", {
11
10
  className: "tableMax-edit-numberRangeWrapper",
12
- children: [/*#__PURE__*/_jsx(_InputNumber, {
11
+ children: [/*#__PURE__*/_jsx(InputNumber, {
13
12
  precision: precision,
14
13
  min: 0,
15
14
  max: value === null || value === void 0 ? void 0 : value[1],
@@ -17,7 +16,7 @@ var NumberRange = function NumberRange(_ref) {
17
16
  onChange: function onChange(newValue) {
18
17
  return _onChange === null || _onChange === void 0 ? void 0 : _onChange([newValue, value === null || value === void 0 ? void 0 : value[1]]);
19
18
  }
20
- }), /*#__PURE__*/_jsx(_InputNumber, {
19
+ }), /*#__PURE__*/_jsx(InputNumber, {
21
20
  precision: precision,
22
21
  min: value === null || value === void 0 ? void 0 : value[0],
23
22
  value: value === null || value === void 0 ? void 0 : value[1],
@@ -1,15 +1,4 @@
1
- import "antd/es/tooltip/style";
2
- import _Tooltip from "antd/es/tooltip";
3
- import "antd/es/form/style";
4
- import _Form from "antd/es/form";
5
- import "antd/es/input/style";
6
- import _Input from "antd/es/input";
7
- import "antd/es/select/style";
8
- import _Select from "antd/es/select";
9
- import "antd/es/date-picker/style";
10
- import _DatePicker from "antd/es/date-picker";
11
- import "antd/es/input-number/style";
12
- import _InputNumber from "antd/es/input-number";
1
+ import { DatePicker, Form, Input, InputNumber, Select, Tooltip } from 'antd';
13
2
  import NumberRange from "./components/numberRange";
14
3
  import "./index.less";
15
4
 
@@ -41,7 +30,7 @@ export var EditableCell = function EditableCell(_ref) {
41
30
  var getEditComponent = function getEditComponent() {
42
31
  switch (editComType) {
43
32
  case InputType.InputNumber:
44
- return /*#__PURE__*/_jsx(_InputNumber, {
33
+ return /*#__PURE__*/_jsx(InputNumber, {
45
34
  precision: precision,
46
35
  placeholder: title,
47
36
  min: numberMin ? numberMin : 0,
@@ -54,7 +43,7 @@ export var EditableCell = function EditableCell(_ref) {
54
43
  precision: precision
55
44
  });
56
45
  case InputType.DatePicker:
57
- return /*#__PURE__*/_jsx(_DatePicker, {
46
+ return /*#__PURE__*/_jsx(DatePicker, {
58
47
  showTime: true,
59
48
  format: "YYYY-MM-DD HH:mm:ss",
60
49
  allowClear: true,
@@ -64,11 +53,11 @@ export var EditableCell = function EditableCell(_ref) {
64
53
  })
65
54
  });
66
55
  case InputType.Select:
67
- return /*#__PURE__*/_jsx(_Select, {
56
+ return /*#__PURE__*/_jsx(Select, {
68
57
  placeholder: title,
69
58
  allowClear: true,
70
59
  children: editOptions.map(function (item, index) {
71
- return /*#__PURE__*/_jsx(_Select.Option, {
60
+ return /*#__PURE__*/_jsx(Select.Option, {
72
61
  value: item.value,
73
62
  children: item.label
74
63
  }, item.value || index);
@@ -76,7 +65,7 @@ export var EditableCell = function EditableCell(_ref) {
76
65
  });
77
66
  case InputType.Input:
78
67
  default:
79
- return /*#__PURE__*/_jsx(_Input, {
68
+ return /*#__PURE__*/_jsx(Input, {
80
69
  placeholder: title,
81
70
  allowClear: true
82
71
  });
@@ -84,7 +73,7 @@ export var EditableCell = function EditableCell(_ref) {
84
73
  };
85
74
  return /*#__PURE__*/_jsx("div", {
86
75
  className: "table-max-cell-wrapper",
87
- children: editing ? /*#__PURE__*/_jsx(_Form.Item, {
76
+ children: editing ? /*#__PURE__*/_jsx(Form.Item, {
88
77
  name: dataIndex,
89
78
  style: {
90
79
  margin: 0
@@ -107,7 +96,7 @@ export var EditableCell = function EditableCell(_ref) {
107
96
  // onClick={e => e.stopPropagation()}
108
97
  ,
109
98
  children: getEditComponent()
110
- }) : ((_ref2 = ellipsis !== null && ellipsis !== void 0 ? ellipsis : columnTooltip) !== null && _ref2 !== void 0 ? _ref2 : tableTooltip) ? /*#__PURE__*/_jsx(_Tooltip, {
99
+ }) : ((_ref2 = ellipsis !== null && ellipsis !== void 0 ? ellipsis : columnTooltip) !== null && _ref2 !== void 0 ? _ref2 : tableTooltip) ? /*#__PURE__*/_jsx(Tooltip, {
111
100
  placement: "top",
112
101
  title: children,
113
102
  mouseEnterDelay: 0.5
@@ -1,10 +1,9 @@
1
- import "antd/es/date-picker/style";
2
- import _DatePicker from "antd/es/date-picker";
3
- import moment from 'moment';
4
- import { useContext } from 'react';
1
+ import { DatePicker } from 'antd';
5
2
  import { TableContext } from "../../../TableMax";
6
3
  import { defaultDateFormat } from "../index";
7
4
  import "./index.less";
5
+ import dayjs from 'dayjs';
6
+ import { useContext } from 'react';
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
9
  export var FilterDateRange = function FilterDateRange(_ref) {
@@ -19,18 +18,18 @@ export var FilterDateRange = function FilterDateRange(_ref) {
19
18
  if (!(value !== null && value !== void 0 && value.endDate)) {
20
19
  return false;
21
20
  }
22
- return current && current > moment(value === null || value === void 0 ? void 0 : value.endDate);
21
+ return current && current > dayjs(value === null || value === void 0 ? void 0 : value.endDate);
23
22
  };
24
23
  var disabledEndDate = function disabledEndDate(current) {
25
24
  if (!(value !== null && value !== void 0 && value.startDate)) {
26
25
  return false;
27
26
  }
28
- return current && current < moment(value === null || value === void 0 ? void 0 : value.startDate);
27
+ return current && current < dayjs(value === null || value === void 0 ? void 0 : value.startDate);
29
28
  };
30
29
  var onStartDateChange = function onStartDateChange(date) {
31
30
  var newRange = {
32
31
  startDate: date ? manualFiltering ? date.format(format) // 后端筛选时,向外传递字符串格式的时间
33
- : moment(date.format(format)).valueOf() // 去掉精确度后面的时间:先格式化为字符串、再转为moment、再转为时间戳,
32
+ : dayjs(date.format(format)).valueOf() // 去掉精确度后面的时间:先格式化为字符串、再转为dayjs、再转为时间戳,
34
33
  : null,
35
34
  endDate: (value === null || value === void 0 ? void 0 : value.endDate) || null
36
35
  };
@@ -69,8 +68,8 @@ export var FilterDateRange = function FilterDateRange(_ref) {
69
68
  };
70
69
  return /*#__PURE__*/_jsxs("div", {
71
70
  className: "date-range-filter-wapper",
72
- children: [/*#__PURE__*/_jsx(_DatePicker, {
73
- value: value !== null && value !== void 0 && value.startDate ? moment(value === null || value === void 0 ? void 0 : value.startDate) : undefined,
71
+ children: [/*#__PURE__*/_jsx(DatePicker, {
72
+ value: value !== null && value !== void 0 && value.startDate ? dayjs(value === null || value === void 0 ? void 0 : value.startDate) : undefined,
74
73
  disabledDate: disabledStartDate,
75
74
  showTime: (_columnDef$filterComP2 = columnDef.filterComProps) === null || _columnDef$filterComP2 === void 0 ? void 0 : _columnDef$filterComP2.showTime,
76
75
  format: format,
@@ -82,8 +81,8 @@ export var FilterDateRange = function FilterDateRange(_ref) {
82
81
  children: /*#__PURE__*/_jsx("span", {
83
82
  className: "horizontal-line"
84
83
  })
85
- }), /*#__PURE__*/_jsx(_DatePicker, {
86
- value: value !== null && value !== void 0 && value.endDate ? moment(value === null || value === void 0 ? void 0 : value.endDate) : undefined,
84
+ }), /*#__PURE__*/_jsx(DatePicker, {
85
+ value: value !== null && value !== void 0 && value.endDate ? dayjs(value === null || value === void 0 ? void 0 : value.endDate) : undefined,
87
86
  disabledDate: disabledEndDate,
88
87
  className: "end-time",
89
88
  showTime: (_columnDef$filterComP4 = columnDef.filterComProps) === null || _columnDef$filterComP4 === void 0 ? void 0 : _columnDef$filterComP4.showTime,
@@ -1,5 +1,3 @@
1
- import "antd/es/select/style";
2
- import _Select from "antd/es/select";
3
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -7,6 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
7
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
7
  import { useUpdateEffect } from 'ahooks';
8
+ import { Select } from 'antd';
10
9
  import { useState } from 'react';
11
10
  import "./index.less";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -35,7 +34,7 @@ var MultipleSelect = function MultipleSelect(_ref) {
35
34
  // console.log('value :>> ', value);
36
35
  setInnerValue(Array.isArray(value) ? value : [value]);
37
36
  }, [value.toString()]);
38
- return /*#__PURE__*/_jsx(_Select, {
37
+ return /*#__PURE__*/_jsx(Select, {
39
38
  mode: "multiple",
40
39
  options: options,
41
40
  allowClear: true,
@@ -1,5 +1,4 @@
1
- import "antd/es/select/style";
2
- import _Select from "antd/es/select";
1
+ import { Select } from 'antd';
3
2
  import "./index.less";
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
5
4
  var SingleSelect = function SingleSelect(_ref) {
@@ -11,7 +10,7 @@ var SingleSelect = function SingleSelect(_ref) {
11
10
  var handleClear = function handleClear() {
12
11
  onChange('');
13
12
  };
14
- return /*#__PURE__*/_jsx(_Select, {
13
+ return /*#__PURE__*/_jsx(Select, {
15
14
  showSearch: true,
16
15
  allowClear: true,
17
16
  value: value,
@@ -1,11 +1,3 @@
1
- import "antd/es/input/style";
2
- import _Input from "antd/es/input";
3
- import "antd/es/auto-complete/style";
4
- import _AutoComplete from "antd/es/auto-complete";
5
- import "antd/es/input-number/style";
6
- import _InputNumber from "antd/es/input-number";
7
- import "antd/es/date-picker/style";
8
- import _DatePicker from "antd/es/date-picker";
9
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); }
10
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
11
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -19,8 +11,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
11
  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; }
20
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
21
13
  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); }
14
+ import { AutoComplete, DatePicker, Input, InputNumber } from 'antd';
22
15
  import { debounce } from 'lodash';
23
- import moment from 'moment';
16
+ import dayjs from 'dayjs';
24
17
  import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
25
18
  import { TableContext } from "../../TableMax";
26
19
  import { noValue } from "../../utils";
@@ -201,8 +194,8 @@ export function Filter(_ref) {
201
194
  columnDef: columnDef
202
195
  });
203
196
  case FilterType.SingleDate:
204
- return /*#__PURE__*/_jsx(_DatePicker, {
205
- value: columnFilterValue ? moment(columnFilterValue) : undefined,
197
+ return /*#__PURE__*/_jsx(DatePicker, {
198
+ value: columnFilterValue ? dayjs(columnFilterValue) : undefined,
206
199
  showTime: (_columnDef$filterComP = columnDef.filterComProps) === null || _columnDef$filterComP === void 0 ? void 0 : _columnDef$filterComP.showTime,
207
200
  format: ((_columnDef$filterComP2 = columnDef.filterComProps) === null || _columnDef$filterComP2 === void 0 ? void 0 : _columnDef$filterComP2.format) || defaultDateFormat,
208
201
  picker: ((_columnDef$filterComP3 = columnDef.filterComProps) === null || _columnDef$filterComP3 === void 0 ? void 0 : _columnDef$filterComP3.picker) || 'date',
@@ -220,7 +213,7 @@ export function Filter(_ref) {
220
213
  display: 'flex'
221
214
  },
222
215
  children: [/*#__PURE__*/_jsx("div", {
223
- children: /*#__PURE__*/_jsx(_InputNumber, {
216
+ children: /*#__PURE__*/_jsx(InputNumber, {
224
217
  placeholder: "".concat((_column$getFacetedMin = column.getFacetedMinMaxValues()) !== null && _column$getFacetedMin !== void 0 && _column$getFacetedMin[0] ? "(".concat((_column$getFacetedMin2 = column.getFacetedMinMaxValues()) === null || _column$getFacetedMin2 === void 0 ? void 0 : _column$getFacetedMin2[0], ")") : ''),
225
218
  controls: false,
226
219
  onChange: function onChange(value) {
@@ -239,7 +232,7 @@ export function Filter(_ref) {
239
232
  }) : columnFilterValue === null || columnFilterValue === void 0 ? void 0 : columnFilterValue[0]
240
233
  })
241
234
  }), /*#__PURE__*/_jsx("div", {
242
- children: /*#__PURE__*/_jsx(_InputNumber, {
235
+ children: /*#__PURE__*/_jsx(InputNumber, {
243
236
  placeholder: "".concat((_column$getFacetedMin3 = column.getFacetedMinMaxValues()) !== null && _column$getFacetedMin3 !== void 0 && _column$getFacetedMin3[1] ? "(".concat((_column$getFacetedMin4 = column.getFacetedMinMaxValues()) === null || _column$getFacetedMin4 === void 0 ? void 0 : _column$getFacetedMin4[1], ")") : ''),
244
237
  controls: false,
245
238
  onChange: function onChange(value) {
@@ -260,7 +253,7 @@ export function Filter(_ref) {
260
253
  })]
261
254
  });
262
255
  case FilterType.SingleInteger:
263
- return /*#__PURE__*/_jsx(_InputNumber, {
256
+ return /*#__PURE__*/_jsx(InputNumber, {
264
257
  controls: false,
265
258
  style: {
266
259
  width: '100%',
@@ -278,7 +271,7 @@ export function Filter(_ref) {
278
271
  }) : columnFilterValue
279
272
  });
280
273
  case FilterType.AutoComplete:
281
- return /*#__PURE__*/_jsx(_AutoComplete, {
274
+ return /*#__PURE__*/_jsx(AutoComplete, {
282
275
  options: options,
283
276
  placeholder: "",
284
277
  filterOption: !!getFilterOptionsFn ? false : function (inputValue, option) {
@@ -299,7 +292,7 @@ export function Filter(_ref) {
299
292
  value: columnFilterValue
300
293
  });
301
294
  case FilterType.Input:
302
- return /*#__PURE__*/_jsx(_Input, {
295
+ return /*#__PURE__*/_jsx(Input, {
303
296
  onChange: function onChange(e) {
304
297
  return handleChangeFilterValueWithDebounce(e.target.value);
305
298
  },
@@ -1,9 +1,3 @@
1
- import "antd/es/switch/style";
2
- import _Switch from "antd/es/switch";
3
- import "antd/es/tooltip/style";
4
- import _Tooltip from "antd/es/tooltip";
5
- import "antd/es/checkbox/style";
6
- import _Checkbox from "antd/es/checkbox";
7
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
3
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
@@ -14,6 +8,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
14
8
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
15
9
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
16
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ import { Checkbox, Switch, Tooltip } from 'antd';
17
12
  import { cloneDeep } from 'lodash';
18
13
  import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
19
14
  import { useDrag, useDrop } from 'react-dnd';
@@ -193,7 +188,7 @@ var SettingItem = function SettingItem(_ref) {
193
188
  className: "content-left",
194
189
  children: [draggable && /*#__PURE__*/_jsx("i", {
195
190
  className: "icon iconfont-other icon-other-drag drag-handle"
196
- }), /*#__PURE__*/_jsx(_Checkbox, {
191
+ }), /*#__PURE__*/_jsx(Checkbox, {
197
192
  checked: column.getIsVisible(),
198
193
  onChange: column.getToggleVisibilityHandler(),
199
194
  className: "content-left-checkbox",
@@ -201,7 +196,7 @@ var SettingItem = function SettingItem(_ref) {
201
196
  })]
202
197
  }), /*#__PURE__*/_jsx("span", {
203
198
  children: getPinningButton().map(function (item) {
204
- return /*#__PURE__*/_jsx(_Tooltip, {
199
+ return /*#__PURE__*/_jsx(Tooltip, {
205
200
  placement: "top",
206
201
  title: item.tooltip,
207
202
  zIndex: 99999,
@@ -338,7 +333,7 @@ var ColumnSetting = function ColumnSetting(_ref3) {
338
333
  className: "column-filtering",
339
334
  children: [/*#__PURE__*/_jsx("span", {
340
335
  children: "\u663E\u793A\u7B5B\u9009"
341
- }), /*#__PURE__*/_jsx(_Switch, {
336
+ }), /*#__PURE__*/_jsx(Switch, {
342
337
  className: "switch-button",
343
338
  defaultChecked: enableFilters,
344
339
  onChange: onFilterSwitchChange
@@ -347,7 +342,7 @@ var ColumnSetting = function ColumnSetting(_ref3) {
347
342
  className: "column-setting-wapper",
348
343
  children: [/*#__PURE__*/_jsxs("div", {
349
344
  className: "column-setting-header",
350
- children: [/*#__PURE__*/_jsx(_Checkbox, {
345
+ children: [/*#__PURE__*/_jsx(Checkbox, {
351
346
  checked: table.getIsAllColumnsVisible(),
352
347
  onChange: table.getToggleAllColumnsVisibilityHandler(),
353
348
  children: "\u5168\u9009"
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
6
6
  declare const customSortFns: {
7
- numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
@@ -1,4 +1,4 @@
1
- import moment from 'moment';
1
+ import dayjs from 'dayjs';
2
2
  import { InputType } from "../ColumnEdit";
3
3
  import { FilterType } from "../ColumnFilter";
4
4
  var isEmpty = function isEmpty(a) {
@@ -66,8 +66,8 @@ export var timeSortFn = function timeSortFn(rowA, rowB, columnId) {
66
66
  var aValue = rowA.getValue(columnId);
67
67
  var bValue = rowB.getValue(columnId);
68
68
  if (!isEmpty(aValue) && !isEmpty(bValue)) {
69
- aValue = moment(aValue).unix();
70
- bValue = moment(bValue).unix();
69
+ aValue = dayjs(aValue).unix();
70
+ bValue = dayjs(bValue).unix();
71
71
  return aValue > bValue ? 1 : aValue < bValue ? -1 : 0;
72
72
  } else if (!isEmpty(aValue) && isEmpty(bValue)) {
73
73
  return 1;
@@ -1,8 +1,4 @@
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
- import "antd/es/pagination/style";
3
- import _Pagination from "antd/es/pagination";
4
- import "antd/es/select/style";
5
- import _Select from "antd/es/select";
6
2
  var _excluded = ["showSizeChanger", "curPageDataNum"];
7
3
  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; }
8
4
  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; }
@@ -11,6 +7,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
7
  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); }
12
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
13
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { Pagination, Select } from 'antd';
14
11
  import "./index.less";
15
12
  import { jsx as _jsx } from "react/jsx-runtime";
16
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -38,7 +35,7 @@ var PaginationV2 = function PaginationV2(props) {
38
35
  className: "size-changer-wrapper",
39
36
  children: [/*#__PURE__*/_jsx("span", {
40
37
  children: "\u6BCF\u9875"
41
- }), /*#__PURE__*/_jsx(_Select, {
38
+ }), /*#__PURE__*/_jsx(Select, {
42
39
  className: "size-changer",
43
40
  options: pageSizeOptions,
44
41
  defaultValue: rest.defaultPageSize,
@@ -47,7 +44,7 @@ var PaginationV2 = function PaginationV2(props) {
47
44
  }), /*#__PURE__*/_jsx("span", {
48
45
  children: "\u6761"
49
46
  })]
50
- }), /*#__PURE__*/_jsx(_Pagination, _objectSpread(_objectSpread({
47
+ }), /*#__PURE__*/_jsx(Pagination, _objectSpread(_objectSpread({
51
48
  className: "table-max-pagination"
52
49
  }, rest), {}, {
53
50
  showSizeChanger: false
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
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
7
  import { cloneDeep } from 'lodash';
8
- import moment from 'moment';
8
+ import dayjs from 'dayjs';
9
9
  import { FilterType, defaultDateFormat } from "./components/ColumnFilter";
10
10
  export var getSizeInfo = function getSizeInfo(columns) {
11
11
  // let columns = cloneDeep(columnDatas)
@@ -106,8 +106,8 @@ export var getFormatFilters = function getFormatFilters(columns, originFilters)
106
106
  var formatKey = filterKey || id;
107
107
  if (filterType === FilterType.Date) {
108
108
  // 时间范围
109
- formatFilters["".concat(formatKey, "From")] = value !== null && value !== void 0 && value.startDate ? moment(value.startDate).format(format) : '';
110
- formatFilters["".concat(formatKey, "To")] = value !== null && value !== void 0 && value.endDate ? moment(value === null || value === void 0 ? void 0 : value.endDate).format(format) : '';
109
+ formatFilters["".concat(formatKey, "From")] = value !== null && value !== void 0 && value.startDate ? dayjs(value.startDate).format(format) : '';
110
+ formatFilters["".concat(formatKey, "To")] = value !== null && value !== void 0 && value.endDate ? dayjs(value === null || value === void 0 ? void 0 : value.endDate).format(format) : '';
111
111
  } else if (filterType === FilterType.Integer) {
112
112
  // 数字范围
113
113
  formatFilters["".concat(formatKey, "From")] = value === null || value === void 0 ? void 0 : value[0];
@@ -1,12 +1,12 @@
1
- import "antd/es/config-provider/style";
2
- import _ConfigProvider from "antd/es/config-provider";
3
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // ThemeContext.js
9
- import zhCN from 'antd/lib/locale-provider/zh_CN';
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ // ThemeContext.js
8
+ import { ConfigProvider } from 'antd';
9
+ import zhCN from 'antd/locale/zh_CN';
10
10
  import { createContext, useContext, useEffect, useState } from 'react';
11
11
  import { _setTheme } from "./theme";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -24,11 +24,11 @@ var ThemeProvider = function ThemeProvider(_ref) {
24
24
  useEffect(function () {
25
25
  _setTheme(theme, variablesConfig);
26
26
  setPrefix("custom-".concat(theme));
27
- _ConfigProvider.config({
27
+ ConfigProvider.config({
28
28
  prefixCls: "custom-".concat(theme)
29
29
  }); //配置相关cls
30
30
  }, [theme]);
31
- return /*#__PURE__*/_jsx(_ConfigProvider, {
31
+ return /*#__PURE__*/_jsx(ConfigProvider, {
32
32
  locale: zhCN,
33
33
  prefixCls: prefix,
34
34
  children: /*#__PURE__*/_jsx(ThemeContext.Provider, {