pro-comp-x 0.0.1 → 0.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 (149) hide show
  1. package/README.md +57 -12
  2. package/compiled/@ant-design/icons/index.js +1 -0
  3. package/compiled/@ant-design/icons/package.json +1 -0
  4. package/compiled/antd/index.d.ts +482 -0
  5. package/compiled/antd/index.js +29 -0
  6. package/compiled/antd/package.json +1 -0
  7. package/compiled/classnames/index.js +7 -0
  8. package/compiled/classnames/package.json +1 -0
  9. package/compiled/dayjs/index.js +1 -0
  10. package/compiled/dayjs/package.json +1 -0
  11. package/dist/404.html +36 -0
  12. package/dist/esm/antd-alias/antd.less +30 -0
  13. package/dist/esm/antd-alias/button.d.ts +2 -0
  14. package/dist/esm/antd-alias/button.js +2 -0
  15. package/dist/esm/antd-alias/cascader.d.ts +2 -0
  16. package/dist/esm/antd-alias/cascader.js +2 -0
  17. package/dist/esm/antd-alias/checkbox.d.ts +2 -0
  18. package/dist/esm/antd-alias/checkbox.js +2 -0
  19. package/dist/esm/antd-alias/col.d.ts +2 -0
  20. package/dist/esm/antd-alias/col.js +2 -0
  21. package/dist/esm/antd-alias/config-provider.d.ts +2 -0
  22. package/dist/esm/antd-alias/config-provider.js +2 -0
  23. package/dist/esm/antd-alias/date-picker.d.ts +2 -0
  24. package/dist/esm/antd-alias/date-picker.js +2 -0
  25. package/dist/esm/antd-alias/form.d.ts +2 -0
  26. package/dist/esm/antd-alias/form.js +2 -0
  27. package/dist/esm/antd-alias/index.d.ts +36 -0
  28. package/dist/esm/antd-alias/index.js +48 -0
  29. package/dist/esm/antd-alias/input-number.d.ts +2 -0
  30. package/dist/esm/antd-alias/input-number.js +2 -0
  31. package/dist/esm/antd-alias/input.d.ts +2 -0
  32. package/dist/esm/antd-alias/input.js +2 -0
  33. package/dist/esm/antd-alias/mentions.d.ts +2 -0
  34. package/dist/esm/antd-alias/mentions.js +2 -0
  35. package/dist/esm/antd-alias/modal.d.ts +2 -0
  36. package/dist/esm/antd-alias/modal.js +2 -0
  37. package/dist/esm/antd-alias/pagination.d.ts +2 -0
  38. package/dist/esm/antd-alias/pagination.js +2 -0
  39. package/dist/esm/antd-alias/popover.d.ts +2 -0
  40. package/dist/esm/antd-alias/popover.js +2 -0
  41. package/dist/esm/antd-alias/radio.d.ts +2 -0
  42. package/dist/esm/antd-alias/radio.js +2 -0
  43. package/dist/esm/antd-alias/row.d.ts +2 -0
  44. package/dist/esm/antd-alias/row.js +2 -0
  45. package/dist/esm/antd-alias/select.d.ts +2 -0
  46. package/dist/esm/antd-alias/select.js +2 -0
  47. package/dist/esm/antd-alias/slider.d.ts +2 -0
  48. package/dist/esm/antd-alias/slider.js +2 -0
  49. package/dist/esm/antd-alias/spin.d.ts +2 -0
  50. package/dist/esm/antd-alias/spin.js +2 -0
  51. package/dist/esm/antd-alias/switch.d.ts +2 -0
  52. package/dist/esm/antd-alias/switch.js +2 -0
  53. package/dist/esm/antd-alias/table.d.ts +2 -0
  54. package/dist/esm/antd-alias/table.js +2 -0
  55. package/dist/esm/antd-alias/tabs.d.ts +2 -0
  56. package/dist/esm/antd-alias/tabs.js +2 -0
  57. package/dist/esm/antd-alias/time-picker.d.ts +2 -0
  58. package/dist/esm/antd-alias/time-picker.js +2 -0
  59. package/dist/esm/antd-alias/tooltip.d.ts +2 -0
  60. package/dist/esm/antd-alias/tooltip.js +2 -0
  61. package/dist/esm/antd-alias/tree-select.d.ts +2 -0
  62. package/dist/esm/antd-alias/tree-select.js +2 -0
  63. package/dist/esm/antd-alias/upload.d.ts +2 -0
  64. package/dist/esm/antd-alias/upload.js +2 -0
  65. package/dist/esm/components/ComponentExtends/DatePicker/index.d.ts +9 -0
  66. package/dist/esm/components/ComponentExtends/DatePicker/index.js +5 -12
  67. package/dist/esm/components/ComponentExtends/InputBox/index.d.ts +31 -0
  68. package/dist/esm/components/ComponentExtends/InputBox/index.js +3 -4
  69. package/dist/esm/components/ComponentExtends/InputSearch/index.d.ts +9 -0
  70. package/dist/esm/components/ComponentExtends/InputSearch/index.js +3 -10
  71. package/dist/esm/components/ComponentExtends/InputTooltip/index.d.ts +11 -0
  72. package/dist/esm/components/ComponentExtends/InputTooltip/index.js +18 -28
  73. package/dist/esm/components/ComponentExtends/Modal/index.d.ts +15 -0
  74. package/dist/esm/components/ComponentExtends/Modal/index.js +4 -13
  75. package/dist/esm/components/ComponentExtends/NumberRange/index.d.ts +13 -0
  76. package/dist/esm/components/ComponentExtends/NumberRange/index.js +21 -30
  77. package/dist/esm/components/ComponentExtends/Raido/index.d.ts +10 -0
  78. package/dist/esm/components/ComponentExtends/Raido/index.js +3 -10
  79. package/dist/esm/components/ComponentExtends/SelectQuery/index.d.ts +32 -0
  80. package/dist/esm/components/ComponentExtends/SelectQuery/index.js +40 -51
  81. package/dist/esm/components/ComponentExtends/TableEditCell/index.d.ts +20 -0
  82. package/dist/esm/components/ComponentExtends/TableEditCell/index.js +5 -19
  83. package/dist/esm/components/ComponentExtends/Tabs/index.d.ts +8 -0
  84. package/dist/esm/components/ComponentExtends/Tabs/index.js +11 -16
  85. package/dist/esm/components/ComponentExtends/Text/index.d.ts +4 -0
  86. package/dist/esm/components/ComponentExtends/Text/index.js +1 -4
  87. package/dist/esm/components/ComponentExtends/TimePicker/index.d.ts +6 -0
  88. package/dist/esm/components/ComponentExtends/TimePicker/index.js +5 -12
  89. package/dist/esm/components/ComponentExtends/UploadImages/index.d.ts +8 -0
  90. package/dist/esm/components/ComponentExtends/UploadImages/index.js +10 -23
  91. package/dist/esm/components/ComponentExtends/index.d.ts +15 -0
  92. package/dist/esm/components/DndProvider/index.d.ts +7 -0
  93. package/dist/esm/components/DndProvider/index.js +15 -0
  94. package/dist/esm/components/DraggableBodyRow/DraggableBodyRow.less +16 -14
  95. package/dist/esm/components/DraggableBodyRow/index.d.ts +18 -0
  96. package/dist/esm/components/DraggableBodyRow/index.js +2 -2
  97. package/dist/esm/components/DraggableCell/index.d.ts +40 -0
  98. package/dist/esm/components/DraggableCell/index.js +23 -10
  99. package/dist/esm/components/DraggableTabNode/index.d.ts +7 -0
  100. package/dist/esm/components/DraggableTabNode/index.js +3 -5
  101. package/dist/esm/components/DraggableTable/DraggableTable.less +31 -0
  102. package/dist/esm/components/DraggableTable/index.d.ts +23 -0
  103. package/dist/esm/components/DraggableTable/index.js +170 -0
  104. package/dist/esm/components/PageList/FilterForm/index.d.ts +53 -0
  105. package/dist/esm/components/PageList/FilterForm/index.js +52 -66
  106. package/dist/esm/components/PageList/index.d.ts +76 -0
  107. package/dist/esm/components/PageList/index.js +148 -138
  108. package/dist/esm/components/PageWraper/index.d.ts +13 -0
  109. package/dist/esm/components/PageWraper/index.js +8 -13
  110. package/dist/esm/components/Panel/Panel.less +2 -0
  111. package/dist/esm/components/Panel/index.d.ts +20 -0
  112. package/dist/esm/components/Panel/index.js +17 -27
  113. package/dist/esm/components/ProConfigProvider/context.d.ts +17 -0
  114. package/dist/esm/components/ProConfigProvider/context.js +6 -1
  115. package/dist/esm/components/ProConfigProvider/index.d.ts +10 -0
  116. package/dist/esm/components/ProConfigProvider/index.js +4 -9
  117. package/dist/esm/components/RenderForm/RenderForm.less +19 -0
  118. package/dist/esm/components/RenderForm/index.d.ts +64 -0
  119. package/dist/esm/components/RenderForm/index.js +106 -103
  120. package/dist/esm/index.d.ts +25 -0
  121. package/dist/esm/index.js +4 -17
  122. package/dist/esm/styles/antd-custom.less +5 -0
  123. package/dist/esm/styles/base.less +3 -6
  124. package/dist/esm/styles/dumi.less +17 -0
  125. package/dist/esm/styles/index.less +1 -0
  126. package/dist/esm/utils/getClassPrefix.d.ts +2 -0
  127. package/dist/index.css +26895 -0
  128. package/dist/index.html +36 -0
  129. package/dist/pro-components-dark.css +1 -0
  130. package/dist/pro-components-default.css +1 -0
  131. package/dist/umi.css +2 -0
  132. package/dist/umi.js +1 -0
  133. package/package.json +29 -30
  134. package/public/pro-components-dark.css +19 -0
  135. package/public/pro-components-default.css +23 -0
  136. package/dist/esm/components/ActionConfigForm/index.js +0 -129
  137. package/dist/esm/components/ColorPalette/ColorPalette.less +0 -9
  138. package/dist/esm/components/ColorPalette/index.js +0 -88
  139. package/dist/esm/components/MarkdownView/MarkdownView.less +0 -93
  140. package/dist/esm/components/MarkdownView/index.js +0 -142
  141. package/dist/esm/components/MdPlainText/MdPlainText.less +0 -118
  142. package/dist/esm/components/MdPlainText/constants.js +0 -2
  143. package/dist/esm/components/MdPlainText/index.js +0 -717
  144. package/dist/esm/components/MdPlainText/planinShortcuts.js +0 -18
  145. package/dist/esm/components/MdPlainText/textContent.js +0 -4
  146. package/dist/esm/components/MdPlainText/utils.js +0 -159
  147. package/dist/esm/components/PlainText/index.js +0 -122
  148. package/dist/esm/components/PlainTextBox/PlainTextBox.less +0 -94
  149. package/dist/esm/components/PlainTextBox/index.js +0 -264
