@pisell/private-materials 3.4.76 → 3.4.78

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 (208) 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/addons/model.d.ts +1 -10
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  14. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  15. package/es/components/booking/info/model.d.ts +1 -10
  16. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/model.d.ts +1 -9
  19. package/es/components/booking/notes/model.d.ts +1 -10
  20. package/es/components/booking/payments/model.d.ts +1 -10
  21. package/es/components/booking/utils.d.ts +2 -2
  22. package/es/components/eftpos/hooks.d.ts +0 -1
  23. package/es/components/eftposPay/amount.d.ts +1 -1
  24. package/es/components/eftposPay/device.d.ts +1 -1
  25. package/es/components/eftposPay/hooks.d.ts +1 -1
  26. package/es/components/eftposPay/store/index.d.ts +2 -2
  27. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  28. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  29. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  30. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  31. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  32. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  33. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  34. package/es/components/pay/toC/model.d.ts +1 -9
  35. package/es/components/schedules/model.d.ts +1 -9
  36. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  37. package/es/hooks/useTranslationOriginal.d.ts +1 -0
  38. package/es/hooks/useTranslationOriginal.js +10 -0
  39. package/es/index.d.ts +3 -0
  40. package/es/index.js +3 -0
  41. package/es/plus/clientCard/index.d.ts +7 -0
  42. package/es/plus/clientCard/index.js +462 -0
  43. package/es/plus/clientCard/index.less +515 -0
  44. package/es/plus/clientCard/line/index.d.ts +9 -0
  45. package/es/plus/clientCard/line/index.js +157 -0
  46. package/es/plus/clientCard/line/index.less +142 -0
  47. package/es/plus/clientCard/locales.d.ts +18 -0
  48. package/es/plus/clientCard/locales.js +17 -0
  49. package/es/plus/clientCard/types.d.ts +135 -0
  50. package/es/plus/clientCard/types.js +1 -0
  51. package/es/plus/clientCard/utils.d.ts +8 -0
  52. package/es/plus/clientCard/utils.js +59 -0
  53. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  54. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  55. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  56. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  57. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  58. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  59. package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  60. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  61. package/es/plus/clinetSearch/Add/index.d.ts +18 -0
  62. package/es/plus/clinetSearch/Add/index.js +213 -0
  63. package/es/plus/clinetSearch/Add/index.less +30 -0
  64. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  65. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  66. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  67. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  68. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  69. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  70. package/es/plus/clinetSearch/index.d.ts +18 -0
  71. package/es/plus/clinetSearch/index.js +234 -0
  72. package/es/plus/clinetSearch/index.less +95 -0
  73. package/es/plus/clinetSearch/locales.d.ts +108 -0
  74. package/es/plus/clinetSearch/locales.js +107 -0
  75. package/es/plus/clinetSearch/serve.d.ts +1 -0
  76. package/es/plus/clinetSearch/serve.js +31 -0
  77. package/es/plus/clinetSearch/types.d.ts +70 -0
  78. package/es/plus/clinetSearch/types.js +1 -0
  79. package/es/plus/saasAttendance/locales.d.ts +63 -0
  80. package/es/plus/saasAttendance/locales.js +71 -2
  81. package/es/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
  82. package/es/plus/saasAttendance/settings/PermissonTab.js +79 -0
  83. package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +9 -3
  84. package/es/plus/saasAttendance/settings/components/MapField.js +69 -33
  85. package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
  86. package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +149 -0
  87. package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
  88. package/es/plus/saasAttendance/settings/index.js +7 -0
  89. package/es/plus/saasAttendance/settings/index.less +15 -0
  90. package/es/plus/saasAttendance/settings/types.d.ts +6 -0
  91. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  92. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  93. package/es/plus/walletPassGallery/components/passDetail/index.js +104 -39
  94. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  95. package/es/plus/walletPassGallery/components/timelineSection/index.js +19 -2
  96. package/es/plus/walletPassGallery/index.d.ts +4 -0
  97. package/es/plus/walletPassGallery/index.js +121 -42
  98. package/es/plus/walletPassGallery/serve.d.ts +3 -1
  99. package/es/plus/walletPassGallery/serve.js +13 -13
  100. package/es/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  101. package/es/pro/pisellPhoneKeyboard/index.js +210 -0
  102. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  103. package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  104. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  105. package/lib/components/booking/addons/model.d.ts +1 -10
  106. package/lib/components/booking/forms/model.d.ts +1 -10
  107. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  108. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  109. package/lib/components/booking/info/model.d.ts +1 -10
  110. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  111. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  112. package/lib/components/booking/model.d.ts +1 -9
  113. package/lib/components/booking/notes/model.d.ts +1 -10
  114. package/lib/components/booking/payments/model.d.ts +1 -10
  115. package/lib/components/booking/utils.d.ts +2 -2
  116. package/lib/components/eftpos/hooks.d.ts +0 -1
  117. package/lib/components/eftposPay/amount.d.ts +1 -1
  118. package/lib/components/eftposPay/device.d.ts +1 -1
  119. package/lib/components/eftposPay/hooks.d.ts +1 -1
  120. package/lib/components/eftposPay/store/index.d.ts +2 -2
  121. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  122. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  123. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  124. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  125. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  126. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  127. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  128. package/lib/components/pay/toC/model.d.ts +1 -9
  129. package/lib/components/schedules/model.d.ts +1 -9
  130. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  131. package/lib/hooks/useTranslationOriginal.d.ts +1 -0
  132. package/lib/hooks/useTranslationOriginal.js +42 -0
  133. package/lib/index.d.ts +3 -0
  134. package/lib/index.js +9 -0
  135. package/lib/plus/clientCard/index.d.ts +7 -0
  136. package/lib/plus/clientCard/index.js +457 -0
  137. package/lib/plus/clientCard/index.less +515 -0
  138. package/lib/plus/clientCard/line/index.d.ts +9 -0
  139. package/lib/plus/clientCard/line/index.js +153 -0
  140. package/lib/plus/clientCard/line/index.less +142 -0
  141. package/lib/plus/clientCard/locales.d.ts +18 -0
  142. package/lib/plus/clientCard/locales.js +41 -0
  143. package/lib/plus/clientCard/types.d.ts +135 -0
  144. package/lib/plus/clientCard/types.js +17 -0
  145. package/lib/plus/clientCard/utils.d.ts +8 -0
  146. package/lib/plus/clientCard/utils.js +75 -0
  147. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  148. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  149. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  150. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  151. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  152. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  153. package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  154. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  155. package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
  156. package/lib/plus/clinetSearch/Add/index.js +244 -0
  157. package/lib/plus/clinetSearch/Add/index.less +30 -0
  158. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  159. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  160. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  161. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  162. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  163. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  164. package/lib/plus/clinetSearch/index.d.ts +18 -0
  165. package/lib/plus/clinetSearch/index.js +237 -0
  166. package/lib/plus/clinetSearch/index.less +95 -0
  167. package/lib/plus/clinetSearch/locales.d.ts +108 -0
  168. package/lib/plus/clinetSearch/locales.js +131 -0
  169. package/lib/plus/clinetSearch/serve.d.ts +1 -0
  170. package/lib/plus/clinetSearch/serve.js +33 -0
  171. package/lib/plus/clinetSearch/types.d.ts +70 -0
  172. package/lib/plus/clinetSearch/types.js +17 -0
  173. package/lib/plus/saasAttendance/locales.d.ts +63 -0
  174. package/lib/plus/saasAttendance/locales.js +65 -2
  175. package/lib/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
  176. package/lib/plus/saasAttendance/settings/PermissonTab.js +128 -0
  177. package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +2 -1
  178. package/lib/plus/saasAttendance/settings/components/MapField.js +50 -11
  179. package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
  180. package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +150 -0
  181. package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
  182. package/lib/plus/saasAttendance/settings/index.js +12 -0
  183. package/lib/plus/saasAttendance/settings/index.less +15 -0
  184. package/lib/plus/saasAttendance/settings/types.d.ts +6 -0
  185. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  186. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  187. package/lib/plus/walletPassGallery/components/passDetail/index.js +57 -5
  188. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  189. package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -2
  190. package/lib/plus/walletPassGallery/index.d.ts +4 -0
  191. package/lib/plus/walletPassGallery/index.js +141 -42
  192. package/lib/plus/walletPassGallery/serve.d.ts +3 -1
  193. package/lib/plus/walletPassGallery/serve.js +2 -2
  194. package/lib/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  195. package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
  196. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  197. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  198. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  199. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  200. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  201. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  202. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  203. package/lowcode/client-card/meta.ts +343 -0
  204. package/lowcode/client-search/meta.ts +316 -0
  205. package/lowcode/eco-cup-list/meta.ts +1 -1
  206. package/lowcode/eco-customer-list/meta.ts +1 -1
  207. package/lowcode/wallet-pass-gallery/meta.ts +66 -1
  208. package/package.json +4 -4
