@pisell/private-materials 3.4.76 → 3.4.77

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 (164) 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 +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  12. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  13. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  14. package/es/components/booking/utils.d.ts +2 -2
  15. package/es/components/eftpos/hooks.d.ts +0 -1
  16. package/es/components/eftposPay/amount.d.ts +1 -1
  17. package/es/components/eftposPay/device.d.ts +1 -1
  18. package/es/components/eftposPay/hooks.d.ts +2 -2
  19. package/es/components/eftposPay/store/index.d.ts +5 -5
  20. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  21. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  22. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  23. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  24. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  25. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  26. package/es/hooks/useTranslationOriginal.d.ts +1 -0
  27. package/es/hooks/useTranslationOriginal.js +10 -0
  28. package/es/index.d.ts +3 -0
  29. package/es/index.js +3 -0
  30. package/es/plus/clientCard/index.d.ts +7 -0
  31. package/es/plus/clientCard/index.js +462 -0
  32. package/es/plus/clientCard/index.less +515 -0
  33. package/es/plus/clientCard/line/index.d.ts +9 -0
  34. package/es/plus/clientCard/line/index.js +157 -0
  35. package/es/plus/clientCard/line/index.less +142 -0
  36. package/es/plus/clientCard/locales.d.ts +18 -0
  37. package/es/plus/clientCard/locales.js +17 -0
  38. package/es/plus/clientCard/types.d.ts +135 -0
  39. package/es/plus/clientCard/types.js +1 -0
  40. package/es/plus/clientCard/utils.d.ts +8 -0
  41. package/es/plus/clientCard/utils.js +59 -0
  42. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  43. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  44. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  45. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  46. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  47. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  48. package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  49. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  50. package/es/plus/clinetSearch/Add/index.d.ts +18 -0
  51. package/es/plus/clinetSearch/Add/index.js +213 -0
  52. package/es/plus/clinetSearch/Add/index.less +30 -0
  53. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  54. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  55. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  56. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  57. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  58. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  59. package/es/plus/clinetSearch/index.d.ts +18 -0
  60. package/es/plus/clinetSearch/index.js +234 -0
  61. package/es/plus/clinetSearch/index.less +95 -0
  62. package/es/plus/clinetSearch/locales.d.ts +108 -0
  63. package/es/plus/clinetSearch/locales.js +107 -0
  64. package/es/plus/clinetSearch/serve.d.ts +1 -0
  65. package/es/plus/clinetSearch/serve.js +31 -0
  66. package/es/plus/clinetSearch/types.d.ts +70 -0
  67. package/es/plus/clinetSearch/types.js +1 -0
  68. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  69. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  70. package/es/plus/walletPassGallery/components/passDetail/index.js +104 -39
  71. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  72. package/es/plus/walletPassGallery/components/timelineSection/index.js +19 -2
  73. package/es/plus/walletPassGallery/index.d.ts +4 -0
  74. package/es/plus/walletPassGallery/index.js +121 -42
  75. package/es/plus/walletPassGallery/serve.d.ts +3 -1
  76. package/es/plus/walletPassGallery/serve.js +13 -13
  77. package/es/pro/Selector/Selector.d.ts +1 -1
  78. package/es/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  79. package/es/pro/pisellPhoneKeyboard/index.js +210 -0
  80. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  81. package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  82. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  83. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  84. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  85. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  86. package/lib/components/booking/utils.d.ts +2 -2
  87. package/lib/components/eftpos/hooks.d.ts +0 -1
  88. package/lib/components/eftposPay/amount.d.ts +1 -1
  89. package/lib/components/eftposPay/device.d.ts +1 -1
  90. package/lib/components/eftposPay/hooks.d.ts +2 -2
  91. package/lib/components/eftposPay/store/index.d.ts +5 -5
  92. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  93. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  94. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  95. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  96. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  97. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  98. package/lib/hooks/useTranslationOriginal.d.ts +1 -0
  99. package/lib/hooks/useTranslationOriginal.js +42 -0
  100. package/lib/index.d.ts +3 -0
  101. package/lib/index.js +9 -0
  102. package/lib/plus/clientCard/index.d.ts +7 -0
  103. package/lib/plus/clientCard/index.js +457 -0
  104. package/lib/plus/clientCard/index.less +515 -0
  105. package/lib/plus/clientCard/line/index.d.ts +9 -0
  106. package/lib/plus/clientCard/line/index.js +153 -0
  107. package/lib/plus/clientCard/line/index.less +142 -0
  108. package/lib/plus/clientCard/locales.d.ts +18 -0
  109. package/lib/plus/clientCard/locales.js +41 -0
  110. package/lib/plus/clientCard/types.d.ts +135 -0
  111. package/lib/plus/clientCard/types.js +17 -0
  112. package/lib/plus/clientCard/utils.d.ts +8 -0
  113. package/lib/plus/clientCard/utils.js +75 -0
  114. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  115. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  116. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  117. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  118. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  119. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  120. package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  121. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  122. package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
  123. package/lib/plus/clinetSearch/Add/index.js +244 -0
  124. package/lib/plus/clinetSearch/Add/index.less +30 -0
  125. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  126. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  127. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  128. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  129. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  130. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  131. package/lib/plus/clinetSearch/index.d.ts +18 -0
  132. package/lib/plus/clinetSearch/index.js +237 -0
  133. package/lib/plus/clinetSearch/index.less +95 -0
  134. package/lib/plus/clinetSearch/locales.d.ts +108 -0
  135. package/lib/plus/clinetSearch/locales.js +131 -0
  136. package/lib/plus/clinetSearch/serve.d.ts +1 -0
  137. package/lib/plus/clinetSearch/serve.js +33 -0
  138. package/lib/plus/clinetSearch/types.d.ts +70 -0
  139. package/lib/plus/clinetSearch/types.js +17 -0
  140. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  141. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  142. package/lib/plus/walletPassGallery/components/passDetail/index.js +57 -5
  143. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  144. package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -2
  145. package/lib/plus/walletPassGallery/index.d.ts +4 -0
  146. package/lib/plus/walletPassGallery/index.js +141 -42
  147. package/lib/plus/walletPassGallery/serve.d.ts +3 -1
  148. package/lib/plus/walletPassGallery/serve.js +2 -2
  149. package/lib/pro/Selector/Selector.d.ts +1 -1
  150. package/lib/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  151. package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
  152. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  153. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  154. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  155. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  156. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  157. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  158. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  159. package/lowcode/client-card/meta.ts +343 -0
  160. package/lowcode/client-search/meta.ts +316 -0
  161. package/lowcode/eco-cup-list/meta.ts +1 -1
  162. package/lowcode/eco-customer-list/meta.ts +1 -1
  163. package/lowcode/wallet-pass-gallery/meta.ts +66 -1
  164. package/package.json +2 -2