@@ -1,16 +1,6 @@
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/table/style";
5
- import _Table from "antd/es/table";
6
- import "antd/es/form/style";
7
- import _Form from "antd/es/form";
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
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; }
9
- 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; }
10
- 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
- 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; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
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); } }
15
5
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
16
6
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -19,15 +9,19 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
19
9
  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; }
20
10
  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; } }
21
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
- import React, { useEffect, useState } from 'react';
12
+ 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; }
13
+ 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; }
14
+ 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; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
16
+ 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); }
17
+ import React, { useEffect, useState, useImperativeHandle, forwardRef } from 'react';
18
+ import { Table, Form, Pagination } from 'antd';
23
19
  import { ConfigContext } from 'antd/es/config-provider';
24
20
  import { ProConfigContext } from "../ProConfigProvider/context";
25
21
  import Panel from "../Panel";
26
22
  import FilterForm from "./FilterForm";
27
23
  import PageWraper from "../PageWraper";
28
24
  import getClassPrefix from "../../utils/getClassPrefix";
29
- import { jsx as _jsx } from "react/jsx-runtime";
30
- import { jsxs as _jsxs } from "react/jsx-runtime";
31
25
  export var defFetchListOptions = {
32
26
  isReset: false,
33
27
  isLoad: false
@@ -35,7 +29,7 @@ export var defFetchListOptions = {
35
29
  /**
36
30
  * 分页组件
37
31
  */
38
- var PageList = function PageList(_ref) {
32
+ var PageList = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
33
  var _ref$isAutoFetch = _ref.isAutoFetch,
40
34
  isAutoFetch = _ref$isAutoFetch === void 0 ? true : _ref$isAutoFetch,
41
35
  _ref$rowKey = _ref.rowKey,
@@ -44,18 +38,12 @@ var PageList = function PageList(_ref) {
44
38
  hasSpace = _ref$hasSpace === void 0 ? false : _ref$hasSpace,
45
39
  _ref$noPadding = _ref.noPadding,
46
40
  noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
47
- tableTitle = _ref.tableTitle,
48
- tableSubtitle = _ref.tableSubtitle,
49
- filterExtra = _ref.filterExtra,
50
- tableExtra = _ref.tableExtra,
51
41
  _ref$tableProps = _ref.tableProps,
52
42
  tableProps = _ref$tableProps === void 0 ? {} : _ref$tableProps,
53
43
  _ref$loading = _ref.loading,
54
44
  loading = _ref$loading === void 0 ? false : _ref$loading,
55
45
  _ref$paging = _ref.paging,
56
46
  paging = _ref$paging === void 0 ? true : _ref$paging,
57
- filter = _ref.filter,
58
- filterSpan = _ref.filterSpan,
59
47
  _ref$filterColumns = _ref.filterColumns,
60
48
  filterColumns = _ref$filterColumns === void 0 ? [] : _ref$filterColumns,
61
49
  _ref$simpleFilterColu = _ref.simpleFilterColumns,
@@ -75,14 +63,24 @@ var PageList = function PageList(_ref) {
75
63
  dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
76
64
  _ref$dataTotal = _ref.dataTotal,
77
65
  dataTotal = _ref$dataTotal === void 0 ? 0 : _ref$dataTotal,
78
- pagination = _ref.pagination,
79
- fetchListFn = _ref.fetchListFn,
80
- className = _ref.className,
81
- children = _ref.children,
66
+ _ref$pagination = _ref.pagination,
67
+ pagination = _ref$pagination === void 0 ? {
68
+ pageCurrentIndex: 'pageNum',
69
+ pageSizeIndex: 'pageSize'
70
+ } : _ref$pagination,
82
71
  _ref$filterInitValues = _ref.filterInitValues,
83
72
  filterInitValues = _ref$filterInitValues === void 0 ? {} : _ref$filterInitValues,
84
73
  _ref$pageSize = _ref.pageSize,
85
74
  pageSize = _ref$pageSize === void 0 ? 'default' : _ref$pageSize,
75
+ filter = _ref.filter,
76
+ filterSpan = _ref.filterSpan,
77
+ tableTitle = _ref.tableTitle,
78
+ tableSubtitle = _ref.tableSubtitle,
79
+ filterExtra = _ref.filterExtra,
80
+ tableExtra = _ref.tableExtra,
81
+ fetchListFn = _ref.fetchListFn,
82
+ className = _ref.className,
83
+ children = _ref.children,
86
84
  prefixCls = _ref.prefixCls,
87
85
  filterTitle = _ref.filterTitle,
88
86
  privateFilterMode = _ref.filterMode,
@@ -102,46 +100,87 @@ var PageList = function PageList(_ref) {
102
100
  var simpleFilterPlacement = privateSimpleFilterPlacement || (pageListConfig === null || pageListConfig === void 0 ? void 0 : pageListConfig.simpleFilterPlacement) || 'left';
103
101
  var simpleFilterTrigger = privateSimpleFilterTrigger || (pageListConfig === null || pageListConfig === void 0 ? void 0 : pageListConfig.simpleFilterTrigger) || 'click';
104
102
  var filterMode = privateFilterMode || (pageListConfig === null || pageListConfig === void 0 ? void 0 : pageListConfig.filterMode) || 'default';
105
- var _Form$useForm = _Form.useForm(),
103
+ var paginationConfig = _objectSpread(_objectSpread({
104
+ hideOnSinglePage: true,
105
+ pageCurrentIndex: 'pageNum',
106
+ pageSizeIndex: 'pageSize'
107
+ }, (pageListConfig === null || pageListConfig === void 0 ? void 0 : pageListConfig.pagination) || {}), pagination || {});
108
+ var _Form$useForm = Form.useForm(),
106
109
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
107
110
  form = _Form$useForm2[0];
108
111
  var _useState = useState(false),
109
112
  _useState2 = _slicedToArray(_useState, 2),
110
113
  fetchLoading = _useState2[0],
111
114
  setFetchLoading = _useState2[1];
115
+ var pageProps = paging ? _objectSpread({
116
+ onChange: function () {
117
+ var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(pNum, pSize) {
118
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
119
+ while (1) switch (_context.prev = _context.next) {
120
+ case 0:
121
+ if (!fetchListFn) {
122
+ _context.next = 3;
123
+ break;
124
+ }
125
+ _context.next = 3;
126
+ return fetchListFn(_objectSpread(_objectSpread({}, filter || {}), {}, _defineProperty(_defineProperty({}, (paginationConfig === null || paginationConfig === void 0 ? void 0 : paginationConfig.pageCurrentIndex) || 'pageNum', pNum), (paginationConfig === null || paginationConfig === void 0 ? void 0 : paginationConfig.pageSizeIndex) || 'pageSize', pSize)));
127
+ case 3:
128
+ case "end":
129
+ return _context.stop();
130
+ }
131
+ }, _callee);
132
+ }));
133
+ function onChange(_x, _x2) {
134
+ return _onChange.apply(this, arguments);
135
+ }
136
+ return onChange;
137
+ }(),
138
+ current: filter === null || filter === void 0 ? void 0 : filter[(paginationConfig === null || paginationConfig === void 0 ? void 0 : paginationConfig.pageCurrentIndex) || 'pageNum'],
139
+ pageSize: filter === null || filter === void 0 ? void 0 : filter[(paginationConfig === null || paginationConfig === void 0 ? void 0 : paginationConfig.pageSizeIndex) || 'pageSize'],
140
+ total: dataTotal,
141
+ showSizeChanger: false,
142
+ showTotal: function showTotal(itemsTotal) {
143
+ return "\u5171".concat(itemsTotal || 0, "\u6761");
144
+ }
145
+ }, paginationConfig) : false;
146
+ useImperativeHandle(ref, function () {
147
+ return {
148
+ form: form
149
+ };
150
+ }, [form]);
112
151
  var fetchPageList = /*#__PURE__*/function () {
113
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
152
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
114
153
  var params,
115
154
  options,
116
155
  res,
117
- _args = arguments;
118
- return _regeneratorRuntime().wrap(function _callee$(_context) {
119
- while (1) switch (_context.prev = _context.next) {
156
+ _args2 = arguments;
157
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
158
+ while (1) switch (_context2.prev = _context2.next) {
120
159
  case 0:
121
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
122
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : defFetchListOptions;
160
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
161
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : defFetchListOptions;
123
162
  if (!fetchListFn) {
124
- _context.next = 12;
163
+ _context2.next = 12;
125
164
  break;
126
165
  }
127
166
  setFetchLoading(true);
128
- _context.prev = 4;
129
- _context.next = 7;
167
+ _context2.prev = 4;
168
+ _context2.next = 7;
130
169
  return fetchListFn(params, _objectSpread(_objectSpread({}, defFetchListOptions), options));
131
170
  case 7:
132
- res = _context.sent;
133
- return _context.abrupt("return", res);
171
+ res = _context2.sent;
172
+ return _context2.abrupt("return", res);
134
173
  case 9:
135
- _context.prev = 9;
174
+ _context2.prev = 9;
136
175
  setFetchLoading(false);
137
- return _context.finish(9);
176
+ return _context2.finish(9);
138
177
  case 12:
139
- return _context.abrupt("return", null);
178
+ return _context2.abrupt("return", null);
140
179
  case 13:
141
180
  case "end":
142
- return _context.stop();
181
+ return _context2.stop();
143
182
  }
144
- }, _callee, null, [[4,, 9, 12]]);
183
+ }, _callee2, null, [[4,, 9, 12]]);
145
184
  }));
