@vortex-ui/env-puzzle 2.0.0-beta.2 → 2.0.0-beta.3

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 (230) hide show
  1. package/lib/b-map/b-map.d.ts +63 -0
  2. package/lib/b-map/b-map.js +296 -0
  3. package/lib/b-map/b-map.js.map +1 -0
  4. package/lib/b-map/custom-overlay.d.ts +13 -0
  5. package/lib/b-map/custom-overlay.js +84 -0
  6. package/lib/b-map/custom-overlay.js.map +1 -0
  7. package/lib/b-map/drawing.d.ts +14 -0
  8. package/lib/b-map/drawing.js +73 -0
  9. package/lib/b-map/drawing.js.map +1 -0
  10. package/lib/b-map/index.d.ts +17 -0
  11. package/lib/b-map/index.js +35 -0
  12. package/lib/b-map/index.js.map +1 -0
  13. package/lib/b-map/js/marker-clusterer.js +158 -42
  14. package/lib/b-map/js/marker-clusterer.js.map +1 -1
  15. package/lib/b-map/lushu.d.ts +16 -0
  16. package/lib/b-map/lushu.js +78 -0
  17. package/lib/b-map/lushu.js.map +1 -0
  18. package/lib/b-map/marker-clusterer.d.ts +29 -0
  19. package/lib/b-map/marker-clusterer.js +52 -0
  20. package/lib/b-map/marker-clusterer.js.map +1 -0
  21. package/lib/b-map/marker.d.ts +45 -0
  22. package/lib/b-map/marker.js +184 -0
  23. package/lib/b-map/marker.js.map +1 -0
  24. package/lib/b-map/polygon.d.ts +54 -0
  25. package/lib/b-map/polygon.js +44 -0
  26. package/lib/b-map/polygon.js.map +1 -0
  27. package/lib/b-map/style/css.js +4 -0
  28. package/lib/b-map/style/css.js.map +1 -0
  29. package/lib/b-map/style/index.d.ts +1 -0
  30. package/lib/b-map/style/index.js +4 -0
  31. package/lib/b-map/style/index.js.map +1 -0
  32. package/lib/create-modal/create-modal.d.ts +31 -0
  33. package/lib/create-modal/create-modal.js +653 -0
  34. package/lib/create-modal/create-modal.js.map +1 -0
  35. package/lib/create-modal/index.d.ts +3 -0
  36. package/lib/create-modal/index.js +14 -0
  37. package/lib/create-modal/index.js.map +1 -0
  38. package/lib/create-modal/style/css.js +22 -0
  39. package/lib/create-modal/style/css.js.map +1 -0
  40. package/lib/create-modal/style/index.d.ts +10 -0
  41. package/lib/create-modal/style/index.js +22 -0
  42. package/lib/create-modal/style/index.js.map +1 -0
  43. package/lib/import-modal/import-modal.d.ts +23 -0
  44. package/lib/import-modal/import-modal.js +358 -0
  45. package/lib/import-modal/import-modal.js.map +1 -0
  46. package/lib/import-modal/index.d.ts +2 -0
  47. package/lib/import-modal/index.js +14 -0
  48. package/lib/import-modal/index.js.map +1 -0
  49. package/lib/import-modal/style/css.js +14 -0
  50. package/lib/import-modal/style/css.js.map +1 -0
  51. package/lib/import-modal/style/index.d.ts +6 -0
  52. package/lib/import-modal/style/index.js +14 -0
  53. package/lib/import-modal/style/index.js.map +1 -0
  54. package/lib/index.d.ts +13 -0
  55. package/lib/index.js +104 -0
  56. package/lib/index.js.map +1 -0
  57. package/lib/interface/index.d.ts +7 -0
  58. package/lib/interface/index.js +6 -0
  59. package/lib/interface/index.js.map +1 -0
  60. package/lib/mapv-Layer/Function.d.ts +1 -0
  61. package/lib/mapv-Layer/Function.js +2 -0
  62. package/lib/mapv-Layer/Function.js.map +1 -1
  63. package/lib/mapv-Layer/index.d.ts +2 -0
  64. package/lib/mapv-Layer/index.js +14 -0
  65. package/lib/mapv-Layer/index.js.map +1 -0
  66. package/lib/mapv-Layer/mapv-Layer.d.ts +7 -0
  67. package/lib/mapv-Layer/mapv-Layer.js +117 -0
  68. package/lib/mapv-Layer/mapv-Layer.js.map +1 -0
  69. package/lib/mapv-Layer/style/css.js +2 -0
  70. package/lib/mapv-Layer/style/css.js.map +1 -0
  71. package/lib/mapv-Layer/style/index.d.ts +1 -0
  72. package/lib/mapv-Layer/style/index.js +2 -0
  73. package/lib/mapv-Layer/style/index.js.map +1 -0
  74. package/lib/percent/images/icon-arrow.png +0 -0
  75. package/lib/percent/index.d.ts +8 -0
  76. package/lib/percent/index.js +18 -0
  77. package/lib/percent/index.js.map +1 -0
  78. package/lib/percent/interface.d.ts +6 -0
  79. package/lib/percent/interface.js +6 -0
  80. package/lib/percent/interface.js.map +1 -0
  81. package/lib/percent/line-percent.d.ts +11 -0
  82. package/lib/percent/line-percent.js +114 -0
  83. package/lib/percent/line-percent.js.map +1 -0
  84. package/lib/percent/percent.d.ts +10 -0
  85. package/lib/percent/percent.js +139 -0
  86. package/lib/percent/percent.js.map +1 -0
  87. package/lib/percent/style/css.js +4 -0
  88. package/lib/percent/style/css.js.map +1 -0
  89. package/lib/percent/style/index.d.ts +1 -0
  90. package/lib/percent/style/index.js +4 -0
  91. package/lib/percent/style/index.js.map +1 -0
  92. package/lib/scroll/index.d.ts +2 -0
  93. package/lib/scroll/index.js +14 -0
  94. package/lib/scroll/index.js.map +1 -0
  95. package/lib/scroll/scroll.d.ts +4 -0
  96. package/lib/scroll/scroll.js +105 -0
  97. package/lib/scroll/scroll.js.map +1 -0
  98. package/lib/scroll/style/css.js +4 -0
  99. package/lib/scroll/style/css.js.map +1 -0
  100. package/lib/scroll/style/index.d.ts +1 -0
  101. package/lib/scroll/style/index.js +4 -0
  102. package/lib/scroll/style/index.js.map +1 -0
  103. package/lib/scroll-select/index.d.ts +2 -0
  104. package/lib/scroll-select/index.js +14 -0
  105. package/lib/scroll-select/index.js.map +1 -0
  106. package/lib/scroll-select/scrollSelect.d.ts +2 -0
  107. package/lib/scroll-select/scrollSelect.js +323 -0
  108. package/lib/scroll-select/scrollSelect.js.map +1 -0
  109. package/lib/scroll-select/style/css.js +6 -0
  110. package/lib/scroll-select/style/css.js.map +1 -0
  111. package/lib/scroll-select/style/index.d.ts +2 -0
  112. package/lib/scroll-select/style/index.js +6 -0
  113. package/lib/scroll-select/style/index.js.map +1 -0
  114. package/lib/table/index.d.ts +2 -0
  115. package/lib/table/index.js +14 -0
  116. package/lib/table/index.js.map +1 -0
  117. package/lib/table/style/css.js +6 -0
  118. package/lib/table/style/css.js.map +1 -0
  119. package/lib/table/style/index.d.ts +2 -0
  120. package/lib/table/style/index.js +6 -0
  121. package/lib/table/style/index.js.map +1 -0
  122. package/lib/table/table.d.ts +17 -0
  123. package/lib/table/table.js +162 -0
  124. package/lib/table/table.js.map +1 -0
  125. package/lib/template/action.d.ts +57 -0
  126. package/lib/template/action.js +265 -0
  127. package/lib/template/action.js.map +1 -0
  128. package/lib/template/card-table.d.ts +35 -0
  129. package/lib/template/card-table.js +193 -0
  130. package/lib/template/card-table.js.map +1 -0
  131. package/lib/template/card.d.ts +15 -0
  132. package/lib/template/card.js +116 -0
  133. package/lib/template/card.js.map +1 -0
  134. package/lib/template/check-row.d.ts +6 -0
  135. package/lib/template/check-row.js +39 -0
  136. package/lib/template/check-row.js.map +1 -0
  137. package/lib/template/field.d.ts +6 -0
  138. package/lib/template/field.js +50 -0
  139. package/lib/template/field.js.map +1 -0
  140. package/lib/template/filter.d.ts +13 -0
  141. package/lib/template/filter.js +146 -0
  142. package/lib/template/filter.js.map +1 -0
  143. package/lib/template/icon.d.ts +6 -0
  144. package/lib/template/icon.js +33 -0
  145. package/lib/template/icon.js.map +1 -0
  146. package/lib/template/index.d.ts +13 -0
  147. package/lib/template/index.js +24 -0
  148. package/lib/template/index.js.map +1 -0
  149. package/lib/template/interface.d.ts +4 -0
  150. package/lib/template/interface.js +6 -0
  151. package/lib/template/interface.js.map +1 -0
  152. package/lib/template/renderColumnButtons.d.ts +2 -0
  153. package/lib/template/renderColumnButtons.js +173 -0
  154. package/lib/template/renderColumnButtons.js.map +1 -0
  155. package/lib/template/style/css.js +40 -0
  156. package/lib/template/style/css.js.map +1 -0
  157. package/lib/template/style/index.d.ts +19 -0
  158. package/lib/template/style/index.js +40 -0
  159. package/lib/template/style/index.js.map +1 -0
  160. package/lib/template/table.d.ts +44 -0
  161. package/lib/template/table.js +103 -0
  162. package/lib/template/table.js.map +1 -0
  163. package/lib/template/template.d.ts +84 -0
  164. package/lib/template/template.js +610 -0
  165. package/lib/template/template.js.map +1 -0
  166. package/lib/template/toolbar.d.ts +16 -0
  167. package/lib/template/toolbar.js +102 -0
  168. package/lib/template/toolbar.js.map +1 -0
  169. package/lib/to-map/container.d.ts +28 -0
  170. package/lib/to-map/container.js +295 -0
  171. package/lib/to-map/container.js.map +1 -0
  172. package/lib/to-map/draw-area.d.ts +6 -0
  173. package/lib/to-map/draw-area.js +66 -0
  174. package/lib/to-map/draw-area.js.map +1 -0
  175. package/lib/to-map/images/icon-area.png +0 -0
  176. package/lib/to-map/images/icon-picker.png +0 -0
  177. package/lib/to-map/index.d.ts +8 -0
  178. package/lib/to-map/index.js +18 -0
  179. package/lib/to-map/index.js.map +1 -0
  180. package/lib/to-map/style/css.js +6 -0
  181. package/lib/to-map/style/css.js.map +1 -0
  182. package/lib/to-map/style/index.d.ts +2 -0
  183. package/lib/to-map/style/index.js +6 -0
  184. package/lib/to-map/style/index.js.map +1 -0
  185. package/lib/to-map/to-map.d.ts +12 -0
  186. package/lib/to-map/to-map.js +120 -0
  187. package/lib/to-map/to-map.js.map +1 -0
  188. package/lib/upload/index.d.ts +2 -0
  189. package/lib/upload/index.js +14 -0
  190. package/lib/upload/index.js.map +1 -0
  191. package/lib/upload/style/css.js +10 -0
  192. package/lib/upload/style/css.js.map +1 -0
  193. package/lib/upload/style/index.d.ts +4 -0
  194. package/lib/upload/style/index.js +10 -0
  195. package/lib/upload/style/index.js.map +1 -0
  196. package/lib/upload/upload.d.ts +12 -0
  197. package/lib/upload/upload.js +445 -0
  198. package/lib/upload/upload.js.map +1 -0
  199. package/lib/use-simple-res/demos/index.d.ts +2 -0
  200. package/lib/use-simple-res/demos/index.js +116 -0
  201. package/lib/use-simple-res/demos/index.js.map +1 -0
  202. package/lib/use-simple-res/index.d.ts +28 -0
  203. package/lib/use-simple-res/index.js +99 -0
  204. package/lib/use-simple-res/index.js.map +1 -0
  205. package/lib/use-simple-res/style/css.js +4 -0
  206. package/lib/use-simple-res/style/css.js.map +1 -0
  207. package/lib/use-simple-res/style/index.d.ts +1 -0
  208. package/lib/use-simple-res/style/index.js +4 -0
  209. package/lib/use-simple-res/style/index.js.map +1 -0
  210. package/lib/utils/dom-util.d.ts +19 -0
  211. package/lib/utils/dom-util.js +98 -0
  212. package/lib/utils/dom-util.js.map +1 -0
  213. package/lib/utils/request-util.d.ts +42 -0
  214. package/lib/utils/request-util.js +191 -0
  215. package/lib/utils/request-util.js.map +1 -0
  216. package/lib/utils/string-util.d.ts +11 -0
  217. package/lib/utils/string-util.js +47 -0
  218. package/lib/utils/string-util.js.map +1 -0
  219. package/lib/view-modal/index.d.ts +2 -0
  220. package/lib/view-modal/index.js +14 -0
  221. package/lib/view-modal/index.js.map +1 -0
  222. package/lib/view-modal/style/css.js +16 -0
  223. package/lib/view-modal/style/css.js.map +1 -0
  224. package/lib/view-modal/style/index.d.ts +8 -0
  225. package/lib/view-modal/style/index.js +16 -0
  226. package/lib/view-modal/style/index.js.map +1 -0
  227. package/lib/view-modal/view-modal.d.ts +8 -0
  228. package/lib/view-modal/view-modal.js +208 -0
  229. package/lib/view-modal/view-modal.js.map +1 -0
  230. package/package.json +1 -1
