@pisell/private-materials 3.0.198 → 3.0.199

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 (202) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/addons/model.d.ts +1 -1
  12. package/es/components/booking/components/customSelect/index.d.ts +0 -1
  13. package/es/components/booking/components/customSelect/index.js +2 -6
  14. package/es/components/booking/components/footer/amount.js +22 -45
  15. package/es/components/booking/components/footer/index.js +40 -84
  16. package/es/components/booking/components/footer/utils.js +32 -218
  17. package/es/components/booking/info/addServiceVariant/index.js +1 -8
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  19. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
  20. package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
  21. package/es/components/booking/info/main.js +8 -20
  22. package/es/components/booking/info/model.js +0 -3
  23. package/es/components/booking/info/pet/index.js +5 -54
  24. package/es/components/booking/info/service/addService/index.js +20 -127
  25. package/es/components/booking/info/service/addService/index.less +3 -13
  26. package/es/components/booking/info/service/addService/utils.d.ts +2 -11
  27. package/es/components/booking/info/service/addService/utils.js +24 -49
  28. package/es/components/booking/info/service/editService/index.js +41 -232
  29. package/es/components/booking/info/service/editService/index.less +13 -18
  30. package/es/components/booking/info/utils.d.ts +0 -9
  31. package/es/components/booking/info/utils.js +0 -13
  32. package/es/components/booking/locales.d.ts +0 -60
  33. package/es/components/booking/locales.js +3 -75
  34. package/es/components/booking/model.d.ts +1 -4
  35. package/es/components/booking/model.js +2 -4
  36. package/es/components/booking/payments/index.d.ts +1 -1
  37. package/es/components/booking/utils.d.ts +3 -12
  38. package/es/components/booking/utils.js +22 -126
  39. package/es/components/eftpos/form/index.js +12 -6
  40. package/es/components/eftpos/group/index.d.ts +1 -2
  41. package/es/components/eftpos/group/index.js +1 -2
  42. package/es/components/eftpos/index.js +2 -2
  43. package/es/components/eftpos/receipt/index.d.ts +24 -0
  44. package/es/components/eftpos/receipt/index.js +96 -0
  45. package/es/components/eftposPay/helper.d.ts +1 -0
  46. package/es/components/eftposPay/helper.js +14 -0
  47. package/es/components/eftposPay/hooks.d.ts +1 -1
  48. package/es/components/eftposPay/tyro/index.js +51 -20
  49. package/es/index.d.ts +0 -1
  50. package/es/index.js +1 -2
  51. package/lib/components/booking/addons/model.d.ts +1 -1
  52. package/lib/components/booking/components/customSelect/index.d.ts +0 -1
  53. package/lib/components/booking/components/customSelect/index.js +2 -6
  54. package/lib/components/booking/components/footer/amount.js +8 -26
  55. package/lib/components/booking/components/footer/index.js +4 -25
  56. package/lib/components/booking/components/footer/utils.js +31 -144
  57. package/lib/components/booking/info/addServiceVariant/index.js +0 -5
  58. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  59. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
  60. package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
  61. package/lib/components/booking/info/main.js +4 -11
  62. package/lib/components/booking/info/model.js +0 -3
  63. package/lib/components/booking/info/pet/index.js +25 -61
  64. package/lib/components/booking/info/service/addService/index.js +28 -95
  65. package/lib/components/booking/info/service/addService/index.less +3 -13
  66. package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
  67. package/lib/components/booking/info/service/addService/utils.js +10 -31
  68. package/lib/components/booking/info/service/editService/index.js +122 -271
  69. package/lib/components/booking/info/service/editService/index.less +13 -18
  70. package/lib/components/booking/info/utils.d.ts +0 -9
  71. package/lib/components/booking/info/utils.js +0 -6
  72. package/lib/components/booking/locales.d.ts +0 -60
  73. package/lib/components/booking/locales.js +3 -63
  74. package/lib/components/booking/model.d.ts +1 -4
  75. package/lib/components/booking/model.js +2 -4
  76. package/lib/components/booking/payments/index.d.ts +1 -1
  77. package/lib/components/booking/utils.d.ts +3 -12
  78. package/lib/components/booking/utils.js +15 -79
  79. package/lib/components/eftpos/form/index.js +12 -6
  80. package/lib/components/eftpos/group/index.d.ts +1 -2
  81. package/lib/components/eftpos/group/index.js +0 -1
  82. package/lib/components/eftpos/index.js +2 -2
  83. package/lib/components/eftpos/receipt/index.d.ts +24 -0
  84. package/lib/components/eftpos/receipt/index.js +88 -0
  85. package/lib/components/eftposPay/helper.d.ts +1 -0
  86. package/lib/components/eftposPay/helper.js +21 -0
  87. package/lib/components/eftposPay/hooks.d.ts +1 -1
  88. package/lib/components/eftposPay/tyro/index.js +36 -7
  89. package/lib/index.d.ts +0 -1
  90. package/lib/index.js +0 -3
  91. package/package.json +4 -4
  92. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  93. package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
  94. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  95. package/es/components/booking/info/dateRange/index.d.ts +0 -5
  96. package/es/components/booking/info/dateRange/index.js +0 -98
  97. package/es/components/booking/info/dateRange/index.less +0 -21
  98. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  99. package/es/components/booking/info/pet/ChangePetModal/index.js +0 -119
  100. package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
  101. package/es/components/booking/info/service2/Lists.d.ts +0 -3
  102. package/es/components/booking/info/service2/Lists.js +0 -158
  103. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  104. package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
  105. package/es/components/booking/info/service2/index.d.ts +0 -3
  106. package/es/components/booking/info/service2/index.js +0 -58
  107. package/es/components/booking/info/service2/status.d.ts +0 -31
  108. package/es/components/booking/info/service2/status.js +0 -78
  109. package/es/components/booking/info/service2/utils.d.ts +0 -145
  110. package/es/components/booking/info/service2/utils.js +0 -436
  111. package/es/components/booking/materiels/holder/index.d.ts +0 -7
  112. package/es/components/booking/materiels/holder/index.js +0 -51
  113. package/es/components/shoppingCart/Provider.d.ts +0 -3
  114. package/es/components/shoppingCart/Provider.js +0 -86
  115. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  116. package/es/components/shoppingCart/components/Cart/Product.js +0 -96
  117. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
  118. package/es/components/shoppingCart/components/Cart/index.js +0 -72
  119. package/es/components/shoppingCart/components/Cart/index.less +0 -68
  120. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
  121. package/es/components/shoppingCart/components/Empty/index.js +0 -14
  122. package/es/components/shoppingCart/components/Empty/index.less +0 -19
  123. package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
  124. package/es/components/shoppingCart/components/Render/index.js +0 -68
  125. package/es/components/shoppingCart/components/Render/index.less +0 -2
  126. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  127. package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
  128. package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  129. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  130. package/es/components/shoppingCart/hooks/useAddService.js +0 -23
  131. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  132. package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
  133. package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
  134. package/es/components/shoppingCart/hooks/useContext.js +0 -5
  135. package/es/components/shoppingCart/index.d.ts +0 -4
  136. package/es/components/shoppingCart/index.js +0 -24
  137. package/es/components/shoppingCart/locales.d.ts +0 -33
  138. package/es/components/shoppingCart/locales.js +0 -38
  139. package/es/components/shoppingCart/mock.d.ts +0 -40
  140. package/es/components/shoppingCart/mock.js +0 -40
  141. package/es/components/shoppingCart/status.d.ts +0 -2
  142. package/es/components/shoppingCart/status.js +0 -22
  143. package/es/components/shoppingCart/type.d.ts +0 -39
  144. package/es/components/shoppingCart/type.js +0 -1
  145. package/es/components/shoppingCart/utils.d.ts +0 -63
  146. package/es/components/shoppingCart/utils.js +0 -119
  147. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  148. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
  149. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  150. package/lib/components/booking/info/dateRange/index.d.ts +0 -5
  151. package/lib/components/booking/info/dateRange/index.js +0 -111
  152. package/lib/components/booking/info/dateRange/index.less +0 -21
  153. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  154. package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -111
  155. package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
  156. package/lib/components/booking/info/service2/Lists.d.ts +0 -3
  157. package/lib/components/booking/info/service2/Lists.js +0 -113
  158. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  159. package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
  160. package/lib/components/booking/info/service2/index.d.ts +0 -3
  161. package/lib/components/booking/info/service2/index.js +0 -75
  162. package/lib/components/booking/info/service2/status.d.ts +0 -31
  163. package/lib/components/booking/info/service2/status.js +0 -81
  164. package/lib/components/booking/info/service2/utils.d.ts +0 -145
  165. package/lib/components/booking/info/service2/utils.js +0 -320
  166. package/lib/components/booking/materiels/holder/index.d.ts +0 -7
  167. package/lib/components/booking/materiels/holder/index.js +0 -65
  168. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  169. package/lib/components/shoppingCart/Provider.js +0 -110
  170. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  171. package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
  172. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
  173. package/lib/components/shoppingCart/components/Cart/index.js +0 -77
  174. package/lib/components/shoppingCart/components/Cart/index.less +0 -68
  175. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
  176. package/lib/components/shoppingCart/components/Empty/index.js +0 -43
  177. package/lib/components/shoppingCart/components/Empty/index.less +0 -19
  178. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
  179. package/lib/components/shoppingCart/components/Render/index.js +0 -79
  180. package/lib/components/shoppingCart/components/Render/index.less +0 -2
  181. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  182. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
  183. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  184. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  185. package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
  186. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  187. package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
  188. package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
  189. package/lib/components/shoppingCart/hooks/useContext.js +0 -31
  190. package/lib/components/shoppingCart/index.d.ts +0 -4
  191. package/lib/components/shoppingCart/index.js +0 -60
  192. package/lib/components/shoppingCart/locales.d.ts +0 -33
  193. package/lib/components/shoppingCart/locales.js +0 -56
  194. package/lib/components/shoppingCart/mock.d.ts +0 -40
  195. package/lib/components/shoppingCart/mock.js +0 -76
  196. package/lib/components/shoppingCart/status.d.ts +0 -2
  197. package/lib/components/shoppingCart/status.js +0 -60
  198. package/lib/components/shoppingCart/type.d.ts +0 -39
  199. package/lib/components/shoppingCart/type.js +0 -17
  200. package/lib/components/shoppingCart/utils.d.ts +0 -63
  201. package/lib/components/shoppingCart/utils.js +0 -92
  202. package/lowcode/shopping-cart/meta.ts +0 -98