146
185
  return function fetchPageList() {
147
186
  return _ref2.apply(this, arguments);
@@ -150,40 +189,40 @@ var PageList = function PageList(_ref) {
150
189
 
151
190
  // 重置表单
152
191
  var onHandleReset = /*#__PURE__*/function () {
153
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
154
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
155
- while (1) switch (_context2.prev = _context2.next) {
192
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
193
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
194
+ while (1) switch (_context3.prev = _context3.next) {
156
195
  case 0:
157
196
  setFetchLoading(true);
158
- _context2.prev = 1;
159
- _context2.next = 4;
197
+ _context3.prev = 1;
198
+ _context3.next = 4;
160
199
  return form.resetFields();
161
200
  case 4:
162
201
  if (!onReset) {
163
- _context2.next = 8;
202
+ _context3.next = 8;
164
203
  break;
165
204
  }
166
205
  onReset();
167
- _context2.next = 10;
206
+ _context3.next = 10;
168
207
  break;
169
208
  case 8:
170
- _context2.next = 10;
209
+ _context3.next = 10;
171
210
  return fetchPageList(filterInitValues, {
172
211
  isReset: true,
173
212
  isLoad: false
174
213
  });
175
214
  case 10:
176
- _context2.prev = 10;
215
+ _context3.prev = 10;
177
216
  setFetchLoading(false);
178
217
  if (onResetCallback) {
179
218
  onResetCallback();
180
219
  }
181
- return _context2.finish(10);
220
+ return _context3.finish(10);
182
221
  case 14:
183
222
  case "end":
184
- return _context2.stop();
223
+ return _context3.stop();
185
224
  }
186
- }, _callee2, null, [[1,, 10, 14]]);
225
+ }, _callee3, null, [[1,, 10, 14]]);
187
226
  }));
