@pisell/private-materials 3.3.13 → 3.3.14

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 (193) 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.js +2 -2
  6. package/build/lowcode/view.js +2 -2
  7. package/es/components/appointmentBooking/components/Services/index.js +2 -2
  8. package/es/components/booking/deposit/DepositItem/index.js +1 -0
  9. package/es/components/booking/info/utils.js +1 -1
  10. package/es/components/booking/info2/utils.js +2 -1
  11. package/lib/components/appointmentBooking/components/Services/index.js +1 -1
  12. package/lib/components/booking/deposit/DepositItem/index.js +1 -0
  13. package/lib/components/booking/info/utils.js +1 -1
  14. package/lib/components/booking/info2/utils.js +2 -1
  15. package/package.json +3 -3
  16. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +0 -7
  17. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
  18. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  19. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -3
  20. package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -36
  21. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
  22. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
  23. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -4
  24. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -3
  25. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -3
  26. package/es/components/appointmentBooking/components/Form/index.d.ts +0 -4
  27. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -3
  28. package/es/components/appointmentBooking/components/Guest/index.d.ts +0 -4
  29. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
  30. package/es/components/appointmentBooking/components/Resource/index.d.ts +0 -7
  31. package/es/components/appointmentBooking/components/Resource/utils.d.ts +0 -5
  32. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  33. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +0 -4
  34. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  35. package/es/components/appointmentBooking/context.d.ts +0 -29
  36. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  37. package/es/components/appointmentBooking/deposit/index.d.ts +0 -3
  38. package/es/components/appointmentBooking/hooks.d.ts +0 -106
  39. package/es/components/appointmentBooking/index.d.ts +0 -3
  40. package/es/components/appointmentBooking/utils.d.ts +0 -114
  41. package/es/components/booking/components/voucher/index.d.ts +0 -3
  42. package/es/components/booking/forms/footer.d.ts +0 -6
  43. package/es/components/booking/forms/forms.d.ts +0 -26
  44. package/es/components/booking/forms/sendModal/index.d.ts +0 -27
  45. package/es/components/booking/info/client/index.d.ts +0 -4
  46. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -43
  47. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -3
  48. package/es/components/booking/info/service/addTimeModal/utils.d.ts +0 -31
  49. package/es/components/booking/info/service/editService/index.d.ts +0 -7
  50. package/es/components/booking/info/utils.d.ts +0 -46
  51. package/es/components/booking/info2/service/editService/index.d.ts +0 -7
  52. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  53. package/es/components/eftposPay/component/fail/index.d.ts +0 -3
  54. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -9
  55. package/es/components/eftposPay/hooks.d.ts +0 -35
  56. package/es/components/eftposPay/locales.d.ts +0 -330
  57. package/es/components/eftposPay/pay.d.ts +0 -20
  58. package/es/components/eftposPay/payo/config.d.ts +0 -12
  59. package/es/components/eftposPay/payo/hooks.d.ts +0 -10
  60. package/es/components/eftposPay/tyro/index.d.ts +0 -9
  61. package/es/components/eftposPay/windcave/helper.d.ts +0 -23
  62. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  63. package/es/components/eventBooking/components/progressBar/index.d.ts +0 -16
  64. package/es/components/eventBooking/components/resourceDisplay/index.d.ts +0 -23
  65. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  66. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
  67. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
  68. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
  69. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
  70. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
  71. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
  72. package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
  73. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  74. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
  75. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
  76. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
  77. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -111
  78. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
  79. package/es/components/pay/toC/index.d.ts +0 -3
  80. package/es/components/pay/toC/utils.d.ts +0 -49
  81. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
  82. package/es/components/productSelect/components/gridLayout/index.d.ts +0 -9
  83. package/es/components/productSelect/components/productGroup/index.d.ts +0 -34
  84. package/es/components/productSelect/index.d.ts +0 -23
  85. package/es/components/ruleSetting/server.d.ts +0 -4
  86. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -3
  87. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -2
  88. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
  89. package/es/components/subTotal/index.d.ts +0 -22
  90. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  91. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -3
  92. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  93. package/es/components/wallet/Detail/index.d.ts +0 -42
  94. package/es/components/wallet/Voucher/index.d.ts +0 -12
  95. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  96. package/es/components/wallet/index.d.ts +0 -10
  97. package/es/components/walletList/index.d.ts +0 -28
  98. package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
  99. package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
  100. package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
  101. package/es/components/workSpaceList/components/EditableString/index.d.ts +0 -21
  102. package/es/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
  103. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
  104. package/es/components/workSpaceList/components/Sort/index.d.ts +0 -7
  105. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +0 -7
  106. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
  107. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  108. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -3
  109. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -36
  110. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
  111. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
  112. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -4
  113. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -3
  114. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -3
  115. package/lib/components/appointmentBooking/components/Form/index.d.ts +0 -4
  116. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -3
  117. package/lib/components/appointmentBooking/components/Guest/index.d.ts +0 -4
  118. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
  119. package/lib/components/appointmentBooking/components/Resource/index.d.ts +0 -7
  120. package/lib/components/appointmentBooking/components/Resource/utils.d.ts +0 -5
  121. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  122. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +0 -4
  123. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  124. package/lib/components/appointmentBooking/context.d.ts +0 -29
  125. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  126. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -3
  127. package/lib/components/appointmentBooking/hooks.d.ts +0 -106
  128. package/lib/components/appointmentBooking/index.d.ts +0 -3
  129. package/lib/components/appointmentBooking/utils.d.ts +0 -114
  130. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  131. package/lib/components/booking/forms/footer.d.ts +0 -6
  132. package/lib/components/booking/forms/forms.d.ts +0 -26
  133. package/lib/components/booking/forms/sendModal/index.d.ts +0 -27
  134. package/lib/components/booking/info/client/index.d.ts +0 -4
  135. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -43
  136. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -3
  137. package/lib/components/booking/info/service/addTimeModal/utils.d.ts +0 -31
  138. package/lib/components/booking/info/service/editService/index.d.ts +0 -7
  139. package/lib/components/booking/info/utils.d.ts +0 -46
  140. package/lib/components/booking/info2/service/editService/index.d.ts +0 -7
  141. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  142. package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
  143. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -9
  144. package/lib/components/eftposPay/hooks.d.ts +0 -35
  145. package/lib/components/eftposPay/locales.d.ts +0 -330
  146. package/lib/components/eftposPay/pay.d.ts +0 -20
  147. package/lib/components/eftposPay/payo/config.d.ts +0 -12
  148. package/lib/components/eftposPay/payo/hooks.d.ts +0 -10
  149. package/lib/components/eftposPay/tyro/index.d.ts +0 -9
  150. package/lib/components/eftposPay/windcave/helper.d.ts +0 -23
  151. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  152. package/lib/components/eventBooking/components/progressBar/index.d.ts +0 -16
  153. package/lib/components/eventBooking/components/resourceDisplay/index.d.ts +0 -23
  154. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  155. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
  156. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
  157. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
  158. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
  159. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
  160. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
  161. package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
  162. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  163. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
  164. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
  165. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
  166. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -111
  167. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
  168. package/lib/components/pay/toC/index.d.ts +0 -3
  169. package/lib/components/pay/toC/utils.d.ts +0 -49
  170. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
  171. package/lib/components/productSelect/components/gridLayout/index.d.ts +0 -9
  172. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -34
  173. package/lib/components/productSelect/index.d.ts +0 -23
  174. package/lib/components/ruleSetting/server.d.ts +0 -4
  175. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -3
  176. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -2
  177. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
  178. package/lib/components/subTotal/index.d.ts +0 -22
  179. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  180. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -3
  181. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  182. package/lib/components/wallet/Detail/index.d.ts +0 -42
  183. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  184. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  185. package/lib/components/wallet/index.d.ts +0 -10
  186. package/lib/components/walletList/index.d.ts +0 -28
  187. package/lib/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
  188. package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
  189. package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
  190. package/lib/components/workSpaceList/components/EditableString/index.d.ts +0 -21
  191. package/lib/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
  192. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
  193. package/lib/components/workSpaceList/components/Sort/index.d.ts +0 -7
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'react';
17
17
  import dayjs from 'dayjs';
