@pisell/private-materials 3.4.42 → 3.4.43
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 -151
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Services/index.js +22 -8
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/es/plus/productSelect/ProductCard/index.js +14 -5
- package/es/plus/productSelect/index.d.ts +3 -2
- package/es/plus/productSelect/index.js +33 -8
- package/es/plus/productSelect/index.less +4 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Services/index.js +8 -3
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/lib/plus/productSelect/ProductCard/index.js +18 -4
- package/lib/plus/productSelect/index.d.ts +3 -2
- package/lib/plus/productSelect/index.js +20 -6
- package/lib/plus/productSelect/index.less +4 -0
- package/package.json +4 -4
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -69,8 +69,19 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
69
69
|
setProductLoading(false);
|
|
70
70
|
});
|
|
71
71
|
}, [isDateSelectedFirst]);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @description: 是否显示商品详情页面的步进器
|
|
75
|
+
* @param {*} useMemo
|
|
76
|
+
* @return {*}
|
|
77
|
+
*/
|
|
78
|
+
var isShowProductDetailStepper = useMemo(function () {
|
|
79
|
+
var _ref3 = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
|
|
80
|
+
productModuleParams = _ref3.productModuleParams;
|
|
81
|
+
return productModuleParams === null || productModuleParams === void 0 ? void 0 : productModuleParams.isShowProductDetailStepper;
|
|
82
|
+
}, [appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams]);
|
|
72
83
|
var handleSelectProduct = /*#__PURE__*/function () {
|
|
73
|
-
var
|
|
84
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item, clickType) {
|
|
74
85
|
var type;
|
|
75
86
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
76
87
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -96,7 +107,9 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
96
107
|
open_deposit: 1
|
|
97
108
|
}),
|
|
98
109
|
setting: {
|
|
99
|
-
can_input: true
|
|
110
|
+
can_input: true,
|
|
111
|
+
item_max_length: isShowProductDetailStepper,
|
|
112
|
+
is_detail_open: clickType === 'cover'
|
|
100
113
|
}
|
|
101
114
|
},
|
|
102
115
|
callback: function () {
|
|
@@ -226,7 +239,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
226
239
|
}
|
|
227
240
|
}, _callee);
|
|
228
241
|
}));
|
|
229
|
-
function callback(
|
|
242
|
+
function callback(_x3) {
|
|
230
243
|
return _callback.apply(this, arguments);
|
|
231
244
|
}
|
|
232
245
|
return callback;
|
|
@@ -238,14 +251,14 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
238
251
|
}
|
|
239
252
|
}, _callee2);
|
|
240
253
|
}));
|
|
241
|
-
return function handleSelectProduct(_x) {
|
|
242
|
-
return
|
|
254
|
+
return function handleSelectProduct(_x, _x2) {
|
|
255
|
+
return _ref4.apply(this, arguments);
|
|
243
256
|
};
|
|
244
257
|
}();
|
|
245
258
|
var productListSetting = useMemo(function () {
|
|
246
259
|
var _context$engine, _productListBlock;
|
|
247
|
-
var
|
|
248
|
-
customPageData =
|
|
260
|
+
var _ref5 = ((_context$engine = context.engine) === null || _context$engine === void 0 ? void 0 : _context$engine.props) || {},
|
|
261
|
+
customPageData = _ref5.customPageData;
|
|
249
262
|
var productListBlock;
|
|
250
263
|
if (Array.isArray(customPageData === null || customPageData === void 0 ? void 0 : customPageData.block)) {
|
|
251
264
|
productListBlock = customPageData.block.find(function (b) {
|
|
@@ -277,7 +290,8 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
277
290
|
cardSelectedBg: 'var(--theme-color)'
|
|
278
291
|
},
|
|
279
292
|
productListSetting: productListSetting,
|
|
280
|
-
selectedItems: carts
|
|
293
|
+
selectedItems: carts,
|
|
294
|
+
hideCategoryWhenOne: true
|
|
281
295
|
}));
|
|
282
296
|
});
|
|
283
297
|
export default Services;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -104,4 +105,11 @@ export declare const walkInData: {
|
|
|
104
105
|
id: number;
|
|
105
106
|
nickname: string;
|
|
106
107
|
};
|
|
107
|
-
export declare const Provider: any, Context:
|
|
108
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
109
|
+
state: FormState;
|
|
110
|
+
} & {
|
|
111
|
+
dispatch: (params: {
|
|
112
|
+
type: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
}) => void;
|
|
115
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -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']>;
|
|
@@ -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<"
|
|
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,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -116,7 +116,7 @@ var ApplePay = function ApplePay(props, ref) {
|
|
|
116
116
|
|
|
117
117
|
// 提取域名
|
|
118
118
|
shop_domain = linkElement.hostname;
|
|
119
|
-
_href = "".concat(config.pay).concat(formatFranchiseeRoute("/apple-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid), state.history)); // 记录即将跳转到ApplePay
|
|
119
|
+
_href = "".concat(config.pay).concat(formatFranchiseeRoute("/apple-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid, "&is_replace_router=1"), state.history)); // 记录即将跳转到ApplePay
|
|
120
120
|
paymentLogger.addLog({
|
|
121
121
|
key: 'ApplePay准备跳转',
|
|
122
122
|
value: ""
|
|
@@ -131,7 +131,7 @@ var GooglePay = function GooglePay(props, ref) {
|
|
|
131
131
|
|
|
132
132
|
// 提取域名
|
|
133
133
|
shop_domain = linkElement.hostname;
|
|
134
|
-
_href = "".concat(config.pay).concat(formatFranchiseeRoute("/google-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid), state.history)); // 记录即将跳转到GooglePay
|
|
134
|
+
_href = "".concat(config.pay).concat(formatFranchiseeRoute("/google-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid, "&is_replace_router=1"), state.history)); // 记录即将跳转到GooglePay
|
|
135
135
|
paymentLogger.addLog({
|
|
136
136
|
key: 'GooglePay准备跳转',
|
|
137
137
|
value: ''
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -29,4 +30,11 @@ export interface PayGroup {
|
|
|
29
30
|
_order: any;
|
|
30
31
|
front_order_uuid?: string;
|
|
31
32
|
}
|
|
32
|
-
export declare const Provider: any, Context:
|
|
33
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
34
|
+
state: FormState;
|
|
35
|
+
} & {
|
|
36
|
+
dispatch: (params: {
|
|
37
|
+
type: string;
|
|
38
|
+
payload: any;
|
|
39
|
+
}) => void;
|
|
40
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
|
@@ -29,10 +29,12 @@ export interface ProductCardProps {
|
|
|
29
29
|
onSelectProduct?: (item: any) => void;
|
|
30
30
|
currentProductId?: number;
|
|
31
31
|
onSelect?: (item: any) => void;
|
|
32
|
+
onSelectCover?: (item: any) => void;
|
|
33
|
+
onSelectInfo?: (item: any) => void;
|
|
32
34
|
isSelected?: boolean;
|
|
33
35
|
decorateConfig?: ProductCardConfig;
|
|
34
36
|
}
|
|
35
|
-
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
37
|
+
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, onSelectCover, onSelectInfo, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
36
38
|
export declare const DefaultItemContent: React.MemoExoticComponent<(props: {
|
|
37
39
|
item: any;
|
|
38
40
|
index: number;
|
|
@@ -42,6 +42,8 @@ export var ProductCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
42
42
|
index = _ref.index,
|
|
43
43
|
context = _ref.context,
|
|
44
44
|
onSelect = _ref.onSelect,
|
|
45
|
+
onSelectCover = _ref.onSelectCover,
|
|
46
|
+
onSelectInfo = _ref.onSelectInfo,
|
|
45
47
|
isSelected = _ref.isSelected,
|
|
46
48
|
className = _ref.className,
|
|
47
49
|
_ref$decorateConfig = _ref.decorateConfig,
|
|
@@ -116,10 +118,11 @@ export var ProductCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
116
118
|
var cardContent = /*#__PURE__*/React.createElement("div", {
|
|
117
119
|
className: classNames("".concat(PREFIX, "__product-card"), className, {
|
|
118
120
|
selected: isSelected
|
|
119
|
-
})
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
121
|
+
})
|
|
122
|
+
// onClick={() => {
|
|
123
|
+
// onSelect?.(item);
|
|
124
|
+
// }}
|
|
125
|
+
,
|
|
123
126
|
"data-index": index,
|
|
124
127
|
"data-item-index": index
|
|
125
128
|
}, isProductCover ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -127,6 +130,9 @@ export var ProductCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
127
130
|
style: {
|
|
128
131
|
width: imgWidth || 'auto',
|
|
129
132
|
height: imgHeight || 'auto'
|
|
133
|
+
},
|
|
134
|
+
onClick: function onClick() {
|
|
135
|
+
onSelectCover === null || onSelectCover === void 0 || onSelectCover(item);
|
|
130
136
|
}
|
|
131
137
|
}, item.cover ? /*#__PURE__*/React.createElement("img", {
|
|
132
138
|
loading: "lazy",
|
|
@@ -141,7 +147,10 @@ export var ProductCard = /*#__PURE__*/memo(function (_ref) {
|
|
|
141
147
|
borderRadius: radius
|
|
142
148
|
}
|
|
143
149
|
}, getTextCover(item.title))) : null, /*#__PURE__*/React.createElement("div", {
|
|
144
|
-
className: "card-right"
|
|
150
|
+
className: "card-right",
|
|
151
|
+
onClick: function onClick() {
|
|
152
|
+
onSelectInfo === null || onSelectInfo === void 0 || onSelectInfo(item);
|
|
153
|
+
}
|
|
145
154
|
}, !!isTitle ? /*#__PURE__*/React.createElement("div", {
|
|
146
155
|
className: "title"
|
|
147
156
|
}, item.title) : null, !!isSubtitle && item.subtitle ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -8,7 +8,7 @@ interface ProductSelectProps {
|
|
|
8
8
|
grid: boolean;
|
|
9
9
|
config: string;
|
|
10
10
|
};
|
|
11
|
-
onChange: (value: any) => void;
|
|
11
|
+
onChange: (value: any, type?: string) => void;
|
|
12
12
|
value?: number;
|
|
13
13
|
loading?: boolean;
|
|
14
14
|
style?: React.CSSProperties;
|
|
@@ -25,7 +25,8 @@ interface ProductSelectProps {
|
|
|
25
25
|
productListSetting?: Partial<any>;
|
|
26
26
|
/** 兼容scrollDom */
|
|
27
27
|
customScrollParent?: HTMLElement | string;
|
|
28
|
+
hideCategoryWhenOne?: boolean;
|
|
28
29
|
}
|
|
29
30
|
export declare const PREFIX = "pisell-product-select";
|
|
30
|
-
declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, ...rest }: ProductSelectProps) => JSX.Element;
|
|
31
|
+
declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, hideCategoryWhenOne, ...rest }: ProductSelectProps) => JSX.Element;
|
|
31
32
|
export default index;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["dataSource", "emptyDescription", "showSearch", "scrollDom", "offsetDom", "style", "token", "onChange", "value", "selectedItems", "productListSetting", "customScrollParent", "loading", "layout"];
|
|
2
|
+
var _excluded = ["dataSource", "emptyDescription", "showSearch", "scrollDom", "offsetDom", "style", "token", "onChange", "value", "selectedItems", "productListSetting", "customScrollParent", "loading", "layout", "hideCategoryWhenOne"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -67,6 +67,8 @@ var index = function index(_ref) {
|
|
|
67
67
|
_ref$loading = _ref.loading,
|
|
68
68
|
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
69
69
|
layout = _ref.layout,
|
|
70
|
+
_ref$hideCategoryWhen = _ref.hideCategoryWhenOne,
|
|
71
|
+
hideCategoryWhenOne = _ref$hideCategoryWhen === void 0 ? false : _ref$hideCategoryWhen,
|
|
70
72
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
71
73
|
var searchRef = useRef(null);
|
|
72
74
|
var _useState = useState(''),
|
|
@@ -113,6 +115,22 @@ var index = function index(_ref) {
|
|
|
113
115
|
});
|
|
114
116
|
});
|
|
115
117
|
}, [_groupedList]);
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @title: 是否隐藏分类
|
|
121
|
+
* @description:
|
|
122
|
+
* @param {*} useMemo
|
|
123
|
+
* @return {*}
|
|
124
|
+
* @Author: WangHan
|
|
125
|
+
* @Date: 2025-10-09 15:13
|
|
126
|
+
*/
|
|
127
|
+
var isHideCategory = useMemo(function () {
|
|
128
|
+
if (hideCategoryWhenOne) {
|
|
129
|
+
// 只有一个分类或者没有分类
|
|
130
|
+
return (_categories === null || _categories === void 0 ? void 0 : _categories.length) === 1 || !(_categories !== null && _categories !== void 0 && _categories.length);
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
}, [_categories, hideCategoryWhenOne]);
|
|
116
134
|
useEffect(function () {
|
|
117
135
|
if (!(_categories !== null && _categories !== void 0 && _categories.length)) {
|
|
118
136
|
setActiveKey('');
|
|
@@ -151,9 +169,9 @@ var index = function index(_ref) {
|
|
|
151
169
|
var disabled = useMemo(function () {
|
|
152
170
|
return !!(productListSetting !== null && productListSetting !== void 0 && productListSetting.list_max_length) && Array.isArray(selectedItems) && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > 0;
|
|
153
171
|
}, [productListSetting, selectedItems]);
|
|
154
|
-
var _onChange = useCallback(function (value) {
|
|
172
|
+
var _onChange = useCallback(function (value, type) {
|
|
155
173
|
if (disabled) return;
|
|
156
|
-
onChange === null || onChange === void 0 || onChange(value);
|
|
174
|
+
onChange === null || onChange === void 0 || onChange(value, type);
|
|
157
175
|
}, [disabled, onChange]);
|
|
158
176
|
var debounceIndicator = useCallback(function (delay) {
|
|
159
177
|
isIndicatorVisibleRef.current = true;
|
|
@@ -228,19 +246,19 @@ var index = function index(_ref) {
|
|
|
228
246
|
// switchCategory('');
|
|
229
247
|
setKeyword(e.target.value);
|
|
230
248
|
}
|
|
231
|
-
})) : null, /*#__PURE__*/React.createElement(CategoryTabs, {
|
|
249
|
+
})) : null, !isHideCategory ? /*#__PURE__*/React.createElement(CategoryTabs, {
|
|
232
250
|
activeKey: activeKey,
|
|
233
251
|
items: _categories,
|
|
234
252
|
onChange: switchCategory,
|
|
235
253
|
loading: loading,
|
|
236
254
|
skeleton: /*#__PURE__*/React.createElement(CategorySkeleton, null)
|
|
237
|
-
}), !loading && !(_groupedList !== null && _groupedList !== void 0 && _groupedList.length) ? /*#__PURE__*/React.createElement(PisellEmpty, {
|
|
255
|
+
}) : null, !loading && !(_groupedList !== null && _groupedList !== void 0 && _groupedList.length) ? /*#__PURE__*/React.createElement(PisellEmpty, {
|
|
238
256
|
description: emptyDescription || locales.getText('pisell2.product-select.empty')
|
|
239
257
|
}) : /*#__PURE__*/React.createElement(IntersectionObserverProvider, {
|
|
240
258
|
rootMargin: "-270px 0px -270px 0px",
|
|
241
259
|
priorityMode: "top"
|
|
242
260
|
}, /*#__PURE__*/React.createElement(ProductList, {
|
|
243
|
-
className: "".concat(PREFIX, "__product-list"),
|
|
261
|
+
className: classNames("".concat(PREFIX, "__product-list"), _defineProperty({}, "".concat(PREFIX, "__product-list_hide_category"), isHideCategory)),
|
|
244
262
|
loading: loading,
|
|
245
263
|
data: loading ? MOCK_DATA : _groupedList,
|
|
246
264
|
context: {
|
|
@@ -259,8 +277,15 @@ var index = function index(_ref) {
|
|
|
259
277
|
return /*#__PURE__*/React.createElement(ProductCard, {
|
|
260
278
|
index: index,
|
|
261
279
|
item: item,
|
|
262
|
-
context: context
|
|
263
|
-
onSelect
|
|
280
|
+
context: context
|
|
281
|
+
// onSelect={_onChange}
|
|
282
|
+
,
|
|
283
|
+
onSelectCover: function onSelectCover(e) {
|
|
284
|
+
_onChange(e, 'cover');
|
|
285
|
+
},
|
|
286
|
+
onSelectInfo: function onSelectInfo(e) {
|
|
287
|
+
_onChange(e, 'info');
|
|
288
|
+
},
|
|
264
289
|
isSelected: item.id === value,
|
|
265
290
|
decorateConfig: productListSetting
|
|
266
291
|
});
|
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -70,7 +70,11 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
70
70
|
setProductLoading(false);
|
|
71
71
|
});
|
|
72
72
|
}, [isDateSelectedFirst]);
|
|
73
|
-
const
|
|
73
|
+
const isShowProductDetailStepper = (0, import_react.useMemo)(() => {
|
|
74
|
+
const { productModuleParams } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
75
|
+
return productModuleParams == null ? void 0 : productModuleParams.isShowProductDetailStepper;
|
|
76
|
+
}, [appointmentBooking == null ? void 0 : appointmentBooking.otherParams]);
|
|
77
|
+
const handleSelectProduct = async (item, clickType) => {
|
|
74
78
|
let type = "";
|
|
75
79
|
if (!isRetailTemplate) {
|
|
76
80
|
type = await checkProductType(item == null ? void 0 : item.id);
|
|
@@ -82,7 +86,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
82
86
|
type: "pisell1.productDetail",
|
|
83
87
|
data: {
|
|
84
88
|
detail: { ...item, open_deposit: 1 },
|
|
85
|
-
setting: { can_input: true }
|
|
89
|
+
setting: { can_input: true, item_max_length: isShowProductDetailStepper, is_detail_open: clickType === "cover" }
|
|
86
90
|
},
|
|
87
91
|
callback: async (data) => {
|
|
88
92
|
var _a, _b;
|
|
@@ -205,7 +209,8 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
205
209
|
cardSelectedBg: "var(--theme-color)"
|
|
206
210
|
},
|
|
207
211
|
productListSetting,
|
|
208
|
-
selectedItems: carts
|
|
212
|
+
selectedItems: carts,
|
|
213
|
+
hideCategoryWhenOne: true
|
|
209
214
|
}
|
|
210
215
|
));
|
|
211
216
|
});
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|