188
227
  return function onHandleReset() {
189
228
  return _ref3.apply(this, arguments);
@@ -192,87 +231,50 @@ var PageList = function PageList(_ref) {
192
231
 
193
232
  // 查询
194
233
  var onHandleQuery = /*#__PURE__*/function () {
195
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
234
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
196
235
  var values, res;
197
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
198
- while (1) switch (_context3.prev = _context3.next) {
236
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
237
+ while (1) switch (_context4.prev = _context4.next) {
199
238
  case 0:
200
239
  setFetchLoading(true);
201
- _context3.prev = 1;
202
- _context3.next = 4;
240
+ _context4.prev = 1;
241
+ _context4.next = 4;
203
242
  return form.validateFields();
204
243
  case 4:
205
- values = _context3.sent;
244
+ values = _context4.sent;
206
245
  if (!values) {
207
- _context3.next = 14;
246
+ _context4.next = 14;
208
247
  break;
209
248
  }
210
249
  if (!onQuery) {
211
- _context3.next = 10;
250
+ _context4.next = 10;
212
251
  break;
213
252
  }
214
253
  onQuery(values);
215
- _context3.next = 14;
254
+ _context4.next = 14;
216
255
  break;
217
256
  case 10:
218
- _context3.next = 12;
219
- return fetchPageList(paging ? _objectSpread(_objectSpread({}, values), {}, {
220
- pageNum: 1
221
- }) : values);
257
+ _context4.next = 12;
258
+ return fetchPageList(pageProps ? _objectSpread(_objectSpread({}, values), {}, _defineProperty({}, pageProps === null || pageProps === void 0 ? void 0 : pageProps.pageCurrentIndex, 1)) : values);
222
259
  case 12:
223
- res = _context3.sent;
260
+ res = _context4.sent;
224
261
  if (onQueryCallback) {
225
262
  onQueryCallback(res);
226
263
  }
227
264
  case 14:
228
- _context3.prev = 14;
265
+ _context4.prev = 14;
229
266
  setFetchLoading(false);
230
- return _context3.finish(14);
267
+ return _context4.finish(14);
231
268
  case 17:
232
269
  case "end":
233
- return _context3.stop();
270
+ return _context4.stop();
234
271
  }
235
- }, _callee3, null, [[1,, 14, 17]]);
272
+ }, _callee4, null, [[1,, 14, 17]]);
236
273
  }));
