pb-sxp-ui 1.1.2 → 1.2.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 +2264 -864
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +356 -175
- package/dist/index.js +2264 -864
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +2264 -864
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/Pagebuilder/type.d.ts +1 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/es/core/components/SxpPageRender/Hashtag/index.js +1 -3
- package/es/core/components/SxpPageRender/Modal/index.d.ts +3 -0
- package/es/core/components/SxpPageRender/Modal/index.js +70 -6
- package/es/core/components/SxpPageRender/Navbar.js +1 -1
- package/es/core/components/SxpPageRender/Popup/index.js +1 -1
- package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/es/core/components/SxpPageRender/RenderCard.js +16 -12
- package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -13
- package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +3 -3
- package/es/core/components/SxpPageRender/index.js +51 -17
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +6 -4
- package/es/core/utils/localStore.d.ts +3 -0
- package/es/core/utils/localStore.js +8 -0
- package/es/materials/sxp/HashTag/material.js +1 -2
- package/es/materials/sxp/cta/AniLink/index.d.ts +14 -0
- package/es/materials/sxp/cta/AniLink/index.js +59 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.js +50 -0
- package/es/materials/sxp/cta/AniLink/material.d.ts +2 -0
- package/es/materials/sxp/cta/AniLink/material.js +38 -0
- package/es/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
- package/es/materials/sxp/cta/AniLink/settingRender.js +103 -0
- package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
- package/es/materials/sxp/cta/AniLinkPopup/index.js +66 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +50 -0
- package/es/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
- package/es/materials/sxp/cta/AniLinkPopup/material.js +52 -0
- package/es/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
- package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +249 -0
- package/es/materials/sxp/cta/index.d.ts +2 -0
- package/es/materials/sxp/cta/index.js +2 -0
- package/es/materials/sxp/index.d.ts +1 -0
- package/es/materials/sxp/index.js +1 -0
- package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +43 -26
- package/es/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
- package/es/materials/sxp/popup/CommodityDetail/interactionRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetail/material.js +3 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
- package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
- package/es/materials/sxp/popup/CommodityList/index.d.ts +28 -0
- package/es/materials/sxp/popup/CommodityList/index.js +56 -0
- package/es/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
- package/es/materials/sxp/popup/CommodityList/interactionRender.js +11 -0
- package/es/materials/sxp/popup/CommodityList/material.d.ts +2 -0
- package/es/materials/sxp/popup/CommodityList/material.js +51 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +207 -0
- package/es/materials/sxp/popup/index.d.ts +1 -0
- package/es/materials/sxp/popup/index.js +1 -0
- package/es/materials/sxp/template/Link/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
- package/es/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
- package/es/materials/sxp/template/components/CommodityGroup.js +31 -0
- package/es/materials/sxp/template/components/Img.js +1 -1
- package/es/materials/sxp/template/components/Scroll.d.ts +2 -1
- package/es/materials/sxp/template/components/Scroll.js +10 -3
- package/es/materials/sxp/template/components/settingRender.js +0 -5
- package/lib/core/Pagebuilder/type.d.ts +1 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -3
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +3 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +70 -6
- package/lib/core/components/SxpPageRender/Navbar.js +1 -1
- package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/lib/core/components/SxpPageRender/RenderCard.js +16 -12
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -13
- package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +3 -3
- package/lib/core/components/SxpPageRender/index.js +50 -16
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +6 -4
- package/lib/core/utils/localStore.d.ts +3 -0
- package/lib/core/utils/localStore.js +11 -1
- package/lib/materials/sxp/HashTag/material.js +1 -2
- package/lib/materials/sxp/cta/AniLink/index.d.ts +14 -0
- package/lib/materials/sxp/cta/AniLink/index.js +61 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.js +52 -0
- package/lib/materials/sxp/cta/AniLink/material.d.ts +2 -0
- package/lib/materials/sxp/cta/AniLink/material.js +42 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.js +105 -0
- package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +68 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +52 -0
- package/lib/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +56 -0
- package/lib/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
- package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +251 -0
- package/lib/materials/sxp/cta/index.d.ts +2 -0
- package/lib/materials/sxp/cta/index.js +5 -0
- package/lib/materials/sxp/index.d.ts +1 -0
- package/lib/materials/sxp/index.js +1 -0
- package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -26
- package/lib/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
- package/lib/materials/sxp/popup/CommodityDetail/interactionRender.js +14 -0
- package/lib/materials/sxp/popup/CommodityDetail/material.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +14 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
- package/lib/materials/sxp/popup/CommodityList/index.d.ts +28 -0
- package/lib/materials/sxp/popup/CommodityList/index.js +58 -0
- package/lib/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/popup/CommodityList/interactionRender.js +13 -0
- package/lib/materials/sxp/popup/CommodityList/material.d.ts +2 -0
- package/lib/materials/sxp/popup/CommodityList/material.js +55 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +209 -0
- package/lib/materials/sxp/popup/index.d.ts +1 -0
- package/lib/materials/sxp/popup/index.js +1 -0
- package/lib/materials/sxp/template/Link/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
- package/lib/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
- package/lib/materials/sxp/template/components/CommodityGroup.js +34 -0
- package/lib/materials/sxp/template/components/Img.js +1 -1
- package/lib/materials/sxp/template/components/Scroll.d.ts +2 -1
- package/lib/materials/sxp/template/components/Scroll.js +9 -2
- package/lib/materials/sxp/template/components/settingRender.js +0 -5
- package/package.json +1 -1
@@ -5,13 +5,15 @@ const tslib_1 = require("tslib");
|
|
5
5
|
const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
|
6
6
|
const _1 = tslib_1.__importDefault(require("."));
|
7
7
|
const create_1 = require("../../../../core/create");
|
8
|
+
const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
|
8
9
|
const CommodityDetailDiroNew = (0, create_1.createMaterial)(_1.default, {
|
9
10
|
displayName: '商品详情',
|
10
11
|
icon: '',
|
11
12
|
category: 'popup',
|
12
13
|
type: 'CommodityDetailDiroNew',
|
13
14
|
related: {
|
14
|
-
settingRender: settingRender_1.default
|
15
|
+
settingRender: settingRender_1.default,
|
16
|
+
interactionRender: interactionRender_1.default
|
15
17
|
},
|
16
18
|
defaulSetting: {
|
17
19
|
props: {
|
@@ -32,6 +32,43 @@ declare const _default: ({
|
|
32
32
|
name?: undefined;
|
33
33
|
addonAfter?: undefined;
|
34
34
|
})[];
|
35
|
+
} | {
|
36
|
+
title: string;
|
37
|
+
child: ({
|
38
|
+
type: string;
|
39
|
+
name: string[];
|
40
|
+
label: string;
|
41
|
+
child?: undefined;
|
42
|
+
} | {
|
43
|
+
type: string;
|
44
|
+
child: {
|
45
|
+
label: string;
|
46
|
+
type: string;
|
47
|
+
name: string[];
|
48
|
+
min: number;
|
49
|
+
addonAfter: string;
|
50
|
+
initialValue: number;
|
51
|
+
}[];
|
52
|
+
name?: undefined;
|
53
|
+
label?: undefined;
|
54
|
+
} | {
|
55
|
+
type: string;
|
56
|
+
child: ({
|
57
|
+
label: string;
|
58
|
+
name: string[];
|
59
|
+
type: string;
|
60
|
+
addonAfter: string;
|
61
|
+
initialValue: number;
|
62
|
+
} | {
|
63
|
+
label: string;
|
64
|
+
name: string[];
|
65
|
+
type: string;
|
66
|
+
addonAfter: string;
|
67
|
+
initialValue?: undefined;
|
68
|
+
})[];
|
69
|
+
name?: undefined;
|
70
|
+
label?: undefined;
|
71
|
+
})[];
|
35
72
|
} | {
|
36
73
|
title: string;
|
37
74
|
child: {
|
@@ -39,6 +39,47 @@ exports.default = [
|
|
39
39
|
}
|
40
40
|
]
|
41
41
|
},
|
42
|
+
{
|
43
|
+
title: '多商品切换器',
|
44
|
+
child: [
|
45
|
+
{
|
46
|
+
type: 'Switch',
|
47
|
+
name: ['props', 'commodityGroup', 'open'],
|
48
|
+
label: '快速切换开关'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
type: 'Group',
|
52
|
+
child: [
|
53
|
+
{
|
54
|
+
label: '居中垂直偏移',
|
55
|
+
type: 'Number',
|
56
|
+
name: ['props', 'commodityGroup', 'translateY'],
|
57
|
+
min: -1000,
|
58
|
+
addonAfter: '%',
|
59
|
+
initialValue: 0
|
60
|
+
}
|
61
|
+
]
|
62
|
+
},
|
63
|
+
{
|
64
|
+
type: 'Group',
|
65
|
+
child: [
|
66
|
+
{
|
67
|
+
label: '上边距',
|
68
|
+
name: ['props', 'commodityGroup', 'style', 'marginTop'],
|
69
|
+
type: 'Number',
|
70
|
+
addonAfter: 'px',
|
71
|
+
initialValue: 20
|
72
|
+
},
|
73
|
+
{
|
74
|
+
label: '下边距',
|
75
|
+
name: ['props', 'commodityGroup', 'style', 'marginBottom'],
|
76
|
+
type: 'Number',
|
77
|
+
addonAfter: 'px'
|
78
|
+
}
|
79
|
+
]
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
42
83
|
{
|
43
84
|
title: '商品文本',
|
44
85
|
child: [
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
|
+
import { IEditorContext } from '../../../../core/context/EditorContext';
|
3
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
4
|
+
import './index.less';
|
5
|
+
export interface ICommodityListProps {
|
6
|
+
content?: string;
|
7
|
+
style?: Record<string, any>;
|
8
|
+
bgImg?: Record<string, any> | string;
|
9
|
+
onClick?: () => void;
|
10
|
+
schema?: IEditorContext['schema'];
|
11
|
+
isDefault?: boolean;
|
12
|
+
rec?: RecItemType;
|
13
|
+
viewTime?: any;
|
14
|
+
isPost?: boolean;
|
15
|
+
bottom_image?: string;
|
16
|
+
commodityStyles?: {
|
17
|
+
title: CSSProperties;
|
18
|
+
collection: CSSProperties;
|
19
|
+
price: CSSProperties;
|
20
|
+
};
|
21
|
+
buttonStyle?: CSSProperties;
|
22
|
+
index?: number;
|
23
|
+
translateY?: number;
|
24
|
+
commodityPicture?: CSSProperties;
|
25
|
+
isExternalLink?: boolean;
|
26
|
+
}
|
27
|
+
declare const _default: React.NamedExoticComponent<ICommodityListProps>;
|
28
|
+
export default _default;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const css_1 = require("@emotion/css");
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const hooks_1 = require("../../../../core/hooks");
|
7
|
+
require("./index.less");
|
8
|
+
const tool_1 = require("../../../../core/utils/tool");
|
9
|
+
const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
|
10
|
+
const EventProvider_1 = tslib_1.__importDefault(require("../../template/components/EventProvider"));
|
11
|
+
const CommodityList = (_a) => {
|
12
|
+
var _b, _c;
|
13
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink"]);
|
14
|
+
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
15
|
+
const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = (0, hooks_1.useSxpDataSource)();
|
16
|
+
const recData = isPost ? rec : popupDetailData;
|
17
|
+
const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
|
18
|
+
const priceText = (0, react_1.useCallback)((product) => {
|
19
|
+
var _a, _b, _c, _d, _e;
|
20
|
+
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
21
|
+
return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
|
22
|
+
minimumFractionDigits: 0
|
23
|
+
})) !== null && _e !== void 0 ? _e : ''}`;
|
24
|
+
}
|
25
|
+
else {
|
26
|
+
return '$7,000';
|
27
|
+
}
|
28
|
+
}, []);
|
29
|
+
return (react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
30
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
31
|
+
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: (0, css_1.css)({
|
32
|
+
display: 'flex'
|
33
|
+
}) }),
|
34
|
+
react_1.default.createElement(Img_1.default, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture }),
|
35
|
+
react_1.default.createElement("div", { style: { flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } },
|
36
|
+
react_1.default.createElement("div", null,
|
37
|
+
react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
38
|
+
__html: (0, tool_1.setFontForText)((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
39
|
+
} }),
|
40
|
+
react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
41
|
+
__html: (0, tool_1.setFontForText)((_f = item === null || item === void 0 ? void 0 : item.collection) !== null && _f !== void 0 ? _f : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
42
|
+
} })),
|
43
|
+
react_1.default.createElement("div", { className: (0, css_1.css)({
|
44
|
+
display: 'flex',
|
45
|
+
alignItems: 'flex-end',
|
46
|
+
justifyContent: 'space-between',
|
47
|
+
width: '100%',
|
48
|
+
overflow: 'hidden'
|
49
|
+
}) },
|
50
|
+
react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
|
51
|
+
__html: (0, tool_1.setFontForText)(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
52
|
+
} }),
|
53
|
+
react_1.default.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
|
54
|
+
__html: (0, tool_1.setFontForText)((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', buttonStyle)
|
55
|
+
} })))));
|
56
|
+
})));
|
57
|
+
};
|
58
|
+
exports.default = (0, react_1.memo)(CommodityList);
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CommodityList = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
|
6
|
+
const _1 = tslib_1.__importDefault(require("."));
|
7
|
+
const create_1 = require("../../../../core/create");
|
8
|
+
const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
|
9
|
+
const CommodityList = (0, create_1.createMaterial)(_1.default, {
|
10
|
+
displayName: '商品列表',
|
11
|
+
icon: '',
|
12
|
+
category: 'popup',
|
13
|
+
type: 'CommodityList',
|
14
|
+
related: {
|
15
|
+
settingRender: settingRender_1.default,
|
16
|
+
interactionRender: interactionRender_1.default
|
17
|
+
},
|
18
|
+
defaulSetting: {
|
19
|
+
props: {
|
20
|
+
commodityPicture: {
|
21
|
+
width: 100,
|
22
|
+
height: 100,
|
23
|
+
marginRight: 10
|
24
|
+
},
|
25
|
+
commodityStyles: {
|
26
|
+
price: {
|
27
|
+
color: '#000',
|
28
|
+
fontWeight: 'bold',
|
29
|
+
fontSize: 14
|
30
|
+
},
|
31
|
+
title: {
|
32
|
+
color: '#000',
|
33
|
+
fontSize: 14
|
34
|
+
},
|
35
|
+
collection: {
|
36
|
+
color: '#757575',
|
37
|
+
fontSize: 12
|
38
|
+
}
|
39
|
+
},
|
40
|
+
buttonStyle: {
|
41
|
+
backgroundColor: '#000',
|
42
|
+
fontSize: 12,
|
43
|
+
height: 30,
|
44
|
+
textAlign: 'center',
|
45
|
+
color: '#fff',
|
46
|
+
lineHeight: 2.5
|
47
|
+
}
|
48
|
+
},
|
49
|
+
style: {}
|
50
|
+
},
|
51
|
+
w: 100,
|
52
|
+
h: 40,
|
53
|
+
sort: 1
|
54
|
+
});
|
55
|
+
exports.CommodityList = CommodityList;
|
@@ -0,0 +1,151 @@
|
|
1
|
+
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
child: {
|
7
|
+
type: string;
|
8
|
+
name: string[];
|
9
|
+
addonAfter: string;
|
10
|
+
}[];
|
11
|
+
addonAfter?: undefined;
|
12
|
+
name?: undefined;
|
13
|
+
min?: undefined;
|
14
|
+
initialValue?: undefined;
|
15
|
+
} | {
|
16
|
+
type: string;
|
17
|
+
label: string;
|
18
|
+
child: ({
|
19
|
+
type: string;
|
20
|
+
name: string[];
|
21
|
+
max: number;
|
22
|
+
addonAfter?: undefined;
|
23
|
+
} | {
|
24
|
+
type: string;
|
25
|
+
name: string[];
|
26
|
+
addonAfter: string;
|
27
|
+
max: number;
|
28
|
+
})[];
|
29
|
+
addonAfter?: undefined;
|
30
|
+
name?: undefined;
|
31
|
+
min?: undefined;
|
32
|
+
initialValue?: undefined;
|
33
|
+
} | {
|
34
|
+
type: string;
|
35
|
+
label: string;
|
36
|
+
addonAfter: string;
|
37
|
+
name: string[];
|
38
|
+
child?: undefined;
|
39
|
+
min?: undefined;
|
40
|
+
initialValue?: undefined;
|
41
|
+
} | {
|
42
|
+
label: string;
|
43
|
+
type: string;
|
44
|
+
name: string[];
|
45
|
+
min: number;
|
46
|
+
addonAfter: string;
|
47
|
+
initialValue: number;
|
48
|
+
child?: undefined;
|
49
|
+
})[];
|
50
|
+
} | {
|
51
|
+
title: string;
|
52
|
+
child: {
|
53
|
+
name: string[];
|
54
|
+
type: string;
|
55
|
+
child: ({
|
56
|
+
label: string;
|
57
|
+
type: string;
|
58
|
+
options: {
|
59
|
+
label: string;
|
60
|
+
value: string;
|
61
|
+
}[];
|
62
|
+
name: string[];
|
63
|
+
initialValue: string;
|
64
|
+
child?: undefined;
|
65
|
+
} | {
|
66
|
+
type: string;
|
67
|
+
label: string;
|
68
|
+
child: {
|
69
|
+
type: string;
|
70
|
+
name: string[];
|
71
|
+
bottomText: string;
|
72
|
+
}[];
|
73
|
+
options?: undefined;
|
74
|
+
name?: undefined;
|
75
|
+
initialValue?: undefined;
|
76
|
+
} | {
|
77
|
+
type: string;
|
78
|
+
label: string;
|
79
|
+
child: ({
|
80
|
+
type: string;
|
81
|
+
name: string[];
|
82
|
+
addonAfter?: undefined;
|
83
|
+
} | {
|
84
|
+
type: string;
|
85
|
+
addonAfter: string;
|
86
|
+
name: string[];
|
87
|
+
})[];
|
88
|
+
options?: undefined;
|
89
|
+
name?: undefined;
|
90
|
+
initialValue?: undefined;
|
91
|
+
} | {
|
92
|
+
label: string;
|
93
|
+
type: string;
|
94
|
+
options?: undefined;
|
95
|
+
name?: undefined;
|
96
|
+
initialValue?: undefined;
|
97
|
+
child?: undefined;
|
98
|
+
})[];
|
99
|
+
}[];
|
100
|
+
} | {
|
101
|
+
title: string;
|
102
|
+
child: ({
|
103
|
+
type: string;
|
104
|
+
label: string;
|
105
|
+
name: string[];
|
106
|
+
child?: undefined;
|
107
|
+
} | {
|
108
|
+
type: string;
|
109
|
+
label: string;
|
110
|
+
child: ({
|
111
|
+
type: string;
|
112
|
+
name: string[];
|
113
|
+
max: number;
|
114
|
+
addonAfter?: undefined;
|
115
|
+
} | {
|
116
|
+
type: string;
|
117
|
+
name: string[];
|
118
|
+
addonAfter: string;
|
119
|
+
max: number;
|
120
|
+
})[];
|
121
|
+
name?: undefined;
|
122
|
+
} | {
|
123
|
+
type: string;
|
124
|
+
name: string[];
|
125
|
+
label?: undefined;
|
126
|
+
child?: undefined;
|
127
|
+
} | {
|
128
|
+
type: string;
|
129
|
+
label: string;
|
130
|
+
child: {
|
131
|
+
type: string;
|
132
|
+
name: string[];
|
133
|
+
bottomText: string;
|
134
|
+
}[];
|
135
|
+
name?: undefined;
|
136
|
+
} | {
|
137
|
+
type: string;
|
138
|
+
label: string;
|
139
|
+
child: ({
|
140
|
+
type: string;
|
141
|
+
name: string[];
|
142
|
+
addonAfter?: undefined;
|
143
|
+
} | {
|
144
|
+
type: string;
|
145
|
+
addonAfter: string;
|
146
|
+
name: string[];
|
147
|
+
})[];
|
148
|
+
name?: undefined;
|
149
|
+
})[];
|
150
|
+
})[];
|
151
|
+
export default _default;
|
@@ -0,0 +1,209 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = [
|
4
|
+
{
|
5
|
+
title: '商品图片',
|
6
|
+
child: [
|
7
|
+
{
|
8
|
+
type: 'Group',
|
9
|
+
label: '尺寸',
|
10
|
+
child: [
|
11
|
+
{
|
12
|
+
type: 'Number',
|
13
|
+
name: ['props', 'commodityPicture', 'width'],
|
14
|
+
addonAfter: 'W'
|
15
|
+
},
|
16
|
+
{
|
17
|
+
type: 'Number',
|
18
|
+
name: ['props', 'commodityPicture', 'height'],
|
19
|
+
addonAfter: 'H'
|
20
|
+
}
|
21
|
+
]
|
22
|
+
},
|
23
|
+
{
|
24
|
+
type: 'Group',
|
25
|
+
label: '圆角',
|
26
|
+
child: [
|
27
|
+
{
|
28
|
+
type: 'Slider',
|
29
|
+
name: ['props', 'commodityPicture', 'borderRadius'],
|
30
|
+
max: 100
|
31
|
+
},
|
32
|
+
{
|
33
|
+
type: 'Number',
|
34
|
+
name: ['props', 'commodityPicture', 'borderRadius'],
|
35
|
+
addonAfter: 'px',
|
36
|
+
max: 100
|
37
|
+
}
|
38
|
+
]
|
39
|
+
},
|
40
|
+
{
|
41
|
+
type: 'Number',
|
42
|
+
label: '与右侧边距',
|
43
|
+
addonAfter: 'px',
|
44
|
+
name: ['props', 'commodityPicture', 'marginRight']
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: '居中垂直偏移',
|
48
|
+
type: 'Number',
|
49
|
+
name: ['props', 'translateY'],
|
50
|
+
min: -1000,
|
51
|
+
addonAfter: '%',
|
52
|
+
initialValue: 0
|
53
|
+
}
|
54
|
+
]
|
55
|
+
},
|
56
|
+
{
|
57
|
+
title: '商品文本',
|
58
|
+
child: [
|
59
|
+
{
|
60
|
+
name: ['props', 'commodityStyles'],
|
61
|
+
type: 'SelectLinkage',
|
62
|
+
child: [
|
63
|
+
{
|
64
|
+
label: '字段',
|
65
|
+
type: 'Select',
|
66
|
+
options: [
|
67
|
+
{
|
68
|
+
label: '商品名称',
|
69
|
+
value: 'title'
|
70
|
+
},
|
71
|
+
{
|
72
|
+
label: '系列名称',
|
73
|
+
value: 'collection'
|
74
|
+
},
|
75
|
+
{
|
76
|
+
label: '价格',
|
77
|
+
value: 'price'
|
78
|
+
}
|
79
|
+
],
|
80
|
+
name: ['props', 'commodityStyles', 'field'],
|
81
|
+
initialValue: 'title'
|
82
|
+
},
|
83
|
+
{
|
84
|
+
type: 'Group',
|
85
|
+
label: '标题字体',
|
86
|
+
child: [
|
87
|
+
{
|
88
|
+
type: 'Select',
|
89
|
+
name: ['fontFamily-cn'],
|
90
|
+
bottomText: '中文字体'
|
91
|
+
},
|
92
|
+
{
|
93
|
+
type: 'Select',
|
94
|
+
name: ['fontFamily-en'],
|
95
|
+
bottomText: '英文/其他字体'
|
96
|
+
}
|
97
|
+
]
|
98
|
+
},
|
99
|
+
{
|
100
|
+
type: 'Group',
|
101
|
+
label: '',
|
102
|
+
child: [
|
103
|
+
{
|
104
|
+
type: 'Color',
|
105
|
+
name: ['color']
|
106
|
+
},
|
107
|
+
{
|
108
|
+
type: 'Number',
|
109
|
+
addonAfter: 'px',
|
110
|
+
name: ['fontSize']
|
111
|
+
}
|
112
|
+
]
|
113
|
+
},
|
114
|
+
{
|
115
|
+
label: '标题样式',
|
116
|
+
type: 'TextStyle'
|
117
|
+
},
|
118
|
+
{
|
119
|
+
label: '标题对齐',
|
120
|
+
type: 'TextAlign'
|
121
|
+
}
|
122
|
+
]
|
123
|
+
}
|
124
|
+
]
|
125
|
+
},
|
126
|
+
{
|
127
|
+
title: '按钮样式',
|
128
|
+
child: [
|
129
|
+
{
|
130
|
+
type: 'Color',
|
131
|
+
label: '背景色',
|
132
|
+
name: ['props', 'buttonStyle', 'backgroundColor']
|
133
|
+
},
|
134
|
+
{
|
135
|
+
type: 'Group',
|
136
|
+
label: '尺寸',
|
137
|
+
child: [
|
138
|
+
{
|
139
|
+
type: 'Number',
|
140
|
+
name: ['props', 'buttonStyle', 'height'],
|
141
|
+
addonAfter: 'H'
|
142
|
+
}
|
143
|
+
]
|
144
|
+
},
|
145
|
+
{
|
146
|
+
type: 'Group',
|
147
|
+
label: '圆角',
|
148
|
+
child: [
|
149
|
+
{
|
150
|
+
type: 'Slider',
|
151
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
152
|
+
max: 100
|
153
|
+
},
|
154
|
+
{
|
155
|
+
type: 'Number',
|
156
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
157
|
+
addonAfter: 'px',
|
158
|
+
max: 100
|
159
|
+
}
|
160
|
+
]
|
161
|
+
},
|
162
|
+
{
|
163
|
+
type: 'TextSpace',
|
164
|
+
name: ['props', 'buttonStyle']
|
165
|
+
},
|
166
|
+
{
|
167
|
+
type: 'Group',
|
168
|
+
label: '字体',
|
169
|
+
child: [
|
170
|
+
{
|
171
|
+
type: 'Select',
|
172
|
+
name: ['props', 'buttonStyle', 'fontFamily-cn'],
|
173
|
+
bottomText: '中文字体'
|
174
|
+
},
|
175
|
+
{
|
176
|
+
type: 'Select',
|
177
|
+
name: ['props', 'buttonStyle', 'fontFamily-en'],
|
178
|
+
bottomText: '英文/其他字体'
|
179
|
+
}
|
180
|
+
]
|
181
|
+
},
|
182
|
+
{
|
183
|
+
type: 'Group',
|
184
|
+
label: '',
|
185
|
+
child: [
|
186
|
+
{
|
187
|
+
type: 'Color',
|
188
|
+
name: ['props', 'buttonStyle', 'color']
|
189
|
+
},
|
190
|
+
{
|
191
|
+
type: 'Number',
|
192
|
+
addonAfter: 'px',
|
193
|
+
name: ['props', 'buttonStyle', 'fontSize']
|
194
|
+
}
|
195
|
+
]
|
196
|
+
},
|
197
|
+
{
|
198
|
+
label: '样式',
|
199
|
+
type: 'TextStyle',
|
200
|
+
name: ['props', 'buttonStyle']
|
201
|
+
},
|
202
|
+
{
|
203
|
+
label: '对齐',
|
204
|
+
type: 'TextAlign',
|
205
|
+
name: ['props', 'buttonStyle']
|
206
|
+
}
|
207
|
+
]
|
208
|
+
}
|
209
|
+
];
|
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./AppointForm/material"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./CommodityDetail/material"), exports);
|
6
6
|
tslib_1.__exportStar(require("./Prompt/material"), exports);
|
7
7
|
tslib_1.__exportStar(require("./CommodityDetailDiroNew/material"), exports);
|
8
|
+
tslib_1.__exportStar(require("./CommodityList/material"), exports);
|
@@ -4,11 +4,11 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const css_1 = require("@emotion/css");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
|
7
|
+
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
7
8
|
const hooks_1 = require("../../../../core/hooks");
|
8
9
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
9
10
|
const Img_1 = tslib_1.__importDefault(require("../components/Img"));
|
10
11
|
const tool_1 = require("../../../../core/utils/tool");
|
11
|
-
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
12
12
|
const Link = (_a) => {
|
13
13
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
14
14
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
|
@@ -32,7 +32,7 @@ const Link = (_a) => {
|
|
32
32
|
overflow: 'hidden'
|
33
33
|
}) },
|
34
34
|
react_1.default.createElement("div", null,
|
35
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
|
35
|
+
react_1.default.createElement("div", { className: (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) ? index_module_less_1.default['one-line-ellipsis'] : index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
|
36
36
|
__html: (0, tool_1.setFontForText)((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
37
37
|
} }),
|
38
38
|
(customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (react_1.default.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: index_module_less_1.default['one-line-ellipsis'], dangerouslySetInnerHTML: {
|