@pisell/private-materials 3.3.51 → 3.3.55

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 (211) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/preview.js +8 -8
  3. package/build/lowcode/render/default/view.css +1 -1
  4. package/build/lowcode/render/default/view.js +7 -7
  5. package/build/lowcode/view.css +1 -1
  6. package/build/lowcode/view.js +6 -6
  7. package/es/components/Sales/Summary/utils.d.ts +1 -1
  8. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  9. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Resource/index.js +5 -44
  14. package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  16. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/hooks.js +177 -218
  18. package/es/components/appointmentBooking/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/locales.d.ts +0 -3
  20. package/es/components/appointmentBooking/locales.js +0 -9
  21. package/es/components/booking/components/TabProduct/productItem/index.js +2 -14
  22. package/es/components/booking/components/drawer/index.js +2 -4
  23. package/es/components/booking/components/footer/index.d.ts +0 -1
  24. package/es/components/booking/components/voucher/index.js +17 -25
  25. package/es/components/booking/forms/footer.d.ts +1 -0
  26. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  27. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  28. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  29. package/es/components/booking/info/client/index.js +1 -2
  30. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  31. package/es/components/booking/info/date/index.d.ts +0 -1
  32. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  33. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  34. package/es/components/booking/info/index.d.ts +0 -1
  35. package/es/components/booking/info/notes/index.d.ts +0 -1
  36. package/es/components/booking/info/pet/index.js +0 -3
  37. package/es/components/booking/info/service/Lists.d.ts +0 -1
  38. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  39. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  40. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  41. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  42. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  43. package/es/components/booking/info/service2/utils.js +27 -27
  44. package/es/components/booking/info2/index.js +3 -3
  45. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  46. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  47. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  48. package/es/components/booking/info2/service/addService/utils.js +2 -5
  49. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  50. package/es/components/booking/info2/service/editService/index.js +0 -1
  51. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  52. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  53. package/es/components/eftposPay/amount.d.ts +1 -1
  54. package/es/components/eftposPay/device.d.ts +1 -1
  55. package/es/components/eftposPay/hooks.d.ts +2 -2
  56. package/es/components/eftposPay/store/index.d.ts +5 -5
  57. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  58. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  59. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  60. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  61. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  62. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  63. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  64. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  65. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  66. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  67. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  68. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  69. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  70. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  71. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  72. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  73. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +4 -23
  74. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  75. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  76. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  77. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  78. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  79. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  80. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  81. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  82. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +6 -18
  83. package/es/components/productExtension/index.d.ts +0 -1
  84. package/es/components/productSelect/components/TabProduct/index.js +10 -28
  85. package/es/components/productSelect/components/productGroup/index.js +7 -20
  86. package/es/components/productSelect/components/productGroup/index.less +1 -14
  87. package/es/components/productSelect/index.less +2 -1
  88. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  89. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  90. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  91. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  92. package/es/components/ticketBooking/components/addServiceVariant/addService.js +10 -16
  93. package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -10
  94. package/es/components/ticketBooking/components/ticketBooking/index.js +1 -3
  95. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  96. package/es/components/ticketBooking/index.js +1 -2
  97. package/es/components/ticketBooking/locales.d.ts +0 -3
  98. package/es/components/ticketBooking/locales.js +3 -12
  99. package/es/components/ticketBooking/utils/index.d.ts +1 -5
  100. package/es/components/ticketBooking/utils/index.js +3 -35
  101. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  102. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  103. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  104. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  105. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  106. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  107. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  108. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  109. package/lib/components/appointmentBooking/components/Resource/index.js +5 -44
  110. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
  111. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
  112. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  113. package/lib/components/appointmentBooking/hooks.js +3 -12
  114. package/lib/components/appointmentBooking/index.d.ts +0 -1
  115. package/lib/components/appointmentBooking/locales.d.ts +0 -3
  116. package/lib/components/appointmentBooking/locales.js +0 -3
  117. package/lib/components/booking/components/TabProduct/productItem/index.js +1 -8
  118. package/lib/components/booking/components/drawer/index.js +2 -2
  119. package/lib/components/booking/components/footer/index.d.ts +0 -1
  120. package/lib/components/booking/components/voucher/index.js +27 -31
  121. package/lib/components/booking/forms/footer.d.ts +1 -0
  122. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  123. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  124. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  125. package/lib/components/booking/info/client/index.js +1 -2
  126. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  127. package/lib/components/booking/info/date/index.d.ts +0 -1
  128. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  129. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  130. package/lib/components/booking/info/index.d.ts +0 -1
  131. package/lib/components/booking/info/notes/index.d.ts +0 -1
  132. package/lib/components/booking/info/pet/index.js +0 -3
  133. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  134. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  135. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  136. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  137. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  138. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  139. package/lib/components/booking/info/service2/utils.js +2 -2
  140. package/lib/components/booking/info2/index.js +4 -7
  141. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  142. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  143. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  144. package/lib/components/booking/info2/service/addService/utils.js +2 -4
  145. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  146. package/lib/components/booking/info2/service/editService/index.js +0 -1
  147. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  148. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  149. package/lib/components/eftposPay/amount.d.ts +1 -1
  150. package/lib/components/eftposPay/device.d.ts +1 -1
  151. package/lib/components/eftposPay/hooks.d.ts +2 -2
  152. package/lib/components/eftposPay/store/index.d.ts +5 -5
  153. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  154. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
  155. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  156. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  157. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  158. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  159. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  160. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  161. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  162. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  163. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  164. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  165. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  166. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  167. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  168. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  169. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +8 -18
  170. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  171. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  172. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  173. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  174. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  175. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  176. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  177. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  178. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +1 -8
  179. package/lib/components/productExtension/index.d.ts +0 -1
  180. package/lib/components/productSelect/components/TabProduct/index.js +6 -19
  181. package/lib/components/productSelect/components/productGroup/index.js +4 -24
  182. package/lib/components/productSelect/components/productGroup/index.less +1 -14
  183. package/lib/components/productSelect/index.less +2 -1
  184. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  185. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  186. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  187. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  188. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +14 -25
  189. package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -10
  190. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -3
  191. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  192. package/lib/components/ticketBooking/index.js +1 -2
  193. package/lib/components/ticketBooking/locales.d.ts +0 -3
  194. package/lib/components/ticketBooking/locales.js +3 -6
  195. package/lib/components/ticketBooking/utils/index.d.ts +1 -5
  196. package/lib/components/ticketBooking/utils/index.js +3 -35
  197. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  198. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  199. package/package.json +4 -4
  200. package/es/components/appointmentBooking/assets/resource.svg +0 -1
  201. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +0 -21
  202. package/es/components/productSelect/components/TabProduct/tabs/index.js +0 -243
  203. package/es/components/productSelect/components/TabProduct/tabs/index.less +0 -126
  204. package/es/components/productSelect/components/pisellPriceText/index.d.ts +0 -11
  205. package/es/components/productSelect/components/pisellPriceText/index.js +0 -43
  206. package/lib/components/appointmentBooking/assets/resource.svg +0 -1
  207. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +0 -21
  208. package/lib/components/productSelect/components/TabProduct/tabs/index.js +0 -202
  209. package/lib/components/productSelect/components/TabProduct/tabs/index.less +0 -126
  210. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +0 -11
  211. package/lib/components/productSelect/components/pisellPriceText/index.js +0 -72
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: () => JSX.Element;
3
4
  export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EmptyHolderModal: (props: any) => JSX.Element;