237
274
  return function onHandleQuery() {
238
275
  return _ref4.apply(this, arguments);
239
276
  };
240
277
  }();
241
- var pageProps = paging ? _objectSpread({
242
- hideOnSinglePage: true,
243
- onChange: function () {
244
- var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(pNum, pSize) {
245
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
246
- while (1) switch (_context4.prev = _context4.next) {
247
- case 0:
248
- if (!fetchListFn) {
249
- _context4.next = 3;
250
- break;
251
- }
252
- _context4.next = 3;
253
- return fetchListFn(_objectSpread(_objectSpread({}, filter || {}), {}, {
254
- pageNum: pNum,
255
- pageSize: pSize
256
- }));
257
- case 3:
258
- case "end":
259
- return _context4.stop();
260
- }
261
- }, _callee4);
262
- }));
263
- function onChange(_x, _x2) {
264
- return _onChange.apply(this, arguments);
265
- }
266
- return onChange;
267
- }(),
268
- pageSize: filter === null || filter === void 0 ? void 0 : filter.pageSize,
269
- current: filter === null || filter === void 0 ? void 0 : filter.pageNum,
270
- total: dataTotal,
271
- showSizeChanger: false,
272
- showTotal: function showTotal(itemsTotal) {
273
- return "\u5171".concat(itemsTotal || 0, "\u6761");
274
- }
275
- }, pagination) : false;
276
278
  var renderContent = function renderContent() {
277
279
  if ( /*#__PURE__*/React.isValidElement(children) || typeof children === 'string') {
278
280
  return children;
@@ -280,7 +282,7 @@ var PageList = function PageList(_ref) {
280
282
  if (children instanceof Function) {
281
283
  return children(dataSource);
282
284
  }
283
- return /*#__PURE__*/_jsx(_Table, _objectSpread({
285
+ return /*#__PURE__*/React.createElement(Table, _extends({
284
286
  size: pageSize === 'small' ? 'small' : 'middle',
285
287
  rowKey: rowKey,
286
288
  tableLayout: "fixed",
@@ -292,6 +294,19 @@ var PageList = function PageList(_ref) {
292
294
  } : {}
293
295
  }, tableProps));
294
296
  };
297
+ var renderFooterPagination = function renderFooterPagination() {
298
+ if (children && pageProps && typeof (filter === null || filter === void 0 ? void 0 : filter[pageProps === null || pageProps === void 0 ? void 0 : pageProps.pageSizeIndex]) === 'number') {
299
+ if (typeof (pageProps === null || pageProps === void 0 ? void 0 : pageProps.hideOnSinglePage) === 'boolean' && pageProps !== null && pageProps !== void 0 && pageProps.hideOnSinglePage && Math.ceil(dataTotal / (filter === null || filter === void 0 ? void 0 : filter[pageProps === null || pageProps === void 0 ? void 0 : pageProps.pageSizeIndex])) <= 1) {
300
+ return null;
301
+ }
302
+ return /*#__PURE__*/React.createElement(Pagination, _extends({
303
+ showSizeChanger: false,
304
+ className: "".concat(clsPrefix, "-pagination"),
305
+ size: "small"
306
+ }, pageProps));
307
+ }
308
+ return null;
309
+ };
295
310
 
296
311
  // 检测有filter值则赋值表单,查询条件是持久化保存
297
312
  useEffect(function () {
@@ -306,36 +321,31 @@ var PageList = function PageList(_ref) {
306
321
  fetchPageList(filter);
307
322
  }
308
323
  }, [isAutoFetch]);
309
- return /*#__PURE__*/_jsxs(PageWraper, {
324
+ return /*#__PURE__*/React.createElement(PageWraper, {
310
325
  hasSpace: hasSpace,
311
326
  loading: fetchLoading || loading,
312
- children: [Array.isArray(filterColumns) && filterColumns.length > 0 || Array.isArray(simpleFilterColumns) && simpleFilterColumns.length > 0 || filterTitle || filterExtra ? /*#__PURE__*/_jsx(FilterForm, _objectSpread(_objectSpread({}, filterLayouts || {}), {}, {
313
- title: filterTitle,
314
- simpleFilterTrigger: simpleFilterTrigger,
315
- simpleFilterPlacement: simpleFilterPlacement,
316
- filterMode: filterMode,
317
- setFilterMode: setFilterMode,
318
- form: form,
319
- span: filterSpan,
320
- simpleFilterColumns: simpleFilterColumns,
321
- filterColumns: filterColumns,
322
- onQuery: onHandleQuery,
323
- onReset: onHandleReset,
324
- extra: filterExtra,
325
- noPadding: noPadding
326
- })) : null, /*#__PURE__*/_jsx(Panel, {
327
- noPadding: noPadding,
328
- title: tableTitle,
329
- subtitle: tableSubtitle,
330
- extra: tableExtra,
331
- className: "".concat(clsPrefix, "-container"),
332
- footer: children && paging && dataTotal / (filter === null || filter === void 0 ? void 0 : filter.pageSize) > 1 && /*#__PURE__*/_jsx(_Pagination, _objectSpread({
333
- showSizeChanger: false,
334
- className: "".concat(clsPrefix, "-pagination"),
335
- size: "small"
336
- }, pageProps)),
337
- children: renderContent()
338
- })]
339
- });
340
- };
327
+ className: className
328
+ }, Array.isArray(filterColumns) && filterColumns.length > 0 || Array.isArray(simpleFilterColumns) && simpleFilterColumns.length > 0 || filterTitle || filterExtra ? /*#__PURE__*/React.createElement(FilterForm, _extends({}, filterLayouts || {}, {
329
+ title: filterTitle,
330
+ simpleFilterTrigger: simpleFilterTrigger,
331
+ simpleFilterPlacement: simpleFilterPlacement,
332
+ filterMode: filterMode,
333
+ setFilterMode: setFilterMode,
334
+ form: form,
335
+ span: filterSpan,
336
+ simpleFilterColumns: simpleFilterColumns,
337
+ filterColumns: filterColumns,
338
+ onQuery: onHandleQuery,
339
+ onReset: onHandleReset,
340
+ extra: filterExtra,
341
+ noPadding: noPadding
342
+ })) : null, /*#__PURE__*/React.createElement(Panel, {
343
+ noPadding: noPadding,
344
+ title: tableTitle,
345
+ subtitle: tableSubtitle,
346
+ extra: tableExtra,
347
+ className: "".concat(clsPrefix, "-container"),
348
+ footer: renderFooterPagination()
349
+ }, renderContent()));
350
+ });
341
351
  export default PageList;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PageWraperProps {
3
+ loading?: boolean;
4
+ className?: string;
5
+ hasSpace?: boolean;
6
+ children: ReactNode;
7
+ prefixCls?: string;
8
+ }
9
+ /**
10
+ * 页面容器
11
+ */
12
+ declare const PageWraper: ({ prefixCls, loading, hasSpace, className, children, }: PageWraperProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default PageWraper;
@@ -1,14 +1,12 @@
1
- import "antd/es/spin/style";
2
- import _Spin from "antd/es/spin";
3
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); }
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
5
  import React from 'react';
6
+ import { Spin } from 'antd';
8
7
  import classnames from 'classnames';
9
8
  import { ConfigContext } from 'antd/es/config-provider';
10
9
  import getClassPrefix from "../../utils/getClassPrefix";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
10
  /**
13
11
  * 页面容器
14
12
  */
@@ -24,15 +22,12 @@ var PageWraper = function PageWraper(_ref) {
24
22
  antGetPrefixCls = _React$useContext.getPrefixCls;
25
23
  var antPrefixCls = antGetPrefixCls(prefixCls);
26
24
  var clsPrefix = getClassPrefix(antPrefixCls, 'page-wraper');
27
- return /*#__PURE__*/_jsx("div", {
28
- className: classnames(clsPrefix, _defineProperty({}, "".concat(clsPrefix, "-space"), hasSpace), className),
29
- children: /*#__PURE__*/_jsx(_Spin, {
30
- spinning: loading,
31
- children: /*#__PURE__*/_jsx("div", {
32
- className: "".concat(clsPrefix, "-container"),
33
- children: children
34
- })
35
- })
36
- });
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ className: classnames(clsPrefix, _defineProperty({}, "".concat(clsPrefix, "-space"), hasSpace), className)
27
+ }, /*#__PURE__*/React.createElement(Spin, {
28
+ spinning: loading
29
+ }, /*#__PURE__*/React.createElement("div", {
30
+ className: "".concat(clsPrefix, "-container")
31
+ }, children)));
37
32
  };
