@pisell/private-materials 6.3.50 → 6.3.51

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 (201) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/Sales/Summary/utils.d.ts +1 -1
  10. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  11. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  13. package/es/components/booking/addons/index.js +20 -17
  14. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  15. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  16. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  17. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  18. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  19. package/es/components/booking/components/footer/utils.d.ts +5 -0
  20. package/es/components/booking/components/footer/utils.js +85 -40
  21. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  22. package/es/components/booking/components/voucher/index.js +18 -5
  23. package/es/components/booking/forms/single/index.d.ts +1 -0
  24. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  25. package/es/components/booking/info/date/index.d.ts +1 -0
  26. package/es/components/booking/info/notes/index.d.ts +1 -0
  27. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  28. package/es/components/booking/info/service2/utils.js +1 -0
  29. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  30. package/es/components/booking/info2/service/addService/index.js +2 -3
  31. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  32. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  33. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  34. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  35. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  36. package/es/components/booking/utils.d.ts +1 -0
  37. package/es/components/booking/utils.js +16 -2
  38. package/es/components/eftpos/index.d.ts +1 -0
  39. package/es/components/eftpos/pos.d.ts +1 -0
  40. package/es/components/eftposPay/amount.d.ts +1 -0
  41. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  42. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  43. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  44. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  45. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  46. package/es/components/eftposPay/pay.d.ts +1 -0
  47. package/es/components/eftposPay/payo/config.d.ts +1 -0
  48. package/es/components/eftposPay/tip.d.ts +1 -0
  49. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  50. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  51. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  52. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  53. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  54. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  55. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  56. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  57. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  58. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  59. package/es/components/login/index.d.ts +1 -0
  60. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  61. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  62. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  63. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  64. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  65. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  66. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  67. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  68. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  69. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  70. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  71. package/es/components/schedules/calendar/index.d.ts +1 -0
  72. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  73. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  74. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  75. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  76. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  77. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  78. package/es/components/schedules/products/list/index.d.ts +1 -0
  79. package/es/components/schedules/resources/index.d.ts +1 -0
  80. package/es/components/schedules/resources/list/index.d.ts +1 -0
  81. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  82. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  83. package/es/components/schedules/schedules/index.d.ts +1 -0
  84. package/es/components/shoppingCart/index.d.ts +1 -0
  85. package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
  86. package/es/components/ticketBooking/utils/index.js +23 -8
  87. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  88. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  89. package/es/hooks/usePaymentLogger.d.ts +1 -0
  90. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  91. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  92. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  93. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  94. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  95. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  96. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  97. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  98. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  99. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  100. package/es/plus/walletPassGallery/components/passDetail/index.js +5 -1
  101. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  102. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  103. package/es/plus/walletPassGallery/index.js +3 -1
  104. package/es/pro/Login2.0/index.less +15 -8
  105. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  106. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  107. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  108. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
  109. package/lib/components/booking/addons/index.js +10 -7
  110. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  111. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  112. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  113. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  114. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  115. package/lib/components/booking/components/footer/utils.d.ts +5 -0
  116. package/lib/components/booking/components/footer/utils.js +56 -23
  117. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  118. package/lib/components/booking/components/voucher/index.js +19 -6
  119. package/lib/components/booking/forms/single/index.d.ts +1 -0
  120. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  121. package/lib/components/booking/info/date/index.d.ts +1 -0
  122. package/lib/components/booking/info/notes/index.d.ts +1 -0
  123. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  124. package/lib/components/booking/info/service2/utils.js +1 -0
  125. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  126. package/lib/components/booking/info2/service/addService/index.js +1 -2
  127. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  128. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  129. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  130. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  131. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  132. package/lib/components/booking/utils.d.ts +1 -0
  133. package/lib/components/booking/utils.js +12 -0
  134. package/lib/components/eftpos/index.d.ts +1 -0
  135. package/lib/components/eftpos/pos.d.ts +1 -0
  136. package/lib/components/eftposPay/amount.d.ts +1 -0
  137. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  138. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  139. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  140. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  141. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  142. package/lib/components/eftposPay/pay.d.ts +1 -0
  143. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  144. package/lib/components/eftposPay/tip.d.ts +1 -0
  145. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  146. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  147. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  148. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  149. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  150. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  151. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  152. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  153. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  154. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  155. package/lib/components/login/index.d.ts +1 -0
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  157. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  158. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  159. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  160. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  161. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  162. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  163. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  164. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  165. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  166. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  167. package/lib/components/schedules/calendar/index.d.ts +1 -0
  168. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  169. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  170. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  171. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  172. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  173. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  174. package/lib/components/schedules/products/list/index.d.ts +1 -0
  175. package/lib/components/schedules/resources/index.d.ts +1 -0
  176. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  177. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  178. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  179. package/lib/components/schedules/schedules/index.d.ts +1 -0
  180. package/lib/components/shoppingCart/index.d.ts +1 -0
  181. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  182. package/lib/components/ticketBooking/utils/index.js +9 -4
  183. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  184. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  185. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  186. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  187. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  188. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  189. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  190. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  191. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  192. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  193. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  194. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  195. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  196. package/lib/plus/walletPassGallery/components/passDetail/index.js +4 -1
  197. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  198. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  199. package/lib/plus/walletPassGallery/index.js +3 -1
  200. package/lib/pro/Login2.0/index.less +15 -8
  201. package/package.json +4 -4
