pb-sxp-ui 1.0.1 → 1.0.2-alpha.1
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/dist/index.cjs +938 -389
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +24 -18
- package/dist/index.js +938 -389
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +938 -389
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/es/core/components/SxpPageRender/ExpandableText.js +16 -9
- package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/Modal/index.js +7 -4
- package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
- package/es/core/components/SxpPageRender/Popup/index.js +3 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
- package/es/core/components/SxpPageRender/index.d.ts +20 -1
- package/es/core/components/SxpPageRender/index.js +19 -16
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/es/core/components/SxpPageRender/useIconLink.js +8 -3
- package/es/core/context/EditorContext.d.ts +5 -0
- package/es/core/context/EditorContext.js +21 -3
- package/es/core/context/SxpDataSourceProvider.js +1 -1
- package/es/core/create.d.ts +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +175 -0
- package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/es/materials/sxp/template/Appoint/index.js +4 -18
- package/es/materials/sxp/template/Appoint/material.js +22 -6
- package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/es/materials/sxp/template/Commodity/index.js +5 -22
- package/es/materials/sxp/template/Commodity/material.js +31 -6
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/Link/index.d.ts +2 -0
- package/es/materials/sxp/template/Link/index.js +4 -13
- package/es/materials/sxp/template/Link/material.js +22 -5
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
- package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/es/materials/sxp/template/components/EventProvider.js +5 -4
- package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
- package/es/materials/sxp/template/components/settingRender.js +198 -0
- package/es/materials/sxp/template/components/typing.d.ts +6 -0
- package/es/materials/sxp/template/components/typing.js +1 -0
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/lib/core/components/SxpPageRender/ExpandableText.js +16 -9
- package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
- package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
- package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
- package/lib/core/components/SxpPageRender/index.d.ts +20 -1
- package/lib/core/components/SxpPageRender/index.js +19 -16
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
- package/lib/core/context/EditorContext.d.ts +5 -0
- package/lib/core/context/EditorContext.js +21 -3
- package/lib/core/context/SxpDataSourceProvider.js +1 -1
- package/lib/core/create.d.ts +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +177 -0
- package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/lib/materials/sxp/template/Appoint/index.js +4 -18
- package/lib/materials/sxp/template/Appoint/material.js +22 -6
- package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/Commodity/index.js +5 -22
- package/lib/materials/sxp/template/Commodity/material.js +31 -6
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/Link/index.d.ts +2 -0
- package/lib/materials/sxp/template/Link/index.js +4 -13
- package/lib/materials/sxp/template/Link/material.js +22 -5
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
- package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/lib/materials/sxp/template/components/EventProvider.js +4 -3
- package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
- package/lib/materials/sxp/template/components/settingRender.js +200 -0
- package/lib/materials/sxp/template/components/typing.d.ts +6 -0
- package/lib/materials/sxp/template/components/typing.js +2 -0
- package/package.json +2 -2
package/es/core/create.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { IEditorContext } from '../../../../core/context/EditorContext';
|
3
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
4
4
|
import './index.less';
|
@@ -17,6 +17,18 @@ export interface ICommodityDetailDiroNewProps {
|
|
17
17
|
foldText?: string;
|
18
18
|
unfoldText?: string;
|
19
19
|
};
|
20
|
+
swiper: {
|
21
|
+
dotsAlign: 'left' | 'center';
|
22
|
+
delay: number;
|
23
|
+
};
|
24
|
+
commodityStyles?: {
|
25
|
+
title: CSSProperties;
|
26
|
+
collection: CSSProperties;
|
27
|
+
price: CSSProperties;
|
28
|
+
taxInfo: CSSProperties;
|
29
|
+
info: CSSProperties;
|
30
|
+
};
|
31
|
+
buttonStyle?: CSSProperties;
|
20
32
|
}
|
21
33
|
declare const _default: React.NamedExoticComponent<ICommodityDetailDiroNewProps>;
|
22
34
|
export default _default;
|
@@ -9,8 +9,8 @@ import Modal from '../../../../core/components/SxpPageRender/Modal';
|
|
9
9
|
import ExpandableText from '../../../../core/components/SxpPageRender/ExpandableText';
|
10
10
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
11
11
|
const CommodityDetailDiroNew = (_a) => {
|
12
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
13
|
-
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
|
12
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
|
14
14
|
const [spread, setSpread] = useState(true);
|
15
15
|
const { sxpParameter } = useSxpDataSource();
|
16
16
|
const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
|
@@ -79,14 +79,22 @@ const CommodityDetailDiroNew = (_a) => {
|
|
79
79
|
}
|
80
80
|
}
|
81
81
|
};
|
82
|
+
const productInfoText = () => {
|
83
|
+
return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
84
|
+
React.createElement(ExpandableText, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
|
85
|
+
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
86
|
+
Made in Italy` })));
|
87
|
+
};
|
82
88
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
83
89
|
React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
|
84
90
|
product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
|
85
91
|
clickable: true,
|
86
92
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
87
|
-
clickableClass:
|
93
|
+
clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
|
94
|
+
? 'commondityDiroNew-swiper-clickable-left'
|
95
|
+
: 'commondityDiroNew-swiper-clickable-center'
|
88
96
|
}, loop: true, autoplay: {
|
89
|
-
delay:
|
97
|
+
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
90
98
|
} }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
|
91
99
|
return (React.createElement(SwiperSlide, { key: src },
|
92
100
|
React.createElement("div", { style: {
|
@@ -112,18 +120,13 @@ const CommodityDetailDiroNew = (_a) => {
|
|
112
120
|
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
113
121
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
114
122
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
115
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
116
|
-
React.createElement("div", { className: '
|
117
|
-
|
118
|
-
|
119
|
-
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
Made in Italy`))))),
|
124
|
-
React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) },
|
125
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-info', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, (product === null || product === void 0 ? void 0 : product.info) ||
|
126
|
-
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
127
|
-
Made in Italy`))));
|
123
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
124
|
+
React.createElement("div", { className: '' },
|
125
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
126
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
|
127
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
|
128
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
|
129
|
+
productInfoText())),
|
130
|
+
React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText())));
|
128
131
|
};
|
129
132
|
export default memo(CommodityDetailDiroNew);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import settingRender from './settingRender';
|
1
2
|
import CommodityDetailDiroNewComponent from '.';
|
2
3
|
import { createMaterial } from '../../../../core/create';
|
3
4
|
const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
@@ -5,8 +6,41 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
5
6
|
icon: '',
|
6
7
|
category: 'popup',
|
7
8
|
type: 'CommodityDetailDiroNew',
|
9
|
+
related: {
|
10
|
+
settingRender
|
11
|
+
},
|
8
12
|
defaulSetting: {
|
9
|
-
props: {
|
13
|
+
props: {
|
14
|
+
swiper: {
|
15
|
+
dotsAlign: 'left',
|
16
|
+
delay: 3
|
17
|
+
},
|
18
|
+
commodityStyles: {
|
19
|
+
price: {
|
20
|
+
color: '#000',
|
21
|
+
fontWeight: 'bold',
|
22
|
+
fontSize: 18
|
23
|
+
},
|
24
|
+
title: {
|
25
|
+
color: '#000',
|
26
|
+
fontSize: 13
|
27
|
+
},
|
28
|
+
collection: {
|
29
|
+
color: '#757575',
|
30
|
+
fontSize: 13
|
31
|
+
},
|
32
|
+
info: {
|
33
|
+
color: '#757575',
|
34
|
+
fontSize: 13
|
35
|
+
},
|
36
|
+
taxInfo: {
|
37
|
+
color: '#000',
|
38
|
+
fontWeight: 'bold',
|
39
|
+
fontSize: 13,
|
40
|
+
textAlign: 'right'
|
41
|
+
}
|
42
|
+
}
|
43
|
+
},
|
10
44
|
style: {}
|
11
45
|
},
|
12
46
|
w: 100,
|
@@ -0,0 +1,134 @@
|
|
1
|
+
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
options: {
|
7
|
+
label: string;
|
8
|
+
value: string;
|
9
|
+
}[];
|
10
|
+
name: string[];
|
11
|
+
addonAfter?: undefined;
|
12
|
+
} | {
|
13
|
+
type: string;
|
14
|
+
name: string[];
|
15
|
+
addonAfter: string;
|
16
|
+
label?: undefined;
|
17
|
+
options?: undefined;
|
18
|
+
})[];
|
19
|
+
} | {
|
20
|
+
title: string;
|
21
|
+
child: {
|
22
|
+
name: string[];
|
23
|
+
type: string;
|
24
|
+
child: ({
|
25
|
+
label: string;
|
26
|
+
type: string;
|
27
|
+
options: {
|
28
|
+
label: string;
|
29
|
+
value: string;
|
30
|
+
}[];
|
31
|
+
name: string[];
|
32
|
+
initialValue: string;
|
33
|
+
child?: undefined;
|
34
|
+
} | {
|
35
|
+
type: string;
|
36
|
+
label: string;
|
37
|
+
child: ({
|
38
|
+
type: string;
|
39
|
+
name: string[];
|
40
|
+
options?: undefined;
|
41
|
+
addonAfter?: undefined;
|
42
|
+
} | {
|
43
|
+
type: string;
|
44
|
+
options: {
|
45
|
+
label: string;
|
46
|
+
value: string;
|
47
|
+
}[];
|
48
|
+
name: string[];
|
49
|
+
addonAfter?: undefined;
|
50
|
+
} | {
|
51
|
+
type: string;
|
52
|
+
addonAfter: string;
|
53
|
+
name: string[];
|
54
|
+
options?: undefined;
|
55
|
+
})[];
|
56
|
+
options?: undefined;
|
57
|
+
name?: undefined;
|
58
|
+
initialValue?: undefined;
|
59
|
+
} | {
|
60
|
+
label: string;
|
61
|
+
type: string;
|
62
|
+
options?: undefined;
|
63
|
+
name?: undefined;
|
64
|
+
initialValue?: undefined;
|
65
|
+
child?: undefined;
|
66
|
+
} | {
|
67
|
+
label: string;
|
68
|
+
type: string;
|
69
|
+
name: string[];
|
70
|
+
options?: undefined;
|
71
|
+
initialValue?: undefined;
|
72
|
+
child?: undefined;
|
73
|
+
})[];
|
74
|
+
}[];
|
75
|
+
} | {
|
76
|
+
title: string;
|
77
|
+
child: ({
|
78
|
+
type: string;
|
79
|
+
label: string;
|
80
|
+
name: string[];
|
81
|
+
initialValue: string;
|
82
|
+
child?: undefined;
|
83
|
+
} | {
|
84
|
+
type: string;
|
85
|
+
label: string;
|
86
|
+
child: ({
|
87
|
+
type: string;
|
88
|
+
name: string[];
|
89
|
+
max: number;
|
90
|
+
addonAfter?: undefined;
|
91
|
+
} | {
|
92
|
+
type: string;
|
93
|
+
name: string[];
|
94
|
+
addonAfter: string;
|
95
|
+
max: number;
|
96
|
+
})[];
|
97
|
+
name?: undefined;
|
98
|
+
initialValue?: undefined;
|
99
|
+
} | {
|
100
|
+
type: string;
|
101
|
+
label: string;
|
102
|
+
child: ({
|
103
|
+
type: string;
|
104
|
+
name: string[];
|
105
|
+
initialValue: string;
|
106
|
+
options?: undefined;
|
107
|
+
addonAfter?: undefined;
|
108
|
+
} | {
|
109
|
+
type: string;
|
110
|
+
name: string[];
|
111
|
+
options: {
|
112
|
+
label: string;
|
113
|
+
value: string;
|
114
|
+
}[];
|
115
|
+
initialValue?: undefined;
|
116
|
+
addonAfter?: undefined;
|
117
|
+
} | {
|
118
|
+
type: string;
|
119
|
+
name: string[];
|
120
|
+
addonAfter: string;
|
121
|
+
initialValue?: undefined;
|
122
|
+
options?: undefined;
|
123
|
+
})[];
|
124
|
+
name?: undefined;
|
125
|
+
initialValue?: undefined;
|
126
|
+
} | {
|
127
|
+
type: string;
|
128
|
+
name: string[];
|
129
|
+
label?: undefined;
|
130
|
+
initialValue?: undefined;
|
131
|
+
child?: undefined;
|
132
|
+
})[];
|
133
|
+
})[];
|
134
|
+
export default _default;
|
@@ -0,0 +1,175 @@
|
|
1
|
+
export default [
|
2
|
+
{
|
3
|
+
title: '商品图片',
|
4
|
+
child: [
|
5
|
+
{
|
6
|
+
type: 'Radius',
|
7
|
+
label: '轮播指示器',
|
8
|
+
options: [
|
9
|
+
{
|
10
|
+
label: '居左',
|
11
|
+
value: 'left'
|
12
|
+
},
|
13
|
+
{
|
14
|
+
label: '居中',
|
15
|
+
value: 'center'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
name: ['props', 'swiper', 'dotsAlign']
|
19
|
+
},
|
20
|
+
{
|
21
|
+
type: 'Number',
|
22
|
+
name: ['props', 'swiper', 'delay'],
|
23
|
+
addonAfter: 's'
|
24
|
+
}
|
25
|
+
]
|
26
|
+
},
|
27
|
+
{
|
28
|
+
title: '商品文本',
|
29
|
+
child: [
|
30
|
+
{
|
31
|
+
name: ['props', 'commodityStyles'],
|
32
|
+
type: 'SelectLinkage',
|
33
|
+
child: [
|
34
|
+
{
|
35
|
+
label: '字段',
|
36
|
+
type: 'Select',
|
37
|
+
options: [
|
38
|
+
{
|
39
|
+
label: '商品名称',
|
40
|
+
value: 'title'
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: '系列名称',
|
44
|
+
value: 'collection'
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: '价格',
|
48
|
+
value: 'price'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
label: '税费说明',
|
52
|
+
value: 'taxInfo'
|
53
|
+
},
|
54
|
+
{
|
55
|
+
label: '商品描述',
|
56
|
+
value: 'info'
|
57
|
+
}
|
58
|
+
],
|
59
|
+
name: ['props', 'commodityStyles', 'field'],
|
60
|
+
initialValue: 'title'
|
61
|
+
},
|
62
|
+
{
|
63
|
+
type: 'Group',
|
64
|
+
label: '标题字体',
|
65
|
+
child: [
|
66
|
+
{
|
67
|
+
type: 'Color',
|
68
|
+
name: ['color']
|
69
|
+
},
|
70
|
+
{
|
71
|
+
type: 'Select',
|
72
|
+
options: [{ label: '黑体', value: '黑体' }],
|
73
|
+
name: ['fontFamily']
|
74
|
+
},
|
75
|
+
{
|
76
|
+
type: 'Number',
|
77
|
+
addonAfter: 'px',
|
78
|
+
name: ['fontSize']
|
79
|
+
}
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
label: '标题样式',
|
84
|
+
type: 'TextStyle'
|
85
|
+
},
|
86
|
+
{
|
87
|
+
label: '标题对齐',
|
88
|
+
type: 'TextAlign'
|
89
|
+
},
|
90
|
+
{
|
91
|
+
label: '默认行数',
|
92
|
+
type: 'Number',
|
93
|
+
name: ['lineClamp']
|
94
|
+
}
|
95
|
+
]
|
96
|
+
}
|
97
|
+
]
|
98
|
+
},
|
99
|
+
{
|
100
|
+
title: '购买按钮样式',
|
101
|
+
child: [
|
102
|
+
{
|
103
|
+
type: 'Color',
|
104
|
+
label: '背景色',
|
105
|
+
name: ['props', 'buttonStyle', 'backgroundColor'],
|
106
|
+
initialValue: '#000'
|
107
|
+
},
|
108
|
+
{
|
109
|
+
type: 'Group',
|
110
|
+
label: '尺寸',
|
111
|
+
child: [
|
112
|
+
{
|
113
|
+
type: 'Number',
|
114
|
+
name: ['props', 'buttonStyle', 'height'],
|
115
|
+
addonAfter: 'H'
|
116
|
+
}
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
type: 'Group',
|
121
|
+
label: '圆角',
|
122
|
+
child: [
|
123
|
+
{
|
124
|
+
type: 'Slider',
|
125
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
126
|
+
max: 100
|
127
|
+
},
|
128
|
+
{
|
129
|
+
type: 'Number',
|
130
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
131
|
+
addonAfter: 'px',
|
132
|
+
max: 100
|
133
|
+
}
|
134
|
+
]
|
135
|
+
},
|
136
|
+
{
|
137
|
+
type: 'Group',
|
138
|
+
label: '字体',
|
139
|
+
child: [
|
140
|
+
{
|
141
|
+
type: 'Color',
|
142
|
+
name: ['props', 'buttonStyle', 'color'],
|
143
|
+
initialValue: '#fff'
|
144
|
+
},
|
145
|
+
{
|
146
|
+
type: 'Select',
|
147
|
+
name: ['props', 'buttonStyle', 'fontFamily'],
|
148
|
+
options: [{ label: '黑体', value: '黑体' }]
|
149
|
+
},
|
150
|
+
{
|
151
|
+
type: 'Number',
|
152
|
+
name: ['props', 'buttonStyle', 'fontSize'],
|
153
|
+
addonAfter: 'px'
|
154
|
+
}
|
155
|
+
]
|
156
|
+
},
|
157
|
+
{
|
158
|
+
type: 'TextStyle',
|
159
|
+
name: ['props', 'buttonStyle']
|
160
|
+
},
|
161
|
+
{
|
162
|
+
type: 'TextAlign',
|
163
|
+
name: ['props', 'buttonStyle']
|
164
|
+
},
|
165
|
+
{
|
166
|
+
type: 'TextSpace',
|
167
|
+
name: ['props', 'buttonStyle']
|
168
|
+
},
|
169
|
+
{
|
170
|
+
type: 'TextMargin',
|
171
|
+
name: ['props', 'buttonStyle']
|
172
|
+
}
|
173
|
+
]
|
174
|
+
}
|
175
|
+
];
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { ICtaTempStylesType } from '../components/typing';
|
2
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
4
|
export interface IAppointProps {
|
4
5
|
content?: string;
|
@@ -6,6 +7,7 @@ export interface IAppointProps {
|
|
6
7
|
bgImg?: Record<string, any> | string;
|
7
8
|
recData?: RecItemType;
|
8
9
|
bottom_image?: string;
|
10
|
+
ctaTempStyles?: ICtaTempStylesType;
|
9
11
|
}
|
10
12
|
declare const _default: React.NamedExoticComponent<IAppointProps>;
|
11
13
|
export default _default;
|
@@ -5,26 +5,12 @@ import EventProvider from '../components/EventProvider';
|
|
5
5
|
import { useSxpDataSource } from '../../../../core/hooks';
|
6
6
|
const Appoint = (_a) => {
|
7
7
|
var _b, _c, _d, _e;
|
8
|
-
var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
8
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
|
9
9
|
const { sxpParameter } = useSxpDataSource();
|
10
10
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
11
|
-
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(
|
12
|
-
React.createElement("div", { className: css({
|
13
|
-
width: '30px',
|
14
|
-
height: '30px',
|
15
|
-
marginRight: '8px',
|
16
|
-
borderRadius: '3px',
|
17
|
-
overflow: 'hidden',
|
18
|
-
flexShrink: 0,
|
19
|
-
backgroundColor: '#f2f2f2'
|
20
|
-
}) },
|
11
|
+
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
|
12
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
21
13
|
React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
|
22
|
-
React.createElement("div", { className: css({
|
23
|
-
color: '#fff',
|
24
|
-
width: '100%',
|
25
|
-
overflow: 'hidden',
|
26
|
-
fontSize: '12px',
|
27
|
-
textOverflow: 'ellipsis'
|
28
|
-
}) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
|
14
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
|
29
15
|
};
|
30
16
|
export default memo(Appoint);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import settingRender from '../components/settingRender';
|
1
2
|
import interactionRender from './interactionRender';
|
2
3
|
import AppointComponent from '.';
|
3
4
|
import { createMaterial } from '../../../../core/create';
|
@@ -8,18 +9,33 @@ const Appoint = createMaterial(AppointComponent, {
|
|
8
9
|
type: 'Appoint',
|
9
10
|
related: {
|
10
11
|
interactionRender,
|
12
|
+
settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
|
11
13
|
bindableProps: []
|
12
14
|
},
|
13
15
|
defaulSetting: {
|
14
16
|
props: {
|
15
|
-
|
17
|
+
ctaTempStyles: {
|
18
|
+
img: {
|
19
|
+
borderRadius: 3,
|
20
|
+
width: 30,
|
21
|
+
height: 30,
|
22
|
+
marginRight: 8
|
23
|
+
},
|
24
|
+
ctaTitle: {
|
25
|
+
fontSize: 12,
|
26
|
+
color: '#fff',
|
27
|
+
textAlign: 'left',
|
28
|
+
width: 130,
|
29
|
+
height: 20
|
30
|
+
}
|
31
|
+
}
|
16
32
|
},
|
17
33
|
style: {
|
18
|
-
padding:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
34
|
+
padding: 7,
|
35
|
+
width: 236,
|
36
|
+
height: 44,
|
37
|
+
borderRadius: 3,
|
38
|
+
backgroundColor: 'rgba(0,0,0,.3)'
|
23
39
|
}
|
24
40
|
},
|
25
41
|
w: 100,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { ICtaTempStylesType } from '../components/typing';
|
2
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
4
|
export interface ICommodityProps {
|
4
5
|
content?: string;
|
@@ -6,6 +7,7 @@ export interface ICommodityProps {
|
|
6
7
|
bgImg?: Record<string, any> | string;
|
7
8
|
recData?: RecItemType;
|
8
9
|
bottom_image?: string;
|
10
|
+
ctaTempStyles?: ICtaTempStylesType;
|
9
11
|
}
|
10
12
|
declare const _default: React.NamedExoticComponent<ICommodityProps>;
|
11
13
|
export default _default;
|
@@ -6,20 +6,12 @@ import styles from './index.module.less';
|
|
6
6
|
import { useSxpDataSource } from '../../../../core/hooks';
|
7
7
|
const Commodity = (_a) => {
|
8
8
|
var _b, _c, _d, _e, _f, _g, _h;
|
9
|
-
var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
9
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
|
10
10
|
const { sxpParameter } = useSxpDataSource();
|
11
11
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12
12
|
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
13
|
-
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(
|
14
|
-
React.createElement("div", { className: css({
|
15
|
-
width: '60px',
|
16
|
-
height: '60px',
|
17
|
-
marginRight: '8px',
|
18
|
-
borderRadius: '3px',
|
19
|
-
overflow: 'hidden',
|
20
|
-
flexShrink: 0,
|
21
|
-
backgroundColor: '#f2f2f2'
|
22
|
-
}) },
|
13
|
+
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
14
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
23
15
|
React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
|
24
16
|
React.createElement("div", { className: css({
|
25
17
|
color: '#fff',
|
@@ -29,16 +21,7 @@ const Commodity = (_a) => {
|
|
29
21
|
width: '100%',
|
30
22
|
overflow: 'hidden'
|
31
23
|
}) },
|
32
|
-
React.createElement("div", { className: styles['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
33
|
-
React.createElement("div", { className: css({
|
34
|
-
background: 'rgba(0,0,0,.5)',
|
35
|
-
fontSize: '10px',
|
36
|
-
padding: '2px 7px',
|
37
|
-
width: 'auto',
|
38
|
-
textAlign: 'center',
|
39
|
-
textOverflow: 'ellipsis',
|
40
|
-
overflow: 'hidden',
|
41
|
-
whiteSpace: 'nowrap'
|
42
|
-
}) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
24
|
+
React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
25
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
43
26
|
};
|
44
27
|
export default memo(Commodity);
|