38
33
  export default PageWraper;
@@ -35,6 +35,8 @@
35
35
  color: @heading-color;
36
36
  font-weight: @font-weight;
37
37
  overflow: hidden;
38
+ flex: auto;
39
+ min-width: 0;
38
40
 
39
41
  & + .@{panel-prefix}-head-subtitle {
40
42
  margin-left: @padding-xs;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ interface PanelProps {
3
+ prefixCls?: string;
4
+ title?: string | React.ReactNode;
5
+ subtitle?: string | React.ReactNode;
6
+ extra?: string | React.ReactNode;
7
+ children?: string | React.ReactNode;
8
+ className?: string;
9
+ size?: 'middle' | 'small' | '';
10
+ mode?: 'card' | '';
11
+ footer?: string | React.ReactNode;
12
+ full?: boolean;
13
+ noPadding?: boolean;
14
+ }
15
+ /**
16
+ * 面板组件
17
+ */
18
+ declare const Panel: ({ title, subtitle, size, mode, prefixCls, extra, children, className, footer, full, noPadding, }: PanelProps) => import("react/jsx-runtime").JSX.Element;
19
+ export type { PanelProps };
20
+ export default Panel;
@@ -6,8 +6,6 @@ import React from 'react';
6
6
  import classsnames from 'classnames';
7
7
  import { ConfigContext } from 'antd/es/config-provider';
8
8
  import getClassPrefix from "../../utils/getClassPrefix";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
9
  /**
12
10
  * 面板组件
13
11
  */
@@ -32,30 +30,22 @@ var Panel = function Panel(_ref) {
32
30
  antGetPrefixCls = _React$useContext.getPrefixCls;
33
31
  var antPrefixCls = antGetPrefixCls(prefixCls);
34
32
  var clsPrefix = getClassPrefix(antPrefixCls, 'panel');
35
- return /*#__PURE__*/_jsxs("div", {
36
- className: classsnames(clsPrefix, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, size, ['small'].includes(size)), "".concat(clsPrefix, "-full"), full), "".concat(clsPrefix, "-").concat(mode), mode), "".concat(clsPrefix, "-noPadding"), noPadding), className),
37
- children: [(title || subtitle || extra) && /*#__PURE__*/_jsxs("div", {
38
- className: "".concat(clsPrefix, "-head"),
39
- children: [/*#__PURE__*/_jsxs("div", {
40
- className: "".concat(clsPrefix, "-head-cell"),
41
- children: [title && /*#__PURE__*/_jsx("div", {
42
- className: "".concat(clsPrefix, "-head-title"),
43
- children: title
44
- }), subtitle && /*#__PURE__*/_jsx("div", {
45
- className: "".concat(clsPrefix, "-head-subtitle"),
46
- children: subtitle
47
- })]
48
- }), /*#__PURE__*/_jsx("div", {
49
- className: "".concat(clsPrefix, "-head-extra"),
50
- children: extra
51
- })]
52
- }), children && /*#__PURE__*/_jsx("div", {
53
- className: "".concat(clsPrefix, "-body"),
54
- children: children
55
- }), footer && /*#__PURE__*/_jsx("div", {
56
- className: "".concat(clsPrefix, "-footer"),
57
- children: footer
58
- })]
59
- });
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: classsnames(clsPrefix, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, size, ['small'].includes(size)), "".concat(clsPrefix, "-full"), full), "".concat(clsPrefix, "-").concat(mode), mode), "".concat(clsPrefix, "-noPadding"), noPadding), className)
35
+ }, (title || subtitle || extra) && /*#__PURE__*/React.createElement("div", {
36
+ className: "".concat(clsPrefix, "-head")
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: "".concat(clsPrefix, "-head-cell")
39
+ }, title && /*#__PURE__*/React.createElement("div", {
40
+ className: "".concat(clsPrefix, "-head-title")
41
+ }, title), subtitle && /*#__PURE__*/React.createElement("div", {
42
+ className: "".concat(clsPrefix, "-head-subtitle")
43
+ }, subtitle)), /*#__PURE__*/React.createElement("div", {
44
+ className: "".concat(clsPrefix, "-head-extra")
45
+ }, extra)), children && /*#__PURE__*/React.createElement("div", {
46
+ className: "".concat(clsPrefix, "-body")
47
+ }, children), footer && /*#__PURE__*/React.createElement("div", {
48
+ className: "".concat(clsPrefix, "-footer")
49
+ }, footer));
60
50
  };
61
51
  export default Panel;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { FilterModeType, FilterPlacementType } from '../PageList';
3
+ import type { FilterTriggerType } from '../PageList/FilterForm';
4
+ export interface ProConfigContextProps {
5
+ pageListConfig?: {
6
+ filterMode?: FilterModeType;
7
+ simpleFilterPlacement?: FilterPlacementType;
8
+ simpleFilterTrigger?: FilterTriggerType;
9
+ pagination?: {
10
+ hideOnSinglePage?: boolean;
11
+ pageCurrentIndex?: string;
12
+ pageSizeIndex?: string;
13
+ };
14
+ };
15
+ }
16
+ export declare const ProDefaultConfig: ProConfigContextProps;
17
+ export declare const ProConfigContext: React.Context<ProConfigContextProps>;