@@ -1,3 +1,7 @@
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 _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
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."); }
3
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); }
@@ -247,7 +251,7 @@ var PassDetail = function PassDetail(props) {
247
251
  };
248
252
  if (!props.dataSource) return null;
249
253
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
250
- className: classNames("pisell-wallet-pass-gallery_detail", "pisell-wallet-pass-gallery_detail-".concat(platform))
254
+ className: classNames("pisell-wallet-pass-gallery_detail", "pisell-wallet-pass-gallery_detail-".concat(platform), _defineProperty({}, "pisell-wallet-pass-gallery_detail-with-footer", platform === 'h5' && tag === 'gift_card'))
251
255
  }, /*#__PURE__*/React.createElement("div", {
252
256
  className: "pisell-wallet-pass-gallery_detail-content",
253
257
  ref: containerRef
@@ -18,6 +18,10 @@
18
18
  padding: 20px 0px;
19
19
  }
20
20
 
21
+ &-with-footer {
22
+ height: calc(100% - 90px);
23
+ }
24
+
21
25
  .pisell-wallet-pass-gallery_detail-content {
22
26
  overflow-y: auto;
23
27
  height: 100%;
@@ -32,6 +32,10 @@ var Recharge = function Recharge(_ref) {
32
32
  storage = _ref2.storage;
33
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
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
+ var _useState3 = useState(false),
36
+ _useState4 = _slicedToArray(_useState3, 2),
37
+ loading = _useState4[0],
38
+ setLoading = _useState4[1];
35
39
  useEffect(function () {
36
40
  if (detailData) {
37
41
  setChargeItem(((detailData === null || detailData === void 0 ? void 0 : detailData.gift_option) || [])[0]);
@@ -44,6 +48,7 @@ var Recharge = function Recharge(_ref) {
44
48
  while (1) switch (_context.prev = _context.next) {
45
49
  case 0:
46
50
  _context.prev = 0;
51
+ setLoading(true);
47
52
  params = {
48
53
  voucher_id: (detailData === null || detailData === void 0 ? void 0 : detailData.id) || '',
49
54
  product_id: (detailData === null || detailData === void 0 ? void 0 : detailData.product_id) || '',
@@ -57,9 +62,9 @@ var Recharge = function Recharge(_ref) {
57
62
  currency_format: (shop === null || shop === void 0 ? void 0 : shop.currency_format) || ''
58
63
  }
59
64
  };
60
- _context.next = 4;
65
+ _context.next = 5;
61
66
  return orderRechargeProduct(params);
62
- case 4:
67
+ case 5:
63
68
  data = _context.sent;
64
69
  if (data !== null && data !== void 0 && data.order_id) {
65
70
  storage === null || storage === void 0 || (_storage$set = storage.set) === null || _storage$set === void 0 || _storage$set.call(storage, 'orderId', data.order_id);
@@ -69,23 +74,28 @@ var Recharge = function Recharge(_ref) {
69
74
  callback: function callback() {}
70
75
  });
71
76
  }
72
- _context.next = 11;
77
+ _context.next = 12;
73
78
  break;
74
- case 8:
75
- _context.prev = 8;
79
+ case 9:
80
+ _context.prev = 9;
76
81
  _context.t0 = _context["catch"](0);
77
82
  console.error(locales.getText('wallet-pass-gallery.log.rechargeOrderFailed'), _context.t0);
78
- case 11:
83
+ case 12:
84
+ _context.prev = 12;
85
+ setLoading(false);
86
+ return _context.finish(12);
87
+ case 15:
79
88
  case "end":
80
89
  return _context.stop();
81
90
  }
82
- }, _callee, null, [[0, 8]]);
91
+ }, _callee, null, [[0, 9, 12, 15]]);
83
92
  }));
