@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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/device.js +208 -36
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/es/plus/orderList/components/Reset.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/orderList/config.d.ts +1 -0
- package/es/plus/saasAttendance/index.d.ts +6 -0
- package/es/plus/saasAttendance/index.js +5 -0
- package/es/plus/saasAttendance/locales.d.ts +318 -0
- package/es/plus/saasAttendance/locales.js +354 -0
- package/es/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/BasicInfoTab.js +96 -0
- package/es/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
- package/es/plus/saasAttendance/settings/ClockInMethodTab.js +81 -0
- package/es/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
- package/es/plus/saasAttendance/settings/CorrectionPolicyTab.js +293 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +109 -0
- package/es/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
- package/es/plus/saasAttendance/settings/components/MapField.js +810 -0
- package/es/plus/saasAttendance/settings/components/index.d.ts +3 -0
- package/es/plus/saasAttendance/settings/components/index.js +2 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +8 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.js +216 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.less +70 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/index.js +438 -0
- package/es/plus/saasAttendance/settings/index.d.ts +18 -0
- package/es/plus/saasAttendance/settings/index.js +255 -0
- package/es/plus/saasAttendance/settings/index.less +495 -0
- package/es/plus/saasAttendance/settings/serve.d.ts +27 -0
- package/es/plus/saasAttendance/settings/serve.js +83 -0
- package/es/plus/saasAttendance/settings/types.d.ts +128 -0
- package/es/plus/saasAttendance/settings/types.js +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/selectHolder/locales.d.ts +6 -0
- package/es/plus/selectHolder/locales.js +6 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/device.js +108 -23
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/lib/plus/orderList/components/Reset.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/orderList/config.d.ts +1 -0
- package/lib/plus/saasAttendance/index.d.ts +6 -0
- package/lib/plus/saasAttendance/index.js +39 -0
- package/lib/plus/saasAttendance/locales.d.ts +318 -0
- package/lib/plus/saasAttendance/locales.js +342 -0
- package/lib/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/BasicInfoTab.js +152 -0
- package/lib/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/ClockInMethodTab.js +88 -0
- package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.js +369 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +106 -0
- package/lib/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
- package/lib/plus/saasAttendance/settings/components/MapField.js +631 -0
- package/lib/plus/saasAttendance/settings/components/index.d.ts +3 -0
- package/lib/plus/saasAttendance/settings/components/index.js +42 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.js +247 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.less +70 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/index.js +447 -0
- package/lib/plus/saasAttendance/settings/index.d.ts +18 -0
- package/lib/plus/saasAttendance/settings/index.js +283 -0
- package/lib/plus/saasAttendance/settings/index.less +495 -0
- package/lib/plus/saasAttendance/settings/serve.d.ts +27 -0
- package/lib/plus/saasAttendance/settings/serve.js +54 -0
- package/lib/plus/saasAttendance/settings/types.d.ts +128 -0
- package/lib/plus/saasAttendance/settings/types.js +17 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/selectHolder/locales.d.ts +6 -0
- package/lib/plus/selectHolder/locales.js +6 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lowcode/eco-cup-list/meta.ts +63 -0
- package/lowcode/eco-customer-list/meta.ts +63 -0
- package/lowcode/saas-attendance-settings/meta.ts +56 -0
- 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 {};
|
|
@@ -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
|
};
|
|
@@ -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" | "
|
|
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, "
|
|
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']>;
|
|
@@ -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" | "
|
|
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
|
-
|
|
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(
|
|
156
|
-
|
|
232
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
233
|
+
import_antd.Spin,
|
|
157
234
|
{
|
|
158
|
-
|
|
235
|
+
spinning: loading,
|
|
236
|
+
size: "large",
|
|
237
|
+
style: { flex: 1, overflow: "auto", minHeight: "200px" }
|
|
159
238
|
},
|
|
160
|
-
|
|
239
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
161
240
|
"div",
|
|
162
241
|
{
|
|
163
|
-
|
|
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
|
-
|
|
171
|
-
"
|
|
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
|
-
|
|
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
|
{
|
|
@@ -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?: "
|
|
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;
|