@pisell/private-materials 3.4.73 → 3.4.74

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 (218) 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 +7 -7
  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/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  17. package/es/components/booking/forms/footer.d.ts +1 -0
  18. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  19. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  20. package/es/components/booking/info/date/index.d.ts +1 -0
  21. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  22. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  23. package/es/components/booking/info/service/Lists.d.ts +1 -0
  24. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  25. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  26. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  27. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  28. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  29. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  30. package/es/components/booking/notes/addNote/index.d.ts +1 -0
  31. package/es/components/eftposPay/amount.d.ts +1 -1
  32. package/es/components/eftposPay/app.d.ts +1 -1
  33. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  34. package/es/components/eftposPay/device.d.ts +1 -1
  35. package/es/components/eftposPay/device.js +208 -36
  36. package/es/components/eftposPay/pay.d.ts +1 -0
  37. package/es/components/eftposPay/store/index.d.ts +1 -1
  38. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  39. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  40. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  41. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  42. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  43. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  44. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  45. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  46. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  47. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  48. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  49. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  50. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  51. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  52. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  53. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  54. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  55. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  56. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  57. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  58. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  59. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  60. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  61. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  62. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  63. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  64. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  65. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  66. package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
  67. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  68. package/es/index.d.ts +1 -0
  69. package/es/index.js +1 -0
  70. package/es/plus/orderList/components/HandleActions.d.ts +1 -0
  71. package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
  72. package/es/plus/orderList/components/Reset.d.ts +1 -0
  73. package/es/plus/orderList/components/Toolbar.d.ts +1 -0
  74. package/es/plus/orderList/config.d.ts +1 -0
  75. package/es/plus/saasAttendance/index.d.ts +6 -0
  76. package/es/plus/saasAttendance/index.js +5 -0
  77. package/es/plus/saasAttendance/locales.d.ts +318 -0
  78. package/es/plus/saasAttendance/locales.js +354 -0
  79. package/es/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
  80. package/es/plus/saasAttendance/settings/BasicInfoTab.js +96 -0
  81. package/es/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
  82. package/es/plus/saasAttendance/settings/ClockInMethodTab.js +81 -0
  83. package/es/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
  84. package/es/plus/saasAttendance/settings/CorrectionPolicyTab.js +293 -0
  85. package/es/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
  86. package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +109 -0
  87. package/es/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
  88. package/es/plus/saasAttendance/settings/components/MapField.js +810 -0
  89. package/es/plus/saasAttendance/settings/components/index.d.ts +3 -0
  90. package/es/plus/saasAttendance/settings/components/index.js +2 -0
  91. package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +8 -0
  92. package/es/plus/saasAttendance/settings/components/membersField/index.js +216 -0
  93. package/es/plus/saasAttendance/settings/components/membersField/index.less +70 -0
  94. package/es/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
  95. package/es/plus/saasAttendance/settings/components/shiftModal/index.js +438 -0
  96. package/es/plus/saasAttendance/settings/index.d.ts +18 -0
  97. package/es/plus/saasAttendance/settings/index.js +255 -0
  98. package/es/plus/saasAttendance/settings/index.less +495 -0
  99. package/es/plus/saasAttendance/settings/serve.d.ts +27 -0
  100. package/es/plus/saasAttendance/settings/serve.js +83 -0
  101. package/es/plus/saasAttendance/settings/types.d.ts +128 -0
  102. package/es/plus/saasAttendance/settings/types.js +1 -0
  103. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  104. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  105. package/es/plus/selectHolder/locales.d.ts +6 -0
  106. package/es/plus/selectHolder/locales.js +6 -0
  107. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  108. package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
  109. package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
  110. package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
  111. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  112. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  113. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  114. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  115. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  116. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  117. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  118. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  119. package/lib/components/booking/forms/footer.d.ts +1 -0
  120. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  121. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  122. package/lib/components/booking/info/date/index.d.ts +1 -0
  123. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  124. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  125. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  126. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  127. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  128. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  129. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  130. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  131. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  132. package/lib/components/booking/notes/addNote/index.d.ts +1 -0
  133. package/lib/components/eftposPay/amount.d.ts +1 -1
  134. package/lib/components/eftposPay/app.d.ts +1 -1
  135. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  136. package/lib/components/eftposPay/device.d.ts +1 -1
  137. package/lib/components/eftposPay/device.js +108 -23
  138. package/lib/components/eftposPay/pay.d.ts +1 -0
  139. package/lib/components/eftposPay/store/index.d.ts +1 -1
  140. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  141. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  142. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  143. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  144. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  145. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  146. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  147. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  148. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  149. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  150. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  151. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  152. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  153. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  154. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  155. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  157. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  158. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  159. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  160. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  161. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  162. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  163. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  164. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  165. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  166. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  167. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  168. package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
  169. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  170. package/lib/index.d.ts +1 -0
  171. package/lib/index.js +3 -0
  172. package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
  173. package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
  174. package/lib/plus/orderList/components/Reset.d.ts +1 -0
  175. package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
  176. package/lib/plus/orderList/config.d.ts +1 -0
  177. package/lib/plus/saasAttendance/index.d.ts +6 -0
  178. package/lib/plus/saasAttendance/index.js +39 -0
  179. package/lib/plus/saasAttendance/locales.d.ts +318 -0
  180. package/lib/plus/saasAttendance/locales.js +342 -0
  181. package/lib/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
  182. package/lib/plus/saasAttendance/settings/BasicInfoTab.js +152 -0
  183. package/lib/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
  184. package/lib/plus/saasAttendance/settings/ClockInMethodTab.js +88 -0
  185. package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
  186. package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.js +369 -0
  187. package/lib/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
  188. package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +106 -0
  189. package/lib/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
  190. package/lib/plus/saasAttendance/settings/components/MapField.js +631 -0
  191. package/lib/plus/saasAttendance/settings/components/index.d.ts +3 -0
  192. package/lib/plus/saasAttendance/settings/components/index.js +42 -0
  193. package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +8 -0
  194. package/lib/plus/saasAttendance/settings/components/membersField/index.js +247 -0
  195. package/lib/plus/saasAttendance/settings/components/membersField/index.less +70 -0
  196. package/lib/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
  197. package/lib/plus/saasAttendance/settings/components/shiftModal/index.js +447 -0
  198. package/lib/plus/saasAttendance/settings/index.d.ts +18 -0
  199. package/lib/plus/saasAttendance/settings/index.js +283 -0
  200. package/lib/plus/saasAttendance/settings/index.less +495 -0
  201. package/lib/plus/saasAttendance/settings/serve.d.ts +27 -0
  202. package/lib/plus/saasAttendance/settings/serve.js +54 -0
  203. package/lib/plus/saasAttendance/settings/types.d.ts +128 -0
  204. package/lib/plus/saasAttendance/settings/types.js +17 -0
  205. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  206. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  207. package/lib/plus/selectHolder/locales.d.ts +6 -0
  208. package/lib/plus/selectHolder/locales.js +6 -0
  209. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  210. package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
  211. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
  212. package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
  213. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  214. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  215. package/lowcode/eco-cup-list/meta.ts +63 -0
  216. package/lowcode/eco-customer-list/meta.ts +63 -0
  217. package/lowcode/saas-attendance-settings/meta.ts +56 -0
  218. package/package.json +1 -1