84
93
  return function handleRecharge() {
85
94
  return _ref3.apply(this, arguments);
86
95
  };
87
96
  }();
88
97
  return /*#__PURE__*/React.createElement(Drawer, {
98
+ destroyOnClose: true,
89
99
  title: locales.getText('wallet-pass-gallery.rechargeOptions'),
90
100
  open: open,
91
101
  zIndex: 999,
@@ -97,7 +107,8 @@ var Recharge = function Recharge(_ref) {
97
107
  block: true,
98
108
  size: "large",
99
109
  onClick: handleRecharge,
100
- disabled: !(chargeItem !== null && chargeItem !== void 0 && chargeItem.id)
110
+ disabled: !(chargeItem !== null && chargeItem !== void 0 && chargeItem.id),
111
+ loading: loading
101
112
  }, locales.getText('wallet-pass-gallery.recharge'))
102
113
  }, /*#__PURE__*/React.createElement("div", {
103
114
  className: "pisell-wallet-pass-gallery_recharge"
@@ -554,7 +554,9 @@ var WalletPassGallery = function WalletPassGallery(props) {
554
554
  },
555
555
  block: true
556
556
  }, locales.getText('wallet-pass-gallery.button.add'))), /*#__PURE__*/React.createElement(PisellModal, {
557
- platform: 'h5',
557
+ zIndex: 997,
558
+ destroyOnClose: true,
559
+ platform: platform,
558
560
  visible: !!_currentItem,
559
561
  onCancel: function onCancel() {
560
562
  return setCurrentItemId('');
@@ -15,6 +15,14 @@
15
15
 
16
16
  /* 默认底部内边距 */
17
17
  padding-bottom: 24px;
18
+
19
+ // 加载状态优化
20
+ .pisell-lowcode-btn-loading-icon {
21
+ .anticon {
22
+ color: #ffffff !important;
23
+ }
24
+ }
25
+
18
26
 
19
27
  /* 在弹窗模式下不需要额外的底部内边距,因为使用 sticky 定位 */
20
28
  .pisell-lowcode-modal-body & {
@@ -462,6 +470,13 @@
462
470
  .login-lm-drawer-popover & {
463
471
  padding-bottom: 100px;
464
472
  }
473
+ // 加载状态优化
474
+ .pisell-lowcode-btn-loading-icon {
475
+ .anticon {
476
+ color: #ffffff !important;
477
+ }
478
+ }
479
+
465
480
  }
466
481
 
467
482
  // 错误提示样式优化
@@ -521,14 +536,6 @@
521
536
  // }
522
537
  // }
523
538
  // }
524
-
525
- // 加载状态优化
526
- .pisell-lowcode-btn-loading-icon {
527
- .anticon {
528
- color: #ffffff !important;
529
- }
530
- }
531
-
532
539
  // 切换认证方式按钮
533
540
  .login2-switch-button {
534
541
  margin-top: 0;
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -96,7 +96,7 @@ var VoucherCard = (props) => {
96
96
  return {
97
97
  _id: item._id,
98
98
  quantity: item.num,
99
- bundle: item._bundleOrigin,
99
+ bundle: item.bundle,
100
100
  options: item._optionsOrigin,
101
101
  product: {
102
102
  ...item._productOrigin
@@ -51,23 +51,26 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
51
51
  var formatProducts = (values) => {
52
52
  let arr = [];
53
53
  arr = values.map((item) => {
54
- var _a, _b, _c, _d, _e, _f, _g;
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
55
+ const bundleDiscountList = (0, import_utils.getBundleDiscountList)(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
56
+ const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
57
+ discount_list.push(...bundleDiscountList);
55
58
  return {
56
59
  order_detail_id: item.order_detail_id || 0,
57
60
  num: item._extend.quantity,
58
61
  price: (0, import_utils.formatProductPrice)(item),
59
62
  product_id: item.id,
60
- discount_list: (item == null ? void 0 : item.discount_list) || [],
63
+ discount_list: discount_list || [],
61
64
  discount_amount: 0,
62
65
  product_discount_reason: "",
63
66
  is_charge_tax: item.is_charge_tax,
64
67
  note: "",
65
68
  discountway: "num",
66
69
  discount_type: "discount",
67
- bundle_edit: (_a = item._extend) == null ? void 0 : _a.bundle_edit,
68
- product_bundle: (0, import_utils.formatProductBundle)((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
69
- "product_option_item": (0, import_utils.formatProductOption)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
70
- "product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0
70
+ bundle_edit: (_c = item._extend) == null ? void 0 : _c.bundle_edit,
71
+ product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
72
+ "product_option_item": (0, import_utils.formatProductOption)((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
73
+ "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0
71
74
  };
72
75
  });
73
76
  return arr;
@@ -241,12 +244,12 @@ var Addons = (0, import_model.Provider)((props) => {
241
244
  isAddons: true,
242
245
  _key: e.key,
243
246
  _extend: {
244
- price: _detail.price,
245
247
  other: e,
246
248
  quantity: (e == null ? void 0 : e.quantity) || 1
247
249
  },
248
250
  quantity: (e == null ? void 0 : e.quantity) || 1
249
251
  };
252
+ product._extend.price = (0, import_utils2.getMainPrice)(product, _detail.price);
250
253
  let _total = (0, import_utils2.getProductTotalPrice)(product);
251
254
  product._extend.total = _total;
252
255
  product._extend.origin_total = _total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
3
4
  export default SelectProductItem;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const renderBundles: (item: any, amountSymbol: string) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 空状态
3
4
  * @description:
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const FooterMenus: ({ state, menuChange, items }: any) => JSX.Element | null;
3
4
  export default FooterMenus;
@@ -16,6 +16,11 @@ export declare const formatProductOption: (option: any) => any;
16
16
  * @Date: 2024-02-19 09:26
17
17
  */
18
18
  export declare const formatProductBundle: (bundle: any) => any;
19
+ /**
20
+ * 获取子商品折扣信息
21
+ * @param item
22
+ */
23
+ export declare const getBundleDiscountList: (bundle: any[]) => any[];
19
24
  export interface ResourceItem {
20
25
  [key: string]: any;
21
26
  }
@@ -35,7 +35,8 @@ __export(utils_exports, {
35
35
  formatProductBundle: () => formatProductBundle,
36
36
  formatProductOption: () => formatProductOption,
37
37
  formatProductPrice: () => formatProductPrice,
38
- formatValues: () => formatValues
38
+ formatValues: () => formatValues,
39
+ getBundleDiscountList: () => getBundleDiscountList
39
40
  });
40
41
  module.exports = __toCommonJS(utils_exports);
41
42
  var import_dayjs = __toESM(require("dayjs"));
@@ -47,6 +48,7 @@ var import_status = require("../../info/service2/status");
47
48
  var import_utils4 = require("../../info/service2/utils");
48
49
  var import_utils5 = require("@pisell/utils");
49
50
  var import_materials = require("@pisell/materials");
51
+ var import_decimal = __toESM(require("decimal.js"));
50
52
  var formatNote = (data) => {
51
53
  var _a;
52
54
  return ((_a = data.notes) == null ? void 0 : _a.orderNote) || "";
@@ -71,10 +73,10 @@ var formatProductOption = (option) => {
71
73
  }
72
74
  return option.map((d) => {
73
75
  return {
74
- num: d.num,
75
- option_group_item_id: d.product_option_item_id || d.option_group_item_id,
76
- option_group_id: d.option_group_id
77
- // "add_price": Number(d?.add_price),
76
+ "num": d.num,
77
+ "option_group_item_id": d.product_option_item_id || d.option_group_item_id,
78
+ "option_group_id": d.option_group_id,
79
+ "custom_add_price": Number(d == null ? void 0 : d.add_price)
78
80
  };
79
81
  });
80
82
  };
@@ -101,20 +103,44 @@ var formatProductBundle = (bundle) => {
101
103
  } catch (error) {
102
104
  }
103
105
  return bundle.map((d) => {
106
+ const option = formatProductOption(d.option);
107
+ const option_price = option.reduce((temp, item) => {
108
+ return temp + Number(item.num) * item.custom_add_price;
109
+ }, 0);
104
110
  return {
105
- bundle_group_id: d.group_id,
106
- bundle_id: d.id,
107
- bundle_product_id: (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
108
- bundle_variant_id: d.bundle_variant_id,
109
- num: d.num,
110
- extension_id: d.extension_id,
111
- extension_type: d.extension_type,
112
- // "price": Number(d?.price),
113
- // "price_type": d?.price_type,
114
- option: formatProductOption(d.option)
111
+ "bundle_group_id": d.group_id,
112
+ "bundle_id": d.id,
113
+ "bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
114
+ "bundle_variant_id": d.bundle_variant_id,
115
+ "num": d.num,
116
+ "extension_id": d.extension_id,
117
+ "extension_type": d.extension_type,
118
+ "price": Number(d == null ? void 0 : d.product_price),
119
+ "price_type": d == null ? void 0 : d.price_type,
120
+ "price_type_ext": d == null ? void 0 : d.price_type_ext,
121
+ "custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default(d == null ? void 0 : d.product_price).sub(option_price).toNumber()).toFixed(2),
122
+ "custom_price_type": d == null ? void 0 : d.price_type,
123
+ "option": option,
124
+ "bundle_selling_price": d == null ? void 0 : d.price,
125
+ "bundle_sum_price": (d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.original_total),
126
+ metadata: {
127
+ custom_product_bundle_map_id: d._id
128
+ }
115
129
  };
116
130
  });
117
131
  };
132
+ var getBundleDiscountList = (bundle) => {
133
+ if (!bundle) {
134
+ return [];
135
+ }
136
+ let discountList = [];
137
+ bundle.forEach((d) => {
138
+ if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
139
+ discountList.push(...d.discount_list.filter((item) => !item.id));
140
+ }
141
+ });
142
+ return discountList;
143
+ };
118
144
  var getSubType = (item) => {
119
145
  var _a;
120
146
  const _type = (_a = item.duration) == null ? void 0 : _a.type;
@@ -219,7 +245,7 @@ var formatProductPrice = (item) => {
219
245
  return price;
220
246
  };
221
247
  var formatMetaData = (item, isMultiDayPrices) => {
222
- var _a, _b, _c, _d, _e;
248
+ var _a, _b, _c, _d, _e, _f, _g;
223
249
  let metadata = {};
224
250
  if ((_a = item._extend) == null ? void 0 : _a.capacity) {
225
251
  metadata.capacity = item._extend.capacity;
@@ -233,6 +259,9 @@ var formatMetaData = (item, isMultiDayPrices) => {
233
259
  if (isMultiDayPrices && ((_d = item._extend) == null ? void 0 : _d.multiDayPrices)) {
234
260
  metadata.multiDayPrices = (_e = item._extend) == null ? void 0 : _e.multiDayPrices;
235
261
  }
262
+ if ((_f = item._extend) == null ? void 0 : _f.unique_identification_number) {
263
+ metadata.unique_identification_number = (_g = item._extend) == null ? void 0 : _g.unique_identification_number;
264
+ }
236
265
  return metadata;
237
266
  };
238
267
  var getSourceProductPrice = (item) => {
@@ -250,11 +279,13 @@ var getSourceProductPrice = (item) => {
250
279
  return price;
251
280
  };
252
281
  var formatProducts = (item, quantity) => {
253
- var _a, _b, _c, _d, _e, _f;
282
+ var _a, _b, _c, _d, _e, _f, _g, _h;
254
283
  const total = Number(item._extend.total);
255
284
  const origin_total = Number(item._extend.origin_total);
256
285
  const discount_amount = origin_total - total;
257
- const discount_list = (item == null ? void 0 : item.discount_list) || [];
286
+ const bundleDiscountList = getBundleDiscountList(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
287
+ const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
288
+ discount_list.push(...bundleDiscountList);
258
289
  const discount_type = discount_amount < 0 ? "change_price" : "discount";
259
290
  const notManualDiscount = discount_list.filter(
260
291
  (item2) => item2.type !== "product"
@@ -262,6 +293,7 @@ var formatProducts = (item, quantity) => {
262
293
  return {
263
294
  "num": quantity || item._extend.quantity,
264
295
  "price": formatProductPrice(item),
296
+ "main_product_selling_price": item._extend.main_product_selling_price ?? formatProductPrice(item),
265
297
  "source_product_price": getSourceProductPrice(item),
266
298
  "product_id": (item == null ? void 0 : item.product_id) || item.id,
267
299
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
@@ -272,10 +304,10 @@ var formatProducts = (item, quantity) => {
272
304
  "discount_per": item._extend.discount_per,
273
305
  "discount_type": item._extend.discount_type || discount_type,
274
306
  "order_detail_id": item._extend.order_detail_id || 0,
275
- "product_bundle": formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
276
- "bundle_edit": item._extend.bundle_edit,
277
- "product_option_item": formatProductOption((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.option),
278
- "product_variant_id": ((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.product_variant_id) || 0,
307
+ "product_bundle": formatProductBundle((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.bundle),
308
+ "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
309
+ "product_option_item": formatProductOption((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.option),
310
+ "product_variant_id": ((_h = (_g = item._extend) == null ? void 0 : _g.other) == null ? void 0 : _h.product_variant_id) || 0,
279
311
  "discount_list": notManualDiscount,
280
312
  metadata: formatMetaData(item, false)
281
313
  };
@@ -538,5 +570,6 @@ var checkHolderIsError = (state) => {
538
570
  formatProductBundle,
539
571
  formatProductOption,
540
572
  formatProductPrice,
541
- formatValues
573
+ formatValues,
574
+ getBundleDiscountList
542
575
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface IProps {
3
4
  modal: any;
@@ -103,6 +103,11 @@ var VoucherCard = (props) => {
103
103
  });
104
104
  return val;
105
105
  }, [state.service.value]);
106
+ const serviceTotal = (0, import_react.useMemo)(() => {
107
+ return serviceMemo.reduce((total, item) => {
108
+ return total + (item.total || 0);
109
+ }, 0);
110
+ }, [serviceMemo]);
106
111
  const addonsMemo = (0, import_react.useMemo)(() => {
107
112
  var _a2;
108
113
  const val = (_a2 = state.addons.value || []) == null ? void 0 : _a2.map((value) => {
@@ -194,6 +199,12 @@ var VoucherCard = (props) => {
194
199
  }, [state.bookingId, isBooking4Shop, fn]);
195
200
  const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
196
201
  const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
202
+ const newTotal = serviceList.reduce((total, item) => {
203
+ return total + (item._extend.total || 0);
204
+ }, 0);
205
+ if (newTotal !== serviceTotal) {
206
+ edit = true;
207
+ }
197
208
  serviceValueRef.current = serviceList;
198
209
  addonsValueRef.current = addonsList;
199
210
  let other = {};
@@ -209,12 +220,14 @@ var VoucherCard = (props) => {
209
220
  ...other
210
221
  }
211
222
  });
212
- dispatch({
213
- type: "setAddons",
214
- payload: {
215
- value: addonsList,
216
- ...other
217
- }
223
+ setTimeout(() => {
224
+ dispatch({
225
+ type: "setAddons",
226
+ payload: {
227
+ value: addonsList,
228
+ ...other
229
+ }
230
+ });
218
231
  });
219
232
  });
220
233
  const onScanCode = async () => {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 表单选择器
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from '../../../model';
2
3
  interface useClientFnParams {
3
4
  state: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
3
4
  declare const DateCom: () => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Notes: () => JSX.Element | null;
2
3
  export default Notes;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -367,6 +367,7 @@ var formatBundle = (bundle) => {
367
367
  num: item == null ? void 0 : item.num,
368
368
  price: item == null ? void 0 : item.price,
369
369
  total: item == null ? void 0 : item.price,
370
+ origin_total: item.original_total,
370
371
  price_type: item == null ? void 0 : item.price_type,
371
372
  bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
372
373
  bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/actions/index.less';
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -242,13 +242,12 @@ var Info = (props) => {
242
242
  _extend: {
243
243
  start_date: state.date.value,
244
244
  quantity: (e == null ? void 0 : e.quantity) || 1,
245
- price: _detail.price,
246
245
  product_name: item.title,
247
246
  other
248
247
  },
249
248
  new: 1
250
249
  };
251
- console.log(cacheItem, "cacheItem", e);
250
+ cacheItem._extend.price = (0, import_utils3.getMainPrice)(_detail, _detail.price);
252
251
  let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
253
252
  cacheItem._extend.total = _total;
254
253
  cacheItem._extend.origin_total = _total;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const ContactInfoMode: () => JSX.Element;
2
3
  export default ContactInfoMode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type ContactType = {
3
4
  country_calling_code: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface DurationProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  isEdit: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  title?: string;
@@ -153,6 +153,7 @@ export declare const getIsOnlySession: (item: any) => boolean;
153
153
  * @Date: 2024-01-26 14:09
154
154
  */
155
155
  export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
156
+ export declare const getMainPrice: (item: any, price?: number) => number;
156
157
  export declare const getProductTotalPrice: (item: any) => number;
157
158
  /**
158
159
  * @title: 判断 duration
@@ -46,6 +46,7 @@ __export(utils_exports, {
46
46
  getIsEject: () => getIsEject,
47
47
  getIsOnlySession: () => getIsOnlySession,
48
48
  getLastServer: () => getLastServer,
49
+ getMainPrice: () => getMainPrice,
49
50
  getNowTime: () => getNowTime,
50
51
  getProductTotalPrice: () => getProductTotalPrice,
51
52
  getResourceTimeIsUsable: () => getResourceTimeIsUsable,
@@ -66,6 +67,7 @@ var import_utils = require("@pisell/utils");
66
67
  var import_utils2 = require("./info/service2/utils");
67
68
  var import_lodash = require("lodash");
68
69
  var import_utilsByBooking = require("./info2/utilsByBooking");
70
+ var import_decimal = __toESM(require("decimal.js"));
69
71
  var Request = class {
70
72
  request = {};
71
73
  constructor() {
@@ -609,6 +611,15 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
609
611
  }
610
612
  return _extend;
611
613
  };
614
+ var getMainPrice = (item, price) => {
615
+ var _a;
616
+ let newPrice = new import_decimal.default(price || item._extend.price || 0);
617
+ let other = (_a = item._extend) == null ? void 0 : _a.other;
618
+ if (other == null ? void 0 : other.product_variant_id) {
619
+ newPrice = new import_decimal.default((other == null ? void 0 : other.price) || 0);
620
+ }
621
+ return newPrice.toNumber();
622
+ };
612
623
  var getProductTotalPrice = (item) => {
613
624
  var _a;
614
625
  let price = Number(item._extend.price);
@@ -698,6 +709,7 @@ var getIsEdit = (state) => {
698
709
  getIsEject,
699
710
  getIsOnlySession,
700
711
  getLastServer,
712
+ getMainPrice,
701
713
  getNowTime,
702
714
  getProductTotalPrice,
703
715
  getResourceTimeIsUsable,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos, DeviceStatus } from './const';
2
3
  import './index.less';
3
4
  interface PosProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DeviceProp } from "./const";
2
3
  interface PosProps {
3
4
  eftposName: string;