@@ -0,0 +1,108 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.text.leave-empty-for-walk-in': string;
4
+ 'pisell2.text.date-year-text': string;
5
+ 'pisell2.text.date-month-text': string;
6
+ 'pisell2.text.date-day-text': string;
7
+ 'pisell2.text.gender': string;
8
+ 'pisell2.text.gender.male': string;
9
+ 'pisell2.text.gender.female': string;
10
+ 'pisell2.text.birthday': string;
11
+ 'pisell2.text.phone': string;
12
+ 'pisell2.text.email': string;
13
+ 'pisell2.text.lastname': string;
14
+ 'pisell2.text.firstname': string;
15
+ 'pisell2.text.email-error-message': string;
16
+ 'pisell2.text.notes': string;
17
+ 'pisell2.text.save': string;
18
+ 'pisell2.text.save-and-select': string;
19
+ 'pisell2.text.no-results-found': string;
20
+ 'pisell2.text.create-new-client': string;
21
+ 'pisell2.text.result-found': string;
22
+ 'pisell2.text.personnel-list': string;
23
+ 'pisell2.text.load-more': string;
24
+ 'pisell2.text.add-client.confirm': string;
25
+ 'pisell2.text.search-customer-by-phone-number': string;
26
+ 'pisell2.text.create': string;
27
+ 'pisell2.text.loading': string;
28
+ 'pisell2.text.no-more-data': string;
29
+ 'pisell2.text.client-search.name': string;
30
+ 'pisell2.text.client-search.register-time': string;
31
+ 'pisell2.text.client-search.phone': string;
32
+ 'pisell2.text.client-search.email': string;
33
+ 'pisell2.text.client-search.membership': string;
34
+ 'pisell2.text.client-search.contact-info': string;
35
+ 'pisell2.text.client-search.holder': string;
36
+ };
37
+ 'zh-CN': {
38
+ 'pisell2.text.leave-empty-for-walk-in': string;
39
+ 'pisell2.text.date-year-text': string;
40
+ 'pisell2.text.date-month-text': string;
41
+ 'pisell2.text.date-day-text': string;
42
+ 'pisell2.text.gender': string;
43
+ 'pisell2.text.gender.male': string;
44
+ 'pisell2.text.gender.female': string;
45
+ 'pisell2.text.birthday': string;
46
+ 'pisell2.text.phone': string;
47
+ 'pisell2.text.email': string;
48
+ 'pisell2.text.lastname': string;
49
+ 'pisell2.text.firstname': string;
50
+ 'pisell2.text.email-error-message': string;
51
+ 'pisell2.text.notes': string;
52
+ 'pisell2.text.save': string;
53
+ 'pisell2.text.save-and-select': string;
54
+ 'pisell2.text.no-results-found': string;
55
+ 'pisell2.text.create-new-client': string;
56
+ 'pisell2.text.result-found': string;
57
+ 'pisell2.text.personnel-list': string;
58
+ 'pisell2.text.add-client.confirm': string;
59
+ 'pisell2.text.load-more': string;
60
+ 'pisell2.text.search-customer-by-phone-number': string;
61
+ 'pisell2.text.create': string;
62
+ 'pisell2.text.loading': string;
63
+ 'pisell2.text.no-more-data': string;
64
+ 'pisell2.text.client-search.name': string;
65
+ 'pisell2.text.client-search.register-time': string;
66
+ 'pisell2.text.client-search.phone': string;
67
+ 'pisell2.text.client-search.email': string;
68
+ 'pisell2.text.client-search.membership': string;
69
+ 'pisell2.text.client-search.contact-info': string;
70
+ 'pisell2.text.client-search.holder': string;
71
+ };
72
+ 'zh-HK': {
73
+ 'pisell2.text.leave-empty-for-walk-in': string;
74
+ 'pisell2.text.date-year-text': string;
75
+ 'pisell2.text.date-month-text': string;
76
+ 'pisell2.text.date-day-text': string;
77
+ 'pisell2.text.gender': string;
78
+ 'pisell2.text.gender.male': string;
79
+ 'pisell2.text.gender.female': string;
80
+ 'pisell2.text.birthday': string;
81
+ 'pisell2.text.phone': string;
82
+ 'pisell2.text.email': string;
83
+ 'pisell2.text.lastname': string;
84
+ 'pisell2.text.firstname': string;
85
+ 'pisell2.text.email-error-message': string;
86
+ 'pisell2.text.notes': string;
87
+ 'pisell2.text.save': string;
88
+ 'pisell2.text.save-and-select': string;
89
+ 'pisell2.text.no-results-found': string;
90
+ 'pisell2.text.create-new-client': string;
91
+ 'pisell2.text.result-found': string;
92
+ 'pisell2.text.personnel-list': string;
93
+ 'pisell2.text.add-client.confirm': string;
94
+ 'pisell2.text.load-more': string;
95
+ 'pisell2.text.search-customer-by-phone-number': string;
96
+ 'pisell2.text.create': string;
97
+ 'pisell2.text.loading': string;
98
+ 'pisell2.text.no-more-data': string;
99
+ 'pisell2.text.client-search.name': string;
100
+ 'pisell2.text.client-search.register-time': string;
101
+ 'pisell2.text.client-search.phone': string;
102
+ 'pisell2.text.client-search.email': string;
103
+ 'pisell2.text.client-search.membership': string;
104
+ 'pisell2.text.client-search.contact-info': string;
105
+ 'pisell2.text.client-search.holder': string;
106
+ };
107
+ };
108
+ export default _default;
@@ -0,0 +1,107 @@
1
+ export default {
2
+ en: {
3
+ 'pisell2.text.leave-empty-for-walk-in': 'Leave empty for Walk-In',
4
+ 'pisell2.text.date-year-text': 'YYYY',
5
+ 'pisell2.text.date-month-text': 'MM',
6
+ 'pisell2.text.date-day-text': 'DD',
7
+ 'pisell2.text.gender': 'Gender',
8
+ 'pisell2.text.gender.male': 'Male',
9
+ 'pisell2.text.gender.female': 'Female',
10
+ 'pisell2.text.birthday': 'Birthday',
11
+ 'pisell2.text.phone': 'Phone Number',
12
+ 'pisell2.text.email': 'Email',
13
+ 'pisell2.text.lastname': 'Last Name',
14
+ 'pisell2.text.firstname': 'First Name',
15
+ 'pisell2.text.email-error-message': 'Email format error',
16
+ 'pisell2.text.notes': 'Note',
17
+ 'pisell2.text.save': 'Save',
18
+ 'pisell2.text.save-and-select': 'Save and select',
19
+ 'pisell2.text.no-results-found': 'No results found.',
20
+ 'pisell2.text.create-new-client': 'Create new customer',
21
+ 'pisell2.text.result-found': 'Result found',
22
+ 'pisell2.text.personnel-list': 'Personnel list',
23
+ 'pisell2.text.load-more': 'Load more',
24
+ 'pisell2.text.add-client.confirm': 'Fill in at least one name, phone number and email address',
25
+ 'pisell2.text.search-customer-by-phone-number': 'Search by phone number',
26
+ 'pisell2.text.create': 'Create',
27
+ 'pisell2.text.loading': 'Loading',
28
+ 'pisell2.text.no-more-data': 'No More Data',
29
+ 'pisell2.text.client-search.name': 'Name',
30
+ 'pisell2.text.client-search.register-time': 'Registration Time',
31
+ 'pisell2.text.client-search.phone': 'Phone Number',
32
+ 'pisell2.text.client-search.email': 'Email Address',
33
+ 'pisell2.text.client-search.membership': 'Membership',
34
+ 'pisell2.text.client-search.contact-info': 'Contact info',
35
+ 'pisell2.text.client-search.holder': 'Holder'
36
+ },
37
+ 'zh-CN': {
38
+ 'pisell2.text.leave-empty-for-walk-in': '如未注册游客则留空',
39
+ 'pisell2.text.date-year-text': '年',
40
+ 'pisell2.text.date-month-text': '月',
41
+ 'pisell2.text.date-day-text': '日',
42
+ 'pisell2.text.gender': '性别',
43
+ 'pisell2.text.gender.male': '男',
44
+ 'pisell2.text.gender.female': '女',
45
+ 'pisell2.text.birthday': '生日',
46
+ 'pisell2.text.phone': '电话号码',
47
+ 'pisell2.text.email': '电子邮箱',
48
+ 'pisell2.text.lastname': '姓',
49
+ 'pisell2.text.firstname': '名',
50
+ 'pisell2.text.email-error-message': '电子邮件格式错误',
51
+ 'pisell2.text.notes': '备注',
52
+ 'pisell2.text.save': '保存',
53
+ 'pisell2.text.save-and-select': '保存并选中',
54
+ 'pisell2.text.no-results-found': '没有搜索到结果',
55
+ 'pisell2.text.create-new-client': '创建新客户',
56
+ 'pisell2.text.result-found': '搜索结果',
57
+ 'pisell2.text.personnel-list': '客户列表',
58
+ 'pisell2.text.add-client.confirm': '姓名,电话,邮箱至少填一个',
59
+ 'pisell2.text.load-more': '加载更多',
60
+ 'pisell2.text.search-customer-by-phone-number': '输入手机号搜索客户',
61
+ 'pisell2.text.create': '创建',
62
+ 'pisell2.text.loading': '加载中',
63
+ 'pisell2.text.no-more-data': '没有更多数据了',
64
+ 'pisell2.text.client-search.name': '姓名',
65
+ 'pisell2.text.client-search.register-time': '注册时间',
66
+ 'pisell2.text.client-search.phone': '电话号码',
67
+ 'pisell2.text.client-search.email': '邮箱',
68
+ 'pisell2.text.client-search.membership': '会员',
69
+ 'pisell2.text.client-search.contact-info': '联系信息',
70
+ 'pisell2.text.client-search.holder': '持有人'
71
+ },
72
+ 'zh-HK': {
73
+ 'pisell2.text.leave-empty-for-walk-in': '如未註冊遊客則留空',
74
+ 'pisell2.text.date-year-text': '年',
75
+ 'pisell2.text.date-month-text': '月',
76
+ 'pisell2.text.date-day-text': '日',
77
+ 'pisell2.text.gender': '性别',
78
+ 'pisell2.text.gender.male': '男',
79
+ 'pisell2.text.gender.female': '女',
80
+ 'pisell2.text.birthday': '生日',
81
+ 'pisell2.text.phone': '電話號碼',
82
+ 'pisell2.text.email': '電子郵箱',
83
+ 'pisell2.text.lastname': '姓',
84
+ 'pisell2.text.firstname': '名',
85
+ 'pisell2.text.email-error-message': '電子郵件格式錯誤',
86
+ 'pisell2.text.notes': '備註',
87
+ 'pisell2.text.save': '保存',
88
+ 'pisell2.text.save-and-select': '保存並選中',
89
+ 'pisell2.text.no-results-found': '沒有搜索到客戶',
90
+ 'pisell2.text.create-new-client': '創建新客戶',
91
+ 'pisell2.text.result-found': '搜索結果',
92
+ 'pisell2.text.personnel-list': '客戶列表',
93
+ 'pisell2.text.add-client.confirm': '姓名,電話,郵箱至少填一個',
94
+ 'pisell2.text.load-more': '加載更多',
95
+ 'pisell2.text.search-customer-by-phone-number': '輸入手機號搜索客戶',
96
+ 'pisell2.text.create': '創建',
97
+ 'pisell2.text.loading': '載入中',
98
+ 'pisell2.text.no-more-data': '沒有更多資料了',
99
+ 'pisell2.text.client-search.name': '姓名',
100
+ 'pisell2.text.client-search.register-time': '註冊時間',
101
+ 'pisell2.text.client-search.phone': '電話號碼',
102
+ 'pisell2.text.client-search.email': '電郵地址',
103
+ 'pisell2.text.client-search.membership': '會員',
104
+ 'pisell2.text.client-search.contact-info': '聯繫信息',
105
+ 'pisell2.text.client-search.holder': '持有人'
106
+ }
107
+ };
@@ -0,0 +1 @@
1
+ export declare const addCustomer: (params: any) => Promise<any>;
@@ -0,0 +1,31 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ import { request } from "../../utils";
6
+
7
+ // 新增客户
8
+ export var addCustomer = /*#__PURE__*/function () {
9
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
10
+ var res;
11
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12
+ while (1) switch (_context.prev = _context.next) {
13
+ case 0:
14
+ _context.next = 2;
15
+ return request.getRequest().post("/shop/customer", params, {
16
+ abort: true,
17
+ fullResult: true
18
+ });
19
+ case 2:
20
+ res = _context.sent;
21
+ return _context.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
22
+ case 4:
23
+ case "end":
24
+ return _context.stop();
25
+ }
26
+ }, _callee);
27
+ }));
28
+ return function addCustomer(_x) {
29
+ return _ref.apply(this, arguments);
30
+ };
31
+ }();
@@ -0,0 +1,70 @@
1
+ /// <reference types="react" />
2
+ export interface FormRecord {
3
+ form_id: number;
4
+ id: number;
5
+ main_field: string;
6
+ data?: {
7
+ [key: string]: any;
8
+ };
9
+ }
10
+ export interface ClientData {
11
+ id: number;
12
+ display_name: string;
13
+ created_at: string;
14
+ phone: string;
15
+ email: string;
16
+ channel: string;
17
+ country_calling_code: string;
18
+ nickname: string;
19
+ shop_id: number;
20
+ updated_at: string;
21
+ contacts_info: {
22
+ value: {
23
+ first_name?: string;
24
+ last_name?: string;
25
+ phone?: {
26
+ phone?: string;
27
+ country_calling_code?: string;
28
+ country_code?: string;
29
+ };
30
+ email?: string;
31
+ };
32
+ };
33
+ form_record: FormRecord[];
34
+ }
35
+ export interface ClientSearchProps {
36
+ dataSource?: any;
37
+ isShowScanner?: boolean;
38
+ isShowCamera?: boolean;
39
+ isShowNFC?: boolean;
40
+ isShowNewButton?: boolean;
41
+ newButtonAlign?: 'left' | 'center' | 'right';
42
+ newButtonText?: string;
43
+ renderType?: 'modal' | 'drawer' | 'portal' | '';
44
+ containerProps?: Record<string, any>;
45
+ isShowSearch?: boolean;
46
+ isShowSearchCamera?: boolean;
47
+ searchIcon?: string;
48
+ placeholder?: string;
49
+ isShowSearchButton?: boolean;
50
+ resultSort?: 'asc' | 'desc' | 'custom';
51
+ sortBy?: string;
52
+ style?: React.CSSProperties;
53
+ onChange?: (value: string) => void;
54
+ onSearch?: (value: string) => void;
55
+ onAdd?: () => void;
56
+ onDataChange?: (data: any) => void;
57
+ onRowClick?: (record: ClientData, index: number) => void;
58
+ }
59
+ export interface ClientFormData {
60
+ display_name: string;
61
+ phone?: string;
62
+ email?: string;
63
+ nickname?: string;
64
+ }
65
+ export interface ClientSearchState {
66
+ modalVisible: boolean;
67
+ loading: boolean;
68
+ searchResults: ClientData[];
69
+ searchValue: string;
70
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
3
3
  value?: string;
4
4
  onChange?: (val: string) => void;
5
5
  }
