pb-sxp-ui 1.0.3-alpha.1 → 1.0.3-alpha.3
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 +2403 -825
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +114 -112
- package/dist/index.js +2404 -826
- 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 +2403 -825
- 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/components/SxpPageRender/Hashtag/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +2 -2
- package/es/core/components/SxpPageRender/Navbar.d.ts +1 -0
- package/es/core/components/SxpPageRender/Navbar.js +3 -2
- package/es/core/components/SxpPageRender/PictureGroup/Picture.js +31 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.js +21 -30
- 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 +13 -11
- 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 +2 -0
- package/es/core/components/SxpPageRender/index.js +5 -5
- 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 +7 -3
- 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/CommodityDetailDiroNew/index.js +4 -3
- package/es/materials/sxp/template/components/settingRender.d.ts +15 -0
- package/es/materials/sxp/template/components/settingRender.js +17 -0
- package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +2 -2
- package/lib/core/components/SxpPageRender/Navbar.d.ts +1 -0
- package/lib/core/components/SxpPageRender/Navbar.js +3 -2
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +30 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +21 -30
- 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 +12 -11
- 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 +2 -0
- package/lib/core/components/SxpPageRender/index.js +5 -5
- 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 +7 -3
- 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/CommodityDetailDiroNew/index.js +4 -3
- package/lib/materials/sxp/template/components/settingRender.d.ts +15 -0
- package/lib/materials/sxp/template/components/settingRender.js +17 -0
- package/package.json +1 -1
@@ -17,6 +17,7 @@ interface ISxpPageRenderProps {
|
|
17
17
|
likeIconY?: number;
|
18
18
|
isShowLike?: boolean;
|
19
19
|
swipeTipIcon?: string;
|
20
|
+
hashTag?: any[];
|
20
21
|
};
|
21
22
|
descStyle?: CSSProperties;
|
22
23
|
tipText?: {
|
@@ -49,6 +50,7 @@ interface ISxpPageRenderProps {
|
|
49
50
|
resolver: any;
|
50
51
|
ctaType?: string;
|
51
52
|
_schema?: any;
|
53
|
+
hashTagStyle?: CSSProperties;
|
52
54
|
}
|
53
55
|
declare const SxpPageRender: FC<ISxpPageRenderProps>;
|
54
56
|
export default SxpPageRender;
|
@@ -20,8 +20,8 @@ import { refreshFeSessionId } from '../../../core/utils/sessionStore';
|
|
20
20
|
import './index.less';
|
21
21
|
import { useEventReport } from '../../../core/hooks/useEventReport';
|
22
22
|
import withBindDataSource from '../../../core/hoc/withBindDataSource';
|
23
|
-
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema }) => {
|
24
|
-
var _a, _b, _c, _d;
|
23
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle }) => {
|
24
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
25
25
|
const { schema } = useEditor();
|
26
26
|
const [activeIndex, setActiveIndex] = useState(0);
|
27
27
|
const viewImageStartTime = useRef(0);
|
@@ -176,10 +176,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
176
176
|
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
|
177
177
|
React.createElement("div", { className: 'clc-sxp-bottom-text' },
|
178
178
|
React.createElement(ExpandableText, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
|
179
|
-
React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec }))));
|
179
|
+
React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
|
180
180
|
}
|
181
181
|
return null;
|
182
|
-
}, [descStyle, activeIndex, tempMap, resolver, tipText, nudge]);
|
182
|
+
}, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
|
183
183
|
const renderLikeButton = useCallback((rec) => {
|
184
184
|
var _a, _b;
|
185
185
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
@@ -343,6 +343,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
343
343
|
zIndex: 999
|
344
344
|
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
|
345
345
|
renderView),
|
346
|
-
React.createElement(WaterFall, null)));
|
346
|
+
React.createElement(WaterFall, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))));
|
347
347
|
};
|
348
348
|
export default SxpPageRender;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
2
2
|
interface IEditorDataContext {
|
3
3
|
sxpPrameter?: {
|
4
4
|
bottomImage: string;
|
@@ -9,6 +9,8 @@ interface IEditorDataContext {
|
|
9
9
|
loadingImage: string;
|
10
10
|
};
|
11
11
|
appDomain?: string;
|
12
|
+
openHashtag?: boolean;
|
13
|
+
setOpenHashtag?: React.Dispatch<React.SetStateAction<boolean>>;
|
12
14
|
}
|
13
15
|
interface IEditorProviderProps {
|
14
16
|
data?: any;
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import React, { createContext, useContext } from 'react';
|
1
|
+
import React, { createContext, useContext, useState } from 'react';
|
2
2
|
const EditorDataContext = createContext({});
|
3
3
|
const EditorDataProvider = ({ children, data }) => {
|
4
4
|
var _a, _b, _c, _d, _e, _f;
|
5
|
+
const [openHashtag, setOpenHashtag] = useState(false);
|
5
6
|
return (React.createElement(EditorDataContext.Provider, { value: {
|
6
7
|
sxpPrameter: {
|
7
8
|
bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
|
@@ -11,7 +12,9 @@ const EditorDataProvider = ({ children, data }) => {
|
|
11
12
|
hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
|
12
13
|
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
|
13
14
|
},
|
14
|
-
appDomain: data === null || data === void 0 ? void 0 : data.appDomain
|
15
|
+
appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
|
16
|
+
openHashtag,
|
17
|
+
setOpenHashtag
|
15
18
|
} }, children));
|
16
19
|
};
|
17
20
|
export function useEditorDataProvider() {
|
@@ -57,6 +57,7 @@ export interface ISxpDataSourceContext {
|
|
57
57
|
appDomain?: string;
|
58
58
|
hashTagSize?: number;
|
59
59
|
loadingImage?: string;
|
60
|
+
isOpenHashTag?: boolean;
|
60
61
|
}
|
61
62
|
export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
|
62
63
|
export interface SxpDataSourceProviderProps {
|
@@ -85,6 +86,7 @@ export interface SxpDataSourceProviderProps {
|
|
85
86
|
sxpParameter?: PageData['sxp_parameter'];
|
86
87
|
appDomain?: string;
|
87
88
|
loadingImage?: string;
|
89
|
+
isOpenHashTag?: boolean;
|
88
90
|
}
|
89
91
|
declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
|
90
92
|
export default _default;
|
@@ -12,7 +12,7 @@ var DataSourceType;
|
|
12
12
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
13
13
|
})(DataSourceType || (DataSourceType = {}));
|
14
14
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
15
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage }) => {
|
15
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
|
16
16
|
const [rtcList, setRtcList] = useState([]);
|
17
17
|
const [loading, setLoading] = useState(false);
|
18
18
|
const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
|
@@ -20,10 +20,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
20
20
|
const isInit = useRef(false);
|
21
21
|
const [popupDetailData, setPopupDetailData] = useState();
|
22
22
|
const [waterFallData, setWaterFallData] = useState();
|
23
|
-
const [openHashtag, setOpenHashtag] = useState(
|
23
|
+
const [openHashtag, setOpenHashtag] = useState(isOpenHashTag);
|
24
24
|
const [cacheRtcList, setCacheRtcList] = useState([]);
|
25
25
|
const [cacheActiveIndex, setCacheActiveIndex] = useState(0);
|
26
26
|
const [isFromHashtag, setIsFromHashtag] = useState(false);
|
27
|
+
useEffect(() => {
|
28
|
+
setOpenHashtag(isOpenHashTag);
|
29
|
+
}, [isOpenHashTag]);
|
27
30
|
const bffDataSource = useMemo(() => {
|
28
31
|
return dataSources === null || dataSources === void 0 ? void 0 : dataSources.find((d) => d.type === DataSourceType.BFF);
|
29
32
|
}, [dataSources]);
|
@@ -198,7 +201,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
198
201
|
setIsFromHashtag,
|
199
202
|
appDomain,
|
200
203
|
hashTagSize,
|
201
|
-
loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage
|
204
|
+
loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage,
|
205
|
+
isOpenHashTag
|
202
206
|
} }, render({ rtcList, mutateLike: bffMutateLike, mutateUnlike: bffMutateUnlike, submitForm: bffSubmitForm })));
|
203
207
|
};
|
204
208
|
export default memo(SxpDataSourceProvider);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
|
+
export interface IHashTagProps {
|
3
|
+
lineClamp: number;
|
4
|
+
space: number;
|
5
|
+
buttonStyle: CSSProperties;
|
6
|
+
textStyles: {
|
7
|
+
hashTagTitle: CSSProperties;
|
8
|
+
hashTagDesc: CSSProperties;
|
9
|
+
title: CSSProperties;
|
10
|
+
price: CSSProperties;
|
11
|
+
};
|
12
|
+
}
|
13
|
+
declare const _default: React.NamedExoticComponent<IHashTagProps>;
|
14
|
+
export default _default;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import settingRender from './settingRender';
|
2
|
+
import HashTagComponent from '.';
|
3
|
+
import { createMaterial } from '../../../core/create';
|
4
|
+
const HashTag = createMaterial(HashTagComponent, {
|
5
|
+
displayName: '',
|
6
|
+
icon: '',
|
7
|
+
category: 'base',
|
8
|
+
type: 'HashTag',
|
9
|
+
related: {
|
10
|
+
settingRender,
|
11
|
+
bindableProps: []
|
12
|
+
},
|
13
|
+
defaulSetting: {
|
14
|
+
props: {
|
15
|
+
lineClamp: 1,
|
16
|
+
space: 40,
|
17
|
+
textStyles: {
|
18
|
+
hashTagTitle: {
|
19
|
+
fontSize: 16,
|
20
|
+
color: '#000'
|
21
|
+
},
|
22
|
+
hashTagDesc: {
|
23
|
+
fontSize: 12,
|
24
|
+
textAlign: 'center',
|
25
|
+
color: '#000'
|
26
|
+
},
|
27
|
+
title: {
|
28
|
+
fontSize: 12,
|
29
|
+
color: '#000'
|
30
|
+
},
|
31
|
+
price: {
|
32
|
+
fontSize: 12,
|
33
|
+
fontWeight: 'bold',
|
34
|
+
color: '#000'
|
35
|
+
}
|
36
|
+
},
|
37
|
+
buttonStyle: {
|
38
|
+
backgroundColor: '#000',
|
39
|
+
fontSize: 12,
|
40
|
+
height: 52,
|
41
|
+
fontWeight: 'bold',
|
42
|
+
textAlign: 'center',
|
43
|
+
color: '#fff',
|
44
|
+
borderRadius: 25
|
45
|
+
}
|
46
|
+
}
|
47
|
+
},
|
48
|
+
w: 100,
|
49
|
+
h: 40,
|
50
|
+
sort: 2
|
51
|
+
});
|
52
|
+
export { HashTag };
|
@@ -0,0 +1,122 @@
|
|
1
|
+
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
name: string[];
|
7
|
+
addonAfter?: undefined;
|
8
|
+
} | {
|
9
|
+
type: string;
|
10
|
+
label: string;
|
11
|
+
name: string[];
|
12
|
+
addonAfter: string;
|
13
|
+
})[];
|
14
|
+
} | {
|
15
|
+
title: string;
|
16
|
+
child: {
|
17
|
+
name: string[];
|
18
|
+
type: string;
|
19
|
+
child: ({
|
20
|
+
label: string;
|
21
|
+
type: string;
|
22
|
+
options: {
|
23
|
+
label: string;
|
24
|
+
value: string;
|
25
|
+
}[];
|
26
|
+
name: string[];
|
27
|
+
initialValue: string;
|
28
|
+
child?: undefined;
|
29
|
+
} | {
|
30
|
+
type: string;
|
31
|
+
label: string;
|
32
|
+
child: ({
|
33
|
+
type: string;
|
34
|
+
name: string[];
|
35
|
+
options?: undefined;
|
36
|
+
addonAfter?: undefined;
|
37
|
+
} | {
|
38
|
+
type: string;
|
39
|
+
options: {
|
40
|
+
label: string;
|
41
|
+
value: string;
|
42
|
+
}[];
|
43
|
+
name: string[];
|
44
|
+
addonAfter?: undefined;
|
45
|
+
} | {
|
46
|
+
type: string;
|
47
|
+
addonAfter: string;
|
48
|
+
name: string[];
|
49
|
+
options?: undefined;
|
50
|
+
})[];
|
51
|
+
options?: undefined;
|
52
|
+
name?: undefined;
|
53
|
+
initialValue?: undefined;
|
54
|
+
} | {
|
55
|
+
label: string;
|
56
|
+
type: string;
|
57
|
+
options?: undefined;
|
58
|
+
name?: undefined;
|
59
|
+
initialValue?: undefined;
|
60
|
+
child?: undefined;
|
61
|
+
})[];
|
62
|
+
}[];
|
63
|
+
} | {
|
64
|
+
title: string;
|
65
|
+
child: ({
|
66
|
+
type: string;
|
67
|
+
label: string;
|
68
|
+
name: string[];
|
69
|
+
initialValue: string;
|
70
|
+
child?: undefined;
|
71
|
+
} | {
|
72
|
+
type: string;
|
73
|
+
label: string;
|
74
|
+
child: ({
|
75
|
+
type: string;
|
76
|
+
name: string[];
|
77
|
+
max: number;
|
78
|
+
addonAfter?: undefined;
|
79
|
+
} | {
|
80
|
+
type: string;
|
81
|
+
name: string[];
|
82
|
+
addonAfter: string;
|
83
|
+
max: number;
|
84
|
+
})[];
|
85
|
+
name?: undefined;
|
86
|
+
initialValue?: undefined;
|
87
|
+
} | {
|
88
|
+
type: string;
|
89
|
+
name: string[];
|
90
|
+
label?: undefined;
|
91
|
+
initialValue?: undefined;
|
92
|
+
child?: undefined;
|
93
|
+
} | {
|
94
|
+
type: string;
|
95
|
+
label: string;
|
96
|
+
child: ({
|
97
|
+
type: string;
|
98
|
+
name: string[];
|
99
|
+
initialValue: string;
|
100
|
+
options?: undefined;
|
101
|
+
addonAfter?: undefined;
|
102
|
+
} | {
|
103
|
+
type: string;
|
104
|
+
name: string[];
|
105
|
+
options: {
|
106
|
+
label: string;
|
107
|
+
value: string;
|
108
|
+
}[];
|
109
|
+
initialValue?: undefined;
|
110
|
+
addonAfter?: undefined;
|
111
|
+
} | {
|
112
|
+
type: string;
|
113
|
+
name: string[];
|
114
|
+
addonAfter: string;
|
115
|
+
initialValue?: undefined;
|
116
|
+
options?: undefined;
|
117
|
+
})[];
|
118
|
+
name?: undefined;
|
119
|
+
initialValue?: undefined;
|
120
|
+
})[];
|
121
|
+
})[];
|
122
|
+
export default _default;
|
@@ -0,0 +1,153 @@
|
|
1
|
+
export default [
|
2
|
+
{
|
3
|
+
title: '卡片样式',
|
4
|
+
child: [
|
5
|
+
{
|
6
|
+
type: 'Number',
|
7
|
+
label: '文本行数',
|
8
|
+
name: ['props', 'lineClamp']
|
9
|
+
},
|
10
|
+
{
|
11
|
+
type: 'Number',
|
12
|
+
label: '上下边距',
|
13
|
+
name: ['props', 'space'],
|
14
|
+
addonAfter: 'px'
|
15
|
+
}
|
16
|
+
]
|
17
|
+
},
|
18
|
+
{
|
19
|
+
title: '文本设置',
|
20
|
+
child: [
|
21
|
+
{
|
22
|
+
name: ['props', 'textStyles'],
|
23
|
+
type: 'SelectLinkage',
|
24
|
+
child: [
|
25
|
+
{
|
26
|
+
label: '字段',
|
27
|
+
type: 'Select',
|
28
|
+
options: [
|
29
|
+
{
|
30
|
+
label: 'hashtag标题',
|
31
|
+
value: 'hashTagTitle'
|
32
|
+
},
|
33
|
+
{
|
34
|
+
label: 'hashtag描述',
|
35
|
+
value: 'hashTagDesc'
|
36
|
+
},
|
37
|
+
{
|
38
|
+
label: '标题',
|
39
|
+
value: 'title'
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: '价格',
|
43
|
+
value: 'price'
|
44
|
+
}
|
45
|
+
],
|
46
|
+
name: ['props', 'textStyles', 'field'],
|
47
|
+
initialValue: 'title'
|
48
|
+
},
|
49
|
+
{
|
50
|
+
type: 'Group',
|
51
|
+
label: '标题字体',
|
52
|
+
child: [
|
53
|
+
{
|
54
|
+
type: 'Color',
|
55
|
+
name: ['color']
|
56
|
+
},
|
57
|
+
{
|
58
|
+
type: 'Select',
|
59
|
+
options: [{ label: '黑体', value: '黑体' }],
|
60
|
+
name: ['fontFamily']
|
61
|
+
},
|
62
|
+
{
|
63
|
+
type: 'Number',
|
64
|
+
addonAfter: 'px',
|
65
|
+
name: ['fontSize']
|
66
|
+
}
|
67
|
+
]
|
68
|
+
},
|
69
|
+
{
|
70
|
+
label: '标题样式',
|
71
|
+
type: 'TextStyle'
|
72
|
+
},
|
73
|
+
{
|
74
|
+
label: '标题对齐',
|
75
|
+
type: 'TextAlign'
|
76
|
+
}
|
77
|
+
]
|
78
|
+
}
|
79
|
+
]
|
80
|
+
},
|
81
|
+
{
|
82
|
+
title: '按钮样式',
|
83
|
+
child: [
|
84
|
+
{
|
85
|
+
type: 'Color',
|
86
|
+
label: '背景色',
|
87
|
+
name: ['props', 'buttonStyle', 'backgroundColor'],
|
88
|
+
initialValue: '#000'
|
89
|
+
},
|
90
|
+
{
|
91
|
+
type: 'Group',
|
92
|
+
label: '尺寸',
|
93
|
+
child: [
|
94
|
+
{
|
95
|
+
type: 'Number',
|
96
|
+
name: ['props', 'buttonStyle', 'height'],
|
97
|
+
addonAfter: 'H'
|
98
|
+
}
|
99
|
+
]
|
100
|
+
},
|
101
|
+
{
|
102
|
+
type: 'Group',
|
103
|
+
label: '圆角',
|
104
|
+
child: [
|
105
|
+
{
|
106
|
+
type: 'Slider',
|
107
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
108
|
+
max: 100
|
109
|
+
},
|
110
|
+
{
|
111
|
+
type: 'Number',
|
112
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
113
|
+
addonAfter: 'px',
|
114
|
+
max: 100
|
115
|
+
}
|
116
|
+
]
|
117
|
+
},
|
118
|
+
{
|
119
|
+
type: 'TextMargin',
|
120
|
+
name: ['props', 'buttonStyle']
|
121
|
+
},
|
122
|
+
{
|
123
|
+
type: 'Group',
|
124
|
+
label: '字体',
|
125
|
+
child: [
|
126
|
+
{
|
127
|
+
type: 'Color',
|
128
|
+
name: ['props', 'buttonStyle', 'color'],
|
129
|
+
initialValue: '#fff'
|
130
|
+
},
|
131
|
+
{
|
132
|
+
type: 'Select',
|
133
|
+
name: ['props', 'buttonStyle', 'fontFamily'],
|
134
|
+
options: [{ label: '黑体', value: '黑体' }]
|
135
|
+
},
|
136
|
+
{
|
137
|
+
type: 'Number',
|
138
|
+
name: ['props', 'buttonStyle', 'fontSize'],
|
139
|
+
addonAfter: 'px'
|
140
|
+
}
|
141
|
+
]
|
142
|
+
},
|
143
|
+
{
|
144
|
+
type: 'TextStyle',
|
145
|
+
name: ['props', 'buttonStyle']
|
146
|
+
},
|
147
|
+
{
|
148
|
+
type: 'TextAlign',
|
149
|
+
name: ['props', 'buttonStyle']
|
150
|
+
}
|
151
|
+
]
|
152
|
+
}
|
153
|
+
];
|
@@ -120,11 +120,12 @@ Made in Italy` })));
|
|
120
120
|
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
121
121
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
122
122
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
123
|
-
React.createElement("div",
|
124
|
-
|
123
|
+
React.createElement("div", null,
|
124
|
+
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'),
|
125
|
+
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')),
|
126
|
+
React.createElement("div", null,
|
125
127
|
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
128
|
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
129
|
(!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
130
|
productInfoText({ isPost }))),
|
130
131
|
React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|
@@ -75,6 +75,21 @@ declare const _default: ({
|
|
75
75
|
} | {
|
76
76
|
title: string;
|
77
77
|
child: ({
|
78
|
+
type: string;
|
79
|
+
label: string;
|
80
|
+
child: ({
|
81
|
+
type: string;
|
82
|
+
name: string[];
|
83
|
+
max: number;
|
84
|
+
addonAfter?: undefined;
|
85
|
+
} | {
|
86
|
+
type: string;
|
87
|
+
name: string[];
|
88
|
+
addonAfter: string;
|
89
|
+
max: number;
|
90
|
+
})[];
|
91
|
+
name?: undefined;
|
92
|
+
} | {
|
78
93
|
type: string;
|
79
94
|
label: string;
|
80
95
|
name: string[];
|
@@ -158,6 +158,23 @@ export default [
|
|
158
158
|
}
|
159
159
|
]
|
160
160
|
},
|
161
|
+
{
|
162
|
+
type: 'Group',
|
163
|
+
label: '圆角',
|
164
|
+
child: [
|
165
|
+
{
|
166
|
+
type: 'Slider',
|
167
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
|
168
|
+
max: 100
|
169
|
+
},
|
170
|
+
{
|
171
|
+
type: 'Number',
|
172
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
|
173
|
+
addonAfter: 'px',
|
174
|
+
max: 100
|
175
|
+
}
|
176
|
+
]
|
177
|
+
},
|
161
178
|
{
|
162
179
|
type: 'Color',
|
163
180
|
label: '背景色',
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { RecItemType } from '../typing';
|
3
3
|
interface IHashtagProps {
|
4
4
|
tags: string[];
|
@@ -6,6 +6,7 @@ interface IHashtagProps {
|
|
6
6
|
itemType: 'VIDEO' | 'PRODUCT' | null;
|
7
7
|
index: number;
|
8
8
|
rec: RecItemType;
|
9
|
+
hashTagStyle?: CSSProperties;
|
9
10
|
}
|
10
11
|
declare const _default: React.NamedExoticComponent<IHashtagProps>;
|
11
12
|
export default _default;
|
@@ -5,7 +5,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const react_2 = require("swiper/react");
|
6
6
|
const hooks_1 = require("../../../../core/hooks");
|
7
7
|
const Scroll_1 = tslib_1.__importDefault(require("../../../../materials/sxp/template/components/Scroll"));
|
8
|
-
const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
|
8
|
+
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
9
9
|
const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
|
10
10
|
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = (0, hooks_1.useSxpDataSource)();
|
11
11
|
const handleClickTag = (data) => {
|
@@ -38,6 +38,6 @@ const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
|
|
38
38
|
return (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
39
39
|
}, [isShowMore, tags]);
|
40
40
|
return (react_1.default.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
|
41
|
-
react_1.default.createElement(Scroll_1.default, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', onClick: () => handleClickTag(item) }, `#${item}`))))));
|
41
|
+
react_1.default.createElement(Scroll_1.default, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) }, `#${item}`))))));
|
42
42
|
};
|
43
43
|
exports.default = (0, react_1.memo)(Hashtag);
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
const hooks_1 = require("../../../core/hooks");
|
6
|
-
const Navbar = ({ icon, styles, onClose }) => {
|
6
|
+
const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
7
|
+
var _a;
|
7
8
|
const { waterFallData, setOpenHashtag } = (0, hooks_1.useSxpDataSource)();
|
8
9
|
return (react_1.default.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
9
10
|
react_1.default.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
|
10
|
-
react_1.default.createElement("div", { className: 'clc-sxp-nav-title' }, `#${waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag}`)));
|
11
|
+
react_1.default.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle }, `#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`)));
|
11
12
|
};
|
12
13
|
exports.default = (0, react_1.memo)(Navbar);
|