@@ -0,0 +1,119 @@
1
+ .saas-attendance-group-settings__shift-preview {
2
+ margin-top: 12px;
3
+ }
4
+
5
+ .saas-attendance-group-settings__shift-summary {
6
+ display: grid;
7
+ grid-template-columns: 1fr 1fr;
8
+ gap: 12px;
9
+ margin-top: 12px;
10
+ }
11
+
12
+ .saas-attendance-group-settings__shift-summary-card {
13
+ border: 1px solid #e5e7eb;
14
+ border-radius: 10px;
15
+ background: #ffffff;
16
+ padding: 14px 16px;
17
+ }
18
+
19
+ .saas-attendance-group-settings__shift-summary-label {
20
+ font-size: 12px;
21
+ line-height: 18px;
22
+ color: #6b7280;
23
+ }
24
+
25
+ .saas-attendance-group-settings__shift-summary-value {
26
+ margin-top: 8px;
27
+ font-size: 28px;
28
+ line-height: 32px;
29
+ font-weight: 600;
30
+ color: #111827;
31
+ }
32
+
33
+ .saas-attendance-group-settings__shift-summary-unit {
34
+ margin-top: 4px;
35
+ font-size: 12px;
36
+ line-height: 18px;
37
+ color: #6b7280;
38
+ }
39
+
40
+ .saas-attendance-group-settings__shift-table {
41
+ margin-top: 12px;
42
+ border: 1px solid #e5e7eb;
43
+ border-radius: 10px;
44
+ overflow: hidden;
45
+ background: #ffffff;
46
+ }
47
+
48
+ .saas-attendance-group-settings__shift-table-head {
49
+ display: grid;
50
+ grid-template-columns: 1fr 3fr 1fr;
51
+ gap: 0;
52
+ padding: 12px 16px;
53
+ background: #f9fafb;
54
+ border-bottom: 1px solid #e5e7eb;
55
+ font-size: 12px;
56
+ color: #6b7280;
57
+ }
58
+
59
+ .saas-attendance-group-settings__shift-table-row {
60
+ display: grid;
61
+ grid-template-columns: 1fr 3fr 1fr;
62
+ gap: 0;
63
+ padding: 12px 16px;
64
+ border-bottom: 1px solid #f3f4f6;
65
+ }
66
+
67
+ .saas-attendance-group-settings__shift-table-row:last-child {
68
+ border-bottom: none;
69
+ }
70
+
71
+ .saas-attendance-group-settings__shift-table-cell {
72
+ display: flex;
73
+ align-items: center;
74
+ }
75
+
76
+ .saas-attendance-group-settings__shift-times {
77
+ display: flex;
78
+ flex-direction: column;
79
+ gap: 8px;
80
+ }
81
+
82
+ .saas-attendance-group-settings__shift-time-tag {
83
+ padding: 2px 4px;
84
+ border-radius: 6px;
85
+ background: #f3f4f6;
86
+ color: #374151;
87
+ font-size: 12px;
88
+ font-weight: 500;
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: 6px;
92
+ }
93
+
94
+ .saas-attendance-group-settings__shift-time-text {
95
+ color: inherit;
96
+ }
97
+
98
+ .saas-attendance-group-settings__shift-time-arrow {
99
+ color: #6b7280;
100
+ }
101
+
102
+ .saas-attendance-group-settings__shift-empty {
103
+ color: #9ca3af;
104
+ font-size: 12px;
105
+ }
106
+
107
+ .saas-attendance-group-settings__shift-duration {
108
+ padding: 2px 4px;
109
+ border-radius: 2px;
110
+ background: #ecfdf5;
111
+ color: #14532d;
112
+ font-size: 10px;
113
+ font-weight: 600;
114
+ }
115
+
116
+ .saas-attendance-group-settings__shift-duration-empty {
117
+ color: #9ca3af;
118
+ font-size: 12px;
119
+ }
@@ -43,6 +43,7 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
43
43
  var import_utils2 = require("../../../utils");