6
- export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
6
+ export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
7
7
  declare const ImageUpload: React.FC<ImageUploadProps>;
8
8
  export default ImageUpload;
@@ -5,6 +5,8 @@ interface PassDetailProps {
5
5
  platform?: 'pc' | 'h5';
6
6
  buttonGroupList?: any[][];
7
7
  showTimeLine?: boolean;
8
+ onDetailRefresh?: (passId: number | string, patch: any) => void;
9
+ onListRefresh?: () => void;
8
10
  }
9
11
  declare const PassDetail: (props: PassDetailProps) => React.JSX.Element | null;
10
12
  export default PassDetail;
@@ -2,6 +2,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
6
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
7
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -37,7 +40,9 @@ var PassDetail = function PassDetail(props) {
37
40
  _props$platform = props.platform,
38
41
  platform = _props$platform === void 0 ? 'pc' : _props$platform,
39
42
  _props$showTimeLine = props.showTimeLine,
40
- showTimeLine = _props$showTimeLine === void 0 ? true : _props$showTimeLine;
43
+ showTimeLine = _props$showTimeLine === void 0 ? true : _props$showTimeLine,
44
+ onDetailRefresh = props.onDetailRefresh,
45
+ onListRefresh = props.onListRefresh;
41
46
  var _useState = useState('detail'),
42
47
  _useState2 = _slicedToArray(_useState, 2),
43
48
  activeKey = _useState2[0],
@@ -51,45 +56,47 @@ var PassDetail = function PassDetail(props) {
51
56
  var containerRef = useRef(null);
52
57
  var isIndicatorVisibleRef = useRef(false);
53
58
  var context = useEngineContext();
54
- var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {
55
- store: {}
56
- },
57
- store = _ref.store;
58
- var _ref2 = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.constants) || {
59
+ var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
60
+ store = _context$appHelper$ut.store,
61
+ isTerminal = _context$appHelper$ut.isTerminal,
62
+ interaction = _context$appHelper$ut.interaction,
63
+ isApp = _context$appHelper$ut.isApp;
64
+ var _ref = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.constants) || {
59
65
  apiPrefix: '/h5'
60
66
  },
61
- apiPrefix = _ref2.apiPrefix;
67
+ apiPrefix = _ref.apiPrefix;
62
68
  var timezone = (store === null || store === void 0 || (_store$getState = store.getState) === null || _store$getState === void 0 || (_store$getState = _store$getState.call(store)) === null || _store$getState === void 0 || (_store$getState = _store$getState.global) === null || _store$getState === void 0 || (_store$getState = _store$getState.symbol) === null || _store$getState === void 0 || (_store$getState = _store$getState.shop) === null || _store$getState === void 0 ? void 0 : _store$getState.timezone) || 'Asia/Shanghai';
69
+ var isTerminalEnv = (typeof isTerminal === 'function' ? isTerminal() : !!isTerminal) || (isApp === null || isApp === void 0 ? void 0 : isApp());
63
70
  locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
64
71
  if ((_context$appHelper3 = context.appHelper) !== null && _context$appHelper3 !== void 0 && (_context$appHelper3 = _context$appHelper3.utils) !== null && _context$appHelper3 !== void 0 && _context$appHelper3.request) {
65
72
  var _context$appHelper4;
66
73
  request.setRequest((_context$appHelper4 = context.appHelper) === null || _context$appHelper4 === void 0 || (_context$appHelper4 = _context$appHelper4.utils) === null || _context$appHelper4 === void 0 ? void 0 : _context$appHelper4.request);
67
74
  }
68
- var _ref3 = dataSource || {},
69
- _ref3$id = _ref3.id,
70
- id = _ref3$id === void 0 ? '' : _ref3$id,
71
- _ref3$code = _ref3.code,
72
- code = _ref3$code === void 0 ? '' : _ref3$code,
73
- _ref3$tag = _ref3.tag,
74
- tag = _ref3$tag === void 0 ? '' : _ref3$tag,
75
- _ref3$product_title = _ref3.product_title,
76
- product_title = _ref3$product_title === void 0 ? '' : _ref3$product_title,
77
- _ref3$encoded = _ref3.encoded,
78
- encoded = _ref3$encoded === void 0 ? '' : _ref3$encoded,
79
- balance = _ref3.balance,
80
- _ref3$expire_date = _ref3.expire_date,
81
- expire_date = _ref3$expire_date === void 0 ? '' : _ref3$expire_date,
82
- _ref3$product = _ref3.product,
83
- product = _ref3$product === void 0 ? {} : _ref3$product,
84
- custom_schedule_snapshot = _ref3.custom_schedule_snapshot,
85
- customer_id = _ref3.customer_id;
86
- var _ref4 = product || {},
87
- _ref4$description = _ref4.description,
88
- description = _ref4$description === void 0 ? '' : _ref4$description,
89
- _ref4$extension_data = _ref4.extension_data,
90
- extension_data = _ref4$extension_data === void 0 ? [] : _ref4$extension_data,
91
- _ref4$customer_order_ = _ref4.customer_order_behavior_count,
92
- customer_order_behavior_count = _ref4$customer_order_ === void 0 ? 0 : _ref4$customer_order_;
75
+ var _ref2 = dataSource || {},
76
+ _ref2$id = _ref2.id,
77
+ id = _ref2$id === void 0 ? '' : _ref2$id,
78
+ _ref2$code = _ref2.code,
79
+ code = _ref2$code === void 0 ? '' : _ref2$code,
80
+ _ref2$tag = _ref2.tag,
81
+ tag = _ref2$tag === void 0 ? '' : _ref2$tag,
82
+ _ref2$product_title = _ref2.product_title,
83
+ product_title = _ref2$product_title === void 0 ? '' : _ref2$product_title,
84
+ _ref2$encoded = _ref2.encoded,
85
+ encoded = _ref2$encoded === void 0 ? '' : _ref2$encoded,
86
+ balance = _ref2.balance,
87
+ _ref2$expire_date = _ref2.expire_date,
88
+ expire_date = _ref2$expire_date === void 0 ? '' : _ref2$expire_date,
89
+ _ref2$product = _ref2.product,
90
+ product = _ref2$product === void 0 ? {} : _ref2$product,
91
+ custom_schedule_snapshot = _ref2.custom_schedule_snapshot,
92
+ customer_id = _ref2.customer_id;
93
+ var _ref3 = product || {},
94
+ _ref3$description = _ref3.description,
95
+ description = _ref3$description === void 0 ? '' : _ref3$description,
96
+ _ref3$extension_data = _ref3.extension_data,
97
+ extension_data = _ref3$extension_data === void 0 ? [] : _ref3$extension_data,
98
+ _ref3$customer_order_ = _ref3.customer_order_behavior_count,
99
+ customer_order_behavior_count = _ref3$customer_order_ === void 0 ? 0 : _ref3$customer_order_;
93
100
  var _getDetail = useRequest(function () {
94
101
  return getDetailApi({
95
102
  id: id,
@@ -100,6 +107,48 @@ var PassDetail = function PassDetail(props) {
100
107
  ready: !!id,
101
108
  refreshDeps: [id, customer_id]
102
109
  });
110
+ useEffect(function () {
111
+ var _interaction$utils, _interaction$utils$mo;
112
+ interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 || _interaction$utils$mo.call(_interaction$utils, 'customer', 'recharge', /*#__PURE__*/function () {
113
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(strVal) {
114
+ var _getDetail$refreshAsy, latest, patch;
115
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
116
+ while (1) switch (_context.prev = _context.next) {
117
+ case 0:
118
+ if (strVal) {
119
+ _context.next = 2;
120
+ break;
121
+ }
122
+ return _context.abrupt("return", onListRefresh === null || onListRefresh === void 0 ? void 0 : onListRefresh());
123
+ case 2:
124
+ _context.prev = 2;
125
+ _context.next = 5;
126
+ return (_getDetail$refreshAsy = _getDetail.refreshAsync) === null || _getDetail$refreshAsy === void 0 ? void 0 : _getDetail$refreshAsy.call(_getDetail);
127
+ case 5:
128
+ latest = _context.sent;
129
+ patch = {
130
+ balance: (latest === null || latest === void 0 ? void 0 : latest.balance) !== undefined ? latest.balance : balance !== null && balance !== void 0 ? balance : undefined,
131
+ expire_date: (latest === null || latest === void 0 ? void 0 : latest.expire_date) !== undefined ? latest.expire_date : expire_date !== null && expire_date !== void 0 ? expire_date : undefined,
132
+ unified_available_status: latest === null || latest === void 0 ? void 0 : latest.unified_available_status
133
+ };
134
+ onDetailRefresh === null || onDetailRefresh === void 0 || onDetailRefresh(id, patch);
135
+ _context.next = 13;
136
+ break;
137
+ case 10:
138
+ _context.prev = 10;
139
+ _context.t0 = _context["catch"](2);
140
+ console.error(_context.t0);
141
+ case 13:
142
+ case "end":
143
+ return _context.stop();
144
+ }
145
+ }, _callee, null, [[2, 10]]);
146
+ }));
147
+ return function (_x) {
148
+ return _ref4.apply(this, arguments);
149
+ };
150
+ }());
151
+ }, [id]);
103
152
  var scheduleList = useMemo(function () {
104
153
  return (custom_schedule_snapshot === null || custom_schedule_snapshot === void 0 ? void 0 : custom_schedule_snapshot.data) || [];
105
154
  }, [custom_schedule_snapshot]);
