@pisell/private-materials 6.3.33 → 6.3.35

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 (175) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +23 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -8
  11. package/es/components/booking/addons/model.d.ts +10 -1
  12. package/es/components/booking/components/customSelect/index.js +18 -3
  13. package/es/components/booking/forms/model.d.ts +10 -1
  14. package/es/components/booking/info/model.d.ts +10 -1
  15. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  16. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/model.d.ts +9 -1
  18. package/es/components/booking/notes/model.d.ts +10 -1
  19. package/es/components/booking/payments/model.d.ts +10 -1
  20. package/es/components/index.d.ts +1 -2
  21. package/es/components/index.js +1 -2
  22. package/es/components/pay/toC/model.d.ts +9 -1
  23. package/es/components/schedules/model.d.ts +9 -1
  24. package/es/components/wallet/Detail/model.d.ts +13 -1
  25. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  26. package/es/components/wallet/PointCard/model.d.ts +13 -1
  27. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  28. package/es/components/wallet/Voucher/model.d.ts +13 -1
  29. package/es/components/wallet/model.d.ts +9 -1
  30. package/es/components/walletList/index.d.ts +0 -25
  31. package/es/components/walletList/index.js +98 -66
  32. package/es/components/walletList/serve.d.ts +4 -0
  33. package/es/components/walletList/serve.js +46 -13
  34. package/es/components/walletList/types/index.d.ts +12 -12
  35. package/es/components/walletList/types/index.js +2 -2
  36. package/es/index.d.ts +2 -1
  37. package/es/index.js +2 -1
  38. package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  39. package/es/plus/productSelect/CategoryTabs/index.js +6 -3
  40. package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  41. package/es/plus/productSelect/utils.js +0 -1
  42. package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
  43. package/es/plus/walletEditor/WalletEditor.js +316 -0
  44. package/es/plus/walletEditor/WalletEditor.less +129 -0
  45. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  46. package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
  47. package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  48. package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
  49. package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
  50. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  51. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
  52. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  53. package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  54. package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
  55. package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
  56. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  57. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
  58. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  59. package/es/plus/walletEditor/index.d.ts +3 -0
  60. package/es/plus/walletEditor/index.js +3 -0
  61. package/es/plus/walletEditor/locales.d.ts +126 -0
  62. package/es/plus/walletEditor/locales.js +143 -0
  63. package/es/plus/walletEditor/types.d.ts +52 -0
  64. package/es/plus/walletEditor/types.js +1 -0
  65. package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  66. package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
  67. package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
  68. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  69. package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
  70. package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
  71. package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
  72. package/es/plus/walletPassGallery/components/passList/index.js +115 -0
  73. package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  74. package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
  75. package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
  76. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
  77. package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
  78. package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  79. package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  80. package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
  81. package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
  82. package/es/plus/walletPassGallery/index.d.ts +6 -0
  83. package/es/plus/walletPassGallery/index.js +602 -0
  84. package/es/plus/walletPassGallery/index.less +115 -0
  85. package/es/plus/walletPassGallery/locales.d.ts +270 -0
  86. package/es/plus/walletPassGallery/locales.js +279 -0
  87. package/es/plus/walletPassGallery/serve.d.ts +218 -0
  88. package/es/plus/walletPassGallery/serve.js +289 -0
  89. package/es/pro/Login2.0/Login2.js +8 -1
  90. package/es/pro/Login2.0/locales.js +93 -93
  91. package/lib/components/booking/addons/model.d.ts +10 -1
  92. package/lib/components/booking/components/customSelect/index.js +22 -3
  93. package/lib/components/booking/forms/model.d.ts +10 -1
  94. package/lib/components/booking/info/model.d.ts +10 -1
  95. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  96. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  97. package/lib/components/booking/model.d.ts +9 -1
  98. package/lib/components/booking/notes/model.d.ts +10 -1
  99. package/lib/components/booking/payments/model.d.ts +10 -1
  100. package/lib/components/index.d.ts +1 -2
  101. package/lib/components/index.js +0 -3
  102. package/lib/components/pay/toC/model.d.ts +9 -1
  103. package/lib/components/schedules/model.d.ts +9 -1
  104. package/lib/components/wallet/Detail/model.d.ts +13 -1
  105. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  106. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  107. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  108. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  109. package/lib/components/wallet/model.d.ts +9 -1
  110. package/lib/components/walletList/index.d.ts +0 -25
  111. package/lib/components/walletList/index.js +90 -51
  112. package/lib/components/walletList/serve.d.ts +4 -0
  113. package/lib/components/walletList/serve.js +12 -0
  114. package/lib/components/walletList/types/index.d.ts +12 -12
  115. package/lib/index.d.ts +2 -1
  116. package/lib/index.js +6 -3
  117. package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  118. package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
  119. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  120. package/lib/plus/productSelect/utils.js +0 -1
  121. package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
  122. package/lib/plus/walletEditor/WalletEditor.js +354 -0
  123. package/lib/plus/walletEditor/WalletEditor.less +129 -0
  124. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  125. package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
  126. package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  127. package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
  128. package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
  129. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  130. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
  131. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  132. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  133. package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
  134. package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
  135. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  136. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
  137. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  138. package/lib/plus/walletEditor/index.d.ts +3 -0
  139. package/lib/plus/walletEditor/index.js +42 -0
  140. package/lib/plus/walletEditor/locales.d.ts +126 -0
  141. package/lib/plus/walletEditor/locales.js +167 -0
  142. package/lib/plus/walletEditor/types.d.ts +52 -0
  143. package/lib/plus/walletEditor/types.js +17 -0
  144. package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  145. package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
  146. package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
  147. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  148. package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
  149. package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
  150. package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
  151. package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
  152. package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  153. package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
  154. package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
  155. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
  156. package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
  157. package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  158. package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  159. package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
  160. package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
  161. package/lib/plus/walletPassGallery/index.d.ts +6 -0
  162. package/lib/plus/walletPassGallery/index.js +498 -0
  163. package/lib/plus/walletPassGallery/index.less +115 -0
  164. package/lib/plus/walletPassGallery/locales.d.ts +270 -0
  165. package/lib/plus/walletPassGallery/locales.js +299 -0
  166. package/lib/plus/walletPassGallery/serve.d.ts +218 -0
  167. package/lib/plus/walletPassGallery/serve.js +98 -0
  168. package/lib/pro/Login2.0/Login2.js +6 -0
  169. package/lib/pro/Login2.0/locales.js +93 -93
  170. package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
  171. package/lowcode/wallet-editor/meta.ts +57 -0
  172. package/lowcode/wallet-editor/snippets.ts +13 -0
  173. package/lowcode/wallet-pass-gallery/meta.ts +35 -0
  174. package/package.json +3 -3
  175. package/lowcode/wallet/meta.ts +0 -79