@@ -1,24 +0,0 @@
1
- var _excluded = ["onCard", "onChange", "onAddProduct", "onActiveKey"];
2
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
- import React from 'react';
5
- import Render from "./components/Render";
6
- import { CartProvider } from "./Provider";
7
- import { locales } from '@pisell/utils';
8
- import localeTexts from "./locales";
9
- locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
10
- var shoppingCart = function shoppingCart(_ref) {
11
- var onCard = _ref.onCard,
12
- onChange = _ref.onChange,
13
- onAddProduct = _ref.onAddProduct,
14
- onActiveKey = _ref.onActiveKey,
15
- props = _objectWithoutProperties(_ref, _excluded);
16
- return /*#__PURE__*/React.createElement(CartProvider, {
17
- props: props,
18
- onCard: onCard,
19
- onChange: onChange,
20
- onAddProduct: onAddProduct,
21
- onActiveKey: onActiveKey
22
- }, /*#__PURE__*/React.createElement(Render, null));
23
- };
24
- export default shoppingCart;
@@ -1,33 +0,0 @@
1
- declare const _default: {
2
- en: {
3
- 'pisell2.text.shopping-cart.item': (num: number) => string;
4
- 'pisell2.text.shopping-cart.clear.cart': string;
5
- 'pisell2.text.shopping-cart.add.service': string;
6
- 'pisell2.text.shopping-cart.add.more': string;
7
- 'pisell2.text.shopping-cart.no.selected': string;
8
- 'pisell2.text.shopping-cart.confirm': string;
9
- 'pisell2.text.shopping-cart.cancel': string;
10
- 'pisell2.text.shopping-cart.select.holder.modal.title': string;
11
- };
12
- 'zh-CN': {
13
- 'pisell2.text.shopping-cart.item': (num: number) => string;
14
- 'pisell2.text.shopping-cart.clear.cart': string;
15
- 'pisell2.text.shopping-cart.add.service': string;
16
- 'pisell2.text.shopping-cart.add.more': string;
17
- 'pisell2.text.shopping-cart.no.selected': string;
18
- 'pisell2.text.shopping-cart.confirm': string;
19
- 'pisell2.text.shopping-cart.cancel': string;
20
- 'pisell2.text.shopping-cart.select.holder.modal.title': string;
21
- };
22
- 'zh-HK': {
23
- 'pisell2.text.shopping-cart.item': (num: number) => string;
24
- 'pisell2.text.shopping-cart.clear.cart': string;
25
- 'pisell2.text.shopping-cart.add.service': string;
26
- 'pisell2.text.shopping-cart.add.more': string;
27
- 'pisell2.text.shopping-cart.no.selected': string;
28
- 'pisell2.text.shopping-cart.confirm': string;
29
- 'pisell2.text.shopping-cart.cancel': string;
30
- 'pisell2.text.shopping-cart.select.holder.modal.title': string;
31
- };
32
- };
33
- export default _default;
@@ -1,38 +0,0 @@
1
- export default {
2
- "en": {
3
- 'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
4
- return "(".concat(num, " ").concat(num > 1 ? 'items' : 'item', ")");
5
- },
6
- 'pisell2.text.shopping-cart.clear.cart': 'Clear cart',
7
- 'pisell2.text.shopping-cart.add.service': 'Add items',
8
- 'pisell2.text.shopping-cart.add.more': 'Add more',
9
- 'pisell2.text.shopping-cart.no.selected': 'No items selected',
10
- 'pisell2.text.shopping-cart.confirm': 'Confirm',
11
- 'pisell2.text.shopping-cart.cancel': 'Cancel',
12
- 'pisell2.text.shopping-cart.select.holder.modal.title': 'Item Assignment'
13
- },
14
- 'zh-CN': {
15
- 'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
16
- return "(".concat(num, " \u9879)");
17
- },
18
- 'pisell2.text.shopping-cart.clear.cart': '清空购物车',
19
- 'pisell2.text.shopping-cart.add.service': '添加项目',
20
- 'pisell2.text.shopping-cart.add.more': '添加更多',
21
- 'pisell2.text.shopping-cart.no.selected': '未选择任何项目',
22
- 'pisell2.text.shopping-cart.confirm': '确定',
23
- 'pisell2.text.shopping-cart.cancel': '取消',
24
- 'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配'
25
- },
26
- 'zh-HK': {
27
- 'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
28
- return "(".concat(num, " \u9805)");
29
- },
30
- 'pisell2.text.shopping-cart.clear.cart': '清空購物車',
31
- 'pisell2.text.shopping-cart.add.service': '添加項目',
32
- 'pisell2.text.shopping-cart.add.more': '添加更多',
33
- 'pisell2.text.shopping-cart.no.selected': '未選擇任何項目',
34
- 'pisell2.text.shopping-cart.confirm': '確定',
35
- 'pisell2.text.shopping-cart.cancel': '取消',
36
- 'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配'
37
- }
38
- };
@@ -1,40 +0,0 @@
1
- export declare const holder: {
2
- key: number;
3
- label: string;
4
- tip: string;
5
- img: string;
6
- }[];
7
- export declare const products: ({
8
- id: number;
9
- title: string;
10
- from_id: number;
11
- holder: string;
12
- price: number;
13
- total: number;
14
- num: number;
15
- origin_price: number;
16
- symbol: string;
17
- relation_form_name: string;
18
- like_status: string;
19
- _extend: {
20
- start_time: string;
21
- duration: number;
22
- date: string;
23
- like_status: string;
24
- };
25
- product_cover: string;
26
- } | {
27
- id: number;
28
- title: string;
29
- from_id: number;
30
- holder: string;
31
- price: number;
32
- total: number;
33
- num: number;
34
- symbol: string;
35
- origin_price?: undefined;
36
- relation_form_name?: undefined;
37
- like_status?: undefined;
38
- _extend?: undefined;
39
- product_cover?: undefined;
40
- })[];
@@ -1,40 +0,0 @@
1
- export var holder = [{
2
- key: 1,
3
- label: '旺旺',
4
- tip: 'french',
5
- img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg'
6
- }, {
7
- key: 2,
8
- label: '咪咪',
9
- tip: 'french',
10
- img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg'
11
- }];
12
- export var products = [{
13
- id: 1,
14
- title: '旺旺1',
15
- from_id: 1,
16
- holder: 'holder1',
17
- price: 4,
18
- total: 5,
19
- num: 2,
20
- origin_price: 6,
21
- symbol: '&',
22
- relation_form_name: 'Room1',
23
- like_status: 'like',
24
- _extend: {
25
- start_time: '2024-10-23 18:40:00',
26
- duration: 120,
27
- date: '2024-10-27 18:40:00',
28
- like_status: 'like'
29
- },
30
- product_cover: 'https://file.mypisell.com/pisel/manual/janedeer/2024-2-8/25.png'
31
- }, {
32
- id: 2,
33
- title: '旺旺2',
34
- from_id: 1,
35
- holder: 'Room2',
36
- price: 4,
37
- total: 4,
38
- num: 2,
39
- symbol: '&'
40
- }];
@@ -1,2 +0,0 @@
1
- import { shoppingCartProps } from './type';
2
- export declare const defaultData: shoppingCartProps;
@@ -1,22 +0,0 @@
1
- import { locales } from '@pisell/utils';
2
- import localeTexts from "./locales";
3
- locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
4
- var productDefault = {
5
- hideAddBtn: false,
6
- isShowNote: true,
7
- isShowPackageNote: true,
8
- holders: [],
9
- products: [],
10
- isEdit: false,
11
- disabledEdit: false
12
- };
13
- export var defaultData = {
14
- isOpenGroup: true,
15
- carts: [],
16
- platform: 'shop',
17
- emptyText: locales.getText('pisell2.text.shopping-cart.no.selected'),
18
- activeKey: [],
19
- defaultActiveKey: [],
20
- className: '',
21
- productParams: productDefault
22
- };
@@ -1,39 +0,0 @@
1
- import { CollapseProps } from 'antd';
2
- export interface productProps {
3
- hideAddBtn?: boolean;
4
- isShowNote?: boolean;
5
- isShowPackageNote?: boolean;
6
- products?: any[];
7
- holders?: any[];
8
- isEdit?: boolean;
9
- disabledEdit?: boolean;
10
- }
11
- export interface shoppingCartProps {
12
- isOpenGroup?: boolean;
13
- carts?: any[];
14
- platform?: 'shop' | 'h5';
15
- emptyText?: string;
16
- activeKey?: string[] | number[];
17
- defaultActiveKey?: string[] | number[];
18
- className?: string;
19
- onCard?: (e: any) => void;
20
- onChange?: (e: any) => void;
21
- onAddProduct?: (e?: any) => void;
22
- onActiveKey?: (e: any) => void;
23
- isShowImage?: boolean;
24
- isShowHolder?: boolean;
25
- isShowDelete?: boolean;
26
- collapseParams?: CollapseProps;
27
- productParams?: productProps;
28
- }
29
- /**
30
- * @title: 商品卡片
31
- * @description:
32
- * @return {*}
33
- * @Author: WangHan
34
- * @Date: 2024-11-29 09:52
35
- */
36
- export interface ProductProps {
37
- id?: any;
38
- lists: any[];
39
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,63 +0,0 @@
1
- /**
2
- * @title: 格式化购物车列表
3
- * @description:
4
- * @param {any} state
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-11-28 16:52
8
- */
9
- export declare const formatCartList: (state: any) => any;
10
- /**
11
- * @title: 是否是空页面
12
- * @description:
13
- * @param {any} state
14
- * @return {*}
15
- * @Author: WangHan
16
- * @Date: 2024-11-28 16:47
17
- */
18
- export declare const isEmptyStatus: (state: any) => boolean;
19
- /**
20
- * @title: 是否是商品列表页面
21
- * @description:
22
- * @param {any} state
23
- * @return {*}
24
- * @Author: WangHan
25
- * @Date: 2024-11-28 17:23
26
- */
27
- export declare const isProductList: (state: any) => boolean;
28
- /**
29
- * @title: 格式化数据最终结果
30
- * @description:
31
- * @param {any} state
32
- * @return {*}
33
- * @Author: WangHan
34
- * @Date: 2024-11-28 18:35
35
- */
36
- export declare const formatState: (state: any) => {
37
- isEmpty: boolean;
38
- isProductList: boolean;
39
- carts: any;
40
- };
41
- /**
42
- * @title: 更新商品
43
- * @description:
44
- * @param {any} newState
45
- * @param {any} state
46
- * @return {*}
47
- * @Author: WangHan
48
- * @Date: 2024-11-28 22:30
49
- */
50
- export declare const updateProduct: (state: any, newProducts: any[]) => {
51
- products: any[];
52
- carts: any;
53
- };
54
- /**
55
- * @title: 格式化服务
56
- * @description:
57
- * @param {any} service
58
- * @param {number} id holder_id
59
- * @return {*}
60
- * @Author: WangHan
61
- * @Date: 2024-12-09 22:47
62
- */
63
- export declare const formatService: (service: any[], id: number) => any[];
@@ -1,119 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- /**
8
- * @title: 格式化购物车列表
9
- * @description:
10
- * @param {any} state
11
- * @return {*}
12
- * @Author: WangHan
13
- * @Date: 2024-11-28 16:52
14
- */
15
- export var formatCartList = function formatCartList(state) {
16
- var products = state.products,
17
- holders = state.holders;
18
- return holders === null || holders === void 0 ? void 0 : holders.map(function (holder) {
19
- return _objectSpread(_objectSpread({}, holder), {}, {
20
- products: products === null || products === void 0 ? void 0 : products.filter(function (product) {
21
- var _product$_extend;
22
- return (product === null || product === void 0 ? void 0 : (_product$_extend = product._extend) === null || _product$_extend === void 0 ? void 0 : _product$_extend.holder_id) === (holder === null || holder === void 0 ? void 0 : holder.key);
23
- })
24
- });
25
- });
26
- };
27
-
28
- /**
29
- * @title: 是否是空页面
30
- * @description:
31
- * @param {any} state
32
- * @return {*}
33
- * @Author: WangHan
34
- * @Date: 2024-11-28 16:47
35
- */
36
- export var isEmptyStatus = function isEmptyStatus(state) {
37
- var products = state.products,
38
- holders = state.holders,
39
- isOpenGroup = state.isOpenGroup;
40
- // 没开启分组并且没有商品数据
41
- if (!isOpenGroup && !(products !== null && products !== void 0 && products.length)) return true;
42
-
43
- // 开启分组没有holders
44
- if (isOpenGroup && !(holders !== null && holders !== void 0 && holders.length)) return true;
45
- return false;
46
- };
47
-
48
- /**
49
- * @title: 是否是商品列表页面
50
- * @description:
51
- * @param {any} state
52
- * @return {*}
53
- * @Author: WangHan
54
- * @Date: 2024-11-28 17:23
55
- */
56
- export var isProductList = function isProductList(state) {
57
- var holders = state.holders,
58
- isOpenGroup = state.isOpenGroup;
59
-
60
- // 开启分组并且有holders, 则是购物车列表
61
- if (isOpenGroup && holders !== null && holders !== void 0 && holders.length) return false;
62
- return true;
63
- };
64
-
65
- /**
66
- * @title: 格式化数据最终结果
67
- * @description:
68
- * @param {any} state
69
- * @return {*}
70
- * @Author: WangHan
71
- * @Date: 2024-11-28 18:35
72
- */
73
- export var formatState = function formatState(state) {
74
- // 默认数据格式化holder数据
75
- var _default = _objectSpread({}, state);
76
- var _carts = formatCartList(_default);
77
- return {
78
- isEmpty: isEmptyStatus(_default),
79
- isProductList: isProductList(_default),
80
- carts: _carts
81
- };
82
- };
83
-
84
- /**
85
- * @title: 更新商品
86
- * @description:
87
- * @param {any} newState
88
- * @param {any} state
89
- * @return {*}
90
- * @Author: WangHan
91
- * @Date: 2024-11-28 22:30
92
- */
93
- export var updateProduct = function updateProduct(state, newProducts) {
94
- return {
95
- products: newProducts,
96
- carts: formatCartList(_objectSpread(_objectSpread({}, state), {}, {
97
- products: newProducts
98
- }))
99
- };
100
- };
101
-
102
- /**
103
- * @title: 格式化服务
104
- * @description:
105
- * @param {any} service
106
- * @param {number} id holder_id
107
- * @return {*}
108
- * @Author: WangHan
109
- * @Date: 2024-12-09 22:47
110
- */
111
- export var formatService = function formatService(service, id) {
112
- return service.map(function (item) {
113
- return _objectSpread(_objectSpread({}, item), {}, {
114
- _extend: _objectSpread(_objectSpread({}, item._extend || {}), {}, {
115
- holder_id: id
116
- })
117
- });
118
- });
119
- };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
3
- export default _default;
@@ -1,60 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/booking/components/footer/AppointmentProductModal/index.tsx
30
- var AppointmentProductModal_exports = {};
31
- __export(AppointmentProductModal_exports, {
32
- default: () => AppointmentProductModal_default
33
- });
34
- module.exports = __toCommonJS(AppointmentProductModal_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_utils = require("@pisell/utils");
37
- var import_materials = require("@pisell/materials");
38
- var AppointmentProductModal = (props, ref) => {
39
- const [open, setOpen] = (0, import_react.useState)(false);
40
- (0, import_react.useImperativeHandle)(ref, () => ({
41
- open: () => {
42
- setOpen(true);
43
- }
44
- }));
45
- return /* @__PURE__ */ import_react.default.createElement(
46
- import_materials.PisellModal.Information,
47
- {
48
- open,
49
- platform: "pc",
50
- title: import_utils.locales.getText("pisell2.text.missing.reservation.title"),
51
- describe: import_utils.locales.getText("pisell2.text.missing.reservation.content"),
52
- cancelText: import_utils.locales.getText("pisell2.text.cancel"),
53
- okText: import_utils.locales.getText("pisell2.text.confirm"),
54
- closable: true,
55
- onOk: () => setOpen(false),
56
- onCancel: () => setOpen(false)
57
- }
58
- );
59
- };
60
- var AppointmentProductModal_default = (0, import_react.forwardRef)(AppointmentProductModal);
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
- declare const DateRange: ({ state, dispatch, key }: any) => React.JSX.Element;
5
- export default DateRange;
@@ -1,111 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/booking/info/dateRange/index.tsx
30
- var dateRange_exports = {};
31
- __export(dateRange_exports, {
32
- default: () => dateRange_default,
33
- disabledDate: () => disabledDate
34
- });
35
- module.exports = __toCommonJS(dateRange_exports);
36
- var import_react = __toESM(require("react"));
37
- var import_icons = require("@ant-design/icons");
38
- var import_classnames = __toESM(require("classnames"));
39
- var import_dayjs = __toESM(require("dayjs"));
40
- var import_materials = require("@pisell/materials");
41
- var import_index = require("./index.less");
42
- var disabledDate = (current, position, currentDate) => {
43
- if (position === "start") {
44
- return false;
45
- }
46
- if (position === "end" && current.endOf("day") && (currentDate == null ? void 0 : currentDate[0])) {
47
- const endDisabled = currentDate == null ? void 0 : currentDate[0].add(8, "months").format("YYYY-MM-DD");
48
- return (0, import_dayjs.default)(endDisabled) < current.startOf("day") || current.startOf("day") <= (currentDate == null ? void 0 : currentDate[0]);
49
- }
50
- return current && current <= (currentDate == null ? void 0 : currentDate[0]);
51
- };
52
- var DateRange = ({ state, dispatch, key }) => {
53
- const [value, setValue] = (0, import_react.useState)([]);
54
- (0, import_react.useEffect)(() => {
55
- var _a, _b;
56
- const lists = [(_a = state.date) == null ? void 0 : _a.value, (_b = state.date) == null ? void 0 : _b.end_date];
57
- setValue(lists);
58
- console.log("lists", lists);
59
- }, [state.date]);
60
- const dateChange = (e) => {
61
- dispatch({
62
- type: "setDate",
63
- payload: {
64
- value: e[0],
65
- end_date: e[1],
66
- edit: true
67
- }
68
- });
69
- };
70
- const formatLocale = (0, import_react.useMemo)(() => {
71
- const locale = state == null ? void 0 : state.locale;
72
- const isEn = locale === "en" || locale === "en-US";
73
- const _format = isEn ? "DD/MM/YYYY" : "YYYY-MM-DD";
74
- return _format;
75
- }, [state == null ? void 0 : state.locale, state.date]);
76
- return (0, import_react.useMemo)(() => {
77
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
78
- "div",
79
- {
80
- className: (0, import_classnames.default)(
81
- "pisell-lowcode__booking-service-header-date-range",
82
- {
83
- "pisell-lowcode__booking-service-header-date-range-terminal": state.isTerminalDayBookingPage
84
- }
85
- )
86
- },
87
- /* @__PURE__ */ import_react.default.createElement(import_materials.Page, null, /* @__PURE__ */ import_react.default.createElement(
88
- import_materials.DatePicker.RangePicker,
89
- {
90
- key,
91
- inputReadOnly: true,
92
- allowClear: false,
93
- size: "large",
94
- style: { width: "100%", padding: 0 },
95
- suffixIcon: !state.disabledEdit ? /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null) : null,
96
- disabledDate,
97
- value: [value[0], value[1]],
98
- onChange: dateChange,
99
- format: formatLocale,
100
- isHideCustomSelect: true,
101
- endDateDays: 1
102
- }
103
- ))
104
- ));
105
- }, [value, state.disabledEdit, state == null ? void 0 : state.locale]);
106
- };
107
- var dateRange_default = DateRange;
108
- // Annotate the CommonJS export names for ESM import in node:
109
- 0 && (module.exports = {
110
- disabledDate
111
- });
@@ -1,21 +0,0 @@
1
- .pisell-lowcode__booking-service-header-date-range {
2
- flex: 1.1;
3
- margin-top: 16px;
4
-
5
- .pisell-date-range-picker > div > div {
6
- height: 44px !important;
7
- cursor: pointer !important;
8
- input {
9
- cursor: pointer;
10
- }
11
- }
12
-
13
- .anticon-calendar {
14
- font-size: 20px;
15
- color: #667085;
16
- }
17
- }
18
-
19
- .pisell-lowcode__booking-service-header-date-range-terminal {
20
- margin-top: 0;
21
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default _default;