@@ -208,6 +257,24 @@ var PassDetail = function PassDetail(props) {
208
257
  setActiveKey(_key);
209
258
  }
210
259
  }, []);
260
+ var handleRechargeClick = useCallback(function () {
261
+ if (isTerminalEnv) {
262
+ var _interaction$utils2, _interaction$utils2$p;
263
+ var productId = (product === null || product === void 0 ? void 0 : product.id) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.product_id) || '';
264
+ interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
265
+ module: 'customer',
266
+ key: 'recharge',
267
+ data: {
268
+ product_id: String(productId || ''),
269
+ card_id: String(id || ''),
270
+ card_code: String(code || ''),
271
+ customer_id: String(customer_id || '')
272
+ }
273
+ });
274
+ return;
275
+ }
276
+ setRechargeOpen(true);
277
+ }, [isTerminalEnv, id, code, customer_id, product, dataSource]);
211
278
  if (!dataSource) {
212
279
  return /*#__PURE__*/React.createElement(Empty, null);
213
280
  }
@@ -247,7 +314,9 @@ var PassDetail = function PassDetail(props) {
247
314
  code: code,
248
315
  tag: tag,
249
316
  timezone: timezone,
250
- apiPrefix: apiPrefix
317
+ apiPrefix: apiPrefix,
318
+ isTerminalEnv: isTerminalEnv,
319
+ interaction: interaction
251
320
  });
