@pisell/private-materials 3.4.16 → 3.4.18
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Content/index.js +1 -1
- package/es/components/appointmentBooking/components/Content/index.less +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +2 -2
- package/es/components/appointmentBooking/index.js +8 -2
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/index.js +8 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/es/hooks/useWindowSize.js +8 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.js +29 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/es/plus/productSelect/CategoryTabs/index.js +171 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.js +37 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/es/plus/productSelect/ProductCard/index.js +170 -0
- package/es/plus/productSelect/ProductCard/index.less +253 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/es/plus/productSelect/ProductList/gridComponents.js +149 -0
- package/es/plus/productSelect/ProductList/index.d.ts +22 -0
- package/es/plus/productSelect/ProductList/index.js +72 -0
- package/es/plus/productSelect/ProductList/index.less +0 -0
- package/es/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/es/plus/productSelect/components/IntersectionObserver.js +276 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.js +357 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.js +243 -0
- package/es/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/es/plus/productSelect/components/TabsStructure/index.js +13 -0
- package/es/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/es/plus/productSelect/components/TabsStructure/styles.js +87 -0
- package/es/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/es/plus/productSelect/components/TabsStructure/types.js +1 -0
- package/es/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/es/plus/productSelect/components/TabsStructure/utils.js +56 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +12 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +44 -0
- package/es/plus/productSelect/components/pisellPriceText/index.less +4 -0
- package/es/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/es/plus/productSelect/hooks/useToken.js +34 -0
- package/es/plus/productSelect/index.d.ts +31 -0
- package/es/plus/productSelect/index.js +270 -0
- package/es/plus/productSelect/index.less +56 -0
- package/es/plus/productSelect/locales.d.ts +18 -0
- package/es/plus/productSelect/locales.js +17 -0
- package/es/plus/productSelect/theme/token.d.ts +17 -0
- package/es/plus/productSelect/theme/token.js +19 -0
- package/es/plus/productSelect/utils.d.ts +39 -0
- package/es/plus/productSelect/utils.js +162 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +3 -0
- package/es/plus/saasCreateOrganization/components/Header.js +62 -0
- package/es/plus/saasCreateOrganization/index.d.ts +4 -0
- package/es/plus/saasCreateOrganization/index.js +15 -0
- package/es/plus/saasCreateOrganization/index.less +55 -0
- package/es/plus/saasCreateOrganization/locales.d.ts +15 -0
- package/es/plus/saasCreateOrganization/locales.js +14 -0
- package/es/plus/saasCreateOrganization/types.d.ts +69 -0
- package/es/plus/saasCreateOrganization/types.js +1 -0
- package/es/plus/saasLogin/index.d.ts +5 -0
- package/es/plus/saasLogin/index.js +165 -0
- package/es/plus/saasLogin/index.less +136 -0
- package/es/plus/saasLogin/locales.d.ts +51 -0
- package/es/plus/saasLogin/locales.js +50 -0
- package/es/plus/saasLogin/types.d.ts +62 -0
- package/es/plus/saasLogin/types.js +1 -0
- package/es/plus/saasLogin/utils.d.ts +35 -0
- package/es/plus/saasLogin/utils.js +31 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +9 -0
- package/es/plus/saasRegister/components/EntryEmail.js +92 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +9 -0
- package/es/plus/saasRegister/components/EntryInfo.js +145 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +4 -0
- package/es/plus/saasRegister/components/GoLogin.js +27 -0
- package/es/plus/saasRegister/components/Header.d.ts +3 -0
- package/es/plus/saasRegister/components/Header.js +62 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +8 -0
- package/es/plus/saasRegister/components/VerifyError.js +68 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +5 -0
- package/es/plus/saasRegister/components/VerifyingLink.js +16 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +7 -0
- package/es/plus/saasRegister/components/VertifyEmail.js +121 -0
- package/es/plus/saasRegister/index.d.ts +5 -0
- package/es/plus/saasRegister/index.js +246 -0
- package/es/plus/saasRegister/index.less +218 -0
- package/es/plus/saasRegister/locales.d.ts +117 -0
- package/es/plus/saasRegister/locales.js +116 -0
- package/es/plus/saasRegister/types.d.ts +114 -0
- package/es/plus/saasRegister/types.js +24 -0
- package/lib/components/appointmentBooking/components/Content/index.js +1 -1
- package/lib/components/appointmentBooking/components/Content/index.less +3 -3
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/index.js +6 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/index.js +6 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/lib/hooks/useWindowSize.js +6 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.js +62 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +183 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.js +58 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/lib/plus/productSelect/ProductCard/index.js +184 -0
- package/lib/plus/productSelect/ProductCard/index.less +253 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/lib/plus/productSelect/ProductList/gridComponents.js +148 -0
- package/lib/plus/productSelect/ProductList/index.d.ts +22 -0
- package/lib/plus/productSelect/ProductList/index.js +86 -0
- package/lib/plus/productSelect/ProductList/index.less +0 -0
- package/lib/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/lib/plus/productSelect/components/IntersectionObserver.js +269 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.js +393 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.js +209 -0
- package/lib/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/lib/plus/productSelect/components/TabsStructure/index.js +92 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.js +122 -0
- package/lib/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/lib/plus/productSelect/components/TabsStructure/types.js +17 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.js +72 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +12 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +73 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.less +4 -0
- package/lib/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/plus/productSelect/hooks/useToken.js +50 -0
- package/lib/plus/productSelect/index.d.ts +31 -0
- package/lib/plus/productSelect/index.js +299 -0
- package/lib/plus/productSelect/index.less +56 -0
- package/lib/plus/productSelect/locales.d.ts +18 -0
- package/lib/plus/productSelect/locales.js +41 -0
- package/lib/plus/productSelect/theme/token.d.ts +17 -0
- package/lib/plus/productSelect/theme/token.js +47 -0
- package/lib/plus/productSelect/utils.d.ts +39 -0
- package/lib/plus/productSelect/utils.js +138 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +3 -0
- package/lib/plus/saasCreateOrganization/components/Header.js +99 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +4 -0
- package/lib/plus/saasCreateOrganization/index.js +47 -0
- package/lib/plus/saasCreateOrganization/index.less +55 -0
- package/lib/plus/saasCreateOrganization/locales.d.ts +15 -0
- package/lib/plus/saasCreateOrganization/locales.js +38 -0
- package/lib/plus/saasCreateOrganization/types.d.ts +69 -0
- package/lib/plus/saasCreateOrganization/types.js +17 -0
- package/lib/plus/saasLogin/index.d.ts +5 -0
- package/lib/plus/saasLogin/index.js +171 -0
- package/lib/plus/saasLogin/index.less +136 -0
- package/lib/plus/saasLogin/locales.d.ts +51 -0
- package/lib/plus/saasLogin/locales.js +74 -0
- package/lib/plus/saasLogin/types.d.ts +62 -0
- package/lib/plus/saasLogin/types.js +17 -0
- package/lib/plus/saasLogin/utils.d.ts +35 -0
- package/lib/plus/saasLogin/utils.js +50 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +9 -0
- package/lib/plus/saasRegister/components/EntryEmail.js +92 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +9 -0
- package/lib/plus/saasRegister/components/EntryInfo.js +128 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +4 -0
- package/lib/plus/saasRegister/components/GoLogin.js +58 -0
- package/lib/plus/saasRegister/components/Header.d.ts +3 -0
- package/lib/plus/saasRegister/components/Header.js +99 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +8 -0
- package/lib/plus/saasRegister/components/VerifyError.js +123 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +5 -0
- package/lib/plus/saasRegister/components/VerifyingLink.js +44 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +7 -0
- package/lib/plus/saasRegister/components/VertifyEmail.js +110 -0
- package/lib/plus/saasRegister/index.d.ts +5 -0
- package/lib/plus/saasRegister/index.js +205 -0
- package/lib/plus/saasRegister/index.less +218 -0
- package/lib/plus/saasRegister/locales.d.ts +117 -0
- package/lib/plus/saasRegister/locales.js +140 -0
- package/lib/plus/saasRegister/types.d.ts +114 -0
- package/lib/plus/saasRegister/types.js +54 -0
- package/lowcode/saas-create-organization/meta.ts +214 -0
- package/lowcode/saas-create-organization/snippets.ts +25 -0
- package/lowcode/saas-login/meta.ts +370 -0
- package/lowcode/saas-login/snippets.ts +38 -0
- package/lowcode/saas-register/meta.ts +386 -0
- package/lowcode/saas-register/snippets.ts +31 -0
- package/package.json +2 -2
|
@@ -251,7 +251,7 @@ var Layout = function Layout() {
|
|
|
251
251
|
if (isMobile()) {
|
|
252
252
|
var _header$getBoundingCl, _footer$getBoundingCl;
|
|
253
253
|
var header = document.querySelector('.event-progress-bar');
|
|
254
|
-
var footer = document.querySelector('.pisell-section-footers-wrapper');
|
|
254
|
+
var footer = document.querySelector('.pisell-section-footers-wrapper') || document.querySelector('#layout-footer');
|
|
255
255
|
var content = document.querySelector('.parallel-content-mobile-wrap');
|
|
256
256
|
var headerHeight = (header === null || header === void 0 || (_header$getBoundingCl = header.getBoundingClientRect()) === null || _header$getBoundingCl === void 0 ? void 0 : _header$getBoundingCl.height) || 0;
|
|
257
257
|
var footerHeight = (footer === null || footer === void 0 || (_footer$getBoundingCl = footer.getBoundingClientRect()) === null || _footer$getBoundingCl === void 0 ? void 0 : _footer$getBoundingCl.height) || 0;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
flex: 1;
|
|
8
8
|
|
|
9
9
|
.pisell-product-select-wrapper {
|
|
10
|
-
.pisell-product-
|
|
10
|
+
.pisell-product-select__tabs-wrapper {
|
|
11
11
|
top: 77px !important;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
flex: none;
|
|
51
51
|
|
|
52
52
|
.pisell-product-select-wrapper {
|
|
53
|
-
.pisell-product-
|
|
53
|
+
.pisell-product-select__tabs-wrapper {
|
|
54
54
|
top: 0 !important;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
|
|
98
98
|
.parallel-content-retail-wrap {
|
|
99
99
|
.pisell-product-select-wrapper {
|
|
100
|
-
.pisell-product-
|
|
100
|
+
.pisell-product-select__tabs-wrapper {
|
|
101
101
|
top: 0px !important;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import React, { useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
17
17
|
import dayjs from 'dayjs';
|
|
18
18
|
import { isMobile, locales } from '@pisell/utils';
|
|
19
|
-
import ProductSelect from "
|
|
19
|
+
import ProductSelect from "../../../../plus/productSelect";
|
|
20
20
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
21
21
|
import { useAppointmentBookingContext } from "../../context";
|
|
22
22
|
import { useAppointmentBooking, useAppointmentBookingSetting, useAppointmentBookingProduct, useAppointmentBookingStep } from "../../hooks";
|
|
@@ -240,7 +240,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
240
240
|
var _isMobile = useMemo(function () {
|
|
241
241
|
if (typeof isMobile === 'function') return isMobile();
|
|
242
242
|
return isMobile;
|
|
243
|
-
}, isMobile);
|
|
243
|
+
}, [isMobile]);
|
|
244
244
|
return /*#__PURE__*/React.createElement("div", {
|
|
245
245
|
className: "appointment-service-wrap"
|
|
246
246
|
}, /*#__PURE__*/React.createElement(ProductSelect, {
|
|
@@ -30,10 +30,16 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
|
30
30
|
useEffect(function () {
|
|
31
31
|
var setRealVH = function setRealVH() {
|
|
32
32
|
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
|
33
|
-
var
|
|
33
|
+
var height = window.innerHeight;
|
|
34
|
+
|
|
35
|
+
// 检查 URL 参数中是否有 fromTabbar
|
|
36
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
37
|
+
if (urlParams.has('fromTabbar')) {
|
|
38
|
+
height = height - 54;
|
|
39
|
+
}
|
|
40
|
+
var vh = height * 0.01;
|
|
34
41
|
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
|
35
42
|
};
|
|
36
|
-
|
|
37
43
|
// 页面加载和窗口大小变化时都重新计算
|
|
38
44
|
setRealVH();
|
|
39
45
|
window.addEventListener('resize', setRealVH);
|
|
@@ -272,7 +272,6 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
272
272
|
case 3:
|
|
273
273
|
newList = _context2.sent;
|
|
274
274
|
list = newList.map(function (d) {
|
|
275
|
-
debugger;
|
|
276
275
|
// 是否可用
|
|
277
276
|
var isUsable = isUsableProduct(d.add_time, state.service.cacheItem);
|
|
278
277
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number | {
|
|
168
|
+
}) => number | "flexible" | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
}
|
|
171
|
+
};
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|
|
@@ -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?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
301
|
-
action?: "amount" | "
|
|
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;
|
|
@@ -61,7 +61,14 @@ var Content = function Content() {
|
|
|
61
61
|
useEffect(function () {
|
|
62
62
|
var setRealVH = function setRealVH() {
|
|
63
63
|
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
|
64
|
-
var
|
|
64
|
+
var height = window.innerHeight;
|
|
65
|
+
|
|
66
|
+
// 检查 URL 参数中是否有 formTabbar
|
|
67
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
68
|
+
if (urlParams.has('formTabbar')) {
|
|
69
|
+
height = height - 54;
|
|
70
|
+
}
|
|
71
|
+
var vh = height * 0.01;
|
|
65
72
|
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
|
66
73
|
};
|
|
67
74
|
|
|
@@ -27,7 +27,7 @@ import { holderId, isDaysBooking, isNormalProductByDurationSchedule } from "../.
|
|
|
27
27
|
import { getIsBundleOrCombination, isBooking4Shop } from "../../../booking/info/utils";
|
|
28
28
|
import { getProductDetail } from "../../../booking/info/service/serve";
|
|
29
29
|
import { useService } from "../../../booking/info/service/serviceManager";
|
|
30
|
-
import ProductSelect from "
|
|
30
|
+
import ProductSelect from "../../../../plus/productSelect";
|
|
31
31
|
import "./index.less";
|
|
32
32
|
import { addService, addServiceScroll, createSimpleCacheItem, genServiceKey, getIsShowNumber, isSameProduct } from "../../utils";
|
|
33
33
|
import NotAvailable from "../notAvailable";
|
|
@@ -584,8 +584,8 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
584
584
|
isTitle: 1,
|
|
585
585
|
isSubtitle: 1,
|
|
586
586
|
isPrice: 1,
|
|
587
|
-
isOriginPrice:
|
|
588
|
-
isStock:
|
|
587
|
+
isOriginPrice: 0,
|
|
588
|
+
isStock: 0
|
|
589
589
|
}
|
|
590
590
|
}), /*#__PURE__*/React.createElement(NotAvailable, {
|
|
591
591
|
ref: notAvailableRef
|
|
@@ -7,7 +7,14 @@ export var useWindowSize = function useWindowSize() {
|
|
|
7
7
|
var timeoutId;
|
|
8
8
|
var setRealVH = function setRealVH() {
|
|
9
9
|
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
|
10
|
-
var
|
|
10
|
+
var height = window.innerHeight;
|
|
11
|
+
|
|
12
|
+
// 检查 URL 参数中是否有 formTabbar
|
|
13
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
14
|
+
if (urlParams.has('formTabbar')) {
|
|
15
|
+
height = height - 54;
|
|
16
|
+
}
|
|
17
|
+
var vh = height * 0.01;
|
|
11
18
|
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
|
12
19
|
};
|
|
13
20
|
var debouncedHandleResize = function debouncedHandleResize() {
|
package/es/index.d.ts
CHANGED
|
@@ -45,3 +45,6 @@ export { default as TicketBooking } from './components/ticketBooking';
|
|
|
45
45
|
export { default as SubTotal } from './components/subTotal';
|
|
46
46
|
export { default as EditBookingModal } from './components/booking/editBookingModal';
|
|
47
47
|
export { default as StepController } from './components/stepController';
|
|
48
|
+
export { default as SaasLogin } from './plus/saasLogin';
|
|
49
|
+
export { default as SaasRegister } from './plus/saasRegister';
|
|
50
|
+
export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
|
package/es/index.js
CHANGED
|
@@ -48,4 +48,7 @@ export { default as AppointmentDeposit } from "./components/appointmentBooking/d
|
|
|
48
48
|
export { default as TicketBooking } from "./components/ticketBooking";
|
|
49
49
|
export { default as SubTotal } from "./components/subTotal";
|
|
50
50
|
export { default as EditBookingModal } from "./components/booking/editBookingModal";
|
|
51
|
-
export { default as StepController } from "./components/stepController";
|
|
51
|
+
export { default as StepController } from "./components/stepController";
|
|
52
|
+
export { default as SaasLogin } from "./plus/saasLogin";
|
|
53
|
+
export { default as SaasRegister } from "./plus/saasRegister";
|
|
54
|
+
export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './CategorySkeleton.less';
|
|
3
|
+
interface CategorySkeletonProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
tabCount?: number;
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const CategorySkeleton: React.FC<CategorySkeletonProps>;
|
|
10
|
+
export default CategorySkeleton;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import "./CategorySkeleton.less";
|
|
4
|
+
var CategorySkeleton = function CategorySkeleton(_ref) {
|
|
5
|
+
var className = _ref.className,
|
|
6
|
+
style = _ref.style,
|
|
7
|
+
_ref$tabCount = _ref.tabCount,
|
|
8
|
+
tabCount = _ref$tabCount === void 0 ? 5 : _ref$tabCount,
|
|
9
|
+
_ref$animated = _ref.animated,
|
|
10
|
+
animated = _ref$animated === void 0 ? true : _ref$animated;
|
|
11
|
+
var containerClass = classNames('category-skeleton', {
|
|
12
|
+
'category-skeleton--animated': animated
|
|
13
|
+
}, className);
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: containerClass,
|
|
16
|
+
style: style
|
|
17
|
+
}, Array.from({
|
|
18
|
+
length: tabCount
|
|
19
|
+
}, function (_, index) {
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
key: index,
|
|
22
|
+
className: "category-skeleton__tab",
|
|
23
|
+
style: {
|
|
24
|
+
width: "".concat(Math.floor(Math.random() * 40) + 80, "px")
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
export default CategorySkeleton;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.category-skeleton {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
padding: 16px 12px;
|
|
6
|
+
|
|
7
|
+
&__tab {
|
|
8
|
+
height: 32px;
|
|
9
|
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
10
|
+
background-size: 200% 100%;
|
|
11
|
+
border-radius: 20px;
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
height: 40px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&--animated {
|
|
17
|
+
.category-skeleton__tab {
|
|
18
|
+
animation: skeleton-loading 1.5s ease-in-out infinite;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes skeleton-loading {
|
|
24
|
+
0% {
|
|
25
|
+
background-position: 200% 0;
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
background-position: -200% 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../components/TabsStructure/TabsStructure.less';
|
|
3
|
+
import CategorySkeleton from './CategorySkeleton';
|
|
4
|
+
declare type TabItem = {
|
|
5
|
+
key: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
interface IProps {
|
|
10
|
+
items: TabItem[];
|
|
11
|
+
activeKey: string;
|
|
12
|
+
onChange: (key: string) => void;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
skeleton?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const CategoryTabs: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
17
|
+
export default CategoryTabs;
|
|
18
|
+
export { CategorySkeleton };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { forwardRef, useCallback, useRef, useState, useEffect } from 'react';
|
|
8
|
+
import IntersectionObserverProvider, { IntersectionTrigger } from "../components/IntersectionObserver";
|
|
9
|
+
import { TabsStructure, useSelectionIndicator } from "../components/TabsStructure";
|
|
10
|
+
import "../components/TabsStructure/TabsStructure.less";
|
|
11
|
+
import CategorySkeleton from "./CategorySkeleton";
|
|
12
|
+
import { PREFIX } from "../index";
|
|
13
|
+
var CategoryTabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
|
+
var items = props.items,
|
|
15
|
+
activeKey = props.activeKey,
|
|
16
|
+
onChange = props.onChange,
|
|
17
|
+
_props$loading = props.loading,
|
|
18
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
19
|
+
skeleton = props.skeleton;
|
|
20
|
+
var railRef = useRef(null);
|
|
21
|
+
|
|
22
|
+
// 使用IntersectionTrigger来优雅地控制滚动状态
|
|
23
|
+
var _useState = useState(true),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
isAtStart = _useState2[0],
|
|
26
|
+
setIsAtStart = _useState2[1];
|
|
27
|
+
var _useState3 = useState(false),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
isAtEnd = _useState4[0],
|
|
30
|
+
setIsAtEnd = _useState4[1];
|
|
31
|
+
var _useState5 = useState(false),
|
|
32
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
33
|
+
needsScrollButtons = _useState6[0],
|
|
34
|
+
setNeedsScrollButtons = _useState6[1];
|
|
35
|
+
|
|
36
|
+
// 滚动函数
|
|
37
|
+
var scrollLeft = useCallback(function () {
|
|
38
|
+
if (!railRef.current) return;
|
|
39
|
+
var container = railRef.current;
|
|
40
|
+
var scrollAmount = container.clientWidth * 0.8;
|
|
41
|
+
var newPosition = Math.max(0, container.scrollLeft - scrollAmount);
|
|
42
|
+
container.scrollTo({
|
|
43
|
+
left: newPosition,
|
|
44
|
+
behavior: 'smooth'
|
|
45
|
+
});
|
|
46
|
+
}, []);
|
|
47
|
+
var scrollRight = useCallback(function () {
|
|
48
|
+
if (!railRef.current) return;
|
|
49
|
+
var container = railRef.current;
|
|
50
|
+
var scrollAmount = container.clientWidth * 0.8;
|
|
51
|
+
var maxScroll = container.scrollWidth - container.clientWidth;
|
|
52
|
+
var newPosition = Math.min(maxScroll, container.scrollLeft + scrollAmount);
|
|
53
|
+
container.scrollTo({
|
|
54
|
+
left: newPosition,
|
|
55
|
+
behavior: 'smooth'
|
|
56
|
+
});
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
// 检测是否需要滚动按钮
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
var updateScrollButtonsVisibility = function updateScrollButtonsVisibility() {
|
|
62
|
+
if (railRef.current) {
|
|
63
|
+
var _railRef$current = railRef.current,
|
|
64
|
+
scrollWidth = _railRef$current.scrollWidth,
|
|
65
|
+
clientWidth = _railRef$current.clientWidth;
|
|
66
|
+
console.log('检测滚动按钮需求:', {
|
|
67
|
+
scrollWidth: scrollWidth,
|
|
68
|
+
clientWidth: clientWidth,
|
|
69
|
+
needsScroll: scrollWidth > clientWidth
|
|
70
|
+
});
|
|
71
|
+
setNeedsScrollButtons(scrollWidth > clientWidth);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var resizeObserver = null;
|
|
75
|
+
|
|
76
|
+
// 确保DOM已经渲染完成
|
|
77
|
+
var timer = setTimeout(function () {
|
|
78
|
+
var container = railRef.current;
|
|
79
|
+
if (!container) {
|
|
80
|
+
console.log('容器未找到,跳过滚动按钮检测');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
updateScrollButtonsVisibility();
|
|
84
|
+
resizeObserver = new ResizeObserver(updateScrollButtonsVisibility);
|
|
85
|
+
resizeObserver.observe(container);
|
|
86
|
+
}, 100);
|
|
87
|
+
return function () {
|
|
88
|
+
clearTimeout(timer);
|
|
89
|
+
if (resizeObserver) {
|
|
90
|
+
resizeObserver.disconnect();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}, [items]); // 依赖items,当标签项变化时重新检测
|
|
94
|
+
|
|
95
|
+
// 获取选择指示器和列表容器属性
|
|
96
|
+
var _useSelectionIndicato = useSelectionIndicator(railRef, activeKey || ''),
|
|
97
|
+
selectionIndicatorProps = _useSelectionIndicato.selectionIndicatorProps,
|
|
98
|
+
listContainerProps = _useSelectionIndicato.listContainerProps;
|
|
99
|
+
|
|
100
|
+
// 如果正在加载且提供了骨架屏组件,显示骨架屏
|
|
101
|
+
if (loading && skeleton) {
|
|
102
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, skeleton);
|
|
103
|
+
}
|
|
104
|
+
return /*#__PURE__*/React.createElement(IntersectionObserverProvider, null, items.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
className: "".concat(PREFIX, "__tabs-wrapper")
|
|
106
|
+
}, /*#__PURE__*/React.createElement(TabsStructure, {
|
|
107
|
+
variant: "pill",
|
|
108
|
+
backgroundVariant: "onPage",
|
|
109
|
+
selectedTab: activeKey
|
|
110
|
+
}, needsScrollButtons && /*#__PURE__*/React.createElement(TabsStructure.ChevronButton, {
|
|
111
|
+
direction: "prev",
|
|
112
|
+
disabled: isAtStart,
|
|
113
|
+
onClick: scrollLeft,
|
|
114
|
+
style: {
|
|
115
|
+
marginRight: '8px'
|
|
116
|
+
}
|
|
117
|
+
}), /*#__PURE__*/React.createElement(TabsStructure.Rail, {
|
|
118
|
+
ref: railRef
|
|
119
|
+
}, /*#__PURE__*/React.createElement(IntersectionTrigger, {
|
|
120
|
+
onShow: function onShow() {
|
|
121
|
+
console.log('is start');
|
|
122
|
+
setIsAtStart(true);
|
|
123
|
+
},
|
|
124
|
+
onHide: function onHide() {
|
|
125
|
+
console.log('is start false');
|
|
126
|
+
setIsAtStart(false);
|
|
127
|
+
},
|
|
128
|
+
style: {
|
|
129
|
+
width: 1,
|
|
130
|
+
height: 1,
|
|
131
|
+
flexShrink: 0,
|
|
132
|
+
background: 'rgba(0,0,0,0)'
|
|
133
|
+
},
|
|
134
|
+
className: "visibility-detector start-detector"
|
|
135
|
+
}), /*#__PURE__*/React.createElement(TabsStructure.SelectionIndicator, selectionIndicatorProps), /*#__PURE__*/React.createElement(TabsStructure.ListContainer, listContainerProps, items.map(function (item) {
|
|
136
|
+
return /*#__PURE__*/React.createElement(TabsStructure.Item, {
|
|
137
|
+
key: item.key,
|
|
138
|
+
tabId: item.key,
|
|
139
|
+
"aria-selected": activeKey === item.key,
|
|
140
|
+
onClick: function onClick() {
|
|
141
|
+
return onChange(item.key);
|
|
142
|
+
},
|
|
143
|
+
className: "tab-item"
|
|
144
|
+
}, item.label);
|
|
145
|
+
})), /*#__PURE__*/React.createElement(IntersectionTrigger, {
|
|
146
|
+
className: "visibility-detector end-detector",
|
|
147
|
+
onShow: function onShow() {
|
|
148
|
+
console.log('is end');
|
|
149
|
+
setIsAtEnd(true);
|
|
150
|
+
},
|
|
151
|
+
onHide: function onHide() {
|
|
152
|
+
console.log('is end false');
|
|
153
|
+
setIsAtEnd(false);
|
|
154
|
+
},
|
|
155
|
+
style: {
|
|
156
|
+
width: 1,
|
|
157
|
+
height: 1,
|
|
158
|
+
flexShrink: 0,
|
|
159
|
+
background: 'rgba(0,0,0,0)'
|
|
160
|
+
}
|
|
161
|
+
})), needsScrollButtons && /*#__PURE__*/React.createElement(TabsStructure.ChevronButton, {
|
|
162
|
+
direction: "next",
|
|
163
|
+
disabled: isAtEnd,
|
|
164
|
+
onClick: scrollRight,
|
|
165
|
+
style: {
|
|
166
|
+
marginLeft: '8px'
|
|
167
|
+
}
|
|
168
|
+
}))));
|
|
169
|
+
});
|
|
170
|
+
export default CategoryTabs;
|
|
171
|
+
export { CategorySkeleton };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ProductCardSkeletonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
isProductCover?: boolean;
|
|
6
|
+
item?: any;
|
|
7
|
+
index?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ProductCardSkeleton: React.FC<ProductCardSkeletonProps>;
|
|
10
|
+
export default ProductCardSkeleton;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Skeleton } from 'antd';
|
|
4
|
+
import { PREFIX } from "../index";
|
|
5
|
+
var ProductCardSkeleton = function ProductCardSkeleton(_ref) {
|
|
6
|
+
var className = _ref.className,
|
|
7
|
+
style = _ref.style,
|
|
8
|
+
_ref$isProductCover = _ref.isProductCover,
|
|
9
|
+
isProductCover = _ref$isProductCover === void 0 ? true : _ref$isProductCover,
|
|
10
|
+
item = _ref.item;
|
|
11
|
+
// 如果item.__typename为'category',显示简单的输入框骨架屏
|
|
12
|
+
if ((item === null || item === void 0 ? void 0 : item.__typename) === 'category') {
|
|
13
|
+
return /*#__PURE__*/React.createElement(Skeleton.Input, {
|
|
14
|
+
active: true,
|
|
15
|
+
size: "small",
|
|
16
|
+
block: false
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 默认显示产品卡片骨架屏
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: classNames("".concat(PREFIX, "__product-card"), className),
|
|
23
|
+
style: style
|
|
24
|
+
}, isProductCover && /*#__PURE__*/React.createElement(Skeleton.Image, {
|
|
25
|
+
active: true,
|
|
26
|
+
style: {
|
|
27
|
+
width: 180,
|
|
28
|
+
height: 126
|
|
29
|
+
}
|
|
30
|
+
}), /*#__PURE__*/React.createElement(Skeleton, {
|
|
31
|
+
active: true,
|
|
32
|
+
paragraph: {
|
|
33
|
+
rows: 2
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
export default ProductCardSkeleton;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.product-card-skeleton {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 12px;
|
|
4
|
+
padding: 8px;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
background: #fff;
|
|
7
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
8
|
+
|
|
9
|
+
&__cover {
|
|
10
|
+
width: 180px;
|
|
11
|
+
height: 126px;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__content {
|
|
17
|
+
flex: 1;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__title {
|
|
24
|
+
height: 20px;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__specs {
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: 6px;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__spec-item {
|
|
35
|
+
height: 24px;
|
|
36
|
+
width: 60px;
|
|
37
|
+
border-radius: 12px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__price {
|
|
41
|
+
height: 18px;
|
|
42
|
+
width: 60%;
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.skeleton-item {
|
|
48
|
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
49
|
+
background-size: 200% 100%;
|
|
50
|
+
display: block;
|
|
51
|
+
position: relative;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
|
|
54
|
+
&--animated {
|
|
55
|
+
animation: skeleton-loading 1.5s ease-in-out infinite;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes skeleton-loading {
|
|
60
|
+
0% {
|
|
61
|
+
background-position: 200% 0;
|
|
62
|
+
}
|
|
63
|
+
100% {
|
|
64
|
+
background-position: -200% 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 网格布局中的产品卡片骨架屏样式调整
|
|
69
|
+
.product-grid-wrapper {
|
|
70
|
+
.product-card-skeleton {
|
|
71
|
+
min-width: unset;
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// 列表布局中的产品卡片骨架屏样式调整
|
|
77
|
+
.product-list-wrapper {
|
|
78
|
+
.product-card-skeleton {
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ProductCardSkeleton from './ProductCardSkeleton';
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare type BoolConfigVal = 0 | 1;
|
|
5
|
+
export interface ProductCardConfig {
|
|
6
|
+
isProductCover?: BoolConfigVal;
|
|
7
|
+
imgWidth?: string;
|
|
8
|
+
imgHeight?: string;
|
|
9
|
+
radius?: number;
|
|
10
|
+
isTitle?: BoolConfigVal;
|
|
11
|
+
isSubtitle?: BoolConfigVal;
|
|
12
|
+
showSpec?: boolean;
|
|
13
|
+
isTag?: BoolConfigVal;
|
|
14
|
+
isPrice?: BoolConfigVal;
|
|
15
|
+
isOriginPrice?: BoolConfigVal;
|
|
16
|
+
showZeroPrice?: boolean;
|
|
17
|
+
showMarketingTag?: boolean;
|
|
18
|
+
showRemark?: boolean;
|
|
19
|
+
isStock?: BoolConfigVal;
|
|
20
|
+
}
|
|
21
|
+
export interface ProductCardProps {
|
|
22
|
+
item: any;
|
|
23
|
+
index: number;
|
|
24
|
+
context?: {
|
|
25
|
+
onItemIntersectionIn: (item: any) => void;
|
|
26
|
+
onItemIntersectionOut: (item: any) => void;
|
|
27
|
+
};
|
|
28
|
+
className?: string;
|
|
29
|
+
onSelectProduct?: (item: any) => void;
|
|
30
|
+
currentProductId?: number;
|
|
31
|
+
onSelect?: (item: any) => void;
|
|
32
|
+
isSelected?: boolean;
|
|
33
|
+
decorateConfig?: ProductCardConfig;
|
|
34
|
+
}
|
|
35
|
+
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
36
|
+
export declare const DefaultItemContent: React.MemoExoticComponent<(props: {
|
|
37
|
+
item: any;
|
|
38
|
+
index: number;
|
|
39
|
+
context?: {
|
|
40
|
+
onItemIntersectionIn: (item: any) => void;
|
|
41
|
+
onItemIntersectionOut: (item: any) => void;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}) => JSX.Element>;
|
|
44
|
+
export default ProductCard;
|
|
45
|
+
export { ProductCardSkeleton };
|