@@ -0,0 +1,134 @@
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 { Drawer, Button } from 'antd';
13
+ import { locales } from '@pisell/utils';
14
+ import { PisellCard, PisellText } from '@pisell/materials';
15
+ import useEngineContext from "../../../../hooks/useEngineContext";
16
+ import { orderRechargeProduct } from "../../serve";
17
+ import "./index.less";
18
+ var Recharge = function Recharge(_ref) {
19
+ var _context$appHelper, _context$appHelper2, _context$appHelper2$g, _dvaStore$core;
20
+ var _ref$platform = _ref.platform,
21
+ platform = _ref$platform === void 0 ? 'pc' : _ref$platform,
22
+ detailData = _ref.detailData,
23
+ open = _ref.open,
24
+ onClose = _ref.onClose;
25
+ var _useState = useState({}),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ chargeItem = _useState2[0],
28
+ setChargeItem = _useState2[1];
29
+ var context = useEngineContext();
30
+ var _ref2 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
31
+ action = _ref2.action,
32
+ storage = _ref2.storage;
33
+ var dvaStore = (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2$g = _context$appHelper2.getStore) === null || _context$appHelper2$g === void 0 || (_context$appHelper2$g = _context$appHelper2$g.call(_context$appHelper2)) === null || _context$appHelper2$g === void 0 ? void 0 : _context$appHelper2$g.getState();
34
+ var shop = (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 || (_dvaStore$core = _dvaStore$core.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.shop) || {};
35
+ useEffect(function () {
36
+ if (detailData) {
37
+ setChargeItem(((detailData === null || detailData === void 0 ? void 0 : detailData.gift_option) || [])[0]);
38
+ }
39
+ }, [detailData]);
40
+ var handleRecharge = /*#__PURE__*/function () {
41
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
42
+ var params, data, _storage$set;
43
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
44
+ while (1) switch (_context.prev = _context.next) {
45
+ case 0:
46
+ _context.prev = 0;
47
+ params = {
48
+ voucher_id: (detailData === null || detailData === void 0 ? void 0 : detailData.id) || '',
49
+ product_id: (detailData === null || detailData === void 0 ? void 0 : detailData.product_id) || '',
50
+ product_variant_id: (chargeItem === null || chargeItem === void 0 ? void 0 : chargeItem.variant_id) || '',
51
+ quantity: 1,
52
+ type: 'virtual',
53
+ platform: 'h5',
54
+ currency_code: {
55
+ currency_code: (shop === null || shop === void 0 ? void 0 : shop.currency_code) || '',
56
+ currency_symbol: (shop === null || shop === void 0 ? void 0 : shop.currency_symbol) || '',
57
+ currency_format: (shop === null || shop === void 0 ? void 0 : shop.currency_format) || ''
58
+ }
59
+ };
60
+ _context.next = 4;
61
+ return orderRechargeProduct(params);
62
+ case 4:
63
+ data = _context.sent;
64
+ if (data !== null && data !== void 0 && data.order_id) {
65
+ storage === null || storage === void 0 || (_storage$set = storage.set) === null || _storage$set === void 0 || _storage$set.call(storage, 'orderId', data.order_id);
66
+ action && action({
67
+ type: 'pisell1.payment',
68
+ data: data,
69
+ callback: function callback() {}
70
+ });
71
+ }
72
+ _context.next = 11;
73
+ break;
74
+ case 8:
75
+ _context.prev = 8;
76
+ _context.t0 = _context["catch"](0);
77
+ console.error(locales.getText('wallet-pass-gallery.log.rechargeOrderFailed'), _context.t0);
78
+ case 11:
79
+ case "end":
80
+ return _context.stop();
81
+ }
82
+ }, _callee, null, [[0, 8]]);
83
+ }));
84
+ return function handleRecharge() {
85
+ return _ref3.apply(this, arguments);
86
+ };
87
+ }();
88
+ return /*#__PURE__*/React.createElement(Drawer, {
89
+ title: locales.getText('wallet-pass-gallery.rechargeOptions'),
90
+ open: open,
91
+ zIndex: 999,
92
+ onClose: onClose,
93
+ width: 375,
94
+ placement: platform === 'pc' ? 'right' : 'bottom',
95
+ footer: /*#__PURE__*/React.createElement(Button, {
96
+ type: "primary",
97
+ block: true,
98
+ size: "large",
99
+ onClick: handleRecharge,
100
+ disabled: !(chargeItem !== null && chargeItem !== void 0 && chargeItem.id)
101
+ }, locales.getText('wallet-pass-gallery.recharge'))
102
+ }, /*#__PURE__*/React.createElement("div", {
103
+ className: "pisell-wallet-pass-gallery_recharge"
104
+ }, /*#__PURE__*/React.createElement("div", {
105
+ className: "pisell-wallet-pass-gallery_recharge-options"
106
+ }, ((detailData === null || detailData === void 0 ? void 0 : detailData.gift_option) || []).map(function (item) {
107
+ return /*#__PURE__*/React.createElement("div", {
108
+ key: item.id,
109
+ className: "pisell-wallet-pass-gallery_recharge-card-item",
110
+ onClick: function onClick() {
111
+ return setChargeItem(item);
112
+ }
113
+ }, /*#__PURE__*/React.createElement(PisellCard, {
114
+ className: "pisell-card-item ".concat(item.id === (chargeItem === null || chargeItem === void 0 ? void 0 : chargeItem.id) ? 'pisell-card-selected' : '')
115
+ }, /*#__PURE__*/React.createElement("div", {
116
+ className: "card-content"
117
+ }, /*#__PURE__*/React.createElement("div", {
118
+ className: "card-content-left"
119
+ }, /*#__PURE__*/React.createElement("p", {
120
+ className: "pisell-card-amount-item-name"
121
+ }, item.name), /*#__PURE__*/React.createElement(PisellText.Amount, {
122
+ showCurrencySymbol: true,
123
+ className: "pisell-card-amount-item-value",
124
+ useThousandsSeparator: true,
125
+ value: item.gift_price
126
+ })), /*#__PURE__*/React.createElement(PisellText.Amount, {
127
+ showCurrencySymbol: true,
128
+ className: "pisell-card-amount-item-value",
129
+ useThousandsSeparator: true,
130
+ value: item.price
131
+ }))));
132
+ }))));
133
+ };
134
+ export default Recharge;
@@ -0,0 +1,16 @@
1
+ .pisell-wallet-pass-gallery_recharge {
2
+ &-options {
3
+ display: grid;
4
+ grid-template-columns: 1fr;
5
+ gap: 12px;
6
+ }
7
+
8
+ &-card-item {
9
+ cursor: pointer;
10
+ }
11
+
12
+ .pisell-card-selected {
13
+ border: 1px solid var(--theme-color, #7f56d9);
14
+ background: var(--Primary-50, #f9f5ff);
15
+ }
16
+ }
@@ -0,0 +1,8 @@
1
+ import './index.less';
2
+ interface TimelineSectionProps {
3
+ code: string;
4
+ tag: string;
5
+ timezone: string;
6
+ }
7
+ declare const TimelineSection: (props: TimelineSectionProps) => JSX.Element;
8
+ export default TimelineSection;
@@ -0,0 +1,176 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useMemo, useCallback } from 'react';
8
+ import { useRequest } from 'ahooks';
9
+ import dayjs from 'dayjs';
10
+ import timezonePlugin from 'dayjs/plugin/timezone';
11
+ import utcPlugin from 'dayjs/plugin/utc';
12
+ import { locales } from '@pisell/utils';
13
+ import { Timeline, Skeleton, PisellEmpty, usePisellConfig, PisellModal, PisellStatisticList, Button } from '@pisell/materials';
14
+ import { getAssetList } from "../../serve";
15
+ import "./index.less";
16
+ dayjs.extend(timezonePlugin);
17
+ dayjs.extend(utcPlugin);
18
+ var stateTimeUnix = 1723255863; // 2024.8.10 时间戳
19
+ var TimelineSection = function TimelineSection(props) {
20
+ var code = props.code,
21
+ tag = props.tag,
22
+ timezone = props.timezone;
23
+ var _usePisellConfig = usePisellConfig(),
24
+ _usePisellConfig$symb = _usePisellConfig.symbol,
25
+ symbol = _usePisellConfig$symb === void 0 ? '$' : _usePisellConfig$symb;
26
+ var _React$useState = React.useState(false),
27
+ _React$useState2 = _slicedToArray(_React$useState, 2),
28
+ isShowtimeLineDetail = _React$useState2[0],
29
+ setIsShowtimeLineDetail = _React$useState2[1];
30
+ var _React$useState3 = React.useState(true),
31
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
32
+ isSpending = _React$useState4[0],
33
+ setIsSpending = _React$useState4[1];
34
+ var _React$useState5 = React.useState(null),
35
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
36
+ timeLineDetail = _React$useState6[0],
37
+ setTimeLineDetail = _React$useState6[1];
38
+ var assetActionEnum = useMemo(function () {
39
+ return {
40
+ recharge: tag === 'point_card' ? locales.getText('wallet-pass-gallery.pointsEarned') : locales.getText('wallet-pass-gallery.recharge'),
41
+ order_expend: tag === 'point_card' ? locales.getText('wallet-pass-gallery.pointsRedeemed') : locales.getText('wallet-pass-gallery.spending'),
42
+ order_refund: locales.getText('wallet-pass-gallery.refund'),
43
+ expire: locales.getText('wallet-pass-gallery.expire')
44
+ };
45
+ }, [tag]);
46
+ var formatCurrencyAmount = useCallback(function () {
47
+ var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
48
+ var isNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
49
+ if (!amount) return '';
50
+ if (tag === 'good_pass') return locales.getText('wallet-pass-gallery.goodPass.usedCredit')(parseInt(amount));
51
+ var absAmount = amount.startsWith('-') ? amount.substring(1) : amount;
52
+ var showSymbol = !['point_card', 'good_pass'].includes(tag);
53
+ return isNegative ? "-".concat(showSymbol ? symbol : '').concat(absAmount) : "".concat(showSymbol ? symbol : '').concat(amount);
54
+ }, [symbol, tag]);
55
+ var timeTreeNode = useCallback(function (data) {
56
+ var _data$action = data.action,
57
+ action = _data$action === void 0 ? '' : _data$action,
58
+ _data$created_at = data.created_at,
59
+ created_at = _data$created_at === void 0 ? '' : _data$created_at,
60
+ _data$amount = data.amount,
61
+ amount = _data$amount === void 0 ? '' : _data$amount,
62
+ _data$currency_symbol = data.currency_symbol,
63
+ currency_symbol = _data$currency_symbol === void 0 ? '' : _data$currency_symbol;
64
+ return /*#__PURE__*/React.createElement("div", {
65
+ className: "pisell-wallet-pass-gallery_timeline-node"
66
+ }, /*#__PURE__*/React.createElement("div", {
67
+ className: "pisell-wallet-pass-gallery_timeline-node-left"
68
+ }, /*#__PURE__*/React.createElement("p", {
69
+ className: "pisell-wallet-pass-gallery_timeline-node-action"
70
+ }, action ? assetActionEnum[action] : ''), created_at && /*#__PURE__*/React.createElement("p", {
71
+ className: "pisell-wallet-pass-gallery_timeline-node-time"
72
+ }, created_at, (action === 'recharge' || action === 'order_expend') && /*#__PURE__*/React.createElement("button", {
73
+ type: "button",
74
+ className: "pisell-wallet-pass-gallery_timeline-node-detail-link",
75
+ onClick: function onClick() {
76
+ setIsShowtimeLineDetail(true);
77
+ setIsSpending(action === 'order_expend');
78
+ setTimeLineDetail(data);
79
+ },
80
+ style: {
81
+ background: 'transparent',
82
+ border: 'none',
83
+ padding: 0
84
+ }
85
+ }, locales.getText('wallet-pass-gallery.viewDetails')))), /*#__PURE__*/React.createElement("div", {
86
+ className: "pisell-wallet-pass-gallery_timeline-node-amount".concat(action === 'recharge' ? ' pisell-wallet-pass-gallery_timeline-node-amount-positive' : '').concat(action === 'order_expend' ? ' pisell-wallet-pass-gallery_timeline-node-amount-negative' : '')
87
+ }, amount && currency_symbol ? formatCurrencyAmount(amount, action === 'order_expend') : ''));
88
+ }, [assetActionEnum, formatCurrencyAmount]);
89
+ var assetListReq = useRequest(function () {
90
+ return getAssetList({
91
+ num: '99',
92
+ skip: '1',
93
+ card_id: code,
94
+ sourceType: tag,
95
+ tag: tag,
96
+ business_object: 'customer'
97
+ });
98
+ }, {
99
+ ready: !!code,
100
+ refreshDeps: [code, tag]
101
+ });
102
+ var timelineItems = useMemo(function () {
103
+ var _assetListReq$data;
104
+ var list = ((_assetListReq$data = assetListReq.data) === null || _assetListReq$data === void 0 ? void 0 : _assetListReq$data.list) || [];
105
+ if (!Array.isArray(list) || list.length === 0) return [];
106
+ var filteredByAction = list.filter(function (item) {
107
+ return !!assetActionEnum[item.action || ''];
108
+ });
109
+ var filteredByTime = filteredByAction.filter(function (item) {
110
+ var itemUnix = dayjs.tz((item === null || item === void 0 ? void 0 : item.created_at) || '', timezone).unix();
111
+ if ((item === null || item === void 0 ? void 0 : item.action) === 'order_expend' && itemUnix < stateTimeUnix) return false;
112
+ if ((item === null || item === void 0 ? void 0 : item.tag) === 'point_card' && itemUnix < stateTimeUnix) return false;
113
+ return true;
114
+ });
115
+ var nonZeroPoint = filteredByTime.filter(function (it) {
116
+ return !(it.tag === 'point_card' && (it.amount === '0' || parseFloat(it.amount || '0') === 0));
117
+ });
118
+ return nonZeroPoint.map(function (item) {
119
+ return {
120
+ children: assetActionEnum[(item === null || item === void 0 ? void 0 : item.action) || ''] ? timeTreeNode(item) : null
121
+ };
122
+ });
123
+ }, [assetListReq.data, assetActionEnum, timeTreeNode, timezone, stateTimeUnix]);
124
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
125
+ className: "pisell-wallet-pass-gallery_timeline-subtitle"
126
+ }, locales.getText('wallet-pass-gallery.activelog')), assetListReq.loading ? /*#__PURE__*/React.createElement("div", {
127
+ className: "pisell-wallet-pass-gallery_timeline-loading"
128
+ }, /*#__PURE__*/React.createElement(Skeleton, {
129
+ active: true,
130
+ paragraph: {
131
+ rows: 6
132
+ },
133
+ round: true
134
+ })) : timelineItems.length > 0 ? /*#__PURE__*/React.createElement(Timeline, {
135
+ items: timelineItems,
136
+ className: "pisell-wallet-pass-gallery_timeline-list"
137
+ }) : /*#__PURE__*/React.createElement("div", {
138
+ className: "pisell-wallet-pass-gallery_timeline-empty"
139
+ }, /*#__PURE__*/React.createElement(PisellEmpty, null)), /*#__PURE__*/React.createElement(PisellModal, {
140
+ platform: 'pc',
141
+ mobileModalHeight: "auto",
142
+ cancelVisible: false,
143
+ destroyOnClose: true,
144
+ onCancel: function onCancel() {
145
+ return setIsShowtimeLineDetail(false);
146
+ },
147
+ title: isSpending ? locales.getText('wallet-pass-gallery.spendingDetails') : locales.getText('wallet-pass-gallery.rechargeDetails'),
148
+ open: isShowtimeLineDetail,
149
+ footer: [/*#__PURE__*/React.createElement(Button, {
150
+ type: "primary",
151
+ block: true,
152
+ size: "large",
153
+ onClick: function onClick() {
154
+ return setIsShowtimeLineDetail(false);
155
+ }
156
+ }, locales.getText('wallet-pass-gallery.done'))]
157
+ }, /*#__PURE__*/React.createElement(PisellStatisticList, {
158
+ data: [{
159
+ label: locales.getText('wallet-pass-gallery.date'),
160
+ value: (timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.created_at) || ''
161
+ }, {
162
+ label: isSpending ? locales.getText('wallet-pass-gallery.spending') : locales.getText('wallet-pass-gallery.recharge'),
163
+ value: formatCurrencyAmount((timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.amount) || '', isSpending)
164
+ }, {
165
+ label: locales.getText('wallet-pass-gallery.viewOrder'),
166
+ value: timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_code ? "#".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_code) : timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.transaction_id ? "#".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.transaction_id) : '',
167
+ isLink: !!(timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_id),
168
+ link: timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_id ? "/order/details?id=".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_id) : undefined
169
+ }],
170
+ labelColor: "#101828",
171
+ valueColor: "#101828",
172
+ backgroundColors: ['#fff'],
173
+ isHasBorder: false
174
+ })));
175
+ };
176
+ export default TimelineSection;
@@ -0,0 +1,67 @@
1
+ .pisell-wallet-pass-gallery_timeline-node {
2
+ display: flex;
3
+ justify-content: space-between;
4
+
5
+ &-left {
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+
10
+ &-action {
11
+ color: #101828;
12
+ font-size: 14px;
13
+ font-weight: 500;
14
+ margin: 0 0 4px;
15
+ }
16
+
17
+ &-time {
18
+ color: #667085;
19
+ font-size: 12px;
20
+ margin: 0;
21
+ display: flex;
22
+ align-items: center;
23
+ }
24
+
25
+ &-detail-link {
26
+ color: var(--theme-color, #7F56D9);
27
+ margin-left: 8px;
28
+ cursor: pointer;
29
+ font-size: 12px;
30
+ }
31
+
32
+ &-amount {
33
+ font-size: 14px;
34
+ font-weight: 500;
35
+
36
+ &-positive {
37
+ color: #12B76A;
38
+ }
39
+
40
+ &-negative {
41
+ color: #F04438;
42
+ }
43
+ }
44
+ }
45
+
46
+ .pisell-wallet-pass-gallery_timeline-list {
47
+ padding: 8px 0;
48
+ }
49
+
50
+ .pisell-wallet-pass-gallery_timeline-subtitle {
51
+ font-size: 16px;
52
+ line-height: 24px;
53
+ font-weight: 600;
54
+ color: #101828;
55
+ margin-bottom: 16px;
56
+ }
57
+
58
+ .pisell-wallet-pass-gallery_timeline-empty {
59
+ display: flex;
60
+ justify-content: center;
61
+ align-items: center;
62
+ min-height: 200px;
63
+ }
64
+
65
+ .pisell-wallet-pass-gallery_timeline-loading {
66
+ min-height: 160px;
67
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface UsageRulesProps {
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ dataSource?: any;
7
+ }
8
+ declare function UsageRules({ className, style, dataSource }: UsageRulesProps): JSX.Element | null;
9
+ export default UsageRules;