@@ -0,0 +1,128 @@
1
+ /**
2
+ * 多语言名称
3
+ */
4
+ export interface MultiLangName {
5
+ en?: string;
6
+ 'zh-CN'?: string;
7
+ 'zh-HK'?: string;
8
+ original?: string;
9
+ }
10
+ /**
11
+ * 未排班时的打卡规则
12
+ * - anytime: 随时打卡
13
+ * - business_hours: 正常上下班(按照店铺营业时间打卡)
14
+ * - select_shift: 自选班次(员工需先选班次后打卡)
15
+ */
16
+ export declare type NoShiftPolicy = 'anytime' | 'business_hours' | 'select_shift';
17
+ /**
18
+ * 考勤规则
19
+ */
20
+ export interface AttendanceRule {
21
+ no_shift_policy: NoShiftPolicy;
22
+ }
23
+ /**
24
+ * 考勤地点
25
+ */
26
+ export interface AttendanceLocation {
27
+ id: string;
28
+ name: MultiLangName;
29
+ radius?: number;
30
+ address: {
31
+ lat: number;
32
+ lng: number;
33
+ };
34
+ }
35
+ /**
36
+ * 考勤地点配置
37
+ */
38
+ export interface AttendancePlace {
39
+ radius: number;
40
+ location: AttendanceLocation[];
41
+ }
42
+ /**
43
+ * 补卡类型
44
+ * - normal: 正常
45
+ * - late: 迟到
46
+ * - early_leave: 早退
47
+ * - missing: 缺卡
48
+ */
49
+ export declare type CorrectionType = 'normal' | 'late' | 'early_leave' | 'missing';
50
+ /**
51
+ * 补卡周期类型
52
+ * - natural_month: 自然月
53
+ * - custom: 自定义周期
54
+ */
55
+ export declare type FrequencyType = 'natural_month' | 'custom';
56
+ /**
57
+ * 补卡配置
58
+ */
59
+ export interface AttendanceCorrection {
60
+ allow: boolean;
61
+ types: CorrectionType[];
62
+ approver_ids: number[];
63
+ days_limit: number;
64
+ monthly_times: number;
65
+ period_type: FrequencyType;
66
+ period_custom: number | null;
67
+ }
68
+ /**
69
+ * 考勤组设置值 - 完整的API数据结构
70
+ */
71
+ export interface AttendanceGroupSettingsValue {
72
+ id?: number;
73
+ name: MultiLangName;
74
+ timezone: string;
75
+ rule: AttendanceRule;
76
+ place: AttendancePlace;
77
+ member_ids: number[];
78
+ correction: AttendanceCorrection;
79
+ creator_type?: string;
80
+ creator_id?: number;
81
+ editor_type?: string;
82
+ editor_id?: number;
83
+ created_at?: string;
84
+ updated_at?: string;
85
+ }
86
+ /**
87
+ * 基本信息Tab的值
88
+ */
89
+ export interface BasicInfoTabValue {
90
+ name: MultiLangName;
91
+ timezone: string;
92
+ member_ids: number[];
93
+ }
94
+ /**
95
+ * 排班规则Tab的值
96
+ */
97
+ export interface ShiftScheduleTabValue {
98
+ rule: AttendanceRule;
99
+ }
100
+ /**
101
+ * 打卡方式Tab的值
102
+ */
103
+ export interface ClockInMethodTabValue {
104
+ place: AttendancePlace;
105
+ }
106
+ /**
107
+ * 补卡规则Tab的值
108
+ */
109
+ export interface CorrectionPolicyTabValue {
110
+ correction: AttendanceCorrection;
111
+ }
112
+ export declare type AttendanceGroupSettingsSection = 'basic' | 'shift' | 'clock' | 'correction';
113
+ export interface TenantAccount {
114
+ account?: {
115
+ id: number;
116
+ email: string;
117
+ avatar: string;
118
+ };
119
+ account_id: number;
120
+ created_at: string;
121
+ id: number;
122
+ member_id: string;
123
+ nickname: string;
124
+ status: 'active' | 'inactive';
125
+ tenant_id: number;
126
+ type: 'founder' | 'staff';
127
+ updated_at: string;
128
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../index.less';
2
3
  declare const VertifyEmail: (props: {
3
4
  email: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => JSX.Element;
3
4
  export default ErrorTip;
@@ -17,5 +17,11 @@ declare const _default: {
17
17
  'pisell-select-holder-selected': string;
18
18
  'pisell-select-holder-skip': string;
19
19
  };
20
+ 'zh-HK': {
21
+ 'pisell-select-holder-create': string;
22
+ 'pisell-select-holder-please-select': string;
23
+ 'pisell-select-holder-selected': string;
24
+ 'pisell-select-holder-skip': string;
25
+ };
20
26
  };
21
27
  export default _default;
@@ -16,5 +16,11 @@ export default {
16
16
  'pisell-select-holder-please-select': '請選擇',
17
17
  'pisell-select-holder-selected': '已選擇:',
18
18
  'pisell-select-holder-skip': '跳過'
19
+ },
20
+ 'zh-HK': {
21
+ 'pisell-select-holder-create': '創建',
22
+ 'pisell-select-holder-please-select': '請選擇',
23
+ 'pisell-select-holder-selected': '已選擇:',
24
+ 'pisell-select-holder-skip': '跳過'
19
25
  }
20
26
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RenderItemProps } from '../../../../pro/Selector/types';
2
3
  declare const NormalCard: (props: RenderItemProps & {
3
4
  parentDataSource: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const OptionItemCard: (props: any) => JSX.Element;
3
4
  export default OptionItemCard;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * 单规格商品卡片,点击后需要拉起弹窗展示具体的规格信息
3
3
  */
4
+ /// <reference types="react" />
4
5
  import { RenderItemProps } from '../../../../pro/Selector/types';
5
6
  import './index.less';
6
7
  declare const OptionsCard: (props: RenderItemProps & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface OptionsModalProps {
2
3
  parentDataSource: any;
3
4
  dataSource: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface IPassListProps {
2
3
  dataSource: any[];
3
4
  value?: string | number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface TimelineSectionProps {
3
4
  code: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
4
  export default Total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: ({ onNext, renderContactInfo }: any) => JSX.Element;
3
4
  export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface DepositProps {
3
4
  showTitle?: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface FooterProps {
2
3
  state: any;
3
4
  reload: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SendModalValues } from './index';
2
3
  declare const useSendModal: (bookingId?: number) => {
3
4
  open: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
2
3
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
3
4
  declare const DateCom: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const AddNote: ({ value, onChange, wait, title, placeholder }: any) => JSX.Element;
3
4
  export default AddNote;
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -1,5 +1,5 @@
1
1
  import { PosProps, RouteType } from './const';
2
- declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "mode" | "type" | "getApi"> & {
2
+ declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
3
3
  action: RouteType;
4
4
  device_number: string | number;
5
5
  api: ReturnType<PosProps['getApi']>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -43,6 +43,8 @@ var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
43
43
  var import_store = require("./store");
44
44
  var import_manufacturer = require("./manufacturer");
45
45
  var import_device = require("./device.less");
46
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
47
+ var import_utils2 = require("@pisell/utils");
46
48
  var device_default = ({
47
49
  api,
48
50
  onChange,
@@ -54,12 +56,15 @@ var device_default = ({
54
56
  client,
55
57
  formatAmount = (number, precision, symbol) => `${symbol}${number}`
56
58
  }) => {
59
+ const context = (0, import_useEngineContext.default)();
60
+ const { isTerminal, interaction } = context.appHelper.utils || {};
57
61
  const store = (0, import_store.useContextData)();
58
- const { device, symbol, mode, eftpos } = store;
62
+ const { device, symbol, mode, eftpos, order_id } = store;
59
63
  const [loading, setLoading] = (0, import_react.useState)(false);
60
64
  const [dataStaus, setDataStaus] = (0, import_react.useState)(true);
61
65
  const [list, setList] = (0, import_react.useState)([]);
62
66
  const dispatch = (0, import_store.useDispatch)();
67
+ const timerRef = (0, import_react.useRef)();
63
68
  const onClick = (event) => {
64
69
  if (!net) {
65
70
  import_antd.message.open({
@@ -72,10 +77,41 @@ var device_default = ({
72
77
  const [index] = [Number(event.currentTarget.dataset.index)];
73
78
  setDevice(list[index]);
74
79
  };
80
+ const triggerCloseButton = (bool) => {
81
+ var _a, _b;
82
+ if (!(isTerminal == null ? void 0 : isTerminal())) {
83
+ return;
84
+ }
85
+ (_b = (_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.postMessageToApp) == null ? void 0 : _b.call(_a, {
86
+ module: "pos",
87
+ key: "other",
88
+ data: {
89
+ key: bool ? "show_close_button" : "hide_close_button"
90
+ }
91
+ });
92
+ };
93
+ const closeFirstWithDelayShow = () => {
94
+ timerRef.current && clearTimeout(timerRef.current);
95
+ if (!(isTerminal == null ? void 0 : isTerminal())) {
96
+ return;
97
+ }
98
+ triggerCloseButton(false);
99
+ timerRef.current = setTimeout(() => {
100
+ triggerCloseButton(true);
101
+ }, 5e3);
102
+ };
103
+ const clearTimer = () => {
104
+ if (timerRef.current) {
105
+ clearTimeout(timerRef.current);
106
+ timerRef.current = void 0;
107
+ }
108
+ };
75
109
  (0, import_ahooks.useMount)(() => {
76
110
  setLoading(true);
111
+ closeFirstWithDelayShow();
77
112
  api.getDeviceList({ type: eftpos, status: "paired" }).then(
78
113
  (res) => {
114
+ clearTimer();
79
115
  setLoading(false);
80
116
  if (res && Array.isArray(res.list) && res.list.length > 0) {
81
117
  if (device_number) {
@@ -100,24 +136,65 @@ var device_default = ({
100
136
  setList(setDeviceList(res.list));
101
137
  if (res.list.length === 1) {
102
138
  setDevice(res.list[0]);
139
+ } else {
140
+ triggerCloseButton(true);
103
141
  }
104
142
  return;
105
143
  }
144
+ triggerCloseButton(true);
106
145
  setDataStaus(false);
107
146
  },
108
147
  () => {
148
+ clearTimer();
149
+ triggerCloseButton(true);
109
150
  setDataStaus(false);
110
151
  setLoading(false);
111
152
  }
112
153
  );
113
154
  });
114
- const setDevice = (device2) => {
155
+ (0, import_ahooks.useUnmount)(() => {
156
+ timerRef.current && clearTimeout(timerRef.current);
157
+ });
158
+ const checkIsActiveWithDelay = async (time = 100) => {
159
+ var _a, _b, _c;
160
+ if (!(isTerminal == null ? void 0 : isTerminal())) {
161
+ return true;
162
+ }
163
+ await new Promise((resolve) => setTimeout(resolve, time));
164
+ if ((_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.asyncDataManager) {
165
+ try {
166
+ const activeStatus = await ((_c = (_b = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _b.asyncDataManager) == null ? void 0 : _c.call(_b, {
167
+ module: "get",
168
+ key: "pay_webview_active"
169
+ }));
170
+ return activeStatus !== "unActive";
171
+ } catch (error) {
172
+ return true;
173
+ }
174
+ }
175
+ return true;
176
+ };
177
+ const setDevice = async (device2) => {
115
178
  dispatch((0, import_store.updateDevice)({ device: device2 }));
116
179
  if (typeof api.selectDevice === "function") {
117
180
  api.selectDevice(device2);
118
181
  }
119
182
  if (typeof onChange === "function") {
120
183
  if (mode === import_const.ModeEnum.Pay) {
184
+ triggerCloseButton(false);
185
+ const isActive = await checkIsActiveWithDelay(100);
186
+ if (!isActive) {
187
+ (0, import_utils2.sendWarningLog)({
188
+ title: "支付-当前页面非活跃状态,无法进行支付",
189
+ content: [
190
+ {
191
+ key: "activeStatus",
192
+ value: JSON.stringify({ order_id, isActive })
193
+ }
194
+ ]
195
+ });
196
+ return;
197
+ }
121
198
  if (device2.pay) {
122
199
  dispatch(
123
200
  (0, import_store.updateState)({
@@ -152,34 +229,42 @@ var device_default = ({
152
229
  className: "pisell-lowcode__eft-pay-device-list",
153
230
  style: isMobile ? { marginTop: "20px" } : {}
154
231
  },
155
- /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: loading, style: { flex: 1, overflow: "auto" } }, /* @__PURE__ */ import_react.default.createElement(
156
- "div",
232
+ /* @__PURE__ */ import_react.default.createElement(
233
+ import_antd.Spin,
157
234
  {
158
- style: { display: "flex", flexDirection: "column", gap: "10px" }
235
+ spinning: loading,
236
+ size: "large",
237
+ style: { flex: 1, overflow: "auto", minHeight: "200px" }
159
238
  },
160
- list.map(({ id, name, pay }, index) => /* @__PURE__ */ import_react.default.createElement(
239
+ /* @__PURE__ */ import_react.default.createElement(
161
240
  "div",
162
241
  {
163
- key: id,
164
- className: `pisell-lowcode__eft-pay-device ${id === (device == null ? void 0 : device.id) ? "active" : ""}`,
165
- "data-index": index,
166
- onClick,
167
- role: "button",
168
- tabIndex: index
242
+ style: { display: "flex", flexDirection: "column", gap: "10px" }
169
243
  },
170
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-name" }, name), mode === import_const.ModeEnum.Refund ? null : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-money" }, pay.totalUnit), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-sucharge" }, import_utils.locales.getText(
171
- "page.eftpos-pay.text.surcharge.edit.inc.surcharge"
172
- ), ": ", formatAmount(`${pay.surcharge}`, 2, symbol), " (", import_utils.locales.getText(
173
- "page.eftpos-pay.text.surcharge.edit.rate"
174
- ), ":", pay.surRate, "% +", " ", formatAmount(`${pay.surMoney}`, 2, symbol), ")"))),
175
- /* @__PURE__ */ import_react.default.createElement("div", { style: { flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
176
- import_ChevronRight.default,
244
+ list.map(({ id, name, pay }, index) => /* @__PURE__ */ import_react.default.createElement(
245
+ "div",
177
246
  {
178
- style: { fontWeight: "600", fontSize: "24px" }
179
- }
247
+ key: id,
248
+ className: `pisell-lowcode__eft-pay-device ${id === (device == null ? void 0 : device.id) ? "active" : ""}`,
249
+ "data-index": index,
250
+ onClick,
251
+ role: "button",
252
+ tabIndex: index
253
+ },
254
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-name" }, name), mode === import_const.ModeEnum.Refund ? null : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-money" }, pay.totalUnit), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-device-sucharge" }, import_utils.locales.getText(
255
+ "page.eftpos-pay.text.surcharge.edit.inc.surcharge"
256
+ ), ": ", formatAmount(`${pay.surcharge}`, 2, symbol), " (", import_utils.locales.getText(
257
+ "page.eftpos-pay.text.surcharge.edit.rate"
258
+ ), ":", pay.surRate, "% +", " ", formatAmount(`${pay.surMoney}`, 2, symbol), ")"))),
259
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
260
+ import_ChevronRight.default,
261
+ {
262
+ style: { fontWeight: "600", fontSize: "24px" }
263
+ }
264
+ ))
180
265
  ))
181
- ))
182
- ))
266
+ )
267
+ )
183
268
  ) : /* @__PURE__ */ import_react.default.createElement(
184
269
  "div",
185
270
  {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PayProps } from './const';
2
3
  import './index.less';
3
4
  /**
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
300
  eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => JSX.Element;
3
4
  export default ErrorTip;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface DepositProps {
2
3
  showTitle?: boolean;
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EmptyHolderModal: (props: any) => JSX.Element;
3
4
  export default EmptyHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Event: () => JSX.Element;
3
4
  export default Event;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: () => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Information: () => JSX.Element;
3
4
  export default Information;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const InformationOptionsModal: (props: any) => JSX.Element;
3
4
  export default InformationOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const OrderProductModal: (props: any) => JSX.Element;
3
4
  export default OrderProductModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
2
3
  export default RemoveOptionConfirmModal;