pb-sxp-ui 1.0.2 → 1.0.3-alpha.2
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 +3624 -1460
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +143 -245
- package/dist/index.js +3625 -1461
- 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 +3624 -1460
- 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 +17 -10
- package/es/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -3
- 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/Navbar.d.ts +1 -0
- package/es/core/components/SxpPageRender/Navbar.js +3 -2
- 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/List.d.ts +2 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +24 -14
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -14
- package/es/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
- package/es/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
- package/es/core/components/SxpPageRender/index.d.ts +22 -1
- package/es/core/components/SxpPageRender/index.js +22 -19
- 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/EditorDataProvider.d.ts +3 -1
- package/es/core/context/EditorDataProvider.js +5 -2
- package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
- package/es/core/context/SxpDataSourceProvider.js +8 -4
- package/es/core/create.d.ts +1 -1
- package/es/materials/sxp/HashTag/index.d.ts +14 -0
- package/es/materials/sxp/HashTag/index.js +6 -0
- package/es/materials/sxp/HashTag/material.d.ts +2 -0
- package/es/materials/sxp/HashTag/material.js +52 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +122 -0
- package/es/materials/sxp/HashTag/settingRender.js +153 -0
- package/es/materials/sxp/index.d.ts +1 -0
- package/es/materials/sxp/index.js +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
- package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
- 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 +46 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
- package/es/materials/sxp/popup/index.d.ts +0 -1
- package/es/materials/sxp/popup/index.js +0 -1
- 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 +123 -0
- package/es/materials/sxp/template/components/settingRender.js +215 -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 +17 -10
- package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -3
- 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/Navbar.d.ts +1 -0
- package/lib/core/components/SxpPageRender/Navbar.js +3 -2
- 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/List.d.ts +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +23 -14
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +15 -13
- package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
- package/lib/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
- package/lib/core/components/SxpPageRender/index.d.ts +22 -1
- package/lib/core/components/SxpPageRender/index.js +22 -19
- 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/EditorDataProvider.d.ts +3 -1
- package/lib/core/context/EditorDataProvider.js +4 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +8 -4
- package/lib/core/create.d.ts +1 -1
- package/lib/materials/sxp/HashTag/index.d.ts +14 -0
- package/lib/materials/sxp/HashTag/index.js +9 -0
- package/lib/materials/sxp/HashTag/material.d.ts +2 -0
- package/lib/materials/sxp/HashTag/material.js +56 -0
- package/lib/materials/sxp/HashTag/settingRender.d.ts +122 -0
- package/lib/materials/sxp/HashTag/settingRender.js +155 -0
- package/lib/materials/sxp/index.d.ts +1 -0
- package/lib/materials/sxp/index.js +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
- package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
- 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 +46 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
- package/lib/materials/sxp/popup/index.d.ts +0 -1
- package/lib/materials/sxp/popup/index.js +0 -1
- 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 +123 -0
- package/lib/materials/sxp/template/components/settingRender.js +217 -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 +1 -1
@@ -0,0 +1,155 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = [
|
4
|
+
{
|
5
|
+
title: '卡片样式',
|
6
|
+
child: [
|
7
|
+
{
|
8
|
+
type: 'Number',
|
9
|
+
label: '文本行数',
|
10
|
+
name: ['props', 'lineClamp']
|
11
|
+
},
|
12
|
+
{
|
13
|
+
type: 'Number',
|
14
|
+
label: '上下边距',
|
15
|
+
name: ['props', 'space'],
|
16
|
+
addonAfter: 'px'
|
17
|
+
}
|
18
|
+
]
|
19
|
+
},
|
20
|
+
{
|
21
|
+
title: '文本设置',
|
22
|
+
child: [
|
23
|
+
{
|
24
|
+
name: ['props', 'textStyles'],
|
25
|
+
type: 'SelectLinkage',
|
26
|
+
child: [
|
27
|
+
{
|
28
|
+
label: '字段',
|
29
|
+
type: 'Select',
|
30
|
+
options: [
|
31
|
+
{
|
32
|
+
label: 'hashtag标题',
|
33
|
+
value: 'hashTagTitle'
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: 'hashtag描述',
|
37
|
+
value: 'hashTagDesc'
|
38
|
+
},
|
39
|
+
{
|
40
|
+
label: '标题',
|
41
|
+
value: 'title'
|
42
|
+
},
|
43
|
+
{
|
44
|
+
label: '价格',
|
45
|
+
value: 'price'
|
46
|
+
}
|
47
|
+
],
|
48
|
+
name: ['props', 'textStyles', 'field'],
|
49
|
+
initialValue: 'title'
|
50
|
+
},
|
51
|
+
{
|
52
|
+
type: 'Group',
|
53
|
+
label: '标题字体',
|
54
|
+
child: [
|
55
|
+
{
|
56
|
+
type: 'Color',
|
57
|
+
name: ['color']
|
58
|
+
},
|
59
|
+
{
|
60
|
+
type: 'Select',
|
61
|
+
options: [{ label: '黑体', value: '黑体' }],
|
62
|
+
name: ['fontFamily']
|
63
|
+
},
|
64
|
+
{
|
65
|
+
type: 'Number',
|
66
|
+
addonAfter: 'px',
|
67
|
+
name: ['fontSize']
|
68
|
+
}
|
69
|
+
]
|
70
|
+
},
|
71
|
+
{
|
72
|
+
label: '标题样式',
|
73
|
+
type: 'TextStyle'
|
74
|
+
},
|
75
|
+
{
|
76
|
+
label: '标题对齐',
|
77
|
+
type: 'TextAlign'
|
78
|
+
}
|
79
|
+
]
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
title: '按钮样式',
|
85
|
+
child: [
|
86
|
+
{
|
87
|
+
type: 'Color',
|
88
|
+
label: '背景色',
|
89
|
+
name: ['props', 'buttonStyle', 'backgroundColor'],
|
90
|
+
initialValue: '#000'
|
91
|
+
},
|
92
|
+
{
|
93
|
+
type: 'Group',
|
94
|
+
label: '尺寸',
|
95
|
+
child: [
|
96
|
+
{
|
97
|
+
type: 'Number',
|
98
|
+
name: ['props', 'buttonStyle', 'height'],
|
99
|
+
addonAfter: 'H'
|
100
|
+
}
|
101
|
+
]
|
102
|
+
},
|
103
|
+
{
|
104
|
+
type: 'Group',
|
105
|
+
label: '圆角',
|
106
|
+
child: [
|
107
|
+
{
|
108
|
+
type: 'Slider',
|
109
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
110
|
+
max: 100
|
111
|
+
},
|
112
|
+
{
|
113
|
+
type: 'Number',
|
114
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
115
|
+
addonAfter: 'px',
|
116
|
+
max: 100
|
117
|
+
}
|
118
|
+
]
|
119
|
+
},
|
120
|
+
{
|
121
|
+
type: 'TextMargin',
|
122
|
+
name: ['props', 'buttonStyle']
|
123
|
+
},
|
124
|
+
{
|
125
|
+
type: 'Group',
|
126
|
+
label: '字体',
|
127
|
+
child: [
|
128
|
+
{
|
129
|
+
type: 'Color',
|
130
|
+
name: ['props', 'buttonStyle', 'color'],
|
131
|
+
initialValue: '#fff'
|
132
|
+
},
|
133
|
+
{
|
134
|
+
type: 'Select',
|
135
|
+
name: ['props', 'buttonStyle', 'fontFamily'],
|
136
|
+
options: [{ label: '黑体', value: '黑体' }]
|
137
|
+
},
|
138
|
+
{
|
139
|
+
type: 'Number',
|
140
|
+
name: ['props', 'buttonStyle', 'fontSize'],
|
141
|
+
addonAfter: 'px'
|
142
|
+
}
|
143
|
+
]
|
144
|
+
},
|
145
|
+
{
|
146
|
+
type: 'TextStyle',
|
147
|
+
name: ['props', 'buttonStyle']
|
148
|
+
},
|
149
|
+
{
|
150
|
+
type: 'TextAlign',
|
151
|
+
name: ['props', 'buttonStyle']
|
152
|
+
}
|
153
|
+
]
|
154
|
+
}
|
155
|
+
];
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { IEditorContext } from '../../../../core/context/EditorContext';
|
3
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
4
|
import './index.less';
|
4
5
|
export interface ICommodityDetailProps {
|
5
6
|
content?: string;
|
@@ -9,6 +10,24 @@ export interface ICommodityDetailProps {
|
|
9
10
|
schema?: IEditorContext['schema'];
|
10
11
|
isDefault?: boolean;
|
11
12
|
bottom_image?: string;
|
13
|
+
tipText?: {
|
14
|
+
foldText?: string;
|
15
|
+
unfoldText?: string;
|
16
|
+
};
|
17
|
+
isPost?: boolean;
|
18
|
+
viewTime?: any;
|
19
|
+
rec?: RecItemType;
|
20
|
+
swiper: {
|
21
|
+
dotsAlign: 'left' | 'center';
|
22
|
+
delay: number;
|
23
|
+
};
|
24
|
+
commodityStyles?: {
|
25
|
+
title: CSSProperties;
|
26
|
+
collection: CSSProperties;
|
27
|
+
price: CSSProperties;
|
28
|
+
info: CSSProperties;
|
29
|
+
};
|
30
|
+
buttonStyle?: CSSProperties;
|
12
31
|
}
|
13
32
|
declare const _default: React.NamedExoticComponent<ICommodityDetailProps>;
|
14
33
|
export default _default;
|
@@ -8,19 +8,25 @@ require("./index.less");
|
|
8
8
|
const modules_1 = require("swiper/modules");
|
9
9
|
const react_2 = require("swiper/react");
|
10
10
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
11
|
+
const Modal_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/Modal"));
|
12
|
+
const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/ExpandableText"));
|
11
13
|
const CommodityDetail = (_a) => {
|
12
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
13
|
-
var { content, style, bgImg, onClick, schema, isDefault, bottom_image } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image"]);
|
14
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
15
|
+
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle"]);
|
14
16
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
15
17
|
const { popupDetailData, bffEventReport, isPreview, waterFallData } = (0, hooks_1.useSxpDataSource)();
|
16
18
|
const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
|
17
19
|
const curTimeRef = (0, react_1.useRef)(null);
|
18
|
-
const
|
19
|
-
const
|
20
|
+
const [showModal, setShowModal] = (0, react_1.useState)(false);
|
21
|
+
const data = isPost ? rec : popupDetailData;
|
22
|
+
const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
23
|
+
const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
|
20
24
|
const handleLink = () => {
|
21
25
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
22
26
|
jumpToWeb(popupDetailData, product, cta);
|
23
|
-
|
27
|
+
if (!isPost) {
|
28
|
+
productView(data, product, cta, viewTime || curTimeRef.current);
|
29
|
+
}
|
24
30
|
window.location.href = window.getJointUtmLink(product.link);
|
25
31
|
}
|
26
32
|
};
|
@@ -46,11 +52,33 @@ const CommodityDetail = (_a) => {
|
|
46
52
|
}
|
47
53
|
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
48
54
|
const width = isPreview ? 375 : window.innerWidth;
|
55
|
+
const renderContent = ({ isPost }) => {
|
56
|
+
var _a, _b, _c;
|
57
|
+
return (react_1.default.createElement("div", { className: 'pb-commondity-content' },
|
58
|
+
react_1.default.createElement("div", { className: 'pb-commondity-content-collection', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
|
59
|
+
react_1.default.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
60
|
+
react_1.default.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
61
|
+
react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
62
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
63
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
64
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
65
|
+
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info })));
|
66
|
+
};
|
67
|
+
const renderBtn = () => {
|
68
|
+
var _a;
|
69
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
|
70
|
+
};
|
49
71
|
return (react_1.default.createElement("div", { className: 'pb-commondity' },
|
50
72
|
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
51
|
-
product && ((
|
52
|
-
|
53
|
-
|
73
|
+
product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
74
|
+
clickable: true,
|
75
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
76
|
+
clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
|
77
|
+
? 'commondityDetail-swiper-clickable-left'
|
78
|
+
: 'commondityDetail-swiper-clickable-center'
|
79
|
+
}, loop: true, autoplay: {
|
80
|
+
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
81
|
+
} }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
|
54
82
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
55
83
|
react_1.default.createElement("div", { style: {
|
56
84
|
overflow: 'hidden',
|
@@ -59,7 +87,7 @@ const CommodityDetail = (_a) => {
|
|
59
87
|
} },
|
60
88
|
react_1.default.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
|
61
89
|
}))),
|
62
|
-
!((
|
90
|
+
!((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
63
91
|
position: 'relative',
|
64
92
|
height: 0,
|
65
93
|
width: '100%',
|
@@ -72,16 +100,11 @@ const CommodityDetail = (_a) => {
|
|
72
100
|
top: 0,
|
73
101
|
objectFit: 'cover',
|
74
102
|
width: '100%'
|
75
|
-
}), src: (
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
82
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
83
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
84
|
-
18-karat gold, this necklace is embellished with hand-set diamonds.`))),
|
85
|
-
(isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn' }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Purchase on Website'))));
|
103
|
+
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
104
|
+
renderContent({ isPost })),
|
105
|
+
renderBtn(),
|
106
|
+
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
|
107
|
+
renderContent({ isPost: false }),
|
108
|
+
renderBtn())));
|
86
109
|
};
|
87
110
|
exports.default = (0, react_1.memo)(CommodityDetail);
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.CommodityDetail = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
+
const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
|
5
6
|
const _1 = tslib_1.__importDefault(require("."));
|
6
7
|
const create_1 = require("../../../../core/create");
|
7
8
|
const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
|
@@ -9,8 +10,42 @@ const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
|
|
9
10
|
icon: '',
|
10
11
|
category: 'popup',
|
11
12
|
type: 'CommodityDetail',
|
13
|
+
related: {
|
14
|
+
settingRender: settingRender_1.default
|
15
|
+
},
|
12
16
|
defaulSetting: {
|
13
|
-
props: {
|
17
|
+
props: {
|
18
|
+
swiper: {
|
19
|
+
dotsAlign: 'center',
|
20
|
+
delay: 3
|
21
|
+
},
|
22
|
+
commodityStyles: {
|
23
|
+
price: {
|
24
|
+
color: '#000',
|
25
|
+
fontSize: 18
|
26
|
+
},
|
27
|
+
title: {
|
28
|
+
color: '#000',
|
29
|
+
fontSize: 23
|
30
|
+
},
|
31
|
+
collection: {
|
32
|
+
fontSize: 12,
|
33
|
+
color: '#000'
|
34
|
+
},
|
35
|
+
info: {
|
36
|
+
color: 'gray',
|
37
|
+
fontSize: 12
|
38
|
+
}
|
39
|
+
},
|
40
|
+
buttonStyle: {
|
41
|
+
backgroundColor: '#000',
|
42
|
+
fontSize: 12,
|
43
|
+
height: 45,
|
44
|
+
fontWeight: 'bold',
|
45
|
+
textAlign: 'center',
|
46
|
+
color: 'rgba(255, 255, 255, 0.9)'
|
47
|
+
}
|
48
|
+
},
|
14
49
|
style: {}
|
15
50
|
},
|
16
51
|
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
|
+
name: string[];
|
102
|
+
label?: undefined;
|
103
|
+
initialValue?: undefined;
|
104
|
+
child?: undefined;
|
105
|
+
} | {
|
106
|
+
type: string;
|
107
|
+
label: string;
|
108
|
+
child: ({
|
109
|
+
type: string;
|
110
|
+
name: string[];
|
111
|
+
initialValue: string;
|
112
|
+
options?: undefined;
|
113
|
+
addonAfter?: undefined;
|
114
|
+
} | {
|
115
|
+
type: string;
|
116
|
+
name: string[];
|
117
|
+
options: {
|
118
|
+
label: string;
|
119
|
+
value: string;
|
120
|
+
}[];
|
121
|
+
initialValue?: undefined;
|
122
|
+
addonAfter?: undefined;
|
123
|
+
} | {
|
124
|
+
type: string;
|
125
|
+
name: string[];
|
126
|
+
addonAfter: string;
|
127
|
+
initialValue?: undefined;
|
128
|
+
options?: undefined;
|
129
|
+
})[];
|
130
|
+
name?: undefined;
|
131
|
+
initialValue?: undefined;
|
132
|
+
})[];
|
133
|
+
})[];
|
134
|
+
export default _default;
|
@@ -0,0 +1,169 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = [
|
4
|
+
{
|
5
|
+
title: '商品图片',
|
6
|
+
child: [
|
7
|
+
{
|
8
|
+
type: 'Radius',
|
9
|
+
label: '轮播指示器',
|
10
|
+
options: [
|
11
|
+
{
|
12
|
+
label: '居左',
|
13
|
+
value: 'left'
|
14
|
+
},
|
15
|
+
{
|
16
|
+
label: '居中',
|
17
|
+
value: 'center'
|
18
|
+
}
|
19
|
+
],
|
20
|
+
name: ['props', 'swiper', 'dotsAlign']
|
21
|
+
},
|
22
|
+
{
|
23
|
+
type: 'Number',
|
24
|
+
name: ['props', 'swiper', 'delay'],
|
25
|
+
addonAfter: 's'
|
26
|
+
}
|
27
|
+
]
|
28
|
+
},
|
29
|
+
{
|
30
|
+
title: '商品文本',
|
31
|
+
child: [
|
32
|
+
{
|
33
|
+
name: ['props', 'commodityStyles'],
|
34
|
+
type: 'SelectLinkage',
|
35
|
+
child: [
|
36
|
+
{
|
37
|
+
label: '字段',
|
38
|
+
type: 'Select',
|
39
|
+
options: [
|
40
|
+
{
|
41
|
+
label: '商品名称',
|
42
|
+
value: 'title'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
label: '系列名称',
|
46
|
+
value: 'collection'
|
47
|
+
},
|
48
|
+
{
|
49
|
+
label: '价格',
|
50
|
+
value: 'price'
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: '商品描述',
|
54
|
+
value: 'info'
|
55
|
+
}
|
56
|
+
],
|
57
|
+
name: ['props', 'commodityStyles', 'field'],
|
58
|
+
initialValue: 'title'
|
59
|
+
},
|
60
|
+
{
|
61
|
+
type: 'Group',
|
62
|
+
label: '标题字体',
|
63
|
+
child: [
|
64
|
+
{
|
65
|
+
type: 'Color',
|
66
|
+
name: ['color']
|
67
|
+
},
|
68
|
+
{
|
69
|
+
type: 'Select',
|
70
|
+
options: [{ label: '黑体', value: '黑体' }],
|
71
|
+
name: ['fontFamily']
|
72
|
+
},
|
73
|
+
{
|
74
|
+
type: 'Number',
|
75
|
+
addonAfter: 'px',
|
76
|
+
name: ['fontSize']
|
77
|
+
}
|
78
|
+
]
|
79
|
+
},
|
80
|
+
{
|
81
|
+
label: '标题样式',
|
82
|
+
type: 'TextStyle'
|
83
|
+
},
|
84
|
+
{
|
85
|
+
label: '标题对齐',
|
86
|
+
type: 'TextAlign'
|
87
|
+
},
|
88
|
+
{
|
89
|
+
label: '默认行数',
|
90
|
+
type: 'Number',
|
91
|
+
name: ['lineClamp']
|
92
|
+
}
|
93
|
+
]
|
94
|
+
}
|
95
|
+
]
|
96
|
+
},
|
97
|
+
{
|
98
|
+
title: '购买按钮样式',
|
99
|
+
child: [
|
100
|
+
{
|
101
|
+
type: 'Color',
|
102
|
+
label: '背景色',
|
103
|
+
name: ['props', 'buttonStyle', 'backgroundColor'],
|
104
|
+
initialValue: '#000'
|
105
|
+
},
|
106
|
+
{
|
107
|
+
type: 'Group',
|
108
|
+
label: '尺寸',
|
109
|
+
child: [
|
110
|
+
{
|
111
|
+
type: 'Number',
|
112
|
+
name: ['props', 'buttonStyle', 'height'],
|
113
|
+
addonAfter: 'H'
|
114
|
+
}
|
115
|
+
]
|
116
|
+
},
|
117
|
+
{
|
118
|
+
type: 'Group',
|
119
|
+
label: '圆角',
|
120
|
+
child: [
|
121
|
+
{
|
122
|
+
type: 'Slider',
|
123
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
124
|
+
max: 100
|
125
|
+
},
|
126
|
+
{
|
127
|
+
type: 'Number',
|
128
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
129
|
+
addonAfter: 'px',
|
130
|
+
max: 100
|
131
|
+
}
|
132
|
+
]
|
133
|
+
},
|
134
|
+
{
|
135
|
+
type: 'TextMargin',
|
136
|
+
name: ['props', 'buttonStyle']
|
137
|
+
},
|
138
|
+
{
|
139
|
+
type: 'Group',
|
140
|
+
label: '字体',
|
141
|
+
child: [
|
142
|
+
{
|
143
|
+
type: 'Color',
|
144
|
+
name: ['props', 'buttonStyle', 'color'],
|
145
|
+
initialValue: '#fff'
|
146
|
+
},
|
147
|
+
{
|
148
|
+
type: 'Select',
|
149
|
+
name: ['props', 'buttonStyle', 'fontFamily'],
|
150
|
+
options: [{ label: '黑体', value: '黑体' }]
|
151
|
+
},
|
152
|
+
{
|
153
|
+
type: 'Number',
|
154
|
+
name: ['props', 'buttonStyle', 'fontSize'],
|
155
|
+
addonAfter: 'px'
|
156
|
+
}
|
157
|
+
]
|
158
|
+
},
|
159
|
+
{
|
160
|
+
type: 'TextStyle',
|
161
|
+
name: ['props', 'buttonStyle']
|
162
|
+
},
|
163
|
+
{
|
164
|
+
type: 'TextAlign',
|
165
|
+
name: ['props', 'buttonStyle']
|
166
|
+
}
|
167
|
+
]
|
168
|
+
}
|
169
|
+
];
|