@@ -0,0 +1,610 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var React = _interopRequireWildcard(require("react"));
11
+
12
+ var _action = _interopRequireDefault(require("./action"));
13
+
14
+ var _filter = _interopRequireDefault(require("./filter"));
15
+
16
+ var _table = _interopRequireDefault(require("./table"));
17
+
18
+ var _cardTable = _interopRequireDefault(require("./card-table"));
19
+
20
+ var _importModal = _interopRequireDefault(require("../import-modal"));
21
+
22
+ var _vtxPageLayout = _interopRequireDefault(require("@vtx/components/lib/vtx-page-layout"));
23
+
24
+ var _antd = require("antd");
25
+
26
+ var _lodash = _interopRequireDefault(require("lodash"));
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
+
30
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
+
32
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+
34
+ 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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
35
+
36
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
+
38
+ 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, descriptor.key, descriptor); } }
39
+
40
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
41
+
42
+ 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); }
43
+
44
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
+
46
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
47
+
48
+ 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); }
49
+
50
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
+
52
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
53
+
54
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
+
56
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
57
+ function adopt(value) {
58
+ return value instanceof P ? value : new P(function (resolve) {
59
+ resolve(value);
60
+ });
61
+ }
62
+
63
+ return new (P || (P = Promise))(function (resolve, reject) {
64
+ function fulfilled(value) {
65
+ try {
66
+ step(generator.next(value));
67
+ } catch (e) {
68
+ reject(e);
69
+ }
70
+ }
71
+
72
+ function rejected(value) {
73
+ try {
74
+ step(generator["throw"](value));
75
+ } catch (e) {
76
+ reject(e);
77
+ }
78
+ }
79
+
80
+ function step(result) {
81
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
82
+ }
83
+
84
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
85
+ });
86
+ };
87
+
88
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
89
+ var t = {};
90
+
91
+ for (var p in s) {
92
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
93
+ }
94
+
95
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
96
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
97
+ }
98
+ return t;
99
+ };
100
+
101
+ var TableLayout = _vtxPageLayout["default"].TableLayout;
102
+ var DEFAULT_PAGINATION = {
103
+ total: 0,
104
+ current: 1,
105
+ pageSize: 10
106
+ };
107
+
108
+ var Template = /*#__PURE__*/function (_Component) {
109
+ _inherits(Template, _Component);
110
+
111
+ var _super = _createSuper(Template);
112
+
113
+ function Template(props) {
114
+ var _this;
115
+
116
+ _classCallCheck(this, Template);
117
+
118
+ _this = _super.call(this, props);
119
+ _this.state = {
120
+ filter: {},
121
+ loading: false,
122
+ dataSource: [],
123
+ selfColumns: [],
124
+ selectedRowKeys: [],
125
+ selectedRows: [],
126
+ pagination: DEFAULT_PAGINATION,
127
+ showImport: false,
128
+ showExportLoading: false
129
+ };
130
+ _this.requestDataSource = _this.requestDataSource.bind(_assertThisInitialized(_this));
131
+ return _this;
132
+ }
133
+
134
+ _createClass(Template, [{
135
+ key: "componentDidMount",
136
+ value: function componentDidMount() {
137
+ // 是否默认不请求
138
+ if (this.props.autoRequest && ! /*#__PURE__*/React.isValidElement(this.props.tableProps) && this.props.tableProps.dataSource === undefined) {
139
+ this.updateFilter();
140
+ } // this.props.tableProps && this.setSelfColumns();
141
+
142
+ }
143
+ }, {
144
+ key: "componentDidUpdate",
145
+ value: function componentDidUpdate(prevProps, prevState) {
146
+ var _a, _b, _c, _d; // 比较差异
147
+
148
+
149
+ if (! /*#__PURE__*/React.isValidElement((_a = this.props) === null || _a === void 0 ? void 0 : _a.tableProps) && !_lodash["default"].isEqual((_b = prevProps === null || prevProps === void 0 ? void 0 : prevProps.tableProps) === null || _b === void 0 ? void 0 : _b.columns, (_d = (_c = this.props) === null || _c === void 0 ? void 0 : _c.tableProps) === null || _d === void 0 ? void 0 : _d.columns)) {
150
+ this.props.tableProps && this.setSelfColumns();
151
+ }
152
+ }
153
+ /**
154
+ * 初始化columns, 给每个column加上是否显示的属性
155
+ */
156
+
157
+ }, {
158
+ key: "setSelfColumns",
159
+ value: function setSelfColumns() {
160
+ var _a;
161
+
162
+ if (! /*#__PURE__*/React.isValidElement((_a = this.props) === null || _a === void 0 ? void 0 : _a.tableProps)) {
163
+ var _this$props$tableProp = this.props.tableProps,
164
+ tableProps = _this$props$tableProp === void 0 ? {} : _this$props$tableProp;
165
+ var _tableProps$columns = tableProps.columns,
166
+ columns = _tableProps$columns === void 0 ? [] : _tableProps$columns;
167
+ this.setState({
168
+ selfColumns: columns.map(function (item) {
169
+ return Object.assign(Object.assign({}, item), {
170
+ isShow: item.isShow === undefined ? true : item.isShow
171
+ });
172
+ })
173
+ });
174
+ }
175
+ }
176
+ }, {
177
+ key: "getPagination",
178
+ value: function getPagination() {
179
+ var _this$props$tableProp2 = this.props.tableProps,
180
+ tableProps = _this$props$tableProp2 === void 0 ? {} : _this$props$tableProp2;
181
+
182
+ if (! /*#__PURE__*/React.isValidElement(tableProps) && typeof (tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination) === 'boolean' && !(tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination)) {
183
+ return true;
184
+ }
185
+
186
+ return false;
187
+ }
188
+ }, {
189
+ key: "updateFilter",
190
+ value: function updateFilter() {
191
+ var _this2 = this;
192
+
193
+ var _a;
194
+
195
+ var pagination = this.state.pagination;
196
+ var filter = (_a = this.filterRef) === null || _a === void 0 ? void 0 : _a.form.getFieldsValue(); // 更新查询条件并且把分页信息重置
197
+
198
+ this.setState({
199
+ filter: filter,
200
+ pagination: this.getPagination() ? false : Object.assign(Object.assign({}, pagination), {
201
+ current: 1,
202
+ total: 0
203
+ })
204
+ }, function () {
205
+ _this2.requestDataSource();
206
+ });
207
+ }
208
+ }, {
209
+ key: "requestDataSource",
210
+ value: function requestDataSource(newPagination, newFilter) {
211
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
212
+ var getDataSource, filter, pagination, res, total, rows;
213
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
214
+ while (1) {
215
+ switch (_context.prev = _context.next) {
216
+ case 0:
217
+ getDataSource = this.props.getDataSource; // 从外面直接调
218
+
219
+ filter = Object.assign(Object.assign({}, this.state.filter), newFilter);
220
+ pagination = this.getPagination() ? false : Object.assign(Object.assign({}, this.state.pagination), newPagination);
221
+ this.setState({
222
+ loading: true
223
+ });
224
+ _context.prev = 4;
225
+ _context.next = 7;
226
+ return getDataSource(pagination, filter);
227
+
228
+ case 7:
229
+ res = _context.sent;
230
+ total = res.total, rows = res.rows;
231
+ this.setState({
232
+ dataSource: rows,
233
+ pagination: this.getPagination() ? false : Object.assign(Object.assign({}, pagination), {
234
+ total: total
235
+ })
236
+ });
237
+
238
+ case 10:
239
+ _context.prev = 10;
240
+ this.setState({
241
+ loading: false,
242
+ // 更新数据后, 清除选中的行
243
+ selectedRows: [],
244
+ selectedRowKeys: []
245
+ });
246
+ return _context.finish(10);
247
+
248
+ case 13:
249
+ case "end":
250
+ return _context.stop();
251
+ }
252
+ }
253
+ }, _callee, this, [[4,, 10, 13]]);
254
+ }));
255
+ }
256
+ }, {
257
+ key: "setPagination",
258
+ value: function setPagination(obj) {
259
+ var _this3 = this;
260
+
261
+ this.setState({
262
+ pagination: this.getPagination() ? false : Object.assign(Object.assign({}, this.state.pagination), obj)
263
+ }, function () {
264
+ _this3.requestDataSource();
265
+ });
266
+ }
267
+ }, {
268
+ key: "clearSelectedRows",
269
+ value: function clearSelectedRows() {
270
+ this.setState({
271
+ selectedRowKeys: [],
272
+ selectedRows: []
273
+ });
274
+ }
275
+ }, {
276
+ key: "render",
277
+ value: function render() {
278
+ var _this4 = this;
279
+
280
+ var _this$state = this.state,
281
+ filter = _this$state.filter,
282
+ loading = _this$state.loading,
283
+ dataSource = _this$state.dataSource,
284
+ pagination = _this$state.pagination,
285
+ selfColumns = _this$state.selfColumns,
286
+ selectedRows = _this$state.selectedRows,
287
+ selectedRowKeys = _this$state.selectedRowKeys,
288
+ showExportLoading = _this$state.showExportLoading,
289
+ showImport = _this$state.showImport;
290
+ var _this$props = this.props,
291
+ tableProps = _this$props.tableProps,
292
+ actionProps = _this$props.actionProps,
293
+ children = _this$props.children,
294
+ _onReset = _this$props.onReset,
295
+ statisticsProps = _this$props.statisticsProps,
296
+ style = _this$props.style,
297
+ showAll = _this$props.showAll,
298
+ importErrorColumns = _this$props.importErrorColumns;
299
+
300
+ var _a = tableProps,
301
+ _a$columns = _a.columns,
302
+ columns = _a$columns === void 0 ? [] : _a$columns,
303
+ _onRefresh = _a.onRefresh,
304
+ tableRestProps = __rest(_a, ["columns", "onRefresh"]); // fix: 操作按钮里无法获取state
305
+
306
+
307
+ var columnsToShow = columns.map(function (item, index) {
308
+ var _a;
309
+
310
+ return Object.assign(Object.assign({}, item), {
311
+ key: item.dataIndex || "".concat(index),
312
+ isShow: (_a = selfColumns === null || selfColumns === void 0 ? void 0 : selfColumns[index]) === null || _a === void 0 ? void 0 : _a.isShow
313
+ });
314
+ });
315
+
316
+ var getTop = function getTop() {
317
+ if (statisticsProps && /*#__PURE__*/React.isValidElement(statisticsProps)) {
318
+ return 104;
319
+ } else if (children) {
320
+ return undefined;
321
+ } else {
322
+ return 0;
323
+ }
324
+ };
325
+
326
+ return /*#__PURE__*/React.createElement("div", {
327
+ className: "env-template",
328
+ style: style
329
+ }, /*#__PURE__*/React.createElement(TableLayout.Page, null, children ? /*#__PURE__*/React.createElement(TableLayout.Search, null, /*#__PURE__*/React.createElement(_filter["default"], {
330
+ ref: function ref(_ref) {
331
+ return _this4.filterRef = _ref;
332
+ },
333
+ onSearch: function onSearch() {
334
+ _this4.updateFilter();
335
+ },
336
+ onReset: function onReset() {
337
+ _this4.filterRef.form.resetFields();
338
+
339
+ _onReset && _onReset();
340
+
341
+ _this4.updateFilter();
342
+ },
343
+ showAll: showAll
344
+ }, children)) : null, children ? /*#__PURE__*/React.createElement(TableLayout.Content, null, /*#__PURE__*/React.createElement(TableLayout.Card, null, statisticsProps && /*#__PURE__*/React.isValidElement(statisticsProps) ? statisticsProps : null), /*#__PURE__*/React.createElement(TableLayout.Table, {
345
+ top: getTop()
346
+ }, tableProps && Object.prototype.toString.call(tableProps) === '[object Object]' && (! /*#__PURE__*/React.isValidElement(tableProps) ? (tableProps === null || tableProps === void 0 ? void 0 : tableProps.theme) === 'list' || !(tableProps === null || tableProps === void 0 ? void 0 : tableProps.theme) ? /*#__PURE__*/React.createElement(_table["default"], Object.assign({
347
+ loading: loading,
348
+ bordered: tableProps === null || tableProps === void 0 ? void 0 : tableProps.bordered,
349
+ onRefresh: function onRefresh() {
350
+ _onRefresh ? _onRefresh() : _this4.requestDataSource();
351
+ },
352
+ rowKey: "id"
353
+ }, tableRestProps, {
354
+ buttonGroup: actionProps && Object.prototype.toString.call(actionProps) === '[object Object]' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_action["default"], Object.assign({}, actionProps, {
355
+ dataSource: dataSource,
356
+ filter: filter,
357
+ selectRows: selectedRows,
358
+ onSelectedRows: function onSelectedRows(selectedRowKeys, selectedRows) {
359
+ _this4.setState({
360
+ selectedRowKeys: selectedRowKeys,
361
+ selectedRows: selectedRows
362
+ });
363
+ },
364
+ setShowExportLoading: function setShowExportLoading(showExportLoading) {
365
+ _this4.setState({
366
+ showExportLoading: showExportLoading
367
+ });
368
+ },
369
+ setShowImport: function setShowImport(showImport) {
370
+ _this4.setState({
371
+ showImport: showImport
372
+ });
373
+ },
374
+ requestDataSource: this.requestDataSource
375
+ }, {
376
+ columnsVisibility: tableProps.columnsVisibility,
377
+ saveColumns: tableProps.saveColumns,
378
+ selectable: tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable,
379
+ isCardTheme: false
380
+ }))),
381
+ rowSelection: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable) ? Object.assign(Object.assign({
382
+ selectedRowKeys: selectedRowKeys
383
+ }, tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection), {
384
+ onChange: function onChange(selectedRowKeys, selectedRows) {
385
+ var _a;
386
+
387
+ _this4.setState({
388
+ selectedRowKeys: selectedRowKeys,
389
+ selectedRows: selectedRows
390
+ });
391
+
392
+ (_a = tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange(selectedRowKeys, selectedRows);
393
+ }
394
+ }) : undefined,
395
+ pagination: this.getPagination() ? false : Object.assign(Object.assign(Object.assign({}, pagination), tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination), {
396
+ onChange: function onChange(current, pageSize) {
397
+ _this4.setPagination({
398
+ current: current,
399
+ pageSize: pageSize
400
+ });
401
+ }
402
+ }),
403
+ dataSource: tableProps.dataSource || dataSource,
404
+ columns: columnsToShow,
405
+ hideColumnSetting: typeof tableProps.columnsVisibility === 'boolean' ? !tableProps.columnsVisibility : false
406
+ })) : (tableProps === null || tableProps === void 0 ? void 0 : tableProps.theme) === 'card' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_cardTable["default"], {
407
+ buttonGroup: actionProps && Object.prototype.toString.call(actionProps) === '[object Object]' && /*#__PURE__*/React.createElement(_action["default"], Object.assign({}, actionProps, {
408
+ dataSource: dataSource,
409
+ filter: filter,
410
+ selectRows: selectedRows,
411
+ onSelectedRows: function onSelectedRows(selectedRowKeys, selectedRows) {
412
+ _this4.setState({
413
+ selectedRowKeys: selectedRowKeys,
414
+ selectedRows: selectedRows
415
+ });
416
+ },
417
+ setShowExportLoading: function setShowExportLoading(showExportLoading) {
418
+ _this4.setState({
419
+ showExportLoading: showExportLoading
420
+ });
421
+ },
422
+ setShowImport: function setShowImport(showImport) {
423
+ _this4.setState({
424
+ showImport: showImport
425
+ });
426
+ },
427
+ requestDataSource: this.requestDataSource
428
+ }, {
429
+ columnsVisibility: tableProps.columnsVisibility,
430
+ saveColumns: tableProps.saveColumns,
431
+ selectable: tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable,
432
+ isCardTheme: true
433
+ })),
434
+ pagination: this.getPagination() ? false : Object.assign(Object.assign(Object.assign({}, pagination), tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination), {
435
+ onChange: function onChange(current, pageSize) {
436
+ _this4.setPagination({
437
+ current: current,
438
+ pageSize: pageSize
439
+ });
440
+ }
441
+ }),
442
+ dataSource: tableProps.dataSource || dataSource,
443
+ loading: tableProps.loading,
444
+ renderCard: tableProps.renderCard,
445
+ rowSelection: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable) ? Object.assign(Object.assign({
446
+ selectedRowKeys: selectedRowKeys
447
+ }, tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection), {
448
+ onChange: function onChange(selectedRowKeys, selectedRows) {
449
+ var _a;
450
+
451
+ _this4.setState({
452
+ selectedRowKeys: selectedRowKeys,
453
+ selectedRows: selectedRows
454
+ });
455
+
456
+ (_a = tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange(selectedRowKeys, selectedRows);
457
+ }
458
+ }) : undefined
459
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement(React.Fragment, null, tableProps)))) : /*#__PURE__*/React.createElement(TableLayout.Table, {
460
+ top: getTop()
461
+ }, tableProps && Object.prototype.toString.call(tableProps) === '[object Object]' && (! /*#__PURE__*/React.isValidElement(tableProps) ? (tableProps === null || tableProps === void 0 ? void 0 : tableProps.theme) === 'list' || !(tableProps === null || tableProps === void 0 ? void 0 : tableProps.theme) ? /*#__PURE__*/React.createElement(_table["default"], Object.assign({
462
+ loading: loading,
463
+ bordered: tableProps === null || tableProps === void 0 ? void 0 : tableProps.bordered
464
+ }, tableRestProps, {
465
+ buttonGroup: actionProps && Object.prototype.toString.call(actionProps) === '[object Object]' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_action["default"], Object.assign({}, actionProps, {
466
+ dataSource: dataSource,
467
+ filter: filter,
468
+ selectRows: selectedRows,
469
+ onSelectedRows: function onSelectedRows(selectedRowKeys, selectedRows) {
470
+ _this4.setState({
471
+ selectedRowKeys: selectedRowKeys,
472
+ selectedRows: selectedRows
473
+ });
474
+ },
475
+ setShowExportLoading: function setShowExportLoading(showExportLoading) {
476
+ _this4.setState({
477
+ showExportLoading: showExportLoading
478
+ });
479
+ },
480
+ setShowImport: function setShowImport(showImport) {
481
+ _this4.setState({
482
+ showImport: showImport
483
+ });
484
+ },
485
+ requestDataSource: this.requestDataSource
486
+ }, {
487
+ columnsVisibility: tableProps.columnsVisibility,
488
+ saveColumns: tableProps.saveColumns,
489
+ selectable: tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable,
490
+ isCardTheme: false
491
+ }))),
492
+ rowSelection: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable) ? Object.assign(Object.assign({
493
+ selectedRowKeys: selectedRowKeys
494
+ }, tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection), {
495
+ onChange: function onChange(selectedRowKeys, selectedRows) {
496
+ var _a;
497
+
498
+ _this4.setState({
499
+ selectedRowKeys: selectedRowKeys,
500
+ selectedRows: selectedRows
501
+ });
502
+
503
+ (_a = tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange(selectedRowKeys, selectedRows);
504
+ }
505
+ }) : undefined,
506
+ rowKey: "id",
507
+ pagination: this.getPagination() ? false : Object.assign(Object.assign(Object.assign({}, pagination), tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination), {
508
+ onChange: function onChange(current, pageSize) {
509
+ _this4.setPagination({
510
+ current: current,
511
+ pageSize: pageSize
512
+ });
513
+ }
514
+ }),
515
+ dataSource: tableProps.dataSource || dataSource,
516
+ columns: columnsToShow,
517
+ hideColumnSetting: typeof tableProps.columnsVisibility === 'boolean' ? !tableProps.columnsVisibility : false,
518
+ onRefresh: function onRefresh() {
519
+ _onRefresh ? _onRefresh() : _this4.requestDataSource();
520
+ }
521
+ })) : (tableProps === null || tableProps === void 0 ? void 0 : tableProps.theme) === 'card' ? /*#__PURE__*/React.createElement(_cardTable["default"], {
522
+ buttonGroup: actionProps && Object.prototype.toString.call(actionProps) === '[object Object]' && /*#__PURE__*/React.createElement(_action["default"], Object.assign({}, actionProps, {
523
+ dataSource: dataSource,
524
+ filter: filter,
525
+ selectRows: selectedRows,
526
+ onSelectedRows: function onSelectedRows(selectedRowKeys, selectedRows) {
527
+ _this4.setState({
528
+ selectedRowKeys: selectedRowKeys,
529
+ selectedRows: selectedRows
530
+ });
531
+ },
532
+ setShowExportLoading: function setShowExportLoading(showExportLoading) {
533
+ _this4.setState({
534
+ showExportLoading: showExportLoading
535
+ });
536
+ },
537
+ setShowImport: function setShowImport(showImport) {
538
+ _this4.setState({
539
+ showImport: showImport
540
+ });
541
+ },
542
+ requestDataSource: this.requestDataSource
543
+ }, {
544
+ columnsVisibility: tableProps.columnsVisibility,
545
+ saveColumns: tableProps.saveColumns,
546
+ selectable: tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable,
547
+ isCardTheme: true
548
+ })),
549
+ pagination: this.getPagination() ? false : Object.assign(Object.assign(Object.assign({}, pagination), tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination), {
550
+ onChange: function onChange(current, pageSize) {
551
+ _this4.setPagination({
552
+ current: current,
553
+ pageSize: pageSize
554
+ });
555
+ }
556
+ }),
557
+ dataSource: tableProps.dataSource || dataSource,
558
+ loading: tableProps.loading,
559
+ renderCard: tableProps.renderCard,
560
+ rowSelection: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.selectable) ? Object.assign(Object.assign({
561
+ selectedRowKeys: selectedRowKeys
562
+ }, tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection), {
563
+ onChange: function onChange(selectedRowKeys, selectedRows) {
564
+ var _a;
565
+
566
+ _this4.setState({
567
+ selectedRowKeys: selectedRowKeys,
568
+ selectedRows: selectedRows
569
+ });
570
+
571
+ (_a = tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange(selectedRowKeys, selectedRows);
572
+ }
573
+ }) : undefined
574
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement(React.Fragment, null, tableProps)))), showImport && /*#__PURE__*/React.createElement(_importModal["default"], {
575
+ onOk: function onOk() {
576
+ _this4.setState({
577
+ showImport: false
578
+ }); // 刷新页面
579
+
580
+
581
+ _this4.requestDataSource();
582
+
583
+ actionProps.onImport && actionProps.onImport();
584
+ },
585
+ importUrl: actionProps.uploadUrl,
586
+ templateSrc: actionProps.templateSrc,
587
+ visible: showImport,
588
+ onCancel: function onCancel() {
589
+ _this4.setState({
590
+ showImport: false
591
+ });
592
+ },
593
+ columns: importErrorColumns
594
+ }), showExportLoading ? /*#__PURE__*/React.createElement(_antd.Spin, {
595
+ size: "large",
596
+ tip: "\u5BFC\u51FA\u6587\u4EF6\u4E2D...",
597
+ className: "env-template-action-loading"
598
+ }) : null);
599
+ }
600
+ }]);
601
+
602
+ return Template;
603
+ }(React.Component);
604
+
605
+ Template.defaultProps = {
606
+ autoRequest: true
607
+ };
608
+ var _default = Template;
609
+ exports["default"] = _default;
610
+ //# sourceMappingURL=template.js.map