gxxc-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -0
  3. package/dist/AmountCellUI/index.d.ts +11 -0
  4. package/dist/AmountCellUI/index.js +123 -0
  5. package/dist/AnchorUI/demo/anchor-button.d.ts +3 -0
  6. package/dist/AnchorUI/demo/anchor-button.js +85 -0
  7. package/dist/AnchorUI/demo/use-anchor.d.ts +3 -0
  8. package/dist/AnchorUI/demo/use-anchor.js +69 -0
  9. package/dist/AnchorUI/index.d.ts +4 -0
  10. package/dist/AnchorUI/index.js +56 -0
  11. package/dist/AnchorUI/index.scss +21 -0
  12. package/dist/BackUI/index.d.ts +14 -0
  13. package/dist/BackUI/index.js +35 -0
  14. package/dist/BackUI/index.scss +26 -0
  15. package/dist/BroadcastUI/index.d.ts +12 -0
  16. package/dist/BroadcastUI/index.js +62 -0
  17. package/dist/BroadcastUI/index.scss +43 -0
  18. package/dist/ButtonUI/index.d.ts +9 -0
  19. package/dist/ButtonUI/index.js +17 -0
  20. package/dist/ButtonUI/index.scss +6 -0
  21. package/dist/CellUI/index.d.ts +13 -0
  22. package/dist/CellUI/index.js +78 -0
  23. package/dist/CellUI/index.scss +28 -0
  24. package/dist/Components/index.d.ts +2 -0
  25. package/dist/Components/index.js +4 -0
  26. package/dist/DateUI/index.d.ts +5 -0
  27. package/dist/DateUI/index.js +116 -0
  28. package/dist/DateUI/index.scss +3 -0
  29. package/dist/DescriptionsUI/index.d.ts +19 -0
  30. package/dist/DescriptionsUI/index.js +72 -0
  31. package/dist/DescriptionsUI/index.scss +88 -0
  32. package/dist/EmptyUI/emptyImage.d.ts +3 -0
  33. package/dist/EmptyUI/emptyImage.js +12 -0
  34. package/dist/EmptyUI/index.d.ts +9 -0
  35. package/dist/EmptyUI/index.js +13 -0
  36. package/dist/EmptyUI/index.scss +10 -0
  37. package/dist/FilterUI/index.d.ts +28 -0
  38. package/dist/FilterUI/index.js +252 -0
  39. package/dist/FilterUI/index.scss +80 -0
  40. package/dist/FormUI/index.d.ts +4 -0
  41. package/dist/FormUI/index.js +45 -0
  42. package/dist/FormUI/index.scss +64 -0
  43. package/dist/IconUI/index.d.ts +27 -0
  44. package/dist/IconUI/index.js +22 -0
  45. package/dist/IconUI/material/dictionary.d.ts +4 -0
  46. package/dist/IconUI/material/dictionary.js +71 -0
  47. package/dist/IconUI/material/dictionary.scss +58 -0
  48. package/dist/IconUI/material/material.d.ts +16 -0
  49. package/dist/IconUI/material/material.js +476 -0
  50. package/dist/IconUI/material/rally.d.ts +22 -0
  51. package/dist/IconUI/material/rally.js +50 -0
  52. package/dist/ImageUI/index.d.ts +13 -0
  53. package/dist/ImageUI/index.js +159 -0
  54. package/dist/ImageUI/index.scss +59 -0
  55. package/dist/InputUI/index.d.ts +7 -0
  56. package/dist/InputUI/index.js +114 -0
  57. package/dist/InputUI/index.scss +24 -0
  58. package/dist/LoadingUI/index.d.ts +4 -0
  59. package/dist/LoadingUI/index.js +13 -0
  60. package/dist/LoadingUI/index.scss +47 -0
  61. package/dist/MessageUI/index.d.ts +3 -0
  62. package/dist/MessageUI/index.js +9 -0
  63. package/dist/MessageUI/index.scss +50 -0
  64. package/dist/ModalUI/index.d.ts +4 -0
  65. package/dist/ModalUI/index.js +98 -0
  66. package/dist/ModalUI/index.scss +45 -0
  67. package/dist/NotificationUI/index.d.ts +3 -0
  68. package/dist/NotificationUI/index.js +30 -0
  69. package/dist/NotificationUI/index.scss +0 -0
  70. package/dist/PasswordStrongUI/index.d.ts +8 -0
  71. package/dist/PasswordStrongUI/index.js +67 -0
  72. package/dist/PasswordStrongUI/index.scss +35 -0
  73. package/dist/RichEditorUI/index.d.ts +10 -0
  74. package/dist/RichEditorUI/index.js +68 -0
  75. package/dist/RichEditorUI/index.scss +20 -0
  76. package/dist/SearchUI/index.d.ts +4 -0
  77. package/dist/SearchUI/index.js +55 -0
  78. package/dist/SearchUI/index.scss +20 -0
  79. package/dist/SelectUI/index.d.ts +13 -0
  80. package/dist/SelectUI/index.js +87 -0
  81. package/dist/SelectUI/index.scss +13 -0
  82. package/dist/StatisticUI/index.d.ts +20 -0
  83. package/dist/StatisticUI/index.js +70 -0
  84. package/dist/StatisticUI/index.scss +6 -0
  85. package/dist/SwitchUI/index.d.ts +4 -0
  86. package/dist/SwitchUI/index.js +24 -0
  87. package/dist/SwitchUI/index.scss +0 -0
  88. package/dist/TableUI/demo/index.scss +7 -0
  89. package/dist/TableUI/demo/setting.d.ts +4 -0
  90. package/dist/TableUI/demo/setting.js +107 -0
  91. package/dist/TableUI/index.d.ts +12 -0
  92. package/dist/TableUI/index.js +109 -0
  93. package/dist/TableUI/index.scss +40 -0
  94. package/dist/TableUI/material/Button/index.d.ts +4 -0
  95. package/dist/TableUI/material/Button/index.js +20 -0
  96. package/dist/TableUI/material/Button/index.scss +35 -0
  97. package/dist/TableUI/material/HideMultipleLines/index.d.ts +4 -0
  98. package/dist/TableUI/material/HideMultipleLines/index.js +48 -0
  99. package/dist/TableUI/material/HideMultipleLines/index.scss +11 -0
  100. package/dist/TableUI/material/MultiLine/index.d.ts +4 -0
  101. package/dist/TableUI/material/MultiLine/index.js +23 -0
  102. package/dist/TableUI/material/MultiLine/index.scss +25 -0
  103. package/dist/TableUI/material/Operate/index.d.ts +3 -0
  104. package/dist/TableUI/material/Operate/index.js +43 -0
  105. package/dist/TableUI/material/Operate/index.scss +25 -0
  106. package/dist/TableUI/material/Setting/index.d.ts +3 -0
  107. package/dist/TableUI/material/Setting/index.js +211 -0
  108. package/dist/TableUI/material/Setting/index.scss +52 -0
  109. package/dist/TagUI/index.d.ts +17 -0
  110. package/dist/TagUI/index.js +118 -0
  111. package/dist/TagUI/index.scss +41 -0
  112. package/dist/TestUI/index.d.ts +3 -0
  113. package/dist/TestUI/index.js +5 -0
  114. package/dist/TestUI/index.scss +0 -0
  115. package/dist/TextUI/index.d.ts +7 -0
  116. package/dist/TextUI/index.js +17 -0
  117. package/dist/TextUI/index.scss +10 -0
  118. package/dist/Tiga/demo/demoQuick.d.ts +3 -0
  119. package/dist/Tiga/demo/demoQuick.js +104 -0
  120. package/dist/Tiga/demo/demoQuickType.d.ts +8 -0
  121. package/dist/Tiga/demo/demoQuickType.js +94 -0
  122. package/dist/Tiga/index.d.ts +4 -0
  123. package/dist/Tiga/index.js +68 -0
  124. package/dist/Tiga/index.scss +0 -0
  125. package/dist/Tiga/material/quickType.d.ts +29 -0
  126. package/dist/Tiga/material/quickType.js +75 -0
  127. package/dist/UploadUI/index.d.ts +23 -0
  128. package/dist/UploadUI/index.js +383 -0
  129. package/dist/UploadUI/index.scss +202 -0
  130. package/dist/UploadUI/type.d.ts +4 -0
  131. package/dist/UploadUI/type.js +30 -0
  132. package/dist/VesselUI/index.d.ts +3 -0
  133. package/dist/VesselUI/index.js +199 -0
  134. package/dist/VesselUI/type.d.ts +64 -0
  135. package/dist/VesselUI/type.js +1 -0
  136. package/dist/VideoPreviewUI/index.d.ts +11 -0
  137. package/dist/VideoPreviewUI/index.js +65 -0
  138. package/dist/VideoPreviewUI/index.scss +32 -0
  139. package/dist/assets/index.d.ts +1 -0
  140. package/dist/assets/index.js +1 -0
  141. package/dist/index.d.ts +34 -0
  142. package/dist/index.js +34 -0
  143. package/package.json +87 -0