44
44
  var import_locales = __toESM(require("../locales"));
45
45
  var import_BasicInfoTab = __toESM(require("./BasicInfoTab"));
46
+ var import_PermissonTab = __toESM(require("./PermissonTab"));
46
47
  var import_ShiftScheduleTab = __toESM(require("./ShiftScheduleTab"));
47
48
  var import_ClockInMethodTab = __toESM(require("./ClockInMethodTab"));
48
49
  var import_CorrectionPolicyTab = __toESM(require("./CorrectionPolicyTab"));
@@ -68,6 +69,11 @@ var TAB_CONFIGS = [
68
69
  key: "correction",
69
70
  icon: "pisell2-clock",
70
71
  labelKey: "pisell2.attendance.group-settings.correction-policy"
72
+ },
73
+ {
74
+ key: "permission",
75
+ icon: "pisell2-user-01",
76
+ labelKey: "pisell2.attendance.group-settings.data-permission"
71
77
  }
72
78
  ];
73
79
  var generateSimpleUUID = () => {
@@ -272,6 +278,12 @@ var Settings = (0, import_react.forwardRef)((props, ref) => {
272
278
  form,
273
279
  id: `saas-attendance-settings-section-${_uniqueId}-correction`
274
280
  }
281
+ ),
282
+ /* @__PURE__ */ import_react.default.createElement(
283
+ import_PermissonTab.default,
284
+ {
285
+ id: `saas-attendance-settings-section-${_uniqueId}-permission`
286
+ }
275
287
  )
276
288
  )
