@pisell/materials 1.0.445 → 1.0.447

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 (190) hide show
  1. package/es/components/collapse/index.d.ts +6 -0
  2. package/es/components/collapse/index.js +66 -0
  3. package/es/components/collapse/index.less +1 -0
  4. package/es/components/pisellAnchor/index.d.ts +15 -0
  5. package/es/components/pisellAnchor/index.js +114 -0
  6. package/es/components/pisellAnchor/index.less +98 -0
  7. package/es/components/pisellQrcode/index.d.ts +4 -0
  8. package/es/components/pisellQrcode/index.js +75 -0
  9. package/es/components/pisellQrcode/index.less +41 -0
  10. package/es/components/pisellStatistic/index.d.ts +10 -0
  11. package/es/components/pisellStatistic/index.js +26 -0
  12. package/es/components/pisellStatistic/index.less +14 -0
  13. package/es/components/pisellUpload/index.d.ts +11 -0
  14. package/es/components/pisellUpload/index.js +34 -0
  15. package/es/components/pisellUpload/index.less +15 -0
  16. package/es/components/pisellUploadCrop/index.d.ts +3 -0
  17. package/es/components/pisellUploadCrop/index.js +73 -0
  18. package/es/components/pisellUploadCrop/index.less +15 -0
  19. package/es/components/pisellWalletCard/img/drak.png +0 -0
  20. package/es/components/pisellWalletCard/img/light.png +0 -0
  21. package/es/components/pisellWalletCard/index.d.ts +4 -0
  22. package/es/components/pisellWalletCard/index.js +122 -0
  23. package/es/components/pisellWalletCard/index.less +96 -0
  24. package/es/components/productCard/components/Actions/index.d.ts +4 -0
  25. package/es/components/productCard/components/Actions/index.js +20 -0
  26. package/es/components/productCard/components/Actions/index.less +14 -0
  27. package/es/components/productCard/components/AmountFooter/index.d.ts +4 -0
  28. package/es/components/productCard/components/AmountFooter/index.js +32 -0
  29. package/es/components/productCard/components/AmountFooter/index.less +30 -0
  30. package/es/components/productCard/components/Divider/index.d.ts +4 -0
  31. package/es/components/productCard/components/Divider/index.js +11 -0
  32. package/es/components/productCard/components/Divider/index.less +13 -0
  33. package/es/components/productCard/components/Header/index.d.ts +4 -0
  34. package/es/components/productCard/components/Header/index.js +69 -0
  35. package/es/components/productCard/components/Header/index.less +59 -0
  36. package/es/components/productCard/components/Holder/index.d.ts +4 -0
  37. package/es/components/productCard/components/Holder/index.js +11 -0
  38. package/es/components/productCard/components/Holder/index.less +11 -0
  39. package/es/components/productCard/components/Note/index.d.ts +4 -0
  40. package/es/components/productCard/components/Note/index.js +17 -0
  41. package/es/components/productCard/components/Note/index.less +20 -0
  42. package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
  43. package/es/components/productCard/components/Packages/components/collapsibleList/index.js +96 -0
  44. package/es/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
  45. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
  46. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +31 -0
  47. package/es/components/productCard/components/Packages/components/options/index.d.ts +4 -0
  48. package/es/components/productCard/components/Packages/components/options/index.js +23 -0
  49. package/es/components/productCard/components/Packages/components/options/index.less +28 -0
  50. package/es/components/productCard/components/Packages/index.d.ts +4 -0
  51. package/es/components/productCard/components/Packages/index.js +22 -0
  52. package/es/components/productCard/components/Packages/index.less +17 -0
  53. package/es/components/productCard/components/Packages/utils.d.ts +20 -0
  54. package/es/components/productCard/components/Packages/utils.js +40 -0
  55. package/es/components/productCard/components/Sales/index.d.ts +4 -0
  56. package/es/components/productCard/components/Sales/index.js +22 -0
  57. package/es/components/productCard/components/Sales/index.less +18 -0
  58. package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  59. package/es/components/productCard/components/Time/components/Like/index.js +26 -0
  60. package/es/components/productCard/components/Time/components/Like/index.less +6 -0
  61. package/es/components/productCard/components/Time/components/Like/like-heart.png +0 -0
  62. package/es/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
  63. package/es/components/productCard/components/Time/index.d.ts +4 -0
  64. package/es/components/productCard/components/Time/index.js +30 -0
  65. package/es/components/productCard/components/Time/index.less +25 -0
  66. package/es/components/productCard/index.d.ts +5 -0
  67. package/es/components/productCard/index.js +80 -0
  68. package/es/components/productCard/index.less +48 -0
  69. package/es/components/productCard/types.d.ts +10 -0
  70. package/es/components/productCard/types.js +1 -0
  71. package/es/components/productCard/utils.d.ts +162 -0
  72. package/es/components/productCard/utils.js +683 -0
  73. package/es/components/record-view/index.js +3 -0
  74. package/es/components/section-footers/index.d.ts +6 -1
  75. package/es/components/section-footers/index.js +14 -2
  76. package/es/components/table/Table/utils.d.ts +1 -1
  77. package/es/components/tabs/index.d.ts +1 -0
  78. package/es/components/tabs/index.js +31 -6
  79. package/es/index.d.ts +9 -1
  80. package/es/index.js +13 -2
  81. package/lib/components/collapse/index.d.ts +6 -0
  82. package/lib/components/collapse/index.js +88 -0
  83. package/lib/components/collapse/index.less +1 -0
  84. package/lib/components/pisellAnchor/index.d.ts +15 -0
  85. package/lib/components/pisellAnchor/index.js +107 -0
  86. package/lib/components/pisellAnchor/index.less +98 -0
  87. package/lib/components/pisellQrcode/index.d.ts +4 -0
  88. package/lib/components/pisellQrcode/index.js +79 -0
  89. package/lib/components/pisellQrcode/index.less +41 -0
  90. package/lib/components/pisellStatistic/index.d.ts +10 -0
  91. package/lib/components/pisellStatistic/index.js +51 -0
  92. package/lib/components/pisellStatistic/index.less +14 -0
  93. package/lib/components/pisellUpload/index.d.ts +11 -0
  94. package/lib/components/pisellUpload/index.js +53 -0
  95. package/lib/components/pisellUpload/index.less +15 -0
  96. package/lib/components/pisellUploadCrop/index.d.ts +3 -0
  97. package/lib/components/pisellUploadCrop/index.js +75 -0
  98. package/lib/components/pisellUploadCrop/index.less +15 -0
  99. package/lib/components/pisellWalletCard/img/drak.png +0 -0
  100. package/lib/components/pisellWalletCard/img/light.png +0 -0
  101. package/lib/components/pisellWalletCard/index.d.ts +4 -0
  102. package/lib/components/pisellWalletCard/index.js +184 -0
  103. package/lib/components/pisellWalletCard/index.less +96 -0
  104. package/lib/components/productCard/components/Actions/index.d.ts +4 -0
  105. package/lib/components/productCard/components/Actions/index.js +54 -0
  106. package/lib/components/productCard/components/Actions/index.less +14 -0
  107. package/lib/components/productCard/components/AmountFooter/index.d.ts +4 -0
  108. package/lib/components/productCard/components/AmountFooter/index.js +61 -0
  109. package/lib/components/productCard/components/AmountFooter/index.less +30 -0
  110. package/lib/components/productCard/components/Divider/index.d.ts +4 -0
  111. package/lib/components/productCard/components/Divider/index.js +50 -0
  112. package/lib/components/productCard/components/Divider/index.less +13 -0
  113. package/lib/components/productCard/components/Header/index.d.ts +4 -0
  114. package/lib/components/productCard/components/Header/index.js +81 -0
  115. package/lib/components/productCard/components/Header/index.less +59 -0
  116. package/lib/components/productCard/components/Holder/index.d.ts +4 -0
  117. package/lib/components/productCard/components/Holder/index.js +42 -0
  118. package/lib/components/productCard/components/Holder/index.less +11 -0
  119. package/lib/components/productCard/components/Note/index.d.ts +4 -0
  120. package/lib/components/productCard/components/Note/index.js +43 -0
  121. package/lib/components/productCard/components/Note/index.less +20 -0
  122. package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
  123. package/lib/components/productCard/components/Packages/components/collapsibleList/index.js +93 -0
  124. package/lib/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
  125. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
  126. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +48 -0
  127. package/lib/components/productCard/components/Packages/components/options/index.d.ts +4 -0
  128. package/lib/components/productCard/components/Packages/components/options/index.js +73 -0
  129. package/lib/components/productCard/components/Packages/components/options/index.less +28 -0
  130. package/lib/components/productCard/components/Packages/index.d.ts +4 -0
  131. package/lib/components/productCard/components/Packages/index.js +51 -0
  132. package/lib/components/productCard/components/Packages/index.less +17 -0
  133. package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
  134. package/lib/components/productCard/components/Packages/utils.js +44 -0
  135. package/lib/components/productCard/components/Sales/index.d.ts +4 -0
  136. package/lib/components/productCard/components/Sales/index.js +51 -0
  137. package/lib/components/productCard/components/Sales/index.less +18 -0
  138. package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  139. package/lib/components/productCard/components/Time/components/Like/index.js +64 -0
  140. package/lib/components/productCard/components/Time/components/Like/index.less +6 -0
  141. package/lib/components/productCard/components/Time/components/Like/like-heart.png +0 -0
  142. package/lib/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
  143. package/lib/components/productCard/components/Time/index.d.ts +4 -0
  144. package/lib/components/productCard/components/Time/index.js +57 -0
  145. package/lib/components/productCard/components/Time/index.less +25 -0
  146. package/lib/components/productCard/index.d.ts +5 -0
  147. package/lib/components/productCard/index.js +101 -0
  148. package/lib/components/productCard/index.less +48 -0
  149. package/lib/components/productCard/types.d.ts +10 -0
  150. package/lib/components/productCard/types.js +17 -0
  151. package/lib/components/productCard/utils.d.ts +162 -0
  152. package/lib/components/productCard/utils.js +598 -0
  153. package/lib/components/record-view/index.js +15 -0
  154. package/lib/components/section-footers/index.d.ts +6 -1
  155. package/lib/components/section-footers/index.js +13 -2
  156. package/lib/components/table/Table/utils.d.ts +1 -1
  157. package/lib/components/tabs/index.d.ts +1 -0
  158. package/lib/components/tabs/index.js +34 -5
  159. package/lib/index.d.ts +9 -1
  160. package/lib/index.js +56 -32
  161. package/lowcode/badge/meta.ts +8 -8
  162. package/lowcode/collapse/meta.ts +85 -1
  163. package/lowcode/pisell-anchor/meta.ts +127 -0
  164. package/lowcode/pisell-anchor/snippets.ts +20 -0
  165. package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
  166. package/lowcode/pisell-qrcode/meta.ts +46 -0
  167. package/lowcode/pisell-qrcode/snippets.ts +12 -0
  168. package/lowcode/pisell-statistic/meta.ts +83 -0
  169. package/lowcode/pisell-statistic/snippets.ts +13 -0
  170. package/lowcode/pisell-tooltip/meta.ts +1 -1
  171. package/lowcode/pisell-upload/__screenshots__/upload-1.png +0 -0
  172. package/lowcode/pisell-upload/meta.ts +508 -0
  173. package/lowcode/pisell-upload/snippets.ts +20 -0
  174. package/lowcode/pisell-upload-crop/meta.ts +77 -0
  175. package/lowcode/pisell-upload-crop/snippe.ts +12 -0
  176. package/lowcode/pisell-wallet-card/meta.ts +141 -0
  177. package/lowcode/pisell-wallet-card/snippets.ts +26 -0
  178. package/lowcode/product-card/meta.ts +92 -0
  179. package/lowcode/product-card/snippets.ts +15 -0
  180. package/lowcode/record-view/meta.ts +12 -0
  181. package/lowcode/section-footers/meta.ts +47 -3
  182. package/lowcode/section-footers/snippe.ts +14 -1
  183. package/lowcode/statistic/meta.ts +1 -1
  184. package/lowcode/tabs/meta.ts +51 -51
  185. package/lowcode/tabs/snippets.ts +36 -36
  186. package/lowcode/tag/meta.ts +6 -0
  187. package/lowcode/timeline/meta.ts +12 -3
  188. package/lowcode/timeline/snippets.ts +2 -0
  189. package/lowcode/timeline.item/meta.ts +1 -1
  190. package/package.json +31 -26