3
4
  export default EmptyHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Event: () => JSX.Element;
3
4
  export default Event;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: () => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Information: () => JSX.Element;
3
4
  export default Information;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const InformationOptionsModal: (props: any) => JSX.Element;
3
4
  export default InformationOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const OrderProductModal: (props: any) => JSX.Element;
3
4
  export default OrderProductModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
2
3
  export default RemoveOptionConfirmModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Resource: () => JSX.Element;
3
4
  export default Resource;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type CallToBookProps = {
2
3
  show: boolean;
3
4
  type: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const WeekItem: (props: any) => JSX.Element;
3
4
  export default WeekItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type CalenDateWeekProps = {
3
4
  currentDate: string;
@@ -3,8 +3,6 @@ import OpenCard from "../../OpenCard";
3
3
  import { PisellCheckboxGroup, PisellText } from '@pisell/materials';
4
4
  import { locales } from '@pisell/utils';
5
5
  import { useEventDetail } from "../../../../Sales";
6
- import Decimal from 'decimal.js';
7
- import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
8
6
  var BookingOptions = function BookingOptions(props) {
9
7
  var _detail$bookingOption, _detail$bookingOption2;
10
8
  var _useEventDetail = useEventDetail(),
@@ -29,29 +27,12 @@ var BookingOptions = function BookingOptions(props) {
29
27
  optionClassName: "option-item ".concat((detail === null || detail === void 0 || (_detail$bookingOption2 = detail.bookingOptions) === null || _detail$bookingOption2 === void 0 ? void 0 : _detail$bookingOption2.length) > 1 ? 'option-item-pointer' : ''),
30
28
  value: currentBookingOption,
31
29
  renderOption: function renderOption(option) {
32
- var _ref = option._originData || {},
33
- price = _ref.price,
34
- is_bundle = _ref.is_bundle,
35
- minimum_markup_price = _ref.minimum_markup_price;
36
- if (!option._originData || !is_bundle) {
37
- return /*#__PURE__*/React.createElement("div", {
38
- className: "item"
39
- }, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellText.Amount, {
40
- value: option.price,
41
- showCurrencySymbol: true,
42
- className: "price"
43
- }));
44
- }
45
- var _price = price;
46
- if (is_bundle) {
47
- _price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
48
- }
49
30
  return /*#__PURE__*/React.createElement("div", {
50
31
  className: "item"
51
- }, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellPriceText, {
52
- className: "price",
53
- value: _price,
54
- isMini: true
32
+ }, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellText.Amount, {
33
+ value: option.price,
34
+ showCurrencySymbol: true,
35
+ className: "price"
55
36
  }));
56
37
  },
57
38
  onChange: onChange
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem } from '../../type';
2
3
  declare type CalendarItemProps = {
3
4
  month: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ScheduleTimeItem: ({ timeList }: any) => JSX.Element;
3
4
  export default ScheduleTimeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
3
4
  export default SetupForm;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
2
3
  import './index.less';
3
4
  interface WalletUseListProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface CustomerListProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PopoverProps } from 'antd';
2
3
  import { CustomerCardProps } from './CustomerCard';
3
4
  import './index.less';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const Actor: ({ name }: {
3
2
  name: string;
4
3
  }) => JSX.Element;
@@ -1,3 +1,3 @@
1
- import './index.less';
1
+ import "./index.less";
2
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
3
  export default ProductItem;
@@ -1,27 +1,18 @@
1
- import React from 'react';
2
- import { image } from '@pisell/utils';
3
- import classNames from 'classnames';
4
- import Decimal from 'decimal.js';
5
- import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
1
+ import React from "react";
2
+ import { formatAmount, image } from "@pisell/utils";
3
+ import classNames from "classnames";
6
4
  import "./index.less";
7
5
  var ProductItem = function ProductItem(_ref) {
8
6
  var _ref$item = _ref.item,
9
7
  item = _ref$item === void 0 ? {} : _ref$item,
10
8
  _onClick = _ref.onClick,
11
9
  _ref$amountSymbol = _ref.amountSymbol,
12
- amountSymbol = _ref$amountSymbol === void 0 ? '$' : _ref$amountSymbol,
10
+ amountSymbol = _ref$amountSymbol === void 0 ? "$" : _ref$amountSymbol,
13
11
  style = _ref.style,
14
12
  className = _ref.className;
15
- var price = item.price,
16
- is_bundle = item.is_bundle,
17
- minimum_markup_price = item.minimum_markup_price;
18
- var _price = price;
19
- if (is_bundle) {
20
- _price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
21
- }
22
13
  return /*#__PURE__*/React.createElement("div", {
23
14
  style: style,
24
- className: classNames('product-item-card', className),
15
+ className: classNames("product-item-card", className),
25
16
  onClick: function onClick() {
26
17
  _onClick(item);
27
18
  }
@@ -34,9 +25,6 @@ var ProductItem = function ProductItem(_ref) {
34
25
  className: "product-item-card-title"
35
26
  }, item.title), /*#__PURE__*/React.createElement("div", {
36
27
  className: "product-item-card-price"
37
- }, /*#__PURE__*/React.createElement(PisellPriceText, {
38
- value: _price,
39
- isMini: is_bundle
40
- }))));
28
+ }, formatAmount(item.price, 2, amountSymbol))));
41
29
  };