@@ -0,0 +1,199 @@
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
+ var _excluded = ["className", "limit", "initialTableData", "initialFilterParams", "pageName", "listType", "getTableDataFn", "RenderHeader", "RenderOperate", "RenderChildren", "filterOptions"];
3
+ 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); }
4
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
5
+ 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; }
6
+ 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; }
7
+ 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; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ 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); }
10
+ 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); } }
11
+ 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); }); }; }
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ 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."); }
14
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+ 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; }
19
+ 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; }
20
+ import { Form } from 'antd';
21
+ import React, { useEffect, useState } from 'react';
22
+ import { FilterUI, MessageUI } from "./..";
23
+ var VesselUI = function VesselUI(props) {
24
+ var _vessel$filterParams3;
25
+ var className = props.className,
26
+ limit = props.limit,
27
+ initialTableData = props.initialTableData,
28
+ initialFilterParams = props.initialFilterParams,
29
+ pageName = props.pageName,
30
+ listType = props.listType,
31
+ getTableDataFn = props.getTableDataFn,
32
+ RenderHeader = props.RenderHeader,
33
+ RenderOperate = props.RenderOperate,
34
+ RenderChildren = props.RenderChildren,
35
+ filterOptions = props.filterOptions,
36
+ otherProps = _objectWithoutProperties(props, _excluded);
37
+ //日期组件form实例
38
+ var _Form$useForm = Form.useForm(),
39
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
40
+ form = _Form$useForm2[0];
41
+ //获取缓存中的筛选数据
42
+ var sessionStorageValue = sessionStorage.getItem(pageName);
43
+ var initial = sessionStorageValue ? JSON.parse(sessionStorageValue) : initialFilterParams;
44
+ //当前容器组件ref
45
+ var _useState = useState(null),
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ container = _useState2[0],
48
+ setContainer = _useState2[1];
49
+ //页面状态 loading 为请求中
50
+ var _useState3 = useState('loading'),
51
+ _useState4 = _slicedToArray(_useState3, 2),
52
+ pageStatus = _useState4[0],
53
+ setPageStatus = _useState4[1];
54
+ //当前组件的配置项
55
+ var _useState5 = useState({
56
+ limit: limit,
57
+ // 是否批量
58
+ choice: false,
59
+ // 批量的值
60
+ multipleChoice: [],
61
+ // 搜索条件
62
+ filterParams: initial,
63
+ // 表格设置状态
64
+ tableSetStatus: false,
65
+ //表头
66
+ headerList: initialTableData
67
+ }),
68
+ _useState6 = _slicedToArray(_useState5, 2),
69
+ vessel = _useState6[0],
70
+ setVessel = _useState6[1];
71
+ // 表格数据
72
+ var _useState7 = useState(),
73
+ _useState8 = _slicedToArray(_useState7, 2),
74
+ tableData = _useState8[0],
75
+ setTableData = _useState8[1];
76
+
77
+ // 获取表格数据
78
+ var getTableData = /*#__PURE__*/function () {
79
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
80
+ var _vessel$filterParams, _vessel$filterParams2;
81
+ var _yield, code, body, msg;
82
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
83
+ while (1) switch (_context.prev = _context.next) {
84
+ case 0:
85
+ setPageStatus('loading');
86
+ sessionStorage.setItem(pageName, JSON.stringify(_objectSpread({}, vessel === null || vessel === void 0 ? void 0 : vessel.filterParams)));
87
+ _context.next = 4;
88
+ return listType ? getTableDataFn(listType !== null && listType !== void 0 ? listType : '', (_vessel$filterParams = vessel === null || vessel === void 0 ? void 0 : vessel.filterParams) !== null && _vessel$filterParams !== void 0 ? _vessel$filterParams : {}) : getTableDataFn((_vessel$filterParams2 = vessel === null || vessel === void 0 ? void 0 : vessel.filterParams) !== null && _vessel$filterParams2 !== void 0 ? _vessel$filterParams2 : {});
89
+ case 4:
90
+ _yield = _context.sent;
91
+ code = _yield.code;
92
+ body = _yield.body;
93
+ msg = _yield.msg;
94
+ setPageStatus('');
95
+ if (code === '0') {
96
+ setTableData(body);
97
+ } else {
98
+ MessageUI.error(msg);
99
+ }
100
+ case 10:
101
+ case "end":
102
+ return _context.stop();
103
+ }
104
+ }, _callee);
105
+ }));
106
+ return function getTableData() {
107
+ return _ref.apply(this, arguments);
108
+ };
109
+ }();
110
+ useEffect(function () {
111
+ if (getTableDataFn) {
112
+ getTableData();
113
+ form.setFieldsValue(_objectSpread({}, vessel === null || vessel === void 0 ? void 0 : vessel.filterParams));
114
+ }
115
+ }, [vessel === null || vessel === void 0 ? void 0 : vessel.filterParams]);
116
+
117
+ //获取日期类型字段
118
+ var getDateKeys = function getDateKeys(options) {
119
+ return options.filter(function (option) {
120
+ return (option === null || option === void 0 ? void 0 : option.type) === 'datePicker';
121
+ }).map(function (item) {
122
+ return {
123
+ key: item === null || item === void 0 ? void 0 : item.key,
124
+ startKey: item === null || item === void 0 ? void 0 : item.startKey,
125
+ endKey: item === null || item === void 0 ? void 0 : item.endKey
126
+ };
127
+ });
128
+ };
129
+
130
+ //筛选组件值改变时
131
+ var onFilterValuesChange = function onFilterValuesChange(_, allValues) {
132
+ var newFilterParams = _objectSpread(_objectSpread({}, initialFilterParams), allValues);
133
+ var dateKeys = getDateKeys(filterOptions);
134
+ dateKeys.forEach(function (_ref2) {
135
+ var _allValues$key$, _allValues$key, _allValues$key$2, _allValues$key2;
136
+ var key = _ref2.key,
137
+ startKey = _ref2.startKey,
138
+ endKey = _ref2.endKey;
139
+ newFilterParams[startKey] = (_allValues$key$ = allValues === null || allValues === void 0 || (_allValues$key = allValues[key]) === null || _allValues$key === void 0 ? void 0 : _allValues$key[0]) !== null && _allValues$key$ !== void 0 ? _allValues$key$ : undefined;
140
+ newFilterParams[endKey] = (_allValues$key$2 = allValues === null || allValues === void 0 || (_allValues$key2 = allValues[key]) === null || _allValues$key2 === void 0 ? void 0 : _allValues$key2[1]) !== null && _allValues$key$2 !== void 0 ? _allValues$key$2 : undefined;
141
+ });
142
+ setVessel(_objectSpread(_objectSpread({}, vessel), {}, {
143
+ filterParams: newFilterParams
144
+ }));
145
+ };
146
+ //筛选组件点击重置时
147
+ var clickReset = function clickReset() {
148
+ setVessel(_objectSpread(_objectSpread({}, vessel), {}, {
149
+ filterParams: _objectSpread({}, initialFilterParams)
150
+ }));
151
+ };
152
+ return /*#__PURE__*/React.createElement("div", {
153
+ className: "publicVessel ".concat(className !== null && className !== void 0 ? className : ''),
154
+ ref: setContainer,
155
+ onClick: function onClick() {
156
+ return (vessel === null || vessel === void 0 ? void 0 : vessel.tableSetStatus) && setVessel(_objectSpread(_objectSpread({}, vessel), {}, {
157
+ tableSetStatus: false
158
+ }));
159
+ }
160
+ }, RenderHeader && /*#__PURE__*/React.createElement("div", {
161
+ className: "publicVessel-header"
162
+ }, RenderHeader === 'filter' ? /*#__PURE__*/React.createElement(FilterUI, {
163
+ form: form,
164
+ filterOptions: filterOptions,
165
+ filterParams: (_vessel$filterParams3 = vessel === null || vessel === void 0 ? void 0 : vessel.filterParams) !== null && _vessel$filterParams3 !== void 0 ? _vessel$filterParams3 : {},
166
+ moreFilters: vessel === null || vessel === void 0 ? void 0 : vessel.moreFilters,
167
+ setMoreFilters: function setMoreFilters(value) {
168
+ return setVessel(_objectSpread(_objectSpread({}, vessel), {}, {
169
+ moreFilters: value
170
+ }));
171
+ },
172
+ onValuesChange: onFilterValuesChange,
173
+ clickReset: clickReset,
174
+ container: container
175
+ }) : /*#__PURE__*/React.createElement(RenderHeader, _extends({
176
+ vessel: vessel,
177
+ setVessel: setVessel,
178
+ container: container
179
+ }, otherProps))), /*#__PURE__*/React.createElement("div", {
180
+ className: "publicVessel-content"
181
+ }, RenderOperate && /*#__PURE__*/React.createElement(RenderOperate, _extends({
182
+ vessel: vessel,
183
+ setVessel: setVessel,
184
+ tableData: tableData,
185
+ pageName: pageName,
186
+ getTableData: getTableData,
187
+ getTableDataFn: getTableDataFn,
188
+ listType: listType
189
+ }, otherProps)), /*#__PURE__*/React.createElement("div", {
190
+ className: "publicVessel-content-vessel"
191
+ }, RenderChildren && /*#__PURE__*/React.createElement(RenderChildren, _extends({
192
+ vessel: vessel,
193
+ setVessel: setVessel,
194
+ tableData: tableData,
195
+ getTableData: getTableData,
196
+ pageStatus: pageStatus
197
+ }, otherProps)))));
198
+ };
199
+ export default VesselUI;
@@ -0,0 +1,64 @@
1
+ export interface TableHeaderItem {
2
+ sort?: number;
3
+ id?: number;
4
+ key?: string;
5
+ name?: string;
6
+ selected?: boolean;
7
+ disable?: boolean;
8
+ title?: string;
9
+ dataIndex?: string;
10
+ width?: number;
11
+ fixed?: string;
12
+ render?: unknown;
13
+ type?: string;
14
+ transform?: any;
15
+ }
16
+ export interface ResourceList {
17
+ resourceId: number;
18
+ resourceName?: string;
19
+ key?: string;
20
+ element?: any;
21
+ }
22
+ export interface FilterParamsType {
23
+ page?: number;
24
+ size?: number;
25
+ searchField?: string;
26
+ startDate?: string;
27
+ endDate?: string;
28
+ zoneId?: number;
29
+ companyId?: number;
30
+ operateId?: number;
31
+ saleId?: number;
32
+ agentName?: string;
33
+ firstIndustryId?: number;
34
+ secondIndustryId?: number;
35
+ status?: number;
36
+ agentLevel?: number;
37
+ sortInfoList?: {
38
+ order: string;
39
+ sortBy: string;
40
+ }[];
41
+ exportColumn?: any[];
42
+ globalNo?: number;
43
+ checkStatus?: number;
44
+ exportId?: any[];
45
+ exportIdName?: string;
46
+ name?: string;
47
+ accountType?: number;
48
+ subType?: number;
49
+ [key: string]: any;
50
+ }
51
+ export interface Vessel {
52
+ tabType?: string;
53
+ limit: ResourceList[] | [];
54
+ choice?: boolean;
55
+ multipleChoice?: string[] | number[] | [];
56
+ tableSetStatus?: boolean;
57
+ filterParams?: FilterParamsType;
58
+ headerList?: TableHeaderItem[];
59
+ tabOneheaderList?: TableHeaderItem[];
60
+ tabTwoheaderList?: TableHeaderItem[];
61
+ tabThreeheaderList?: TableHeaderItem[];
62
+ tabFourheaderList?: TableHeaderItem[];
63
+ moreFilters?: boolean;
64
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ interface PropsType {
4
+ videoUrl: string;
5
+ frameTime?: number;
6
+ fallback?: string;
7
+ alt?: string;
8
+ onClick?: () => void;
9
+ }
10
+ declare const VideoPreviewUI: (props: PropsType) => React.JSX.Element;
11
+ export default VideoPreviewUI;
@@ -0,0 +1,65 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ 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); }); }; }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import React, { useEffect, useState } from 'react';
12
+ import { IconUI } from "./..";
13
+ import { video_preview } from 'sic-util';
14
+ import "./index.scss";
15
+ var VideoPreviewUI = function VideoPreviewUI(props) {
16
+ var videoUrl = props.videoUrl,
17
+ _props$frameTime = props.frameTime,
18
+ frameTime = _props$frameTime === void 0 ? 0.1 : _props$frameTime,
19
+ _props$fallback = props.fallback,
20
+ fallback = _props$fallback === void 0 ? '' : _props$fallback,
21
+ _props$alt = props.alt,
22
+ alt = _props$alt === void 0 ? '视频预览图' : _props$alt,
23
+ onClick = props.onClick;
24
+ var _useState = useState(''),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ previewUrl = _useState2[0],
27
+ setPreviewUrl = _useState2[1];
28
+ var getVideoPreview = /*#__PURE__*/function () {
29
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
30
+ var base64;
31
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
32
+ while (1) switch (_context.prev = _context.next) {
33
+ case 0:
34
+ _context.next = 2;
35
+ return video_preview(videoUrl, frameTime);
36
+ case 2:
37
+ base64 = _context.sent;
38
+ setPreviewUrl(base64 || fallback);
39
+ case 4:
40
+ case "end":
41
+ return _context.stop();
42
+ }
43
+ }, _callee);
44
+ }));
45
+ return function getVideoPreview() {
46
+ return _ref.apply(this, arguments);
47
+ };
48
+ }();
49
+ useEffect(function () {
50
+ if (videoUrl) getVideoPreview();
51
+ }, [videoUrl]);
52
+ return /*#__PURE__*/React.createElement("div", {
53
+ className: "videoPreviewUI",
54
+ onClick: onClick
55
+ }, previewUrl && /*#__PURE__*/React.createElement("img", {
56
+ className: "videoPreviewUI-img",
57
+ src: previewUrl,
58
+ alt: alt
59
+ }), /*#__PURE__*/React.createElement("div", {
60
+ className: "videoPreviewUI-mask"
61
+ }, /*#__PURE__*/React.createElement(IconUI, {
62
+ name: "Play"
63
+ })));
64
+ };
65
+ export default VideoPreviewUI;
@@ -0,0 +1,32 @@
1
+ .videoPreviewUI {
2
+ width: 100%;
3
+ height: 100%;
4
+ position: relative;
5
+ cursor: pointer;
6
+
7
+ &-img {
8
+ width: 100%;
9
+ height: 100%;
10
+ object-fit: contain;
11
+ }
12
+ &-mask {
13
+ position: absolute;
14
+ top: 0;
15
+ left: 0;
16
+ width: 100%;
17
+ height: 100%;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ background: rgba(0, 0, 0, 0.25);
22
+ .i-icon {
23
+ color: #fff;
24
+ font-size: 60px;
25
+ }
26
+ }
27
+ }
28
+ .videoPreviewUI:hover {
29
+ .videoPreviewUI-mask .i-icon {
30
+ color: var(--themeColor);
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,34 @@
1
+ import '@icon-park/react/styles/index.css';
2
+ export * from 'antd';
3
+ export { default as AmountCellUI } from './AmountCellUI';
4
+ export { default as AnchorUI } from './AnchorUI';
5
+ export { default as BackUI } from './BackUI';
6
+ export { default as BroadcastUI } from './BroadcastUI';
7
+ export { default as ButtonUI } from './ButtonUI';
8
+ export { default as CellUI } from './CellUI';
9
+ export { default as DateUI } from './DateUI';
10
+ export { default as DescriptionsUI } from './DescriptionsUI';
11
+ export { default as EmptyUI } from './EmptyUI';
12
+ export { default as FilterUI } from './FilterUI';
13
+ export { default as FormUI } from './FormUI';
14
+ export { default as IconUI } from './IconUI';
15
+ export { default as ImageUI } from './ImageUI';
16
+ export { default as InputUI } from './InputUI';
17
+ export { default as LoadingUI } from './LoadingUI';
18
+ export { default as MessageUI } from './MessageUI';
19
+ export { default as ModalUI } from './ModalUI';
20
+ export { default as NotificationUI } from './NotificationUI';
21
+ export { default as PasswordStrongUI } from './PasswordStrongUI';
22
+ export { default as RichEditorUI } from './RichEditorUI';
23
+ export { default as SearchUI } from './SearchUI';
24
+ export { default as SelectUI } from './SelectUI';
25
+ export { default as StatisticUI } from './StatisticUI';
26
+ export { default as SwitchUI } from './SwitchUI';
27
+ export { default as TableUI } from './TableUI';
28
+ export { default as TagUI } from './TagUI';
29
+ export { default as TestUI } from './TestUI';
30
+ export { default as TextUI } from './TextUI';
31
+ export { default as Tiga } from './Tiga';
32
+ export { default as UploadUI } from './UploadUI';
33
+ export { default as VesselUI } from './VesselUI';
34
+ export { default as VideoPreviewUI } from './VideoPreviewUI';
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
1
+ import '@icon-park/react/styles/index.css';
2
+ export * from 'antd';
3
+ export { default as AmountCellUI } from "./AmountCellUI";
4
+ export { default as AnchorUI } from "./AnchorUI";
5
+ export { default as BackUI } from "./BackUI";
6
+ export { default as BroadcastUI } from "./BroadcastUI";
7
+ export { default as ButtonUI } from "./ButtonUI";
8
+ export { default as CellUI } from "./CellUI";
9
+ export { default as DateUI } from "./DateUI";
10
+ export { default as DescriptionsUI } from "./DescriptionsUI";
11
+ export { default as EmptyUI } from "./EmptyUI";
12
+ export { default as FilterUI } from "./FilterUI";
13
+ export { default as FormUI } from "./FormUI";
14
+ export { default as IconUI } from "./IconUI";
15
+ export { default as ImageUI } from "./ImageUI";
16
+ export { default as InputUI } from "./InputUI";
17
+ export { default as LoadingUI } from "./LoadingUI";
18
+ export { default as MessageUI } from "./MessageUI";
19
+ export { default as ModalUI } from "./ModalUI";
20
+ export { default as NotificationUI } from "./NotificationUI";
21
+ export { default as PasswordStrongUI } from "./PasswordStrongUI";
22
+ export { default as RichEditorUI } from "./RichEditorUI";
23
+ export { default as SearchUI } from "./SearchUI";
24
+ export { default as SelectUI } from "./SelectUI";
25
+ export { default as StatisticUI } from "./StatisticUI";
26
+ export { default as SwitchUI } from "./SwitchUI";
27
+ export { default as TableUI } from "./TableUI";
28
+ export { default as TagUI } from "./TagUI";
29
+ export { default as TestUI } from "./TestUI";
30
+ export { default as TextUI } from "./TextUI";
31
+ export { default as Tiga } from "./Tiga";
32
+ export { default as UploadUI } from "./UploadUI";
33
+ export { default as VesselUI } from "./VesselUI";
34
+ export { default as VideoPreviewUI } from "./VideoPreviewUI";
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "gxxc-ui",
3
+ "version": "1.0.0",
4
+ "description": "A react library developed with dumi",
5
+ "license": "MIT",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "dev": "dumi dev",
15
+ "docs:build": "dumi build",
16
+ "docs:preview": "dumi preview",
17
+ "doctor": "father doctor",
18
+ "lint": "npm run lint:es && npm run lint:css",
19
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
+ "prepare": "husky install && dumi setup",
22
+ "prepublishOnly": "father doctor && npm run build",
23
+ "start": "npm run dev"
24
+ },
25
+ "lint-staged": {
26
+ "*.{md,json}": [
27
+ "prettier --write --no-error-on-unmatched-pattern"
28
+ ],
29
+ "*.{css,less}": [
30
+ "stylelint --fix",
31
+ "prettier --write"
32
+ ],
33
+ "*.{js,jsx}": [
34
+ "eslint --fix",
35
+ "prettier --write"
36
+ ],
37
+ "*.{ts,tsx}": [
38
+ "eslint --fix",
39
+ "prettier --parser=typescript --write"
40
+ ]
41
+ },
42
+ "dependencies": {
43
+ "@ant-design/icons": "^5.6.1",
44
+ "@dnd-kit/core": "^6.1.0",
45
+ "@dnd-kit/modifiers": "^7.0.0",
46
+ "@dnd-kit/sortable": "^8.0.0",
47
+ "@dnd-kit/utilities": "^3.2.2",
48
+ "@icon-park/react": "^1.4.2",
49
+ "@wangeditor/editor": "^5.1.23",
50
+ "@wangeditor/editor-for-react": "^1.0.6",
51
+ "antd": "^5.26.2",
52
+ "dayjs": "^1.11.11",
53
+ "lodash": "^4.17.21",
54
+ "react-countup": "^6.5.3",
55
+ "react-draggable": "^4.4.6",
56
+ "react-router-dom": "^6.13.0",
57
+ "sic-util": "^0.2.8"
58
+ },
59
+ "devDependencies": {
60
+ "@commitlint/cli": "^17.1.2",
61
+ "@commitlint/config-conventional": "^17.1.0",
62
+ "@types/crypto-js": "^4.2.1",
63
+ "@types/lodash": "^4.17.17",
64
+ "@types/react": "^18.0.0",
65
+ "@types/react-dom": "^18.0.0",
66
+ "@umijs/lint": "^4.0.0",
67
+ "dumi": "^2.4.13",
68
+ "eslint": "^8.23.0",
69
+ "father": "^4.1.0",
70
+ "husky": "^8.0.1",
71
+ "lint-staged": "^13.0.3",
72
+ "prettier": "^2.7.1",
73
+ "prettier-plugin-organize-imports": "^3.0.0",
74
+ "prettier-plugin-packagejson": "^2.2.18",
75
+ "react": "^18.0.0",
76
+ "react-dom": "^18.0.0",
77
+ "stylelint": "^14.9.1"
78
+ },
79
+ "peerDependencies": {
80
+ "react": ">=16.9.0",
81
+ "react-dom": ">=16.9.0"
82
+ },
83
+ "publishConfig": {
84
+ "access": "public"
85
+ },
86
+ "authors": []
87
+ }