252
321
  };
253
322
  if (!props.dataSource) return null;
@@ -283,9 +352,7 @@ var PassDetail = function PassDetail(props) {
283
352
  }, locales.getText('wallet-pass-gallery.details')), platform === 'pc' && tag === 'gift_card' && (dataSource === null || dataSource === void 0 || (_dataSource$machineco = dataSource.machinecode_config) === null || _dataSource$machineco === void 0 ? void 0 : _dataSource$machineco.hide_recharge) === 0 && /*#__PURE__*/React.createElement(Button, {
284
353
  type: "primary",
285
354
  size: "large",
286
- onClick: function onClick() {
287
- return setRechargeOpen(true);
288
- }
355
+ onClick: handleRechargeClick
289
356
  }, locales.getText('wallet-pass-gallery.recharge')), /*#__PURE__*/React.createElement(PisellStatisticList, {
290
357
  data: descs,
291
358
  labelColor: "#667085",
@@ -312,9 +379,7 @@ var PassDetail = function PassDetail(props) {
312
379
  })), /*#__PURE__*/React.createElement("div", null, renderTimeLine())))), platform === 'h5' && tag === 'gift_card' ? /*#__PURE__*/React.createElement(FooterButtons, {
313
380
  appleWalletUrl: (_getDetail$data = _getDetail.data) === null || _getDetail$data === void 0 ? void 0 : _getDetail$data.apple_wallet_url,
314
381
  googleWalletUrl: (_getDetail$data2 = _getDetail.data) === null || _getDetail$data2 === void 0 ? void 0 : _getDetail$data2.google_wallet_url,
315
- onRechargeClick: (dataSource === null || dataSource === void 0 || (_dataSource$machineco2 = dataSource.machinecode_config) === null || _dataSource$machineco2 === void 0 ? void 0 : _dataSource$machineco2.hide_recharge) === 0 ? function () {
316
- return setRechargeOpen(true);
317
- } : undefined,
382
+ onRechargeClick: (dataSource === null || dataSource === void 0 || (_dataSource$machineco2 = dataSource.machinecode_config) === null || _dataSource$machineco2 === void 0 ? void 0 : _dataSource$machineco2.hide_recharge) === 0 ? handleRechargeClick : undefined,
318
383
  platform: platform
319
384
  }) : null, /*#__PURE__*/React.createElement(Recharge, {
320
385
  platform: platform,
@@ -5,6 +5,8 @@ interface TimelineSectionProps {
5
5
  tag: string;
6
6
  timezone: string;
7
7
  apiPrefix?: '/shop' | '/h5';
8
+ isTerminalEnv?: boolean;
9
+ interaction?: any;
8
10
  }
9
11
  declare const TimelineSection: (props: TimelineSectionProps) => React.JSX.Element;
10
12
  export default TimelineSection;
@@ -20,7 +20,9 @@ var TimelineSection = function TimelineSection(props) {
20
20
  var code = props.code,
21
21
  tag = props.tag,
22
22
  timezone = props.timezone,
23
- apiPrefix = props.apiPrefix;
23
+ apiPrefix = props.apiPrefix,
24
+ isTerminalEnv = props.isTerminalEnv,
25
+ interaction = props.interaction;
24
26
  var _usePisellConfig = usePisellConfig(),
25
27
  _usePisellConfig$symb = _usePisellConfig.symbol,
26
28
  symbol = _usePisellConfig$symb === void 0 ? '$' : _usePisellConfig$symb;
@@ -171,7 +173,22 @@ var TimelineSection = function TimelineSection(props) {
171
173
  label: locales.getText('wallet-pass-gallery.viewOrder'),
172
174
  value: timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_code ? "#".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_code) : timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.transaction_id ? "#".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.transaction_id) : '',
173
175
  isLink: !!(timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_id),
174
- link: timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_id ? apiPrefix === '/shop' ? "/admin/order/orders/detail?id=".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_id) : "/order/details?id=".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_id) : undefined
176
+ onClick: function onClick() {
177
+ if (isTerminalEnv) {
178
+ var _interaction$utils, _interaction$utils$po;
179
+ return interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$po = _interaction$utils.postMessageToApp) === null || _interaction$utils$po === void 0 ? void 0 : _interaction$utils$po.call(_interaction$utils, {
180
+ module: 'booking',
181
+ key: 'view_order',
182
+ data: {
183
+ order_id: timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_id
184
+ },
185
+ origin: '/booking'
186
+ });
187
+ }
188
+ var link = apiPrefix === '/shop' ? "/admin/order/orders/detail?id=".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_id) : "/order/details?id=".concat(timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.resource_id);
189
+ location.replace(link);
190
+ },
191
+ link: timeLineDetail && timeLineDetail !== null && timeLineDetail !== void 0 && timeLineDetail.resource_id ? true : undefined
175
192
  }],
176
193
  labelColor: "#101828",
177
194
  valueColor: "#101828",