@pisell/private-materials 6.4.67 → 6.4.69
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 +146 -160
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +0 -85
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
- package/package.json +13 -13
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
|
|
|
17
17
|
cardData: any;
|
|
18
18
|
handleSelectWallet: (value: number[]) => void;
|
|
19
19
|
selectedWalletIds: any[];
|
|
20
|
-
expiredWalletIds: any
|
|
20
|
+
expiredWalletIds: any;
|
|
21
21
|
expiredWalletData: any;
|
|
22
22
|
disabledWalletData: any[];
|
|
23
23
|
clearAllSelectedWallet: () => void;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
301
|
-
action?: "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -180,6 +180,12 @@ export default (function (_ref) {
|
|
|
180
180
|
response: {},
|
|
181
181
|
metadata: {
|
|
182
182
|
receipt: []
|
|
183
|
+
},
|
|
184
|
+
_config: {
|
|
185
|
+
retry: {
|
|
186
|
+
count: 10,
|
|
187
|
+
delay: 500
|
|
188
|
+
}
|
|
183
189
|
}
|
|
184
190
|
}).then(function (res) {
|
|
185
191
|
requestIdRef.current = res.data.id;
|
|
@@ -254,6 +260,12 @@ export default (function (_ref) {
|
|
|
254
260
|
response: {},
|
|
255
261
|
metadata: {
|
|
256
262
|
receipt: []
|
|
263
|
+
},
|
|
264
|
+
_config: {
|
|
265
|
+
retry: {
|
|
266
|
+
count: 10,
|
|
267
|
+
delay: 500
|
|
268
|
+
}
|
|
257
269
|
}
|
|
258
270
|
}).then(function (res) {
|
|
259
271
|
requestIdRef.current = res.data.id;
|
|
@@ -57,7 +57,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
57
57
|
productDisplayConfig = props.productDisplayConfig;
|
|
58
58
|
var context = useEngineContext();
|
|
59
59
|
var notAvailableRef = useRef(null);
|
|
60
|
-
var isLoadedServiceRef = useRef(false);
|
|
61
60
|
request.setRequest(context.appHelper.utils.request);
|
|
62
61
|
var isActive = useIsActive();
|
|
63
62
|
var Toast = useToast();
|
|
@@ -160,90 +159,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
160
159
|
setHandleSetService(scanAddService);
|
|
161
160
|
}
|
|
162
161
|
}, [isActive]);
|
|
163
|
-
|
|
164
|
-
/*
|
|
165
|
-
const removeNotAvailableService = (list: any) => {
|
|
166
|
-
if (!stateRef.current?.service?.value?.length) return;
|
|
167
|
-
const listMap = list.reduce((acc: any, cur: any) => {
|
|
168
|
-
acc[cur.id] = cur;
|
|
169
|
-
return acc;
|
|
170
|
-
}, {});
|
|
171
|
-
const newValue = (stateRef.current?.service?.value || []).filter(
|
|
172
|
-
(item: any) => listMap[item.product_id]
|
|
173
|
-
);
|
|
174
|
-
dispatch({
|
|
175
|
-
type: 'setService',
|
|
176
|
-
payload: {
|
|
177
|
-
value: newValue,
|
|
178
|
-
edit: true,
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
};
|
|
182
|
-
const getServices = async (params?: any) => {
|
|
183
|
-
setLoading(true);
|
|
184
|
-
// 活动预约如果没有绑定商品id不查询
|
|
185
|
-
if (
|
|
186
|
-
state.renderType === 'eventBooking' &&
|
|
187
|
-
!state.eventOtherParams?.productIds?.length
|
|
188
|
-
) {
|
|
189
|
-
dispatch({
|
|
190
|
-
type: 'setService',
|
|
191
|
-
payload: {
|
|
192
|
-
services: [],
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
setLoading(false);
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
let data = await getProductList({
|
|
199
|
-
skip: 1,
|
|
200
|
-
num: 500,
|
|
201
|
-
// extension_type: state.productExtensionType,
|
|
202
|
-
exclude_extension_type: [
|
|
203
|
-
'product_party',
|
|
204
|
-
'product_event',
|
|
205
|
-
'product_series_event',
|
|
206
|
-
'product_package_ticket',
|
|
207
|
-
'ticket',
|
|
208
|
-
'event_item',
|
|
209
|
-
],
|
|
210
|
-
with: ['category'],
|
|
211
|
-
open_quotation: 1,
|
|
212
|
-
with_schedule: 1,
|
|
213
|
-
with_count: ['bundleGroup', 'optionGroup'],
|
|
214
|
-
order_by_string: 'sort:desc',
|
|
215
|
-
status: 'published',
|
|
216
|
-
schedule_date: params?.schedule_date,
|
|
217
|
-
schedule_datetime: params?.schedule_datetime,
|
|
218
|
-
customer_id: params?.customer_id,
|
|
219
|
-
menu_list_ids: params?.menu_list_ids,
|
|
220
|
-
_config: {
|
|
221
|
-
fullResult: true,
|
|
222
|
-
customResponse: true,
|
|
223
|
-
},
|
|
224
|
-
});
|
|
225
|
-
setLoading(false);
|
|
226
|
-
if (data?.code === 607100) {
|
|
227
|
-
// 第一次加载时,或者之前有数据
|
|
228
|
-
if (!isLoadedServiceRef.current || state.service?.services?.length) {
|
|
229
|
-
notAvailableRef.current?.open();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
// 只有自动获取列表的时候才设置商品, 手动点击添加按钮的时候不设置
|
|
233
|
-
if (!state.service.addModal) {
|
|
234
|
-
setDefaultService(data?.data?.list);
|
|
235
|
-
}
|
|
236
|
-
removeNotAvailableService(data?.data?.list);
|
|
237
|
-
isLoadedServiceRef.current = true;
|
|
238
|
-
dispatch({
|
|
239
|
-
type: 'setService',
|
|
240
|
-
payload: {
|
|
241
|
-
services: data?.data?.list || [],
|
|
242
|
-
},
|
|
243
|
-
});
|
|
244
|
-
};
|
|
245
|
-
*/
|
|
246
|
-
|
|
247
162
|
var handleAddToast = function handleAddToast(title, quantity) {
|
|
248
163
|
var _Toast$success;
|
|
249
164
|
Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, /*#__PURE__*/React.createElement("div", {
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
|
|
|
17
17
|
cardData: any;
|
|
18
18
|
handleSelectWallet: (value: number[]) => void;
|
|
19
19
|
selectedWalletIds: any[];
|
|
20
|
-
expiredWalletIds: any
|
|
20
|
+
expiredWalletIds: any;
|
|
21
21
|
expiredWalletData: any;
|
|
22
22
|
disabledWalletData: any[];
|
|
23
23
|
clearAllSelectedWallet: () => void;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
301
|
-
action?: "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -158,6 +158,12 @@ var tyro_default = ({
|
|
|
158
158
|
response: {},
|
|
159
159
|
metadata: {
|
|
160
160
|
receipt: []
|
|
161
|
+
},
|
|
162
|
+
_config: {
|
|
163
|
+
retry: {
|
|
164
|
+
count: 10,
|
|
165
|
+
delay: 500
|
|
166
|
+
}
|
|
161
167
|
}
|
|
162
168
|
}).then((res) => {
|
|
163
169
|
requestIdRef.current = res.data.id;
|
|
@@ -229,6 +235,12 @@ var tyro_default = ({
|
|
|
229
235
|
response: {},
|
|
230
236
|
metadata: {
|
|
231
237
|
receipt: []
|
|
238
|
+
},
|
|
239
|
+
_config: {
|
|
240
|
+
retry: {
|
|
241
|
+
count: 10,
|
|
242
|
+
delay: 500
|
|
243
|
+
}
|
|
232
244
|
}
|
|
233
245
|
}).then((res) => {
|
|
234
246
|
requestIdRef.current = res.data.id;
|
|
@@ -73,7 +73,6 @@ var AddSerivce = (props) => {
|
|
|
73
73
|
} = props;
|
|
74
74
|
const context = (0, import_useEngineContext.default)();
|
|
75
75
|
const notAvailableRef = (0, import_react.useRef)(null);
|
|
76
|
-
const isLoadedServiceRef = (0, import_react.useRef)(false);
|
|
77
76
|
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
78
77
|
const isActive = (0, import_IsActiveContext.useIsActive)();
|
|
79
78
|
const Toast = (0, import_materials.useToast)();
|
package/package.json
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.4.
|
|
4
|
-
"scripts": {
|
|
5
|
-
"dev": "father dev",
|
|
6
|
-
"build": "father build",
|
|
7
|
-
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
|
8
|
-
"lowcode:build": " build-scripts build --config ./build.lowcode.js"
|
|
9
|
-
},
|
|
3
|
+
"version": "6.4.69",
|
|
10
4
|
"main": "./lib/index.js",
|
|
11
5
|
"module": "./es/index.js",
|
|
12
6
|
"types": "./lib/index.d.ts",
|
|
@@ -56,10 +50,6 @@
|
|
|
56
50
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
57
51
|
"@dnd-kit/sortable": "^7.0.2",
|
|
58
52
|
"@dnd-kit/utilities": "^3.2.1",
|
|
59
|
-
"@pisell/date-picker": "workspace:*",
|
|
60
|
-
"@pisell/icon": "workspace:*",
|
|
61
|
-
"@pisell/materials": "workspace:*",
|
|
62
|
-
"@pisell/utils": "workspace:*",
|
|
63
53
|
"ahooks": "^3.7.6",
|
|
64
54
|
"antd": "^5.6.3",
|
|
65
55
|
"classnames": "^2.3.2",
|
|
@@ -70,7 +60,11 @@
|
|
|
70
60
|
"react-resizable": "^3.0.5",
|
|
71
61
|
"styled-components": "^6.0.0-rc.3",
|
|
72
62
|
"@react-spring/web": "^9.6.1",
|
|
73
|
-
"@use-gesture/react": "^10.3.1"
|
|
63
|
+
"@use-gesture/react": "^10.3.1",
|
|
64
|
+
"@pisell/icon": "0.0.11",
|
|
65
|
+
"@pisell/date-picker": "3.0.7",
|
|
66
|
+
"@pisell/utils": "3.0.2",
|
|
67
|
+
"@pisell/materials": "6.4.17"
|
|
74
68
|
},
|
|
75
69
|
"peerDependencies": {
|
|
76
70
|
"react": "^18.0.0",
|
|
@@ -78,5 +72,11 @@
|
|
|
78
72
|
},
|
|
79
73
|
"componentConfig": {
|
|
80
74
|
"materialSchema": "https://unpkg.com/@pisell/materials@1.0.1/build/lowcode/assets-prod.json"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"dev": "father dev",
|
|
78
|
+
"build": "father build",
|
|
79
|
+
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
|
80
|
+
"lowcode:build": " build-scripts build --config ./build.lowcode.js"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|