18
- import { locales } from '@pisell/utils';
18
+ import { isMobile, locales } from '@pisell/utils';
19
19
  import { PisellToast } from '@pisell/materials';
20
20
  import ProductSelect from "../../../productSelect";
21
21
  import useEngineContext from "../../../../hooks/useEngineContext";
@@ -179,7 +179,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
179
179
  }, /*#__PURE__*/React.createElement(ProductSelect, {
180
180
  dataSource: products,
181
181
  onChange: handleSelectProduct,
182
- scrollDom: '.parallel-booking-wrap',
182
+ scrollDom: isMobile() ? '.parallel-content-wrap' : '.parallel-booking-wrap',
183
183
  loading: loading,
184
184
  emptyDescription: locales.getText('pisell2.appointment.booking.empty.service'),
185
185
  token: {
@@ -44,6 +44,7 @@ var DepositItem = function DepositItem(props) {
44
44
  }, []);
45
45
  var items = [{
46
46
  key: 'send',
47
+ disabled: isPaid || isBookingCancelled,
47
48
  label: /*#__PURE__*/React.createElement("div", null, locales.getText('pisell2.text.send-mail'))
48
49
  }, {
49
50
  key: '1',
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
95
95
  if (renderType === 'eventBooking') {
96
96
  return false;
97
97
  }
98
- var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327];
98
+ var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813];
99
99
  return booking4Shops.includes(shopId);
100
100
  };
101
101
  function generateDateRange(start, end) {
@@ -16,8 +16,9 @@ export var getFormatResourceListAndMap = function getFormatResourceListAndMap(da
16
16
  if (((_item$combined_resour = item.combined_resource) === null || _item$combined_resour === void 0 ? void 0 : _item$combined_resour.status) === 1 && (_item$combined_resour2 = item.combined_resource) !== null && _item$combined_resour2 !== void 0 && (_item$combined_resour2 = _item$combined_resour2.resource_ids) !== null && _item$combined_resour2 !== void 0 && _item$combined_resour2.length) {
17
17
  var _item$combined_resour3;
18
18
  return (_item$combined_resour3 = item.combined_resource) === null || _item$combined_resour3 === void 0 ? void 0 : _item$combined_resour3.resource_ids.reduce(function (pre, cur) {
19
+ var _map$cur;
19
20
  var pax = 0;
20
- map[cur].times.forEach(function (time) {
21
+ (((_map$cur = map[cur]) === null || _map$cur === void 0 ? void 0 : _map$cur.times) || []).forEach(function (time) {
21
22
  time.event_list.forEach(function (event) {
22
23
  if (event.id !== bookingId) {
23
24
  pax += (event === null || event === void 0 ? void 0 : event.pax) || 0;
@@ -139,7 +139,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
139
139
  {
140
140
  dataSource: products,
141
141
  onChange: handleSelectProduct,
142
- scrollDom: ".parallel-booking-wrap",
142
+ scrollDom: (0, import_utils.isMobile)() ? ".parallel-content-wrap" : ".parallel-booking-wrap",
143
143
  loading,
144
144
  emptyDescription: import_utils.locales.getText(
145
145
  "pisell2.appointment.booking.empty.service"
@@ -83,6 +83,7 @@ var DepositItem = (props) => {
83
83
  const items = [
84
84
  {
85
85
  key: "send",
86
+ disabled: isPaid || isBookingCancelled,
86
87
  label: /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("pisell2.text.send-mail"))
87
88
  },
88
89
  {
@@ -103,7 +103,7 @@ var isBooking4Shop = (shopId, renderType) => {
103
103
  if (renderType === "eventBooking") {
104
104
  return false;
105
105
  }
106
- const booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327];
106
+ const booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813];
107
107
  return booking4Shops.includes(shopId);
108
108
  };
109
109
  function generateDateRange(start, end) {
@@ -33,8 +33,9 @@ var getFormatResourceListAndMap = (data, bookingId) => {
33
33
  var _a, _b, _c, _d;
34
34
  if (((_a = item.combined_resource) == null ? void 0 : _a.status) === 1 && ((_c = (_b = item.combined_resource) == null ? void 0 : _b.resource_ids) == null ? void 0 : _c.length)) {
35
35
  return (_d = item.combined_resource) == null ? void 0 : _d.resource_ids.reduce((pre, cur) => {
36
+ var _a2;
36
37
  let pax = 0;
37
- map[cur].times.forEach((time) => {
38
+ (((_a2 = map[cur]) == null ? void 0 : _a2.times) || []).forEach((time) => {
38
39
  time.event_list.forEach((event) => {
39
40
  if (event.id !== bookingId) {
40
41
  pax += (event == null ? void 0 : event.pax) || 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.3.13",
3
+ "version": "3.3.14",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -61,8 +61,8 @@
61
61
  "decimal.js": "^10.4.3",
62
62
  "@pisell/utils": "1.0.42",
63
63
  "@pisell/materials": "3.3.5",
64
- "@pisell/date-picker": "3.0.2",
65
- "@pisell/icon": "0.0.11"
64
+ "@pisell/icon": "0.0.11",
65
+ "@pisell/date-picker": "3.0.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface ContinueButtonProps {
4
- onNext?: () => void;
5
- }
6
- declare const ContinueButton: React.FC<ContinueButtonProps>;
7
- export default ContinueButton;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
- export default Total;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const CartItem: ({ onNext }: any) => JSX.Element;
3
- export default CartItem;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
3
- export default Cart;
@@ -1,36 +0,0 @@
1
- interface CheckLoginParams {
2
- isLogin: boolean;
3
- openLoginModal: (params: {
4
- callback: (status: string) => void;
5
- }) => void;
6
- isFormSubject: boolean;
7
- utils: any;
8
- accountLists: any[];
9
- appointmentBooking: any;
10
- getHolders: () => void;
11
- }
12
- export declare const checkLogin: ({ isLogin, openLoginModal, isFormSubject, utils, accountLists, appointmentBooking, getHolders, }: CheckLoginParams) => Promise<boolean>;
13
- interface CheckHolderParams {
14
- isFormSubject: boolean;
15
- checkAccount: (type: string) => boolean;
16
- carts: any[];
17
- }
18
- export declare const checkHolder: ({ isFormSubject, checkAccount, carts }: CheckHolderParams) => false | any[];
19
- interface CheckResourceParams {
20
- carts: any[];
21
- resources: any[];
22
- }
23
- /**
24
- * @title: 检测资源数据
25
- * @description:
26
- * @param {CheckResourceParams} param1
27
- * @return {*}
28
- * @Author: WangHan
29
- * @Date: 2025-04-29 18:02
30
- */
31
- export declare const checkResource: ({ carts, resources }: CheckResourceParams) => false | any[];
32
- interface CheckResourceParams {
33
- carts: any[];
34
- }
35
- export declare type StepKey = 'select-resource' | 'fill-form' | 'select-time' | 'confirm-information' | 'select-service' | 'select-date' | 'select-guest';
36
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const ConfirmInformation: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default ConfirmInformation;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Layout: () => JSX.Element;
3
- export default Layout;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Date: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default Date;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Deposit: () => JSX.Element;
3
- export default Deposit;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
- export default Footer;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Form: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default Form;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const GuestOptionsModal: (props: any) => JSX.Element;
3
- export default GuestOptionsModal;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Guest: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default Guest;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Header: () => JSX.Element;
3
- export default Header;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface ResourceProps {
4
- onChange?: (val: any) => void;
5
- }
6
- declare const Resource: React.ForwardRefExoticComponent<ResourceProps & React.RefAttributes<any>>;
7
- export default Resource;
@@ -1,5 +0,0 @@
1
- /**
2
- * 滚动到第一个错误卡片
3
- * @param {string} selector - 错误卡片的 class 选择器
4
- */
5
- export declare const scrollToFirstErrorCard: (selector?: string) => void;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Services: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default Services;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const TimeSlicing: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default TimeSlicing;
@@ -1,4 +0,0 @@
1
- import '../../../booking/components/voucher/index.less';
2
- import './index.less';
3
- declare const VoucherCard: (props: any) => JSX.Element;
4
- export default VoucherCard;
@@ -1,29 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface AppointmentBookingContextType {
3
- appointmentBooking: any;
4
- times: any[];
5
- resources: any[];
6
- setTimes: (times: any[]) => void;
7
- setResources: (lists: any[]) => void;
8
- carts: any[];
9
- summary: any;
10
- setCarts: (val: any[]) => void;
11
- setSummary: (val: any) => void;
12
- currentStep: any;
13
- setCurrentStep: (val: any) => void;
14
- appHelper?: any;
15
- symbolic?: any;
16
- resourceOtherParams?: any;
17
- setResourceOtherParams: (val: any) => void;
18
- selectedTime: any;
19
- setSelectedTime: (val: any) => void;
20
- isAgreeDepositPolicy: boolean;
21
- setIsAgreeDepositPolicy: (val: boolean) => void;
22
- setStepParams: (val: any) => void;
23
- [key: string]: any;
24
- }
25
- export declare const AppointmentBookingProvider: ({ children, }: {
26
- children: ReactNode;
27
- }) => JSX.Element;
28
- export declare const useAppointmentBookingContext: () => AppointmentBookingContextType;
29
- export {};
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const DepositModal: (props: any) => JSX.Element;
3
- export default DepositModal;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Deposit: (props: any) => JSX.Element;
3
- export default Deposit;
@@ -1,106 +0,0 @@
1
- export declare const useAppointmentBooking: () => any;
2
- export declare const useShopDiscount: () => any;
3
- export declare const contextUtils: () => any;
4
- /**
5
- * @title: 监听步骤发生变化
6
- * @description:
7
- * @return {*}
8
- * @Author: WangHan
9
- * @Date: 2025-04-15 11:11
10
- */
11
- export declare const useAppointmentBookingStep: () => {
12
- getStepIndex: (type: string, skipNumber?: number) => any;
13
- stepList: any;
14
- removeStep: (key: string) => any;
15
- addStep: (props: any, stepKey?: string) => any;
16
- updateStep: (key: string, step: any) => void;
17
- };
18
- /**
19
- * @title: 获取商品数据
20
- * @description:
21
- * @return {*}
22
- * @Author: WangHan
23
- * @Date: 2025-04-15 11:12
24
- */
25
- export declare const useAppointmentBookingProduct: () => {
26
- checkProductType: (productId: number) => Promise<any>;
27
- getProducts: () => Promise<any>;
28
- };
29
- /**
30
- * @title: 更新购物车数据
31
- * @description:
32
- * @return {*}
33
- * @Author: WangHan
34
- * @Date: 2025-04-15 11:12
35
- */
36
- export declare const useAppointmentBookingCart: () => void;
37
- /**
38
- * @title: 获取登录状态
39
- * @description:
40
- * @return {*}
41
- * @Author: WangHan
42
- * @Date: 2025-04-15 11:14
43
- */
44
- export declare const useAppointmentBookingLogin: () => {
45
- isLogin: boolean;
46
- openLoginModal: (params: {
47
- callback: any;
48
- }) => void;
49
- };
50
- /**
51
- * @title: 获取账户
52
- * @description:
53
- * @return {*}
54
- * @Author: WangHan
55
- * @Date: 2025-04-15 11:15
56
- */
57
- export declare const useAppointmentBookingAccount: () => {
58
- accountLists: any;
59
- getHolders: () => Promise<any>;
60
- form_id: any;
61
- addAccount: (val: any, type?: string) => Promise<any>;
62
- checkAccount: (type: any) => any;
63
- };
64
- /**
65
- * @title: 获取资源数据
66
- * @description:
67
- * @return {*}
68
- * @Author: WangHan
69
- * @Date: 2025-04-15 11:29
70
- */
71
- export declare const useAppointmentBookingResource: () => {
72
- getResourceTimeSlot: (index?: number) => Promise<void>;
73
- getResourceList: () => {
74
- resources: any;
75
- resourceCodes: any;
76
- };
77
- autoSelectAllProductResources: (index?: number) => Promise<any>;
78
- };
79
- /**
80
- * @title: 是否跳过资源选择步骤
81
- * @description:
82
- * @return {*}
83
- * @Author: WangHan
84
- * @Date: 2025-04-21 11:47
85
- */
86
- export declare const useIsSkipResourceStep: () => {
87
- checkSkipResourceStep: (isSkipUpdateFormStep?: boolean) => Promise<boolean>;
88
- };
89
- /**
90
- * @title: 获取预约配置
91
- * @description:
92
- * @return {*}
93
- * @Author: WangHan
94
- * @Date: 2025-04-24 18:15
95
- */
96
- export declare const useAppointmentBookingSetting: () => {
97
- isDateSelectedFirst: boolean;
98
- isFormSubject: boolean;
99
- customPageId: any;
100
- channel: any;
101
- getLoadAllSchedule: () => void;
102
- bookingSubject: any;
103
- setOtherData: (key: string, val: any) => any;
104
- getOtherData: (key: string) => any;
105
- formName: any;
106
- };
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const AppointmentBooking: () => JSX.Element;
3
- export default AppointmentBooking;
@@ -1,114 +0,0 @@
1
- /**
2
- * @title: 格式化holder表数据
3
- * @description:
4
- * @param {any} data
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2025-05-07 21:22
8
- */
9
- export declare const formatHolder: (data: any[]) => any[];
10
- export declare const formatGuest: (data: any[], products: any) => any[];
11
- /**
12
- * @title: 格式化购物车中资源上挂接的表单数据
13
- * @description:
14
- * @param {any} data
15
- * @param {any} resources
16
- * @return {*}
17
- * @Author: WangHan
18
- * @Date: 2025-05-06 22:22
19
- */
20
- export declare const formatCartsResources: (carts: any[], resources: any[]) => any[];
21
- /**
22
- * @title: 格式化购物车数据
23
- * @description:
24
- * @param {any} data
25
- * @param {any} resources
26
- * @param {any} accountLists
27
- * @return {*}
28
- * @Author: WangHan
29
- * @Date: 2025-05-07 21:22
30
- */
31
- export declare const formatCarts: (data: any[], resources: any[], accountLists?: any) => any[];
32
- /**
33
- * @title: 对资源进行排序
34
- * @description:
35
- * @param {any} currentResourcesMap
36
- * @param {any} resourceSort
37
- * @return {*}
38
- * @Author: WangHan
39
- * @Date: 2025-04-14 11:16
40
- */
41
- export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
42
- export declare const getMeAccount: (val: any[]) => any;
43
- export declare const getCustomer: () => any;
44
- export declare const formatCustomer: (val: any) => {
45
- id: any;
46
- username: string;
47
- };
48
- export declare const formatCurrentUser: () => {
49
- id: any;
50
- username: string;
51
- };
52
- /**
53
- * @title: 定金合并的标点符号
54
- * @description:
55
- * @return {*}
56
- * @Author: WangHan
57
- * @Date: 2025-04-21 17:52
58
- */
59
- export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
60
- /**
61
- * @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
62
- * @description:
63
- * @param {any} array
64
- * @param {any} resources
65
- * @return {*}
66
- * @Author: WangHan
67
- * @Date: 2025-04-25 19:05
68
- */
69
- export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
70
- export declare const formatForms: (array: any[]) => ({
71
- form_id: any;
72
- policy_id: any;
73
- id: any;
74
- cart_id: any;
75
- } | null)[];
76
- /**
77
- * @title: 打开表单
78
- * @description:
79
- * @param {string} title
80
- * @param {any} callback
81
- * @return {*}
82
- * @Author: WangHan
83
- * @Date: 2025-04-26 15:26
84
- */
85
- export declare const openForm: ({ form_id, title, callback, utils }: any) => void;
86
- /**
87
- * @title: 更新数组
88
- * @description:
89
- * @return {*}
90
- * @Author: WangHan
91
- * @Date: 2025-04-26 18:13
92
- */
93
- export declare function updateLists<T extends Record<string, any>>(list: T[], key: string, value: any, newData: Partial<T>): T[];
94
- /**
95
- * @title: 更新表单存储
96
- * @description:
97
- * @param {any} bookingForm
98
- * @param {number} id
99
- * @param {any} newData
100
- * @return {*}
101
- * @Author: WangHan
102
- * @Date: 2025-04-27 17:27
103
- */
104
- export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
105
- export declare const Toast: (text: string) => void;
106
- /**
107
- * @title: 添加或移除表单步骤
108
- * @description:
109
- * @param {any} param1
110
- * @return {*}
111
- * @Author: WangHan
112
- * @Date: 2025-05-06 21:51
113
- */
114
- export declare const checkHasFormStep: ({ isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const VoucherCard: (props: any) => JSX.Element | null;
3
- export default VoucherCard;
@@ -1,6 +0,0 @@
1
- interface FooterProps {
2
- state: any;
3
- reload: () => void;
4
- }
5
- declare const Footer: ({ state, reload }: FooterProps) => JSX.Element | null;
6
- export default Footer;
@@ -1,26 +0,0 @@
1
- import './index.less';
2
- export interface InfoProps {
3
- forms: any[];
4
- value: any;
5
- onChange: any;
6
- modalOpen: boolean;
7
- action: any;
8
- customSelectProps: any;
9
- optionRender: any;
10
- hideTitle?: boolean;
11
- addCallback?: any;
12
- client: any;
13
- loading?: boolean;
14
- addButtonProps?: any;
15
- drawerProps?: any;
16
- }
17
- /**
18
- * @title: 表单模块
19
- * @description:
20
- * @param {*} Provider
21
- * @return {*}
22
- * @Author: zhiwei.Wang
23
- * @Date: 2024-01-30 17:10
24
- */
25
- declare const Forms: any;
26
- export default Forms;
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export declare type SendModalValues = {
4
- sendSms: boolean;
5
- sendEmail: boolean;
6
- phone: {
7
- code: string;
8
- phone: string;
9
- };
10
- email: string;
11
- };
12
- interface SendModalProps {
13
- open: boolean;
14
- refreshKey: string;
15
- onCancel: () => void;
16
- onOk: (values: SendModalValues) => void;
17
- defaultValues?: {
18
- email?: string;
19
- phone?: {
20
- code?: string;
21
- phone?: string;
22
- };
23
- };
24
- onValuesChange?: (values: any) => void;
25
- }
26
- declare const SendModal: React.FC<SendModalProps>;
27
- export default SendModal;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.MemoExoticComponent<() => JSX.Element>;
4
- export default _default;
@@ -1,43 +0,0 @@
1
- import { FormState } from '../../../model';
2
- interface useClientFnParams {
3
- state: any;
4
- setGlobalState: (val: any) => void;
5
- modalRef: any;
6
- onRemoveClient?: () => void;
7
- }
8
- declare const useClientFn: (_params: useClientFnParams) => {
9
- setClient: (client: Partial<FormState['client']>) => void;
10
- isWalkIn: boolean;
11
- handleSelectClient: (value: any) => Promise<unknown>;
12
- menuChange: (e: any) => void;
13
- handleViewClient: () => void;
14
- menus: {
15
- key: string;
16
- label: any;
17
- }[];
18
- handleCreateItem: (cb?: () => void) => void;
19
- getClients: ({ customer_id, customer_ids, ...resetParams }: {
20
- customer_id?: number | undefined;
21
- skip?: number | undefined;
22
- search?: string | undefined;
23
- with?: string[] | undefined;
24
- relation_form_id?: number | undefined;
25
- num?: number | undefined;
26
- customer_ids?: string[] | undefined;
27
- }, returnResult?: boolean) => Promise<any>;
28
- params: {
29
- skip: number;
30
- num: number;
31
- total: number;
32
- search: string;
33
- with: string[];
34
- relation_form_id: any;
35
- };
36
- searchChange: (search: string) => void;
37
- loading: boolean;
38
- loadMore: JSX.Element | null;
39
- handleOpenClientModal: (val?: string) => void;
40
- getNickname: (item: any) => any;
41
- franchiseeLoading: number;
42
- };
43
- export default useClientFn;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const AddTimeModal: () => JSX.Element;
3
- export default AddTimeModal;