277
289
  ));
@@ -485,6 +485,21 @@
485
485
  gap: 8px;
486
486
  }
487
487
 
488
+ .saas-attendance-map-field__location-actions {
489
+ display: flex;
490
+ align-items: center;
491
+ gap: 4px;
492
+ }
493
+
494
+ .saas-attendance-map-field__edit-btn {
495
+ color: #9ca3af;
496
+ transition: color 0.2s ease;
497
+
498
+ &:hover {
499
+ color: #7f56d9;
500
+ }
501
+ }
502
+
488
503
  .saas-attendance-map-field__delete-btn {
489
504
  color: #9ca3af;
490
505
  transition: color 0.2s ease;
@@ -65,6 +65,10 @@ export interface AttendanceCorrection {
65
65
  period_type: FrequencyType;
66
66
  period_custom: number | null;
67
67
  }
68
+ export declare type MemberDataViewRange = 'this_week' | 'last_week' | 'this_month';
69
+ export interface AttendancePermission {
70
+ member_data_view_range?: MemberDataViewRange[];
71
+ }
68
72
  /**
69
73
  * 考勤组设置值 - 完整的API数据结构
70
74
  */
@@ -76,6 +80,7 @@ export interface AttendanceGroupSettingsValue {
76
80
  place: AttendancePlace;
77
81
  member_ids: number[];
78
82
  correction: AttendanceCorrection;
83
+ permission?: AttendancePermission;
79
84
  creator_type?: string;
80
85
  creator_id?: number;
81
86
  editor_type?: string;
@@ -90,6 +95,7 @@ export interface BasicInfoTabValue {
90
95
  name: MultiLangName;
91
96
  timezone: string;
92
97
  member_ids: number[];
98
+ permission?: AttendancePermission;
93
99
  }
94
100
  /**
95
101
  * 排班规则Tab的值
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
4
3
  export default ErrorTip;
@@ -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;
@@ -55,15 +55,22 @@ var { Text } = import_antd.Typography;
55
55
  var PassDetail = (props) => {
56
56
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
57
57
  const { symbol = "$" } = (0, import_materials.usePisellConfig)();
58
- const { dataSource, platform = "pc", showTimeLine = true } = props;
58
+ const {
59
+ dataSource,
60
+ platform = "pc",
61
+ showTimeLine = true,
62
+ onDetailRefresh,
63
+ onListRefresh
64
+ } = props;
59
65
  const [activeKey, setActiveKey] = (0, import_react.useState)("detail");
60
66
  const [rechargeOpen, setRechargeOpen] = (0, import_react.useState)(false);
61
67
  const containerRef = (0, import_react.useRef)(null);
62
68
  const isIndicatorVisibleRef = (0, import_react.useRef)(false);
63
69
  const context = (0, import_useEngineContext.default)();
64
- const { store } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || { store: {} };
70
+ const { store, isTerminal, interaction, isApp } = (_a = context.appHelper) == null ? void 0 : _a.utils;
65
71
  const { apiPrefix } = ((_b = context.appHelper) == null ? void 0 : _b.constants) || { apiPrefix: "/h5" };
66
72
  const timezone = ((_g = (_f = (_e = (_d = (_c = store == null ? void 0 : store.getState) == null ? void 0 : _c.call(store)) == null ? void 0 : _d.global) == null ? void 0 : _e.symbol) == null ? void 0 : _f.shop) == null ? void 0 : _g.timezone) || "Asia/Shanghai";
73
+ const isTerminalEnv = (typeof isTerminal === "function" ? isTerminal() : !!isTerminal) || (isApp == null ? void 0 : isApp());
67
74
  import_utils.locales.init(import_locales.default, ((_i = (_h = context == null ? void 0 : context.engine) == null ? void 0 : _h.props) == null ? void 0 : _i.locale) || "en");
68
75
  if ((_k = (_j = context.appHelper) == null ? void 0 : _j.utils) == null ? void 0 : _k.request) {
69
76
  import_utils4.request.setRequest((_m = (_l = context.appHelper) == null ? void 0 : _l.utils) == null ? void 0 : _m.request);
@@ -96,6 +103,31 @@ var PassDetail = (props) => {
96
103
  refreshDeps: [id, customer_id]
97
104
  }
98
105
  );
106
+ (0, import_react.useEffect)(() => {
107
+ var _a2, _b2;
108
+ (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.mountFunction) == null ? void 0 : _b2.call(
109
+ _a2,
110
+ "customer",
111
+ "recharge",
112
+ async (strVal) => {
113
+ var _a3;
114
+ if (!strVal) {
115
+ return onListRefresh == null ? void 0 : onListRefresh();
116
+ }
117
+ try {
118
+ const latest = await ((_a3 = _getDetail.refreshAsync) == null ? void 0 : _a3.call(_getDetail));
119
+ const patch = {
120
+ balance: (latest == null ? void 0 : latest.balance) !== void 0 ? latest.balance : balance ?? void 0,
121
+ expire_date: (latest == null ? void 0 : latest.expire_date) !== void 0 ? latest.expire_date : expire_date ?? void 0,
122
+ unified_available_status: latest == null ? void 0 : latest.unified_available_status
123
+ };
124
+ onDetailRefresh == null ? void 0 : onDetailRefresh(id, patch);
125
+ } catch (err) {
126
+ console.error(err);
127
+ }
128
+ }
129
+ );
130
+ }, [id]);
99
131
  const scheduleList = (0, import_react.useMemo)(() => {
100
132
  return (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [];
101
133
  }, [custom_schedule_snapshot]);
@@ -200,6 +232,24 @@ var PassDetail = (props) => {
200
232
  setActiveKey(_key);
201
233
  }
202
234
  }, []);
235
+ const handleRechargeClick = (0, import_react.useCallback)(() => {
236
+ var _a2, _b2;
237
+ if (isTerminalEnv) {
238
+ const productId = (product == null ? void 0 : product.id) || (dataSource == null ? void 0 : dataSource.product_id) || "";
239
+ (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
240
+ module: "customer",
241
+ key: "recharge",
242
+ data: {
243
+ product_id: String(productId || ""),
244
+ card_id: String(id || ""),
245
+ card_code: String(code || ""),
246
+ customer_id: String(customer_id || "")
247
+ }
248
+ });
249
+ return;
250
+ }
251
+ setRechargeOpen(true);
252
+ }, [isTerminalEnv, id, code, customer_id, product, dataSource]);
203
253
  if (!dataSource) {
204
254
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, null);
205
255
  }
@@ -246,7 +296,9 @@ var PassDetail = (props) => {
246
296
  code,
247
297
  tag,
248
298
  timezone,
249
- apiPrefix
299
+ apiPrefix,
300
+ isTerminalEnv,
301
+ interaction
250
302
  }
251
303
  );
252
304
  };
@@ -299,7 +351,7 @@ var PassDetail = (props) => {
299
351
  {
300
352
  type: "primary",
301
353
  size: "large",
302
- onClick: () => setRechargeOpen(true)
354
+ onClick: handleRechargeClick
303
355
  },
304
356
  import_utils.locales.getText("wallet-pass-gallery.recharge")
305
357
  ), /* @__PURE__ */ import_react.default.createElement(
@@ -328,7 +380,7 @@ var PassDetail = (props) => {
328
380
  {
329
381
  appleWalletUrl: (_o = _getDetail.data) == null ? void 0 : _o.apple_wallet_url,
330
382
  googleWalletUrl: (_p = _getDetail.data) == null ? void 0 : _p.google_wallet_url,
331
- onRechargeClick: ((_q = dataSource == null ? void 0 : dataSource.machinecode_config) == null ? void 0 : _q.hide_recharge) === 0 ? () => setRechargeOpen(true) : void 0,
383
+ onRechargeClick: ((_q = dataSource == null ? void 0 : dataSource.machinecode_config) == null ? void 0 : _q.hide_recharge) === 0 ? handleRechargeClick : void 0,
332
384
  platform
333
385
  }
334
386
  ) : null, /* @__PURE__ */ import_react.default.createElement(
@@ -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;
@@ -45,7 +45,7 @@ import_dayjs.default.extend(import_timezone.default);
45
45
  import_dayjs.default.extend(import_utc.default);
46
46
  var stateTimeUnix = 1723255863;
47
47
  var TimelineSection = (props) => {
48
- const { code, tag, timezone, apiPrefix } = props;
48
+ const { code, tag, timezone, apiPrefix, isTerminalEnv, interaction } = props;
49
49
  const { symbol = "$" } = (0, import_materials.usePisellConfig)();
50
50
  const [isShowtimeLineDetail, setIsShowtimeLineDetail] = import_react.default.useState(false);
51
51
  const [isSpending, setIsSpending] = import_react.default.useState(true);
@@ -205,7 +205,22 @@ var TimelineSection = (props) => {
205
205
  label: import_utils.locales.getText("wallet-pass-gallery.viewOrder"),
206
206
  value: timeLineDetail && (timeLineDetail == null ? void 0 : timeLineDetail.resource_code) ? `#${timeLineDetail == null ? void 0 : timeLineDetail.resource_code}` : (timeLineDetail == null ? void 0 : timeLineDetail.transaction_id) ? `#${timeLineDetail == null ? void 0 : timeLineDetail.transaction_id}` : "",
207
207
  isLink: !!(timeLineDetail && (timeLineDetail == null ? void 0 : timeLineDetail.resource_id)),
208
- link: timeLineDetail && (timeLineDetail == null ? void 0 : timeLineDetail.resource_id) ? apiPrefix === "/shop" ? `/admin/order/orders/detail?id=${timeLineDetail == null ? void 0 : timeLineDetail.resource_id}` : `/order/details?id=${timeLineDetail == null ? void 0 : timeLineDetail.resource_id}` : void 0
208
+ onClick: () => {
209
+ var _a, _b;
210
+ if (isTerminalEnv) {
211
+ return (_b = (_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.postMessageToApp) == null ? void 0 : _b.call(_a, {
212
+ module: "booking",
213
+ key: "view_order",
214
+ data: {
215
+ order_id: timeLineDetail == null ? void 0 : timeLineDetail.resource_id
216
+ },
217
+ origin: "/booking"
218
+ });
219
+ }
220
+ const link = apiPrefix === "/shop" ? `/admin/order/orders/detail?id=${timeLineDetail == null ? void 0 : timeLineDetail.resource_id}` : `/order/details?id=${timeLineDetail == null ? void 0 : timeLineDetail.resource_id}`;
221
+ location.replace(link);
222
+ },
223
+ link: timeLineDetail && (timeLineDetail == null ? void 0 : timeLineDetail.resource_id) ? true : void 0
209
224
  }
210
225
  ],
211
226
  labelColor: "#101828",
@@ -1,6 +1,10 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
3
  export interface WalletPassGalleryProps {
4
+ hideTitle: boolean;
5
+ hideAddButton: boolean;
6
+ customer?: any;
7
+ platform?: 'pc' | 'h5';
4
8
  [key: string]: any;
5
9
  }
6
10
  declare const WalletPassGallery: (props: WalletPassGalleryProps) => React.JSX.Element;