@@ -0,0 +1,73 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
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(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import React, { useState } from 'react';
12
+ import { Upload } from 'antd';
13
+ import ImgCrop from 'antd-img-crop';
14
+ var pisellUploadCrop = function pisellUploadCrop(props) {
15
+ console.log('%c [ props ]-12', 'font-size:13px; background:pink; color:#bf2c9f;', props);
16
+ var cropShape = props.cropShape; // 裁剪形状
17
+ var _useState = useState([]),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ fileList = _useState2[0],
20
+ setFileList = _useState2[1];
21
+ var onChange = function onChange(_ref) {
22
+ var newFileList = _ref.fileList;
23
+ setFileList(newFileList);
24
+ };
25
+ var onPreview = /*#__PURE__*/function () {
26
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
27
+ var src, image, imgWindow;
28
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
29
+ while (1) switch (_context.prev = _context.next) {
30
+ case 0:
31
+ src = file.url;
32
+ if (src) {
33
+ _context.next = 5;
34
+ break;
35
+ }
36
+ _context.next = 4;
37
+ return new Promise(function (resolve) {
38
+ var reader = new FileReader();
39
+ reader.readAsDataURL(file.originFileObj);
40
+ reader.onload = function () {
41
+ return resolve(reader.result);
42
+ };
43
+ });
44
+ case 4:
45
+ src = _context.sent;
46
+ case 5:
47
+ image = new Image();
48
+ image.src = src;
49
+ imgWindow = window.open(src);
50
+ imgWindow === null || imgWindow === void 0 ? void 0 : imgWindow.document.write(image.outerHTML);
51
+ case 9:
52
+ case "end":
53
+ return _context.stop();
54
+ }
55
+ }, _callee);
56
+ }));
57
+ return function onPreview(_x2) {
58
+ return _ref2.apply(this, arguments);
59
+ };
60
+ }();
61
+ return /*#__PURE__*/React.createElement(ImgCrop, {
62
+ rotationSlider: true,
63
+ aspectSlider: true,
64
+ cropShape: cropShape
65
+ }, /*#__PURE__*/React.createElement(Upload, {
66
+ action: "https://660d2bd96ddfa2943b33731c.mockapi.io/api/upload",
67
+ listType: "picture-card",
68
+ fileList: fileList,
69
+ onChange: onChange,
70
+ onPreview: onPreview
71
+ }, fileList.length < 5 && '+ Upload'));
72
+ };
73
+ export default pisellUploadCrop;
@@ -0,0 +1,15 @@
1
+ .pisell-upload-wapper {
2
+ .ant-upload-drag-icon {
3
+ font-size: 16px;
4
+ }
5
+ .ant-upload-title {
6
+ font-size: 16px;
7
+ font-weight: bold;
8
+ }
9
+ .ant-upload-text {
10
+ font-size: 14px;
11
+ }
12
+ .ant-upload-text2 {
13
+ font-size: 14px;
14
+ }
15
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const PisellWalletCard: React.FC;
4
+ export default PisellWalletCard;
@@ -0,0 +1,122 @@
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(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useEffect, useState } from 'react';
8
+ import { Card, Flex, Modal, QRCode } from 'antd';
9
+ import cfg from "./../../../../../application/admin/src/configs";
10
+ import Iconfont from "./../iconfont";
11
+ import useEngineContext from "../../hooks/useEngineContext";
12
+ import Barcode from 'react-barcode';
13
+ import { image } from '@pisell/utils';
14
+ import "./index.less";
15
+ import classNames from 'classnames';
16
+ var walletNumber = '123871283618273687123'; //钱包号
17
+ var PisellWalletCard = function PisellWalletCard(props) {
18
+ var _context$appHelper;
19
+ console.log('%c [ props ]-12', 'font-size:13px; background:pink; color:#bf2c9f;', props);
20
+ var mode = props.mode,
21
+ cardStyle = props.cardStyle,
22
+ codeType = props.codeType,
23
+ icon = props.icon,
24
+ vipLevel = props.vipLevel,
25
+ _props$shopName = props.shopName,
26
+ shopName = _props$shopName === void 0 ? '店铺名称' : _props$shopName,
27
+ cardNo = props.cardNo,
28
+ codeDirection = props.codeDirection,
29
+ showCode = props.showCode,
30
+ points = props.points,
31
+ balance = props.balance,
32
+ coupon = props.coupon,
33
+ vouCher = props.vouCher,
34
+ discountCard = props.discountCard; // 裁剪形状
35
+ console.log('%c [ props ]-43', 'font-size:13px; background:pink; color:#bf2c9f;', props);
36
+ var context = useEngineContext();
37
+ var _useState = useState(false),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ isModalOpen = _useState2[0],
40
+ setIsModalOpen = _useState2[1]; //控制模态框的显示与隐藏
41
+ var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
42
+ store = _ref.store;
43
+ useEffect(function () {
44
+ document.body.id = 'body';
45
+ }, []);
46
+ var codeRender = function codeRender() {
47
+ return /*#__PURE__*/React.createElement(Flex, {
48
+ justify: "center"
49
+ }, codeType === 'one' ? /*#__PURE__*/React.createElement(Barcode, {
50
+ value: walletNumber,
51
+ height: 114,
52
+ width: 3
53
+ }) : /*#__PURE__*/React.createElement(QRCode, {
54
+ size: 250,
55
+ value: walletNumber,
56
+ bordered: false
57
+ }));
58
+ };
59
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
60
+ className: classNames('pisell-wallet-card-wrapper')
61
+ }, /*#__PURE__*/React.createElement(Flex, {
62
+ style: {
63
+ flexDirection: "".concat(codeDirection === 'bottom' ? 'column' : 'column-reverse')
64
+ }
65
+ }, /*#__PURE__*/React.createElement(Flex, {
66
+ vertical: true,
67
+ className: classNames('pisell-wallet-card-content', mode),
68
+ style: {
69
+ backgroundImage: "url('".concat(image.ali("".concat(cfg.static, "/static/").concat(mode === 'dark' ? 'wallet_bg_black' : 'wallet_bg_white', ".jpeg"), 360), "')")
70
+ }
71
+ }, /*#__PURE__*/React.createElement(Flex, {
72
+ className: classNames('pisell-wallet-card-header'),
73
+ justify: "space-between",
74
+ align: "start"
75
+ }, /*#__PURE__*/React.createElement(Flex, {
76
+ className: classNames('pisell-wallet-card-header-left'),
77
+ vertical: true
78
+ }, /*#__PURE__*/React.createElement(Flex, {
79
+ className: classNames('pisell-wallet-card-header-level'),
80
+ gap: 10,
81
+ align: "center"
82
+ }, /*#__PURE__*/React.createElement("div", {
83
+ className: "pisell-wallet-card-header-icon"
84
+ }, icon), vipLevel && /*#__PURE__*/React.createElement("p", {
85
+ className: classNames('pisell-wallet-card-header-level-text')
86
+ }, "Level")), shopName && /*#__PURE__*/React.createElement("p", null, "Store name"), cardNo && /*#__PURE__*/React.createElement("p", null, "Wallet number")), /*#__PURE__*/React.createElement(Flex, {
87
+ className: classNames('pisell-wallet-card-header-right')
88
+ }, showCode && cardStyle === 'normal' && /*#__PURE__*/React.createElement(React.Fragment, null, codeType === 'one' ? /*#__PURE__*/React.createElement(Iconfont, {
89
+ type: "pisell2-Barcode",
90
+ onClick: function onClick() {
91
+ return setIsModalOpen(true);
92
+ },
93
+ className: classNames('pisell-wallet-card-icon')
94
+ }) : /*#__PURE__*/React.createElement(Iconfont, {
95
+ type: "pisell2-a-qr-code-02",
96
+ onClick: function onClick() {
97
+ return setIsModalOpen(true);
98
+ },
99
+ className: classNames('pisell-wallet-card-icon')
100
+ })))), /*#__PURE__*/React.createElement(Flex, {
101
+ className: classNames('pisell-wallet-card-list'),
102
+ vertical: true,
103
+ justify: "center"
104
+ }, /*#__PURE__*/React.createElement(Flex, {
105
+ className: classNames('pisell-wallet-card-row'),
106
+ justify: "space-around"
107
+ }, points && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Points"), /*#__PURE__*/React.createElement("p", null, 0)), balance && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Balance"), /*#__PURE__*/React.createElement("p", null, 0)), coupon && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Coupon"), /*#__PURE__*/React.createElement("p", null, 0)), vouCher && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "VouCher"), /*#__PURE__*/React.createElement("p", null, 0))), /*#__PURE__*/React.createElement(Flex, {
108
+ className: classNames('pisell-wallet-card-row')
109
+ }, discountCard && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Discount card"), /*#__PURE__*/React.createElement("p", null, 0))))), showCode && cardStyle === 'full' && /*#__PURE__*/React.createElement("div", {
110
+ className: classNames('pisell-wallet-card-showCode')
111
+ }, codeRender()))), /*#__PURE__*/React.createElement(Modal, {
112
+ open: isModalOpen,
113
+ onCancel: function onCancel() {
114
+ return setIsModalOpen(false);
115
+ },
116
+ style: {
117
+ bottom: 0
118
+ },
119
+ footer: null
120
+ }, codeRender()));
121
+ };
122
+ export default PisellWalletCard;
@@ -0,0 +1,96 @@
1
+ .pisell-wallet-card-wrapper {
2
+ .pisell-lowcode-card-body {
3
+ padding: 0;
4
+ p {
5
+ margin: 0;
6
+ }
7
+ .pisell-wallet-card-content {
8
+ padding: 16px 18px 16px;
9
+
10
+ background-position: top center;
11
+ background-size: cover;
12
+ background-repeat: no-repeat;
13
+
14
+ &.dark {
15
+ .pisell-wallet-card-header-left {
16
+ color: #fff;
17
+ }
18
+ .pisell-wallet-card-row {
19
+ div p:first-child {
20
+ color: #eaecf0;
21
+ }
22
+ div p:last-child {
23
+ color: #fff;
24
+ }
25
+ }
26
+ }
27
+
28
+ &.light {
29
+ .pisell-wallet-card-header-left {
30
+ color: #101828;
31
+ }
32
+ .pisell-wallet-card-row {
33
+ div p:first-child {
34
+ color: #667085;
35
+ }
36
+ div p:last-child {
37
+ color: #101828;
38
+ }
39
+ }
40
+ }
41
+
42
+ .pisell-wallet-card-header {
43
+ .pisell-wallet-card-header-left {
44
+ font-family: Inter;
45
+ font-size: 12px;
46
+ font-style: normal;
47
+ font-weight: 400;
48
+ line-height: 18px; /* 150% */
49
+ .pisell-wallet-card-header-level-text {
50
+ font-size: 14px;
51
+ font-weight: 600;
52
+ line-height: 20px; /* 142.857% */
53
+ }
54
+ .pisell-wallet-card-header-icon {
55
+ width: 20px;
56
+ height: 20px;
57
+ overflow: hidden;
58
+ }
59
+ }
60
+ .pisell-wallet-card-header-right {
61
+ .pisell-wallet-card-icon {
62
+ font-size: 40px;
63
+ }
64
+ }
65
+ }
66
+
67
+ .pisell-wallet-card-list {
68
+ width: 100%;
69
+ margin-top: 20px;
70
+ .pisell-wallet-card-row {
71
+ width: 100%;
72
+ height: 50px;
73
+ margin-top: 10px;
74
+ div p:first-child {
75
+ font-family: Inter;
76
+ font-size: 14px;
77
+ font-style: normal;
78
+ font-weight: 400;
79
+ line-height: 20px; /* 142.857% */
80
+ }
81
+ div p:last-child {
82
+ font-family: Inter;
83
+ font-size: 20px;
84
+ font-style: normal;
85
+ font-weight: 600;
86
+ line-height: 30px; /* 150% */
87
+ }
88
+ }
89
+ }
90
+ }
91
+ .pisell-wallet-card-showCode {
92
+ padding: 20px;
93
+ background-color: #fff;
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Actions: ({ item }: any) => React.JSX.Element | null;
4
+ export default Actions;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+ import { Button } from 'antd';
4
+ import "./index.less";
5
+ var prefix = 'pisell-lowcode-';
6
+ var Actions = function Actions(_ref) {
7
+ var item = _ref.item;
8
+ return item !== null && item !== void 0 && item.actionText ? /*#__PURE__*/React.createElement("div", {
9
+ className: classNames("".concat(prefix, "product-actions"))
10
+ }, /*#__PURE__*/React.createElement(Button, {
11
+ className: classNames("".concat(prefix, "product-actions-item")),
12
+ size: "large",
13
+ onClick: function onClick(e) {
14
+ e.preventDefault();
15
+ e.stopPropagation();
16
+ // onAddTime();
17
+ }
18
+ }, item.actionText)) : null;
19
+ };
20
+ export default Actions;
@@ -0,0 +1,14 @@
1
+ @pisell-prefix: pisell-lowcode;
2
+
3
+ .@{pisell-prefix} {
4
+ &-product-actions {
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ margin-top: 4px;
9
+ }
10
+
11
+ &-product-actions-item {
12
+ flex: 1;
13
+ }
14
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const Footer: ({ item, amountSymbol, hideDivider }: any) => import("react").JSX.Element;
4
+ export default Footer;
@@ -0,0 +1,32 @@
1
+ import { useMemo } from 'react';
2
+ import classNames from 'classnames';
3
+ import { _formatAmount } from "../Packages/utils";
4
+ import Divider from "../Divider";
5
+ import "./index.less";
6
+ var prefix = 'pisell-lowcode-';
7
+ var Footer = function Footer(_ref) {
8
+ var item = _ref.item,
9
+ amountSymbol = _ref.amountSymbol,
10
+ hideDivider = _ref.hideDivider;
11
+ /**
12
+ * @title: 折扣
13
+ * @description:
14
+ * @param {*} useMemo
15
+ * @return {*}
16
+ * @Author: WangHan
17
+ * @Date: 2024-11-22 13:50
18
+ */
19
+ var isDiscount = useMemo(function () {
20
+ // item中没有该属性则不展示
21
+ if (!(item !== null && item !== void 0 && item.hasOwnProperty('origin_total'))) return false;
22
+ return Number(item === null || item === void 0 ? void 0 : item.total) != Number(item === null || item === void 0 ? void 0 : item.origin_total);
23
+ }, [item]);
24
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, null) : null, /*#__PURE__*/React.createElement("div", {
25
+ className: classNames("".concat(prefix, "packages-product-footer"), hideDivider && "".concat(prefix, "packages-product-hide-divider-footer"))
26
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, _formatAmount(item === null || item === void 0 ? void 0 : item.total, amountSymbol)), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(item === null || item === void 0 ? void 0 : item.num)), /*#__PURE__*/React.createElement("span", {
27
+ className: "".concat(prefix, "packages-product-footer-total")
28
+ }, "".concat(amountSymbol, " ").concat(_formatAmount((item === null || item === void 0 ? void 0 : item.total) * (item === null || item === void 0 ? void 0 : item.num))))), isDiscount ? /*#__PURE__*/React.createElement("div", {
29
+ className: "".concat(prefix, "packages-product-footer-discount")
30
+ }, /*#__PURE__*/React.createElement("span", null, _formatAmount(item === null || item === void 0 ? void 0 : item.origin_total, amountSymbol)), /*#__PURE__*/React.createElement("span", null, "".concat(amountSymbol, " ").concat(_formatAmount((item === null || item === void 0 ? void 0 : item.origin_total) * (item === null || item === void 0 ? void 0 : item.num))))) : null));
31
+ };
32
+ export default Footer;
@@ -0,0 +1,30 @@
1
+ @pisell-prefix: pisell-lowcode;
2
+
3
+ .@{pisell-prefix} {
4
+ &-packages-product-footer {
5
+ color: var(--Gray-500, #667085);
6
+ font-size: 14px;
7
+ font-style: normal;
8
+ font-weight: 600;
9
+ line-height: 20px;
10
+ > div {
11
+ display: flex;
12
+ justify-content: space-between;
13
+ }
14
+ }
15
+
16
+ &-packages-product-footer-discount {
17
+ font-size: 12px;
18
+ font-weight: 400;
19
+ line-height: 18px;
20
+ text-decoration-line: line-through;
21
+ }
22
+
23
+ &-packages-product-footer-total {
24
+ color: var(--Gray-900, #101828);
25
+ }
26
+
27
+ &-packages-product-hide-divider-footer {
28
+ margin-top: 8px;
29
+ }
30
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Divider: ({ type }: any) => React.JSX.Element;
4
+ export default Divider;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+ import "./index.less";
4
+ var prefix = 'pisell-lowcode-';
5
+ var Divider = function Divider(_ref) {
6
+ var type = _ref.type;
7
+ return /*#__PURE__*/React.createElement("div", {
8
+ className: classNames("".concat(prefix, "product-divider"), type === 'inside' && "".concat(prefix, "product-divider-inside"))
9
+ });
10
+ };
11
+ export default Divider;
@@ -0,0 +1,13 @@
1
+ @pisell-prefix: pisell-lowcode;
2
+
3
+ .@{pisell-prefix} {
4
+ &-product-divider {
5
+ height: 1px;
6
+ background-color: #eaecf0;
7
+ margin: 8px 0;
8
+ }
9
+
10
+ &-product-divider-inside {
11
+ margin: 4px 0;
12
+ }
13
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Header: ({ isShowDelete, d, showImage }: any) => React.JSX.Element;
4
+ export default Header;
@@ -0,0 +1,69 @@
1
+ import { Button } from 'antd';
2
+ import React, { useMemo } from 'react';
3
+ import classNames from 'classnames';
4
+ import Iconfont from "../../../iconfont";
5
+ import { image, formatAmount } from '@pisell/utils';
6
+ import Options from "../Packages/components/options";
7
+ import "./index.less";
8
+ var prefix = 'pisell-lowcode-';
9
+ var Header = function Header(_ref) {
10
+ var isShowDelete = _ref.isShowDelete,
11
+ d = _ref.d,
12
+ showImage = _ref.showImage;
13
+ console.log(d, showImage, 'wh8888');
14
+
15
+ /**
16
+ * @title: 是否显示价格
17
+ * @description:
18
+ * @param {*} useMemo
19
+ * @return {*}
20
+ * @Author: WangHan
21
+ * @Date: 2024-11-23 16:13
22
+ */
23
+ var showPrice = useMemo(function () {
24
+ var _d$bundle, _d$options;
25
+ return (d === null || d === void 0 ? void 0 : (_d$bundle = d.bundle) === null || _d$bundle === void 0 ? void 0 : _d$bundle.length) > 0 || (d === null || d === void 0 ? void 0 : (_d$options = d.options) === null || _d$options === void 0 ? void 0 : _d$options.length) > 0;
26
+ }, [d === null || d === void 0 ? void 0 : d.bundle]);
27
+
28
+ /**
29
+ * @title: 样式是否居中
30
+ * @description:
31
+ * @param {*} useMemo
32
+ * @return {*}
33
+ * @Author: WangHan
34
+ * @Date: 2024-11-23 17:37
35
+ */
36
+ var headerCenterStyle = useMemo(function () {
37
+ var _d$options2;
38
+ return (d === null || d === void 0 ? void 0 : (_d$options2 = d.options) === null || _d$options2 === void 0 ? void 0 : _d$options2.length) > 0 || (d === null || d === void 0 ? void 0 : d.product_option_string);
39
+ }, [d === null || d === void 0 ? void 0 : d.options]);
40
+ return /*#__PURE__*/React.createElement("div", {
41
+ className: classNames("".concat(prefix, "product-header"), headerCenterStyle && "".concat(prefix, "product-options-header"))
42
+ }, isShowDelete ? /*#__PURE__*/React.createElement("div", {
43
+ className: "".concat(prefix, "product-delete"),
44
+ onClick: function onClick(e) {
45
+ e.stopPropagation();
46
+ // handleDeleteService(d);
47
+ }
48
+ }, /*#__PURE__*/React.createElement(Button, {
49
+ type: "text",
50
+ icon: /*#__PURE__*/React.createElement(Iconfont, {
51
+ type: "pisell2-trash-01"
52
+ })
53
+ })) : null, showImage ? /*#__PURE__*/React.createElement("img", {
54
+ src: image.ali(d === null || d === void 0 ? void 0 : d.product_cover, 100),
55
+ className: "".concat(prefix, "product-header-cover")
56
+ }) : null, d !== null && d !== void 0 && d.id ? /*#__PURE__*/React.createElement("div", {
57
+ className: "".concat(prefix, "product-right-wrap")
58
+ }, /*#__PURE__*/React.createElement("div", {
59
+ className: "".concat(prefix, "product-title")
60
+ }, /*#__PURE__*/React.createElement("span", null, d === null || d === void 0 ? void 0 : d.title), showPrice ? /*#__PURE__*/React.createElement("span", {
61
+ className: "".concat(prefix, "product-title-price")
62
+ }, formatAmount(d === null || d === void 0 ? void 0 : d.price, 2, d === null || d === void 0 ? void 0 : d.symbol)) : null), d !== null && d !== void 0 && d.product_option_string ? /*#__PURE__*/React.createElement("span", {
63
+ className: "".concat(prefix, "product-title-variant")
64
+ }, d === null || d === void 0 ? void 0 : d.product_option_string) : null, /*#__PURE__*/React.createElement(Options, {
65
+ options: d === null || d === void 0 ? void 0 : d.options,
66
+ amountSymbol: d === null || d === void 0 ? void 0 : d.symbol
67
+ })) : null);
68
+ };
69
+ export default Header;
@@ -0,0 +1,59 @@
1
+ @pisell-prefix: pisell-lowcode;
2
+
3
+ .@{pisell-prefix} {
4
+ &-product-header {
5
+ display: flex;
6
+ align-items: center;
7
+ gap: 8px;
8
+ }
9
+
10
+ &-product-options-header {
11
+ align-items: initial;
12
+ }
13
+
14
+ &-product-delete {
15
+ position: absolute;
16
+ padding: 0;
17
+ top: 0;
18
+ right: 0;
19
+ cursor: pointer;
20
+ }
21
+
22
+ &-product-header-cover {
23
+ width: 64px;
24
+ height: 64px;
25
+ object-fit: cover;
26
+ border-radius: 8px;
27
+ }
28
+
29
+ &-product-right-wrap {
30
+ display: flex;
31
+ flex-direction: column;
32
+ justify-content: space-between;
33
+ flex: 1;
34
+ }
35
+
36
+ &-product-title {
37
+ color: var(--gray-900, #101828);
38
+ font-size: 16px;
39
+ font-style: normal;
40
+ font-weight: 600;
41
+ line-height: 24px;
42
+ display: flex;
43
+ flex-direction: column;
44
+ }
45
+
46
+ &-product-title-price {
47
+ font-size: 14px;
48
+ font-weight: 500;
49
+ line-height: 20px;
50
+ }
51
+
52
+ &-product-title-variant {
53
+ color: var(--Gray-500, #667085);
54
+ font-size: 14px;
55
+ font-style: normal;
56
+ font-weight: 400;
57
+ line-height: 20px;
58
+ }
59
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Holder: ({ d }: any) => React.JSX.Element;
4
+ export default Holder;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import Divider from "../Divider";
3
+ import "./index.less";
4
+ var prefix = 'pisell-lowcode-';
5
+ var Holder = function Holder(_ref) {
6
+ var d = _ref.d;
7
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
8
+ className: "".concat(prefix, "product-holder-wrap")
9
+ }, d === null || d === void 0 ? void 0 : d.holder));
10
+ };
11
+ export default Holder;