@pisell/private-materials 3.3.42 → 3.3.44
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -25
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +31 -16
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +39 -20
- package/es/components/appointmentBooking/components/Date/index.js +2 -13
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Form/index.js +76 -167
- package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/es/components/appointmentBooking/components/Form/utils.js +36 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +78 -46
- package/es/components/appointmentBooking/components/Resource/index.js +92 -115
- package/es/components/appointmentBooking/components/Services/index.js +19 -4
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +20 -27
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/context.js +50 -3
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +1 -2
- package/es/components/appointmentBooking/hooks.js +377 -269
- package/es/components/appointmentBooking/utils.d.ts +91 -2
- package/es/components/appointmentBooking/utils.js +350 -61
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +2 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +11 -7
- package/es/components/productSelect/components/productGroup/index.js +32 -19
- package/es/components/productSelect/components/productGroup/index.less +17 -3
- package/es/components/productSelect/index.d.ts +3 -2
- package/es/components/productSelect/index.js +20 -6
- package/es/components/productSelect/index.less +7 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +11 -3
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +0 -5
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +35 -16
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +37 -21
- package/lib/components/appointmentBooking/components/Date/index.js +0 -6
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Form/index.js +56 -108
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
- package/lib/components/appointmentBooking/components/Form/utils.js +49 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +49 -19
- package/lib/components/appointmentBooking/components/Resource/index.js +51 -69
- package/lib/components/appointmentBooking/components/Services/index.js +16 -3
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -7
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/context.js +52 -4
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +1 -2
- package/lib/components/appointmentBooking/hooks.js +153 -57
- package/lib/components/appointmentBooking/utils.d.ts +91 -2
- package/lib/components/appointmentBooking/utils.js +210 -50
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +2 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +11 -7
- package/lib/components/productSelect/components/productGroup/index.js +12 -10
- package/lib/components/productSelect/components/productGroup/index.less +17 -3
- package/lib/components/productSelect/index.d.ts +3 -2
- package/lib/components/productSelect/index.js +17 -3
- package/lib/components/productSelect/index.less +7 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lowcode/product-select/meta.ts +18 -34
- package/package.json +2 -2
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import './index.less';
|
|
2
|
+
declare type BoolConfigVal = 0 | 1;
|
|
2
3
|
export interface ProductCardConfig {
|
|
3
|
-
|
|
4
|
+
isProductCover: BoolConfigVal;
|
|
4
5
|
imgWidth: string;
|
|
5
6
|
imgHeight: string;
|
|
6
|
-
|
|
7
|
+
radius?: number;
|
|
8
|
+
isTitle: BoolConfigVal;
|
|
9
|
+
isSubtitle: BoolConfigVal;
|
|
7
10
|
showSpec: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
isTag: BoolConfigVal;
|
|
12
|
+
isPrice: BoolConfigVal;
|
|
13
|
+
isOriginPrice: BoolConfigVal;
|
|
11
14
|
showZeroPrice: boolean;
|
|
12
15
|
showMarketingTag: boolean;
|
|
13
16
|
showRemark: boolean;
|
|
14
|
-
|
|
17
|
+
isStock: BoolConfigVal;
|
|
18
|
+
list_max_length: 0 | 1;
|
|
15
19
|
}
|
|
16
20
|
interface ProductGroupProps {
|
|
17
21
|
data: {
|
|
@@ -29,6 +33,6 @@ interface ProductGroupProps {
|
|
|
29
33
|
onSelectProduct?: (id: number) => void;
|
|
30
34
|
currentProductId?: number;
|
|
31
35
|
}
|
|
32
|
-
declare const ProductGroup: ({ data, layout, onSelectProduct, currentProductId,
|
|
36
|
+
declare const ProductGroup: ({ data, layout, onSelectProduct, currentProductId, isProductCover, imgWidth, imgHeight, radius, isTitle, isSubtitle, showSpec, isTag, isPrice, isOriginPrice, showZeroPrice, showMarketingTag, showRemark, isStock, }: ProductGroupProps & ProductCardConfig) => JSX.Element;
|
|
33
37
|
export declare const ProductGroupSkeleton: ({ layout }: any) => JSX.Element;
|
|
34
38
|
export default ProductGroup;
|
|
@@ -45,18 +45,20 @@ var ProductGroup = ({
|
|
|
45
45
|
layout = { grid: false },
|
|
46
46
|
onSelectProduct,
|
|
47
47
|
currentProductId,
|
|
48
|
-
|
|
48
|
+
isProductCover = 1,
|
|
49
49
|
imgWidth = "180px",
|
|
50
50
|
imgHeight = "126px",
|
|
51
|
-
|
|
51
|
+
radius = 8,
|
|
52
|
+
isTitle = 1,
|
|
53
|
+
isSubtitle = 0,
|
|
52
54
|
showSpec = true,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
isTag = 0,
|
|
56
|
+
isPrice = 0,
|
|
57
|
+
isOriginPrice = 0,
|
|
56
58
|
showZeroPrice = false,
|
|
57
59
|
showMarketingTag = true,
|
|
58
60
|
showRemark = true,
|
|
59
|
-
|
|
61
|
+
isStock = 0
|
|
60
62
|
}) => {
|
|
61
63
|
const _products = (0, import_react.useMemo)(() => {
|
|
62
64
|
const { products } = data;
|
|
@@ -70,7 +72,7 @@ var ProductGroup = ({
|
|
|
70
72
|
};
|
|
71
73
|
const renderPrice = (item) => {
|
|
72
74
|
if (!showZeroPrice && !parseFloat(item.price)) return null;
|
|
73
|
-
return
|
|
75
|
+
return !!isPrice || !!isOriginPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price-info" }, isPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.price })) : null, !!isOriginPrice && parseFloat(item.original_price) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "original-price" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.original_price })) : null) : null;
|
|
74
76
|
};
|
|
75
77
|
const renderItem = (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
76
78
|
"div",
|
|
@@ -82,7 +84,7 @@ var ProductGroup = ({
|
|
|
82
84
|
onSelectProduct == null ? void 0 : onSelectProduct(item);
|
|
83
85
|
}
|
|
84
86
|
},
|
|
85
|
-
|
|
87
|
+
isProductCover && item.cover ? /* @__PURE__ */ import_react.default.createElement(
|
|
86
88
|
"div",
|
|
87
89
|
{
|
|
88
90
|
className: "card-left",
|
|
@@ -91,9 +93,9 @@ var ProductGroup = ({
|
|
|
91
93
|
height: imgHeight || "auto"
|
|
92
94
|
}
|
|
93
95
|
},
|
|
94
|
-
/* @__PURE__ */ import_react.default.createElement("img", { src: item.cover })
|
|
96
|
+
/* @__PURE__ */ import_react.default.createElement("img", { loading: "lazy", src: item.cover, style: { borderRadius: radius } })
|
|
95
97
|
) : null,
|
|
96
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "card-right" },
|
|
98
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "card-right" }, !!isTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null, !!isSubtitle && item.subtitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "subtitle" }, item.subtitle) : null, !!isStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null, renderPrice(item))
|
|
97
99
|
);
|
|
98
100
|
return /* @__PURE__ */ import_react.default.createElement("div", { "data-section": data.id, className: "pisell-product-select-group" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "group-title" }, data.name), /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "16px 0" } }, (layout == null ? void 0 : layout.grid) && layout.config ? /* @__PURE__ */ import_react.default.createElement(
|
|
99
101
|
import_gridLayout.default,
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
.card-right {
|
|
46
46
|
.title,
|
|
47
|
+
.subtitle,
|
|
47
48
|
.price {
|
|
48
49
|
color: var(--ps-card-selected-text-color, '#FFFFFF');
|
|
49
50
|
}
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
|
|
100
101
|
img {
|
|
101
102
|
border-radius: 8px;
|
|
102
|
-
background:
|
|
103
|
+
background: lightgray 50% / cover no-repeat;
|
|
103
104
|
width: 100%;
|
|
104
105
|
height: 100%;
|
|
105
106
|
object-fit: cover;
|
|
@@ -111,8 +112,9 @@
|
|
|
111
112
|
flex-direction: column;
|
|
112
113
|
row-gap: 8px;
|
|
113
114
|
min-height: 92px;
|
|
115
|
+
overflow: hidden;
|
|
114
116
|
.title {
|
|
115
|
-
color: var(--ps-
|
|
117
|
+
color: var(--ps-color-text, #1b1b1b);
|
|
116
118
|
font-size: 18px;
|
|
117
119
|
font-style: normal;
|
|
118
120
|
font-weight: 600;
|
|
@@ -124,6 +126,18 @@
|
|
|
124
126
|
text-overflow: ellipsis;
|
|
125
127
|
// word-break: break-word;
|
|
126
128
|
}
|
|
129
|
+
.subtitle {
|
|
130
|
+
color: var(--ps-color-text, #1b1b1b);
|
|
131
|
+
font-size: 16px;
|
|
132
|
+
font-style: normal;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
line-height: 24px;
|
|
135
|
+
display: -webkit-box;
|
|
136
|
+
-webkit-line-clamp: 2;
|
|
137
|
+
-webkit-box-orient: vertical;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
text-overflow: ellipsis;
|
|
140
|
+
}
|
|
127
141
|
.stock,
|
|
128
142
|
.specs {
|
|
129
143
|
overflow: hidden;
|
|
@@ -169,7 +183,7 @@
|
|
|
169
183
|
gap: 8px;
|
|
170
184
|
}
|
|
171
185
|
.price {
|
|
172
|
-
color: var(--ps-
|
|
186
|
+
color: var(--ps-color-text, #1b1b1b);
|
|
173
187
|
font-size: 18px;
|
|
174
188
|
font-style: normal;
|
|
175
189
|
font-weight: 600;
|
|
@@ -4,7 +4,6 @@ import type { ProductSelectToken } from './theme/token';
|
|
|
4
4
|
import './index.less';
|
|
5
5
|
interface ProductSelectProps {
|
|
6
6
|
dataSource: any[];
|
|
7
|
-
theme?: 'light' | 'dark';
|
|
8
7
|
showSearch?: boolean;
|
|
9
8
|
showTab?: boolean;
|
|
10
9
|
layout?: {
|
|
@@ -18,6 +17,8 @@ interface ProductSelectProps {
|
|
|
18
17
|
style?: React.CSSProperties;
|
|
19
18
|
emptyDescription?: string;
|
|
20
19
|
token?: Partial<ProductSelectToken>;
|
|
20
|
+
selectedItems?: Array<any>;
|
|
21
|
+
productListSetting?: Partial<ProductCardConfig>;
|
|
21
22
|
}
|
|
22
|
-
declare const index: ({ dataSource,
|
|
23
|
+
declare const index: ({ dataSource, showSearch, scrollDom, style, token: customToken, onChange, selectedItems, productListSetting, ...rest }: ProductSelectProps) => JSX.Element;
|
|
23
24
|
export default index;
|
|
@@ -33,6 +33,7 @@ __export(productSelect_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(productSelect_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
37
|
var import_materials = require("@pisell/materials");
|
|
37
38
|
var import_utils = require("@pisell/utils");
|
|
38
39
|
var import_SearchLg = __toESM(require("@pisell/icon/es/SearchLg"));
|
|
@@ -44,11 +45,13 @@ var import_useToken = require("./hooks/useToken");
|
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
46
|
var index = ({
|
|
46
47
|
dataSource = [],
|
|
47
|
-
theme = "light",
|
|
48
48
|
showSearch = true,
|
|
49
49
|
scrollDom,
|
|
50
50
|
style = {},
|
|
51
51
|
token: customToken,
|
|
52
|
+
onChange,
|
|
53
|
+
selectedItems,
|
|
54
|
+
productListSetting = {},
|
|
52
55
|
...rest
|
|
53
56
|
}) => {
|
|
54
57
|
var _a, _b;
|
|
@@ -86,10 +89,19 @@ var index = ({
|
|
|
86
89
|
}
|
|
87
90
|
return baseStyle;
|
|
88
91
|
}, [cssVars, style, scrollDom]);
|
|
92
|
+
const disabled = (0, import_react.useMemo)(() => {
|
|
93
|
+
return !!(productListSetting == null ? void 0 : productListSetting.list_max_length) && Array.isArray(selectedItems) && (selectedItems == null ? void 0 : selectedItems.length) > 0;
|
|
94
|
+
}, [productListSetting, selectedItems]);
|
|
95
|
+
const _onChange = (0, import_react.useCallback)((value) => {
|
|
96
|
+
if (disabled) return;
|
|
97
|
+
onChange == null ? void 0 : onChange(value);
|
|
98
|
+
}, [disabled, onChange]);
|
|
89
99
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
90
100
|
"div",
|
|
91
101
|
{
|
|
92
|
-
className: `pisell-product-select-wrapper`,
|
|
102
|
+
className: (0, import_classnames.default)(`pisell-product-select-wrapper`, {
|
|
103
|
+
disabled
|
|
104
|
+
}),
|
|
93
105
|
style: mergedStyle
|
|
94
106
|
},
|
|
95
107
|
showSearch ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-product-select-search-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -111,7 +123,9 @@ var index = ({
|
|
|
111
123
|
{
|
|
112
124
|
list: _dataSource,
|
|
113
125
|
scrollDom: scrollDom || ".pisell-product-select-wrapper",
|
|
114
|
-
...
|
|
126
|
+
...productListSetting,
|
|
127
|
+
...rest,
|
|
128
|
+
onChange: _onChange
|
|
115
129
|
}
|
|
116
130
|
)
|
|
117
131
|
);
|
|
@@ -292,7 +292,15 @@ var AddSerivce = (props) => {
|
|
|
292
292
|
},
|
|
293
293
|
onChange: handleSelectProduct,
|
|
294
294
|
value: currentProduct == null ? void 0 : currentProduct.id,
|
|
295
|
-
loading: !renderList.length && loading
|
|
295
|
+
loading: !renderList.length && loading,
|
|
296
|
+
productListSetting: {
|
|
297
|
+
isProductCover: 1,
|
|
298
|
+
isTitle: 1,
|
|
299
|
+
isSubtitle: 1,
|
|
300
|
+
isPrice: 1,
|
|
301
|
+
isOriginPrice: 1,
|
|
302
|
+
isStock: 1
|
|
303
|
+
}
|
|
296
304
|
}
|
|
297
305
|
);
|
|
298
306
|
}
|
|
@@ -49,38 +49,15 @@ const productSelectMeta = {
|
|
|
49
49
|
display: 'block',
|
|
50
50
|
items: [
|
|
51
51
|
{
|
|
52
|
-
name: '
|
|
53
|
-
title: { label: '
|
|
54
|
-
propType: { type: 'oneOf', value: ['dark', 'light'] },
|
|
55
|
-
setter: [
|
|
56
|
-
{
|
|
57
|
-
componentName: 'RadioGroupSetter',
|
|
58
|
-
props: {
|
|
59
|
-
options: [
|
|
60
|
-
{
|
|
61
|
-
title: 'Dark',
|
|
62
|
-
value: 'dark',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
title: 'Light',
|
|
66
|
-
value: 'light',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
defaultValue: 'Dark',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: 'showSearch',
|
|
76
|
-
title: { label: '全部商品tab', tip: '全部商品tab' },
|
|
52
|
+
name: 'isSearch',
|
|
53
|
+
title: { label: '开启搜索功能'},
|
|
77
54
|
propType: 'bool',
|
|
78
55
|
setter: 'BoolSetter',
|
|
79
56
|
defaultValue: true,
|
|
80
57
|
},
|
|
81
58
|
{
|
|
82
59
|
name: 'showTab',
|
|
83
|
-
title: { label: '全部商品tab'
|
|
60
|
+
title: { label: '全部商品tab' },
|
|
84
61
|
propType: 'bool',
|
|
85
62
|
setter: 'BoolSetter',
|
|
86
63
|
defaultValue: true,
|
|
@@ -115,7 +92,7 @@ const productSelectMeta = {
|
|
|
115
92
|
display: 'block',
|
|
116
93
|
items: [
|
|
117
94
|
{
|
|
118
|
-
name: '
|
|
95
|
+
name: 'isProductCover',
|
|
119
96
|
title: { label: '商品图片', tip: '是否展示商品图片' },
|
|
120
97
|
propType: 'bool',
|
|
121
98
|
setter: 'BoolSetter',
|
|
@@ -124,7 +101,7 @@ const productSelectMeta = {
|
|
|
124
101
|
{
|
|
125
102
|
name: 'imgWidth',
|
|
126
103
|
condition: (target: IPublicModelSettingField) => {
|
|
127
|
-
return target.parent.getPropValue('
|
|
104
|
+
return target.parent.getPropValue('isProductCover') === true;
|
|
128
105
|
},
|
|
129
106
|
title: { label: '商品图片宽度' },
|
|
130
107
|
propType: 'string',
|
|
@@ -134,7 +111,7 @@ const productSelectMeta = {
|
|
|
134
111
|
{
|
|
135
112
|
name: 'imgHeight',
|
|
136
113
|
condition: (target: IPublicModelSettingField) => {
|
|
137
|
-
return target.parent.getPropValue('
|
|
114
|
+
return target.parent.getPropValue('isProductCover') === true;
|
|
138
115
|
},
|
|
139
116
|
title: { label: '商品图片高度' },
|
|
140
117
|
propType: 'string',
|
|
@@ -142,11 +119,18 @@ const productSelectMeta = {
|
|
|
142
119
|
defaultValue: '126px',
|
|
143
120
|
},
|
|
144
121
|
{
|
|
145
|
-
name: '
|
|
122
|
+
name: 'isTitle',
|
|
146
123
|
title: { label: '商品名称' },
|
|
147
124
|
propType: 'bool',
|
|
148
125
|
setter: 'BoolSetter',
|
|
149
126
|
defaultValue: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'isSubtitle',
|
|
130
|
+
title: { label: '商品副标题' },
|
|
131
|
+
propType: 'bool',
|
|
132
|
+
setter: 'BoolSetter',
|
|
133
|
+
defaultValue: true,
|
|
150
134
|
},
|
|
151
135
|
{
|
|
152
136
|
name: 'showSpec',
|
|
@@ -156,21 +140,21 @@ const productSelectMeta = {
|
|
|
156
140
|
defaultValue: true,
|
|
157
141
|
},
|
|
158
142
|
{
|
|
159
|
-
name: '
|
|
143
|
+
name: 'isTag',
|
|
160
144
|
title: { label: '商品标签' },
|
|
161
145
|
propType: 'bool',
|
|
162
146
|
setter: 'BoolSetter',
|
|
163
147
|
defaultValue: true,
|
|
164
148
|
},
|
|
165
149
|
{
|
|
166
|
-
name: '
|
|
150
|
+
name: 'isPrice',
|
|
167
151
|
title: { label: '价格' },
|
|
168
152
|
propType: 'bool',
|
|
169
153
|
setter: 'BoolSetter',
|
|
170
154
|
defaultValue: true,
|
|
171
155
|
},
|
|
172
156
|
{
|
|
173
|
-
name: '
|
|
157
|
+
name: 'isOriginPrice',
|
|
174
158
|
title: { label: '商品原价' },
|
|
175
159
|
propType: 'bool',
|
|
176
160
|
setter: 'BoolSetter',
|
|
@@ -191,7 +175,7 @@ const productSelectMeta = {
|
|
|
191
175
|
defaultValue: true,
|
|
192
176
|
},
|
|
193
177
|
{
|
|
194
|
-
name: '
|
|
178
|
+
name: 'isStock',
|
|
195
179
|
title: { label: '商品库存' },
|
|
196
180
|
propType: 'bool',
|
|
197
181
|
setter: 'BoolSetter',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.44",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.42",
|
|
63
|
+
"@pisell/materials": "3.3.13",
|
|
63
64
|
"@pisell/icon": "0.0.11",
|
|
64
|
-
"@pisell/materials": "3.3.14",
|
|
65
65
|
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|