42
30
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface ProductExtensionProps {
4
3
  onDataChange: any;
@@ -12,9 +12,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
12
12
  import React, { useEffect, useMemo, useRef, useState } from 'react';
13
13
  import { Skeleton } from 'antd';
14
14
  import { PisellEmpty } from '@pisell/materials';
15
- import { useMemoizedFn, useDebounceFn } from 'ahooks';
15
+ import { useMemoizedFn } from 'ahooks';
16
16
  import { locales } from '@pisell/utils';
17
- import Tabs from "./tabs";
17
+ import Tabs from "../../../booking/components/TabProduct/tabs";
18
18
  import ProductGroup, { ProductGroupSkeleton } from "../productGroup";
19
19
  var io = null;
20
20
  var TabProduct = function TabProduct(props) {
@@ -43,37 +43,19 @@ var TabProduct = function TabProduct(props) {
43
43
  });
44
44
  }
45
45
  }, [list]);
46
-
47
- // 添加防抖的scroll函数
48
- var debouncedScroll = useDebounceFn(function (id) {
49
- var _tabsRef$current;
50
- tabsRef === null || tabsRef === void 0 || (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 || _tabsRef$current.scroll(id);
51
- }, {
52
- wait: 100
53
- } // 100ms防抖
54
- );
55
46
  var handleObserver = useMemoizedFn(function () {
56
47
  var _marginTop = 270;
57
48
  var _marginBottom = window.innerHeight - 70 - 200 - 70;
58
49
  var _rootMargin = "".concat(_marginTop * -1, "px 0px ").concat(_marginBottom * -1, "px 0px");
59
50
  io = new IntersectionObserver(function (entries) {
60
- var enteringEntries = entries.filter(function (entry) {
61
- return entry.isIntersecting;
62
- });
63
- if (enteringEntries.length > 0) {
64
- var _topMostEntry$target;
65
- // 选择最靠近顶部的元素
66
- var topMostEntry = enteringEntries.reduce(function (top, current) {
67
- return current.boundingClientRect.top < top.boundingClientRect.top ? current : top;
68
- });
69
- var _topMostEntry$target$ = topMostEntry === null || topMostEntry === void 0 || (_topMostEntry$target = topMostEntry.target) === null || _topMostEntry$target === void 0 || (_topMostEntry$target = _topMostEntry$target.id) === null || _topMostEntry$target === void 0 ? void 0 : _topMostEntry$target.split('-'),
70
- _topMostEntry$target$2 = _slicedToArray(_topMostEntry$target$, 2),
71
- name = _topMostEntry$target$2[0],
72
- id = _topMostEntry$target$2[1];
73
- var newGroupId = Number(id);
74
- setCurrentGroupId(newGroupId);
75
- debouncedScroll.run(id);
76
- // tabsRef?.current?.scroll(id);
51
+ if (entries[0].isIntersecting) {
52
+ var _entries$, _tabsRef$current;
53
+ var _entries$0$target$id$ = (_entries$ = entries[0]) === null || _entries$ === void 0 || (_entries$ = _entries$.target) === null || _entries$ === void 0 || (_entries$ = _entries$.id) === null || _entries$ === void 0 ? void 0 : _entries$.split('-'),
54
+ _entries$0$target$id$2 = _slicedToArray(_entries$0$target$id$, 2),
55
+ name = _entries$0$target$id$2[0],
56
+ id = _entries$0$target$id$2[1];
57
+ setCurrentGroupId(Number(id));
58
+ tabsRef === null || tabsRef === void 0 || (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 || _tabsRef$current.scroll(id);
77
59
  }
78
60
  }, {
79
61
  root: null,
@@ -1,11 +1,10 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import GridLayout from "../gridLayout";
4
+ import { PisellText } from '@pisell/materials';
4
5
  import { locales } from '@pisell/utils';
5
6
  import { Skeleton } from 'antd';
6
- import Decimal from 'decimal.js';
7
7
  import "./index.less";
8
- import PisellPriceText from "../pisellPriceText";
9
8
 
10
9
  // 装修端配置项均为 isXXX,这里先适配一部分
11
10
 
@@ -56,29 +55,17 @@ var ProductGroup = function ProductGroup(_ref) {
56
55
  return "".concat(locales.getText('pisell2.product-select.stock'), "\uFF1A").concat(item.stock_quantity);
57
56
  };
58
57
  var renderPrice = function renderPrice(item) {
59
- var _price = item.price,
60
- _original_price = item.original_price,
61
- is_bundle = item.is_bundle,
62
- minimum_markup_price = item.minimum_markup_price;
63
- var price = _price;
64
- var original_price = _original_price;
65
- if (is_bundle) {
66
- price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
67
- original_price = new Decimal(original_price).plus(new Decimal(minimum_markup_price)).toFixed(2);
68
- }
69
- if (!showZeroPrice && !parseFloat(price)) return null;
58
+ if (!showZeroPrice && !parseFloat(item.price)) return null;
70
59
  return !!isPrice || !!isOriginPrice ? /*#__PURE__*/React.createElement("div", {
71
60
  className: "price-info"
72
61
  }, isPrice ? /*#__PURE__*/React.createElement("div", {
73
62
  className: "price"
74
- }, /*#__PURE__*/React.createElement(PisellPriceText, {
75
- value: price,
76
- isMini: is_bundle
77
- })) : null, !!isOriginPrice && parseFloat(original_price) ? /*#__PURE__*/React.createElement("div", {
63
+ }, /*#__PURE__*/React.createElement(PisellText.Amount, {
64
+ value: item.price
65
+ })) : null, !!isOriginPrice && parseFloat(item.original_price) ? /*#__PURE__*/React.createElement("div", {
78
66
  className: "original-price"
79
- }, /*#__PURE__*/React.createElement(PisellPriceText, {
80
- value: original_price,
81
- isMini: is_bundle
67
+ }, /*#__PURE__*/React.createElement(PisellText.Amount, {
68
+ value: item.original_price
82
69
  })) : null) : null;
83
70
  };
84
71
  var renderItem = function renderItem(item) {
@@ -17,7 +17,6 @@
17
17
  }
18
18
 
19
19
  .product-card {
20
- user-select: none;
21
20
  cursor: pointer;
22
21
  border-radius: 12px;
23
22
  background: var(--ps-card-bg, #fff);
@@ -196,19 +195,7 @@
196
195
  font-style: normal;
197
196
  font-weight: 400;
198
197
  line-height: 24px;
199
- // text-decoration-line: line-through;
200
- position: relative;
201
- &::before {
202
- content: '';
203
- display: block;
204
- position: absolute;
205
- top: 50%;
206
- left: 0;
207
- width: 100%;
208
- height: 1px;
209
- background-color: #4e4e4e;
210
- transform: translateY(-50%);
211
- }
198
+ text-decoration-line: line-through;
212
199
 
213
200
  > span {
214
201
  vertical-align: middle;
@@ -58,13 +58,14 @@
58
58
  .booking-pisell-tabs-tab {
59
59
  .booking-pisell-tabs-tab-content {
60
60
  background: var(--ps-tab-item-bg, #ffffff) !important;
61
- font-weight: 600;
61
+ font-weight: 400;
62
62
  }
63
63
  }
64
64
 
65
65
  .booking-pisell-tabs-tab-active {
66
66
  .booking-pisell-tabs-tab-content {
67
67
  background: var(--ps-tab-item-active-bg, #8157d5) !important;
68
+ font-weight: 600;
68
69
  }
69
70
  }
70
71
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ProductProps } from '../../type';
2
3
  declare const Product: (props: ProductProps) => JSX.Element;
3
4
  export default Product;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: () => JSX.Element;
3
4
  export default Cart;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useAddService: (id?: number, type?: string) => JSX.Element | null;
2
3
  export default useAddService;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (key?: number | undefined) => JSX.Element | null;
2
3
  export default useClearCart;
@@ -20,6 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
  import { getUniqueId, locales } from '@pisell/utils';
21
21
  import React, { useEffect, useMemo, useRef, useState } from 'react';
22
22
  import { useMemoizedFn } from 'ahooks';
23
+ import { PisellToast } from '@pisell/materials';
23
24
  import useEngineContext from "../../../../hooks/useEngineContext";
24
25
  import { isSessionProduct, request, getProductTotalPrice, getIsEject } from "../../../booking/utils";
25
26
  import { getProductExtend } from "../../../booking/info2/service/addService/utils";
@@ -30,16 +31,16 @@ import { getProductDetail } from "../../../booking/info/service/serve";
30
31
  import { useService } from "../../../booking/info/service/serviceManager";
31
32
  import ProductSelect from "../../../productSelect";
32
33
  import "./index.less";
33
- import { addService, addServiceScroll } from "../../utils";
34
+ import { addService } from "../../utils";
34
35
  import NotAvailable from "../notAvailable";
35
36
  var AddSerivce = function AddSerivce(props) {
36
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _state$bookingConfig2, _state$client2, _state$service5, _state$service6;
37
+ var _context$appHelper$ut, _context$appHelper$ut2, _state$bookingConfig2, _state$client2, _state$service5, _state$service6;
37
38
  var onEdit = props.onEdit,
38
39
  state = props.state,
39
40
  dispatch = props.dispatch,
40
41
  _props$renderMode = props.renderMode,
41
42
  renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode;
42
- var _useState = useState(true),
43
+ var _useState = useState(false),
43
44
  _useState2 = _slicedToArray(_useState, 2),
44
45
  loading = _useState2[0],
45
46
  setLoading = _useState2[1];
@@ -47,7 +48,6 @@ var AddSerivce = function AddSerivce(props) {
47
48
  var notAvailableRef = useRef(null);
48
49
  var isLoadedServiceRef = useRef(false);
49
50
  request.setRequest(context.appHelper.utils.request);
50
- var Toast = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.Toast;
51
51
  var _useService = useService({
52
52
  renderMode: renderMode,
53
53
  onEdit: onEdit,
@@ -287,7 +287,7 @@ var AddSerivce = function AddSerivce(props) {
287
287
  },
288
288
  callback: function () {
289
289
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e, extension_type, detail) {
290
- var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI, _Toast$success, _addService, _list, quantity;
290
+ var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI, _list;
291
291
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
292
292
  while (1) switch (_context3.prev = _context3.next) {
293
293
  case 0:
@@ -356,23 +356,17 @@ var AddSerivce = function AddSerivce(props) {
356
356
  }
357
357
  cacheItem = getProductExtend({
358
358
  cacheItem: cacheItem,
359
- state: state,
360
- isDisabledTime: true
359
+ state: state
361
360
  });
362
361
  if (state.renderType === 'eventBooking') {
363
362
  cacheItem.autoClose = false;
364
363
  }
365
364
  if (cacheItem.autoClose) {
366
365
  cacheItem.autoClose = false;
367
- _addService = addService(state.service.value, cacheItem), _list = _addService.list, quantity = _addService.quantity;
368
- Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, /*#__PURE__*/React.createElement("div", {
369
- className: "add-toast-wrap"
370
- }, /*#__PURE__*/React.createElement("div", {
371
- className: "add-toast-title"
372
- }, cacheItem.title), /*#__PURE__*/React.createElement("div", {
373
- className: "add-toast-quantity"
374
- }, locales.getText('pisell2.ticket-booking.in-cart')(quantity || 1))));
375
- addServiceScroll(e.rowKey, cacheItem);
366
+ _list = addService(state.service.value, cacheItem);
367
+ PisellToast({
368
+ content: locales.getText('pisell2.ticket-booking.add-to-cart')
369
+ });
376
370
  dispatch({
377
371
  type: 'setService',
378
372
  payload: {
@@ -1,10 +0,0 @@
1
- .add-toast-wrap {
2
- width: 190px;
3
- .add-toast-title {
4
- margin-bottom: 12px;
5
- line-height: 22px;
6
- }
7
- .add-toast-quantity {
8
- font-size: 14px;
9
- }
10
- }
@@ -286,7 +286,6 @@ var TicketBooking = function TicketBooking() {
286
286
  }
287
287
  }
288
288
  }
289
- _modalState.service.value = [];
290
289
  _modalState.service.cacheItem = null;
291
290
  _modalState.service.addTimeModal = false;
292
291
  _modalState.service.changeService = false;
@@ -809,8 +808,7 @@ var TicketBooking = function TicketBooking() {
809
808
  locale: engineProps.locale,
810
809
  refreshData: _refreshData,
811
810
  setActiveTab: _setActiveTab,
812
- clearAllValue: _clearAllValue,
813
- drawerMask: true
811
+ clearAllValue: _clearAllValue
814
812
  }),
815
813
  setGlobalState: _setModalState,
816
814
  setState: setState,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Dayjs } from 'dayjs';
2
3
  import './index.less';
3
4
  interface ITimeBarProps {
@@ -8,7 +8,6 @@ import React, { useLayoutEffect, useMemo, useRef } from 'react';
8
8
  import { Provider, createStore } from "./miniRedux";
9
9
  import { locales } from '@pisell/utils';
10
10
  import dayjs from 'dayjs';
11
- import { cloneDeep } from 'lodash';
12
11
  import TicketBooking from "./components/ticketBooking/index";
13
12
  import { request } from "../../utils";
14
13
  import useEngineContext from "../../hooks/useEngineContext";
@@ -142,7 +141,7 @@ export default (function (props) {
142
141
  request.setRequest(context.appHelper.utils.request);
143
142
  }, []);
144
143
  useMemo(function () {
145
- var store = createStore(_objectSpread(_objectSpread({}, cloneDeep(initialState)), {}, {
144
+ var store = createStore(_objectSpread(_objectSpread({}, initialState), {}, {
146
145
  bookingConfigParams: bookingConfigParams,
147
146
  productExtensionType: productExtensionType
148
147
  }));
@@ -47,7 +47,6 @@ declare const _default: {
47
47
  "pisell2.ticket-booking.add-to-cart": string;
48
48
  "pisell2.ticket-booking.not-available-title": string;
49
49
  "pisell2.ticket-booking.not-available-ok": string;
50
- "pisell2.ticket-booking.in-cart": (number: number) => string;
51
50
  };
52
51
  "zh-CN": {
53
52
  "pisell2.ticket-booking.info": string;
@@ -97,7 +96,6 @@ declare const _default: {
97
96
  "pisell2.ticket-booking.add-to-cart": string;
98
97
  "pisell2.ticket-booking.not-available-title": string;
99
98
  "pisell2.ticket-booking.not-available-ok": string;
100
- "pisell2.ticket-booking.in-cart": (number: number) => string;
101
99
  };
102
100
  "zh-HK": {
103
101
  "pisell2.ticket-booking.info": string;
@@ -147,7 +145,6 @@ declare const _default: {
147
145
  "pisell2.ticket-booking.add-to-cart": string;
148
146
  "pisell2.ticket-booking.not-available-title": string;
149
147
  "pisell2.ticket-booking.not-available-ok": string;
150
- "pisell2.ticket-booking.in-cart": (number: number) => string;
151
148
  };
152
149
  };
153
150
  export default _default;
@@ -46,10 +46,7 @@ export default {
46
46
  "pisell2.ticket-booking.create-new": "Create new",
47
47
  "pisell2.ticket-booking.add-to-cart": "Added to Cart",
48
48
  "pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
49
- "pisell2.ticket-booking.not-available-ok": "OK",
50
- "pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
51
- return "".concat(number, " in cart");
52
- }
49
+ "pisell2.ticket-booking.not-available-ok": "OK"
53
50
  },
54
51
  "zh-CN": {
55
52
  "pisell2.ticket-booking.info": "信息",
@@ -98,10 +95,7 @@ export default {
98
95
  "pisell2.ticket-booking.create-new": "新建",
99
96
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
100
97
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
101
- "pisell2.ticket-booking.not-available-ok": "好的",
102
- "pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
103
- return "\u5DF2\u6709".concat(number, "\u4EF6");
104
- }
98
+ "pisell2.ticket-booking.not-available-ok": "好的"
105
99
  },
106
100
  "zh-HK": {
107
101
  "pisell2.ticket-booking.info": "資訊",
@@ -150,9 +144,6 @@ export default {
150
144
  "pisell2.ticket-booking.create-new": "新建",
151
145
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
152
146
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
153
- "pisell2.ticket-booking.not-available-ok": "好的",
154
- "pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
155
- return "\u5DF2\u6709".concat(number, "\u4EF6");
156
- }
147
+ "pisell2.ticket-booking.not-available-ok": "好的"
157
148
  }
158
149
  };
@@ -12,8 +12,4 @@ export declare const restoreProductOtherData: (data: any) => {
12
12
  product_variant_id: number;
13
13
  quantity: number;
14
14
  } | undefined;
15
- export declare const addService: (list: any[], addItem: any) => {
16
- list: any[];
17
- quantity: any;
18
- };
19
- export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
15
+ export declare const addService: (list: any[], addItem: any) => any[];