@chaoswise/ui 2.5.7 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AbreastLayout/index.js +1 -1
- package/lib/Ace/ace.js +5 -6
- package/lib/Ace/diff.js +6 -7
- package/lib/Ace/split.js +5 -6
- package/lib/AdaptiveLayout/index.js +1 -1
- package/lib/Antd/Drawer.js +1 -1
- package/lib/Antd4Form/FieldList.js +1 -1
- package/lib/Antd4Form/FormItem.js +1 -1
- package/lib/Antd4Form/FormItemChildren.js +3 -4
- package/lib/Antd4Form/useForm.js +1 -1
- package/lib/BasicLayout/Breadcrumb.js +1 -1
- package/lib/BasicLayout/Sider.js +1 -1
- package/lib/CWCascader/Cascader/index.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/Checkbox.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +2 -2
- package/lib/CWCascader/rc-cascader/OptionList/index.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useSearchOptions.js +1 -1
- package/lib/CWMessage/MessageContent/TabList/index.js +2 -2
- package/lib/CWMessage/MessageContent/index.js +2 -2
- package/lib/CWMessage/index.js +2 -2
- package/lib/CWRangePicker/DropdownMenu/index.js +1 -1
- package/lib/CWRangePicker/Refresh/index.js +1 -1
- package/lib/CWRangePicker/index.js +1 -1
- package/lib/CWRangePicker/utils/index.js +1 -1
- package/lib/CWSelect/antd-select.js +6 -7
- package/lib/CWSelect/index.js +1 -1
- package/lib/CWTable/CWTable.js +26 -20
- package/lib/CWTable/EditLine.js +1 -1
- package/lib/CWTable/FormTable.js +1 -1
- package/lib/CWTable/header.js +40 -6
- package/lib/CWTable/index.js +7 -2
- package/lib/CWTable/index.less +1 -1
- package/lib/CWTree/index.js +1 -1
- package/lib/CWTree/index.less +3 -3
- package/lib/CWTree/utils/index.js +1 -1
- package/lib/CWUpload/upload/DragList.js +1 -1
- package/lib/CWUpload/upload/Upload.js +3 -4
- package/lib/CWUpload/upload/UploadList.js +3 -4
- package/lib/Checkbox/Checkbox.js +9 -10
- package/lib/Checkbox/Group.js +11 -12
- package/lib/ColorPicker/SketchPicker/components/common/Alpha.js +8 -9
- package/lib/ColorPicker/SketchPicker/components/common/Checkboard.js +1 -1
- package/lib/ColorPicker/SketchPicker/components/common/ColorWrap.js +6 -7
- package/lib/ColorPicker/SketchPicker/components/common/EditableInput.js +11 -12
- package/lib/ColorPicker/SketchPicker/components/common/Hue.js +7 -8
- package/lib/ColorPicker/SketchPicker/components/common/Saturation.js +7 -8
- package/lib/ColorPicker/SketchPicker/components/common/Swatch.js +1 -1
- package/lib/ColorPicker/SketchPicker/components/sketch/index.js +1 -1
- package/lib/ColorPicker/SketchPicker/helpers/interaction.js +7 -8
- package/lib/ColorPicker/index.js +9 -5
- package/lib/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/CustomScrollBar/index.js +1 -1
- package/lib/DateRangePicker/components/ExtraTimeFooter.js +1 -1
- package/lib/Documentation/Tocify.js +2 -3
- package/lib/Documentation/index.js +1 -1
- package/lib/Drawer/index.js +1 -1
- package/lib/DropdownDatePicker/DropdownMenu/index.js +1 -1
- package/lib/DropdownDatePicker/index.js +1 -1
- package/lib/DropdownDatePicker/utils/index.js +1 -1
- package/lib/EchartsArea/index.js +1 -1
- package/lib/EchartsBar/index.js +1 -1
- package/lib/EchartsBase/index.js +1 -1
- package/lib/EchartsLine/index.js +1 -1
- package/lib/ErrorBoundary/history.js +3 -5
- package/lib/ErrorBoundary/index.js +11 -9
- package/lib/FilterDropDown/DragList.js +10 -5
- package/lib/FilterDropDown/index.js +16 -7
- package/lib/FilterDropDown/index.less +0 -1
- package/lib/Flow/components/PluginWrapper.js +1 -1
- package/lib/Flow/layouts/callChain.js +1 -1
- package/lib/Flow/plugins/CommandLifeCycle.js +2 -3
- package/lib/Flow/plugins/InitSideBarPlugin.js +2 -3
- package/lib/Flow/plugins/InitToolBarPlugin.js +2 -3
- package/lib/Form/FormItem.js +1 -1
- package/lib/FormItemWrapper/index.js +1 -1
- package/lib/Formily/FieldList/index.js +1 -1
- package/lib/Formily/FormItem/index.js +1 -1
- package/lib/Formily/MegaLayout/index.js +1 -1
- package/lib/Formily/subscribeFields/index.js +1 -1
- package/lib/GlobalTabs/index.js +1 -1
- package/lib/Header/CommonIcon.js +1 -1
- package/lib/Header/UserSetting/utils.js +1 -1
- package/lib/Input/InputComponent.js +1 -1
- package/lib/IntersectionInput/index.js +1 -1
- package/lib/Joyride/index.js +1 -1
- package/lib/LayoutBreadcrumb/index.js +1 -1
- package/lib/LazyLoadingTreeSelect/index.js +1 -1
- package/lib/Menu/menu/MenuItem.js +3 -4
- package/lib/Menu/menu/SubMenu.js +3 -4
- package/lib/Menu/menu/index.js +5 -7
- package/lib/Modal/Modal.js +8 -9
- package/lib/Modal/custom-backup/entiretyDrag.js +1 -1
- package/lib/Modal/index.js +1 -1
- package/lib/ModuleFederation/ErrorBoundary/index.js +3 -4
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +2 -2
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +1 -1
- package/lib/Pagination/index.js +1 -1
- package/lib/QuickRangePicker/index.js +1 -1
- package/lib/QuickTransfer/DragList.js +1 -1
- package/lib/QuickTransfer/index.js +1 -1
- package/lib/QuickTransfer/utils.js +1 -1
- package/lib/Radio/Group.js +8 -9
- package/lib/Radio/Radio.js +10 -11
- package/lib/RangePicker/components/ExtraTimeFooter.js +1 -1
- package/lib/ReactSelect/customStyles.js +1 -1
- package/lib/ReactSelect/index.js +1 -1
- package/lib/SearchBar/index.js +1 -1
- package/lib/SelectBackup/index.js +1 -1
- package/lib/SiderMenu/Item.js +3 -4
- package/lib/SiderMenu/index.js +1 -1
- package/lib/SimplePagination/index.js +1 -1
- package/lib/SingleSpa/hooks/useErrorHandle.js +1 -1
- package/lib/SingleSpa/index.js +2 -2
- package/lib/SingleSpa/singleSpa/single-spa.dev.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/ThemeProvider/main.js +1 -1
- package/lib/TimeRangeSlider/Refresh/index.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/utils/index.js +1 -1
- package/lib/TimeRangeSlider/index.js +1 -1
- package/lib/TimeRangeSlider/utils/index.js +1 -1
- package/lib/TreeList/index.js +1 -1
- package/lib/TreeSelect111/index.js +1 -1
- package/lib/TreeSelect111/utils/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/noticeManager/globalState.js +2 -3
- package/lib/portalNoticeManager/usePortalDispatchNotice.js +1 -1
- package/lib/useLocale/index.js +1 -1
- package/package.json +2 -2
package/lib/CWMessage/index.js
CHANGED
|
@@ -8,13 +8,13 @@ import _useConfigContext2 from "@chaoswise/ui/lib/useConfigContext";
|
|
|
8
8
|
var _excluded = ["count"],
|
|
9
9
|
_excluded2 = ["onClickStrongMessageItem"];
|
|
10
10
|
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); }
|
|
11
|
-
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
|
|
11
|
+
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 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 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 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
12
|
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); } }
|
|
13
13
|
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); }); }; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
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); }
|
|
19
19
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
20
|
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."); }
|
|
@@ -18,7 +18,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
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; }
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
22
|
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); }
|
|
23
23
|
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; }
|
|
24
24
|
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,7 +10,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
12
|
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; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
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); }
|
|
15
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
16
|
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."); }
|
|
@@ -21,7 +21,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
21
21
|
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; }
|
|
22
22
|
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; }
|
|
23
23
|
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; }
|
|
24
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
25
|
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); }
|
|
26
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
27
|
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."); }
|
|
@@ -2,7 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
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."); }
|
|
@@ -11,13 +11,13 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
14
15
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
16
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
17
17
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
18
18
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
19
|
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
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
21
|
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); }
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
import RcSelect, { Option, OptGroup } from 'rc-select';
|
|
@@ -28,15 +28,14 @@ import PropTypes from "prop-types";
|
|
|
28
28
|
import './index.less';
|
|
29
29
|
var SelectSizes = ['default', 'large', 'small'];
|
|
30
30
|
var Select = /*#__PURE__*/function (_React$Component) {
|
|
31
|
-
_inherits(Select, _React$Component);
|
|
32
31
|
function Select(props) {
|
|
33
32
|
var _this;
|
|
34
33
|
_classCallCheck(this, Select);
|
|
35
34
|
_this = _callSuper(this, Select, [props]);
|
|
36
|
-
_defineProperty(
|
|
35
|
+
_defineProperty(_this, "saveSelect", function (node) {
|
|
37
36
|
_this.rcSelect = node;
|
|
38
37
|
});
|
|
39
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "renderSelect", function (_ref) {
|
|
40
39
|
var getContextPopupContainer = _ref.getPopupContainer,
|
|
41
40
|
getPrefixCls = _ref.getPrefixCls,
|
|
42
41
|
renderEmpty = _ref.renderEmpty;
|
|
@@ -150,7 +149,8 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
150
149
|
});
|
|
151
150
|
return _this;
|
|
152
151
|
}
|
|
153
|
-
|
|
152
|
+
_inherits(Select, _React$Component);
|
|
153
|
+
return _createClass(Select, [{
|
|
154
154
|
key: "getNotFoundContent",
|
|
155
155
|
value: function getNotFoundContent(renderEmpty) {
|
|
156
156
|
var notFoundContent = this.props.notFoundContent;
|
|
@@ -208,7 +208,6 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
208
208
|
return /*#__PURE__*/React.createElement(ConfigConsumer, null, this.renderSelect);
|
|
209
209
|
}
|
|
210
210
|
}]);
|
|
211
|
-
return Select;
|
|
212
211
|
}(React.Component);
|
|
213
212
|
Select.Option = Option;
|
|
214
213
|
Select.OptGroup = OptGroup;
|
package/lib/CWSelect/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
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; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
21
|
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."); }
|
package/lib/CWTable/CWTable.js
CHANGED
|
@@ -9,9 +9,9 @@ import _Icon from "@chaoswise/ui/lib/Icon";
|
|
|
9
9
|
import _treeLoad from "@chaoswise/ui/lib/treeLoad";
|
|
10
10
|
import "@chaoswise/ui/lib/FilterDropDown/index.less";
|
|
11
11
|
import _FilterDropDown from "@chaoswise/ui/lib/FilterDropDown";
|
|
12
|
-
var _excluded = ["columns", "lazyLoading", "loadData", "dataSource", "rowSelection", "pagination", "onExpand", "searchBar", "showHeader", "bordered", "scroll", "size", "className", "columnFilter", "tableWapperClassName", "onColumnsExchange", "expandIcon", "frontPagination", "tableHeader", "tableHeaderClassName", "autoHeight", "expandedRowRender", "onScrollToBottom", "getForm", "onSubmit", "onChange", "components", "onColumnsResizeEnd"],
|
|
12
|
+
var _excluded = ["columns", "lazyLoading", "loadData", "dataSource", "rowSelection", "pagination", "onExpand", "searchBar", "showHeader", "bordered", "scroll", "size", "className", "columnFilter", "tableWapperClassName", "onColumnsExchange", "expandIcon", "frontPagination", "tableHeader", "tableHeaderClassName", "autoHeight", "expandedRowRender", "onScrollToBottom", "getForm", "onSubmit", "onChange", "components", "onColumnsResizeEnd", "isRealTimeDrag"],
|
|
13
13
|
_excluded2 = ["onSearch"];
|
|
14
|
-
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
|
|
14
|
+
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 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 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 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; }
|
|
15
15
|
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); } }
|
|
16
16
|
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); }); }; }
|
|
17
17
|
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); }
|
|
@@ -19,7 +19,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
21
|
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; }
|
|
22
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
23
|
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); }
|
|
24
24
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
25
25
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -92,6 +92,8 @@ var CWTable = function CWTable(_ref, ref) {
|
|
|
92
92
|
tableComponents = _ref.components,
|
|
93
93
|
_ref$onColumnsResizeE = _ref.onColumnsResizeEnd,
|
|
94
94
|
onColumnsResizeEnd = _ref$onColumnsResizeE === void 0 ? function () {} : _ref$onColumnsResizeE,
|
|
95
|
+
_ref$isRealTimeDrag = _ref.isRealTimeDrag,
|
|
96
|
+
isRealTimeDrag = _ref$isRealTimeDrag === void 0 ? true : _ref$isRealTimeDrag,
|
|
95
97
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
96
98
|
var prefix = rest.getPrefixCls();
|
|
97
99
|
var _useState = useState(1),
|
|
@@ -361,7 +363,8 @@ var CWTable = function CWTable(_ref, ref) {
|
|
|
361
363
|
//设置头部单元格属性
|
|
362
364
|
col_.onHeaderCell = function (column) {
|
|
363
365
|
return {
|
|
364
|
-
width: parseInt(column.minWidth) ? parseInt(column.width) > parseInt(column.minWidth) ? parseInt(column.width) : parseInt(column.minWidth) : parseInt(column.width),
|
|
366
|
+
// width: parseInt(column.minWidth) ? parseInt(column.width) > parseInt(column.minWidth) ? parseInt(column.width) : parseInt(column.minWidth) : parseInt(column.width),
|
|
367
|
+
width: column.width,
|
|
365
368
|
onResize: handleResize(index)
|
|
366
369
|
};
|
|
367
370
|
};
|
|
@@ -448,21 +451,20 @@ var CWTable = function CWTable(_ref, ref) {
|
|
|
448
451
|
|
|
449
452
|
// 表格滚动到底触发函数
|
|
450
453
|
useEffect(function () {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
onScrollToBottom();
|
|
459
|
-
}
|
|
460
|
-
};
|
|
454
|
+
var tableBodyDom = tableRef.current.querySelector(".".concat(prefix, "-table-body"));
|
|
455
|
+
var scrollEvent = function scrollEvent() {
|
|
456
|
+
if (tableBodyDom.scrollTop + tableBodyDom.clientHeight == tableBodyDom.scrollHeight) {
|
|
457
|
+
onScrollToBottom();
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
if (onScrollToBottom && tableBodyDom) {
|
|
461
461
|
tableBodyDom.addEventListener('scroll', scrollEvent);
|
|
462
|
-
return function () {
|
|
463
|
-
tableBodyDom.removeEventListener('scroll', scrollEvent);
|
|
464
|
-
};
|
|
465
462
|
}
|
|
463
|
+
return function () {
|
|
464
|
+
if (onScrollToBottom && tableBodyDom) {
|
|
465
|
+
tableBodyDom.removeEventListener('scroll', scrollEvent);
|
|
466
|
+
}
|
|
467
|
+
};
|
|
466
468
|
}, []);
|
|
467
469
|
var filterColumn = function filterColumn() {
|
|
468
470
|
if (columnsOptions) {
|
|
@@ -495,11 +497,14 @@ var CWTable = function CWTable(_ref, ref) {
|
|
|
495
497
|
var size = _ref3.size;
|
|
496
498
|
var nextColumns = _toConsumableArray(resizeColsRef.current);
|
|
497
499
|
nextColumns[index] = _objectSpread(_objectSpread({}, nextColumns[index]), {}, {
|
|
498
|
-
width: size.width
|
|
500
|
+
width: size.width < nextColumns[index].minWidth ? nextColumns[index].minWidth : size.width //伸缩最小宽度限制
|
|
499
501
|
});
|
|
500
|
-
|
|
502
|
+
if (isRealTimeDrag) {
|
|
503
|
+
setTableColumn(nextColumns);
|
|
504
|
+
}
|
|
501
505
|
if (isDragEnd) {
|
|
502
506
|
// 拖拽结束后将columns回传
|
|
507
|
+
setTableColumn(nextColumns);
|
|
503
508
|
onColumnsResizeEnd(nextColumns);
|
|
504
509
|
}
|
|
505
510
|
};
|
|
@@ -799,7 +804,8 @@ var CWTable = function CWTable(_ref, ref) {
|
|
|
799
804
|
}, /*#__PURE__*/React.createElement(SortContext.Provider, {
|
|
800
805
|
value: {
|
|
801
806
|
columns: tableColumns,
|
|
802
|
-
sorterInfo: sorterInfo
|
|
807
|
+
sorterInfo: sorterInfo,
|
|
808
|
+
isRealTimeDrag: isRealTimeDrag
|
|
803
809
|
}
|
|
804
810
|
}, /*#__PURE__*/React.createElement(FormTable, {
|
|
805
811
|
tableForm: tableForm,
|
package/lib/CWTable/EditLine.js
CHANGED
|
@@ -15,7 +15,7 @@ var _excluded = ["form"],
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
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; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
21
|
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."); }
|
package/lib/CWTable/FormTable.js
CHANGED
|
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
8
|
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); }
|
|
9
9
|
import React, { useEffect } from 'react';
|
|
10
10
|
var FormTable = function FormTable(_ref) {
|
package/lib/CWTable/header.js
CHANGED
|
@@ -4,7 +4,8 @@ import _Dropdown from "@chaoswise/ui/lib/Dropdown";
|
|
|
4
4
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
5
5
|
var _excluded = ["children"],
|
|
6
6
|
_excluded2 = ["onResize", "width"],
|
|
7
|
-
_excluded3 = ["
|
|
7
|
+
_excluded3 = ["columns", "isRealTimeDrag"],
|
|
8
|
+
_excluded4 = ["children", "onClick"];
|
|
8
9
|
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); }
|
|
9
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
11
|
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."); }
|
|
@@ -16,6 +17,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
16
17
|
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; }
|
|
17
18
|
import React, { useState, useRef } from "react";
|
|
18
19
|
import { Resizable } from "react-resizable";
|
|
20
|
+
import classnames from 'classnames';
|
|
19
21
|
import SortContext from "./SortContext";
|
|
20
22
|
import SortSvg from './icon/SortSvg';
|
|
21
23
|
import SortingSvg from './icon/SortingSvg';
|
|
@@ -85,11 +87,18 @@ export function HeaderCell(props) {
|
|
|
85
87
|
width = props.width,
|
|
86
88
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
87
89
|
var isResizeRef = useRef(null);
|
|
90
|
+
// 偏移量
|
|
91
|
+
var _useState3 = useState(0),
|
|
92
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
93
|
+
offset = _useState4[0],
|
|
94
|
+
setOffset = _useState4[1];
|
|
88
95
|
var _useConfigContext = useConfigContext(),
|
|
89
96
|
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
90
97
|
var prefixCls = getPrefixCls();
|
|
91
98
|
var render = function render(context) {
|
|
92
|
-
var columns = context.columns
|
|
99
|
+
var columns = context.columns,
|
|
100
|
+
isRealTimeDrag = context.isRealTimeDrag,
|
|
101
|
+
restContext = _objectWithoutProperties(context, _excluded3);
|
|
93
102
|
var children;
|
|
94
103
|
// 如果有排序
|
|
95
104
|
if (restProps.className.indexOf("".concat(prefixCls, "-table-column-has-sorters")) !== -1) {
|
|
@@ -111,7 +120,7 @@ export function HeaderCell(props) {
|
|
|
111
120
|
position: "relative",
|
|
112
121
|
zIndex: 1
|
|
113
122
|
}
|
|
114
|
-
}, /*#__PURE__*/React.createElement(Sort, _extends({},
|
|
123
|
+
}, /*#__PURE__*/React.createElement(Sort, _extends({}, restContext, {
|
|
115
124
|
column: column
|
|
116
125
|
}))))]));
|
|
117
126
|
} else {
|
|
@@ -133,7 +142,7 @@ export function HeaderCell(props) {
|
|
|
133
142
|
var _children = restProps.children,
|
|
134
143
|
_restProps$onClick = restProps.onClick,
|
|
135
144
|
_onClick = _restProps$onClick === void 0 ? function () {} : _restProps$onClick,
|
|
136
|
-
rest = _objectWithoutProperties(restProps,
|
|
145
|
+
rest = _objectWithoutProperties(restProps, _excluded4);
|
|
137
146
|
var findColumnItem = columns === null || columns === void 0 ? void 0 : columns.find(function (item) {
|
|
138
147
|
return (item.dataIndex || item.key) === rest.dataIndex;
|
|
139
148
|
});
|
|
@@ -145,10 +154,30 @@ export function HeaderCell(props) {
|
|
|
145
154
|
}), renderChildren);
|
|
146
155
|
}
|
|
147
156
|
return /*#__PURE__*/React.createElement(Resizable, {
|
|
148
|
-
width: width,
|
|
157
|
+
width: width + offset,
|
|
149
158
|
height: 0,
|
|
159
|
+
handle: /*#__PURE__*/React.createElement("span", {
|
|
160
|
+
// 有偏移量时显示伸缩手柄竖线
|
|
161
|
+
className: classnames('react-resizable-handle', {
|
|
162
|
+
'react-resizable-handle-resizing': offset !== 0
|
|
163
|
+
})
|
|
164
|
+
// 拖拽层偏移
|
|
165
|
+
,
|
|
166
|
+
style: {
|
|
167
|
+
transform: "translateX(".concat(offset, "px)")
|
|
168
|
+
},
|
|
169
|
+
onClick: function onClick(e) {
|
|
170
|
+
e.stopPropagation();
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
}
|
|
173
|
+
}),
|
|
150
174
|
onResize: function onResize(e, data) {
|
|
151
|
-
|
|
175
|
+
if (isRealTimeDrag) {
|
|
176
|
+
_onResize(e, data, false);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
// 更新偏移量,数据列表不实时伸缩
|
|
180
|
+
setOffset(data.size.width - width);
|
|
152
181
|
},
|
|
153
182
|
onResizeStart: function onResizeStart() {
|
|
154
183
|
// 页面选中功能禁用
|
|
@@ -163,10 +192,15 @@ export function HeaderCell(props) {
|
|
|
163
192
|
return true;
|
|
164
193
|
};
|
|
165
194
|
// 第三个参数是拖拽是否结束
|
|
195
|
+
// 拖拽结束后偏移量置零
|
|
166
196
|
_onResize(e, data, true);
|
|
167
197
|
setTimeout(function () {
|
|
168
198
|
isResizeRef.current = false;
|
|
169
199
|
});
|
|
200
|
+
if (isRealTimeDrag) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
setOffset(0);
|
|
170
204
|
},
|
|
171
205
|
className: "cw-table-react-resizable",
|
|
172
206
|
draggableOpts: {
|
package/lib/CWTable/index.js
CHANGED
|
@@ -290,7 +290,11 @@ Table.propTypes = {
|
|
|
290
290
|
/**
|
|
291
291
|
* 列拖拽结束后的回调,function(columns){}
|
|
292
292
|
*/
|
|
293
|
-
onColumnsResizeEnd: PropTypes.func
|
|
293
|
+
onColumnsResizeEnd: PropTypes.func,
|
|
294
|
+
/**
|
|
295
|
+
* 开启列拖拽后isRealTimeDrag为true时,实时拖拽
|
|
296
|
+
*/
|
|
297
|
+
isRealTimeDrag: PropTypes.bool
|
|
294
298
|
};
|
|
295
299
|
Table.defaultProps = {
|
|
296
300
|
onSubmit: function onSubmit() {},
|
|
@@ -304,6 +308,7 @@ Table.defaultProps = {
|
|
|
304
308
|
size: 'default',
|
|
305
309
|
columnFilter: false,
|
|
306
310
|
frontPagination: false,
|
|
307
|
-
tableHeader: null
|
|
311
|
+
tableHeader: null,
|
|
312
|
+
isRealTimeDrag: true
|
|
308
313
|
};
|
|
309
314
|
export default Table;
|
package/lib/CWTable/index.less
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
&-row-cell-ellipsis.cw-table-react-resizable{
|
|
55
55
|
overflow: visible;
|
|
56
56
|
}
|
|
57
|
-
.react-resizable-handle:hover::after{
|
|
57
|
+
.react-resizable-handle:hover::after,.react-resizable-handle-resizing::after{
|
|
58
58
|
content: "";
|
|
59
59
|
position: absolute;
|
|
60
60
|
display: inline-block;
|
package/lib/CWTree/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
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; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
21
|
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."); }
|
package/lib/CWTree/index.less
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
&.@{tree-prefix-cls}-iconEle{
|
|
62
62
|
width: 16px;
|
|
63
|
-
display: inline-flex;
|
|
63
|
+
display: inline-flex !important;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
66
66
|
.@{iconfont-css-prefix}{
|
|
@@ -566,8 +566,8 @@
|
|
|
566
566
|
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
.@{ant-prefix}-tree li span[draggable],
|
|
570
|
-
.@{ant-prefix}-tree li span[draggable='true'] {
|
|
569
|
+
.@{ant-prefix}-tree li .span[draggable].@{ant-prefix}-tree-node-content-wrapper,
|
|
570
|
+
.@{ant-prefix}-tree li span[draggable='true'].@{ant-prefix}-tree-node-content-wrapper {
|
|
571
571
|
border: @border-width-base @border-style-base transparent;
|
|
572
572
|
}
|
|
573
573
|
|
|
@@ -2,7 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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 { KMPMatch } from "../../QuickTransfer/utils";
|
|
8
8
|
import isUndefined from "lodash-es/isUndefined";
|
|
@@ -1,6 +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
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; }
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
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); }
|
|
5
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
6
|
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."); }
|
|
@@ -13,7 +13,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
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); }
|
|
18
18
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
19
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -36,7 +36,6 @@ import LocaleReceiver from "antd/es/locale-provider/LocaleReceiver";
|
|
|
36
36
|
import defaultLocale from "antd/es/locale/default";
|
|
37
37
|
import { ConfigConsumer } from "antd/es/config-provider";
|
|
38
38
|
var Upload = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(Upload, _React$Component);
|
|
40
39
|
function Upload(props) {
|
|
41
40
|
var _this;
|
|
42
41
|
_classCallCheck(this, Upload);
|
|
@@ -428,7 +427,8 @@ var Upload = /*#__PURE__*/function (_React$Component) {
|
|
|
428
427
|
// );
|
|
429
428
|
return _this;
|
|
430
429
|
}
|
|
431
|
-
|
|
430
|
+
_inherits(Upload, _React$Component);
|
|
431
|
+
return _createClass(Upload, [{
|
|
432
432
|
key: "componentWillUnmount",
|
|
433
433
|
value: function componentWillUnmount() {
|
|
434
434
|
this.clearProgressTimer();
|
|
@@ -468,7 +468,6 @@ var Upload = /*#__PURE__*/function (_React$Component) {
|
|
|
468
468
|
return null;
|
|
469
469
|
}
|
|
470
470
|
}]);
|
|
471
|
-
return Upload;
|
|
472
471
|
}(React.Component);
|
|
473
472
|
Upload.defaultProps = {
|
|
474
473
|
type: "select",
|