pb-sxp-ui 1.0.79 → 1.0.81
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 +342 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +93 -0
- package/dist/index.js +343 -106
- 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 +342 -105
- 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 +7 -0
- package/es/core/components/Consent/index.d.ts +13 -0
- package/es/core/components/Consent/index.js +60 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/Tagbar.js +15 -1
- package/es/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +15 -9
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
- package/es/core/components/SxpPageRender/WaterFall/index.js +7 -2
- package/es/core/components/SxpPageRender/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/index.js +29 -32
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/EditorDataProvider.d.ts +9 -0
- package/es/core/context/EditorDataProvider.js +13 -3
- package/es/core/context/SxpDataSourceProvider.d.ts +10 -0
- package/es/core/context/SxpDataSourceProvider.js +58 -18
- package/es/core/hooks/useEventReport.d.ts +1 -0
- package/es/core/hooks/useEventReport.js +13 -1
- package/es/core/utils/localStore.d.ts +1 -0
- package/es/core/utils/localStore.js +1 -0
- package/es/materials/sxp/Consent/index.d.ts +12 -0
- package/es/materials/sxp/Consent/index.js +5 -0
- package/es/materials/sxp/Consent/material.d.ts +2 -0
- package/es/materials/sxp/Consent/material.js +20 -0
- package/es/materials/sxp/Consent/settingRender.d.ts +31 -0
- package/es/materials/sxp/Consent/settingRender.js +39 -0
- package/es/materials/sxp/HashTag/index.d.ts +1 -1
- package/es/materials/sxp/HashTag/settingRender.d.ts +9 -0
- package/es/materials/sxp/HashTag/settingRender.js +2 -1
- package/es/materials/sxp/index.d.ts +1 -0
- package/es/materials/sxp/index.js +1 -0
- package/lib/core/Pagebuilder/type.d.ts +7 -0
- package/lib/core/components/Consent/index.d.ts +13 -0
- package/lib/core/components/Consent/index.js +63 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/Tagbar.js +15 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +15 -9
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
- package/lib/core/components/SxpPageRender/WaterFall/index.js +7 -2
- package/lib/core/components/SxpPageRender/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/index.js +29 -32
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/EditorDataProvider.d.ts +9 -0
- package/lib/core/context/EditorDataProvider.js +13 -3
- package/lib/core/context/SxpDataSourceProvider.d.ts +10 -0
- package/lib/core/context/SxpDataSourceProvider.js +57 -17
- package/lib/core/hooks/useEventReport.d.ts +1 -0
- package/lib/core/hooks/useEventReport.js +13 -1
- package/lib/core/utils/localStore.d.ts +1 -0
- package/lib/core/utils/localStore.js +2 -1
- package/lib/materials/sxp/Consent/index.d.ts +12 -0
- package/lib/materials/sxp/Consent/index.js +8 -0
- package/lib/materials/sxp/Consent/material.d.ts +2 -0
- package/lib/materials/sxp/Consent/material.js +24 -0
- package/lib/materials/sxp/Consent/settingRender.d.ts +31 -0
- package/lib/materials/sxp/Consent/settingRender.js +41 -0
- package/lib/materials/sxp/HashTag/index.d.ts +1 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +9 -0
- package/lib/materials/sxp/HashTag/settingRender.js +2 -1
- package/lib/materials/sxp/index.d.ts +1 -0
- package/lib/materials/sxp/index.js +1 -0
- package/package.json +1 -1
@@ -6,6 +6,7 @@ const hooks_1 = require("../../../../core/hooks");
|
|
6
6
|
require("./WaterfallList.less");
|
7
7
|
const preview_json_1 = tslib_1.__importDefault(require("./preview.json"));
|
8
8
|
const FormatImage_1 = tslib_1.__importDefault(require("../FormatImage"));
|
9
|
+
const css_1 = require("@emotion/css");
|
9
10
|
const WaterfallFlowItem = (props) => {
|
10
11
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
11
12
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
@@ -142,8 +143,8 @@ const WaterfallFlowItem = (props) => {
|
|
142
143
|
react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
|
143
144
|
};
|
144
145
|
function WaterfallList(_a) {
|
145
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
146
|
-
var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
|
146
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
147
|
+
var { reportTagsView, showBanner } = _a, props = tslib_1.__rest(_a, ["reportTagsView", "showBanner"]);
|
147
148
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
|
148
149
|
const scrollParent = (0, react_1.useRef)(null);
|
149
150
|
const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
|
@@ -314,24 +315,29 @@ function WaterfallList(_a) {
|
|
314
315
|
return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
315
316
|
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
|
316
317
|
react_1.default.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
|
317
|
-
|
318
|
-
|
318
|
+
showBanner && ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.picture) && (react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
|
319
|
+
width: '100%',
|
320
|
+
objectFit: 'cover',
|
321
|
+
marginBottom: '20px'
|
322
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
323
|
+
react_1.default.createElement("div", { className: 'waterFallList-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
|
324
|
+
react_1.default.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'waterFallList-collection', style: Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
|
319
325
|
react_1.default.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
|
320
326
|
list.map((item, ind) => {
|
321
327
|
var _a;
|
322
328
|
return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + ((_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.clientHeight), style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
|
323
329
|
}),
|
324
|
-
react_1.default.createElement("div", { hidden: !((
|
330
|
+
react_1.default.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
325
331
|
position: 'absolute',
|
326
332
|
width: '100%',
|
327
|
-
transform: `translate(0px,${(
|
328
|
-
((
|
329
|
-
height: ((
|
330
|
-
? ((
|
333
|
+
transform: `translate(0px,${(_p = ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.top) +
|
334
|
+
((_o = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_m = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _m === void 0 ? void 0 : _m.length) - 1]) === null || _o === void 0 ? void 0 : _o.height)) !== null && _p !== void 0 ? _p : 0}px)`,
|
335
|
+
height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
|
336
|
+
? ((_r = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _r === void 0 ? void 0 : _r.offsetHeight) || ((_s = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _s === void 0 ? void 0 : _s.height) || '100px'
|
331
337
|
: 0
|
332
338
|
} }))),
|
333
|
-
react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((
|
334
|
-
react_1.default.createElement("div", { ref: buttonRef, hidden: !((
|
335
|
-
react_1.default.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
339
|
+
react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
340
|
+
react_1.default.createElement("div", { ref: buttonRef, hidden: !((_u = data === null || data === void 0 ? void 0 : data.tag) === null || _u === void 0 ? void 0 : _u.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
341
|
+
react_1.default.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection'))))));
|
336
342
|
}
|
337
343
|
exports.default = WaterfallList;
|
@@ -10,9 +10,11 @@ const WaterfallList_1 = tslib_1.__importDefault(require("./WaterfallList"));
|
|
10
10
|
const left_png_1 = tslib_1.__importDefault(require("./left.png"));
|
11
11
|
const List_1 = tslib_1.__importDefault(require("./List"));
|
12
12
|
const hooks_1 = require("../../../../core/hooks");
|
13
|
+
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
14
|
const WaterFall = (props) => {
|
14
15
|
var _a;
|
15
|
-
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = (0, hooks_1.useSxpDataSource)();
|
16
|
+
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = (0, hooks_1.useSxpDataSource)();
|
17
|
+
const { backMainFeed } = (0, useEventReport_1.useEventReport)();
|
16
18
|
const ref = (0, react_1.useRef)(null);
|
17
19
|
const modalEleRef = (0, react_1.useRef)(null);
|
18
20
|
const [viewTime, setViewTime] = (0, react_1.useState)();
|
@@ -33,6 +35,9 @@ const WaterFall = (props) => {
|
|
33
35
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
34
36
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
35
37
|
}
|
38
|
+
if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
|
39
|
+
backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
|
40
|
+
}
|
36
41
|
reportTagsView();
|
37
42
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
38
43
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
@@ -100,6 +105,6 @@ const WaterFall = (props) => {
|
|
100
105
|
display: openHashtag ? 'block' : 'none'
|
101
106
|
} },
|
102
107
|
react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
|
103
|
-
(props === null || props === void 0 ? void 0 : props.
|
108
|
+
(props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
104
109
|
};
|
105
110
|
exports.default = (0, react_1.memo)(WaterFall);
|
@@ -34,6 +34,7 @@ export interface ISxpPageRenderProps {
|
|
34
34
|
likeIconYPosit?: string;
|
35
35
|
likeIconXPosit?: string;
|
36
36
|
swipeTipOffset?: number;
|
37
|
+
consent?: any[];
|
37
38
|
};
|
38
39
|
descStyle?: CSSProperties;
|
39
40
|
tipText?: {
|
@@ -68,7 +69,7 @@ export interface ISxpPageRenderProps {
|
|
68
69
|
ctaType?: string;
|
69
70
|
_schema?: any;
|
70
71
|
hashTagStyle?: CSSProperties;
|
71
|
-
licenseUrl?:
|
72
|
+
licenseUrl?: string;
|
72
73
|
}
|
73
74
|
declare const SxpPageRender: FC<ISxpPageRenderProps>;
|
74
75
|
export default SxpPageRender;
|
@@ -3,7 +3,6 @@ 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 react_2 = require("swiper/react");
|
6
|
-
const qs_1 = tslib_1.__importDefault(require("qs"));
|
7
6
|
const ExpandableText_1 = tslib_1.__importDefault(require("./ExpandableText"));
|
8
7
|
const LikeButton_1 = tslib_1.__importDefault(require("./LikeButton"));
|
9
8
|
const VideoWidget_1 = tslib_1.__importDefault(require("./VideoWidget"));
|
@@ -32,11 +31,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
32
31
|
const viewImageStartTime = (0, react_1.useRef)(0);
|
33
32
|
const [isInit, setIsInit] = (0, react_1.useState)(false);
|
34
33
|
const [isMuted, setIsMuted] = (0, react_1.useState)(true);
|
35
|
-
const curTime = (0, react_1.useRef)();
|
36
34
|
const viewTime = (0, react_1.useRef)();
|
37
35
|
const [isLoadMore, setIsLoadMore] = (0, react_1.useState)(false);
|
38
36
|
const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
|
39
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = (0, hooks_1.useSxpDataSource)();
|
37
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = (0, hooks_1.useSxpDataSource)();
|
38
|
+
const { backMainFeed } = (0, useEventReport_1.useEventReport)();
|
40
39
|
const [videoRef, setVideoRef] = (0, react_1.useState)(null);
|
41
40
|
const playerRef = (0, react_1.useRef)();
|
42
41
|
const { productView } = (0, useEventReport_1.useEventReport)();
|
@@ -44,42 +43,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
44
43
|
return data.length > 0 && !loading && (0, localStore_1.getFeUserId)();
|
45
44
|
}, [data, loading]);
|
46
45
|
const handleH5EnterLink = (0, react_1.useCallback)(() => {
|
47
|
-
var _a, _b;
|
48
46
|
if (data.length <= 0) {
|
49
47
|
return;
|
50
48
|
}
|
51
|
-
|
52
|
-
const
|
53
|
-
|
54
|
-
|
55
|
-
|
49
|
+
(0, sessionStore_1.refreshFeSessionId)();
|
50
|
+
const now = new Date();
|
51
|
+
viewTime.current = now;
|
52
|
+
if (isInit) {
|
53
|
+
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
56
54
|
}
|
57
|
-
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
58
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
59
|
-
eventInfo: {
|
60
|
-
eventSubject: 'h5LinkEnterFeed',
|
61
|
-
eventDescription: 'User enter h5 link',
|
62
|
-
utmSource: getVal('utm_source'),
|
63
|
-
utmMedium: getVal('utm_medium'),
|
64
|
-
utmCampaign: getVal('utm_campaign'),
|
65
|
-
utmId: getVal('utm_id'),
|
66
|
-
utmContent: getVal('utm_content'),
|
67
|
-
enterTime: `${Date.now()}`,
|
68
|
-
requestId: null,
|
69
|
-
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
70
|
-
clSource: getVal('cl_sourc')
|
71
|
-
}
|
72
|
-
});
|
73
55
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
74
56
|
eventName: 'PageView'
|
75
57
|
});
|
76
58
|
setIsInit(true);
|
77
|
-
}, [
|
78
|
-
const initTime = () => {
|
79
|
-
curTime.current = new Date();
|
80
|
-
viewTime.current = new Date();
|
81
|
-
(0, sessionStore_1.refreshFeSessionId)();
|
82
|
-
};
|
59
|
+
}, [data.length, bffFbReport, h5EnterLink, isInit]);
|
83
60
|
const firstRef = (0, react_1.useRef)();
|
84
61
|
(0, react_1.useEffect)(() => {
|
85
62
|
var _a, _b, _c, _d;
|
@@ -172,13 +149,33 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
172
149
|
handleH5EnterLink();
|
173
150
|
handleViewImageStartEvent(activeIndex);
|
174
151
|
event_1.default.emit(event_1.SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
|
152
|
+
backMainFeed('external');
|
175
153
|
}
|
176
154
|
};
|
177
155
|
document.addEventListener('visibilitychange', visibleChange);
|
178
156
|
return () => {
|
179
157
|
document.removeEventListener('visibilitychange', visibleChange);
|
180
158
|
};
|
181
|
-
}, [
|
159
|
+
}, [
|
160
|
+
activeIndex,
|
161
|
+
bffEventReport,
|
162
|
+
data,
|
163
|
+
handleH5EnterLink,
|
164
|
+
popupDetailData,
|
165
|
+
isFromHashtag,
|
166
|
+
tempMap,
|
167
|
+
curTime,
|
168
|
+
backMainFeed
|
169
|
+
]);
|
170
|
+
(0, react_1.useEffect)(() => {
|
171
|
+
const initTime = () => {
|
172
|
+
backMainFeed('external');
|
173
|
+
};
|
174
|
+
window.addEventListener('pageshow', initTime);
|
175
|
+
return () => {
|
176
|
+
window.removeEventListener('pageshow', initTime);
|
177
|
+
};
|
178
|
+
}, []);
|
182
179
|
const tagHeight = (0, react_1.useMemo)(() => {
|
183
180
|
let h = 0;
|
184
181
|
if (tagList.length > 0) {
|
@@ -7,10 +7,19 @@ interface IEditorDataContext {
|
|
7
7
|
placeholderImage: string;
|
8
8
|
hashTagSize: number;
|
9
9
|
loadingImage: string;
|
10
|
+
industry?: string;
|
11
|
+
privacyContent?: string;
|
12
|
+
privacyNecessity?: boolean;
|
13
|
+
privacyPolicyTitle?: string;
|
14
|
+
privacyPolicyUrl?: string;
|
15
|
+
privacyTitle?: string;
|
16
|
+
template?: any | null;
|
10
17
|
};
|
11
18
|
appDomain?: string;
|
12
19
|
openHashtag?: boolean;
|
13
20
|
setOpenHashtag?: React.Dispatch<React.SetStateAction<boolean>>;
|
21
|
+
openConsent?: boolean;
|
22
|
+
setOpenConsent?: React.Dispatch<React.SetStateAction<boolean>>;
|
14
23
|
}
|
15
24
|
interface IEditorProviderProps {
|
16
25
|
data?: any;
|
@@ -5,8 +5,9 @@ const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const EditorDataContext = (0, react_1.createContext)({});
|
7
7
|
const EditorDataProvider = ({ children, data }) => {
|
8
|
-
var _a, _b, _c, _d, _e, _f;
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
9
9
|
const [openHashtag, setOpenHashtag] = (0, react_1.useState)(false);
|
10
|
+
const [openConsent, setOpenConsent] = (0, react_1.useState)(false);
|
10
11
|
return (react_1.default.createElement(EditorDataContext.Provider, { value: {
|
11
12
|
sxpPrameter: {
|
12
13
|
bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
|
@@ -14,11 +15,20 @@ const EditorDataProvider = ({ children, data }) => {
|
|
14
15
|
personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
|
15
16
|
placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
|
16
17
|
hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
|
17
|
-
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
|
18
|
+
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
|
19
|
+
privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
|
20
|
+
privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
|
21
|
+
privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
|
22
|
+
privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
|
23
|
+
privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
|
24
|
+
template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
|
25
|
+
industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
|
18
26
|
},
|
19
27
|
appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
|
20
28
|
openHashtag,
|
21
|
-
setOpenHashtag
|
29
|
+
setOpenHashtag,
|
30
|
+
openConsent,
|
31
|
+
setOpenConsent
|
22
32
|
} }, children));
|
23
33
|
};
|
24
34
|
function useEditorDataProvider() {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
2
|
import { DataSource, PageData } from '../Pagebuilder/type';
|
3
3
|
import { ProductInfoType, RecItemType, RecommendVideoResultType, VideoInfoType } from '../components/SxpPageRender/typing';
|
4
|
+
import { ISxpPageRenderProps } from '../components/SxpPageRender';
|
4
5
|
export interface IWaterFallDataType {
|
5
6
|
hashTag: string;
|
6
7
|
itemId?: string;
|
@@ -62,6 +63,8 @@ export interface ISxpDataSourceContext {
|
|
62
63
|
loadingImage?: string;
|
63
64
|
isOpenHashTag?: boolean;
|
64
65
|
tagList: string[];
|
66
|
+
isAgreePolicy?: boolean;
|
67
|
+
setIsAgreePolicy?: React.Dispatch<React.SetStateAction<boolean>>;
|
65
68
|
setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
|
66
69
|
videoRef?: any;
|
67
70
|
setVideoRef?: React.Dispatch<React.SetStateAction<any>>;
|
@@ -71,6 +74,9 @@ export interface ISxpDataSourceContext {
|
|
71
74
|
eventSourceUrl?: string;
|
72
75
|
externalId?: string;
|
73
76
|
}) => Promise<any> | undefined | boolean;
|
77
|
+
curTime?: any;
|
78
|
+
h5EnterLink?: () => void;
|
79
|
+
themeTag?: any;
|
74
80
|
}
|
75
81
|
export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
|
76
82
|
export interface SxpDataSourceProviderProps {
|
@@ -103,6 +109,10 @@ export interface SxpDataSourceProviderProps {
|
|
103
109
|
isOpenHashTag?: boolean;
|
104
110
|
enabledMetaConversionApi?: boolean;
|
105
111
|
isShowTag?: boolean;
|
112
|
+
consentWidth?: number;
|
113
|
+
consentHeight?: number;
|
114
|
+
isOpenConsent?: boolean;
|
115
|
+
globalConfig?: ISxpPageRenderProps['globalConfig'];
|
106
116
|
}
|
107
117
|
declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
|
108
118
|
export default _default;
|
@@ -8,6 +8,7 @@ const sessionStore_1 = require("../utils/sessionStore");
|
|
8
8
|
const localStore_1 = require("../utils/localStore");
|
9
9
|
const useIconLink_1 = require("../components/SxpPageRender/useIconLink");
|
10
10
|
const event_1 = tslib_1.__importStar(require("../utils/event"));
|
11
|
+
const Consent_1 = tslib_1.__importDefault(require("../components/Consent"));
|
11
12
|
exports.SxpDataSourceContext = (0, react_1.createContext)({
|
12
13
|
rtcList: [],
|
13
14
|
tagList: []
|
@@ -17,13 +18,15 @@ var DataSourceType;
|
|
17
18
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
18
19
|
})(DataSourceType || (DataSourceType = {}));
|
19
20
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
20
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
21
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig }) => {
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
21
23
|
const [rtcList, setRtcList] = (0, react_1.useState)([]);
|
22
24
|
const [tagList, setTagList] = (0, react_1.useState)([]);
|
23
25
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
24
26
|
const [curReqInfo, setCurReqInfo] = (0, react_1.useState)({ rtc: '', requestId: '' });
|
25
27
|
const swiperRef = (0, react_1.useRef)(null);
|
26
28
|
const isInit = (0, react_1.useRef)(false);
|
29
|
+
const [isAgreePolicy, setIsAgreePolicy] = (0, react_1.useState)(() => !!window.localStorage.getItem(localStore_1.AGREE_POLICY));
|
27
30
|
const [popupDetailData, setPopupDetailData] = (0, react_1.useState)();
|
28
31
|
const [waterFallData, setWaterFallData] = (0, react_1.useState)();
|
29
32
|
const [openHashtag, setOpenHashtag] = (0, react_1.useState)(isOpenHashTag);
|
@@ -32,6 +35,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
32
35
|
const [isFromHashtag, setIsFromHashtag] = (0, react_1.useState)(false);
|
33
36
|
const [videoRef, setVideoRef] = (0, react_1.useState)(null);
|
34
37
|
const themeTag = (0, react_1.useRef)();
|
38
|
+
const curTime = (0, react_1.useRef)();
|
35
39
|
(0, react_1.useEffect)(() => {
|
36
40
|
const handleChangeThemeTag = (tag) => {
|
37
41
|
themeTag.current = tag;
|
@@ -71,10 +75,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
71
75
|
.catch((err) => Promise.reject(err));
|
72
76
|
}, [bffDataSource]);
|
73
77
|
const getRecommendVideos = (0, react_1.useCallback)((query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
74
|
-
var
|
78
|
+
var _h, _j, _k, _l, _m;
|
75
79
|
query = {
|
76
|
-
maxSize: (
|
77
|
-
defaultSize: (
|
80
|
+
maxSize: (_h = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _h !== void 0 ? _h : maxSize,
|
81
|
+
defaultSize: (_j = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _j !== void 0 ? _j : defaultSize,
|
78
82
|
'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
|
79
83
|
'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
|
80
84
|
hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
|
@@ -82,10 +86,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
82
86
|
themeTag: query === null || query === void 0 ? void 0 : query.themeTag
|
83
87
|
};
|
84
88
|
if (utmVal) {
|
85
|
-
const val = (
|
89
|
+
const val = (_m = (_l = (_k = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _k === void 0 ? void 0 : _k.filter((val) => {
|
86
90
|
const key = val.split('=')[0];
|
87
91
|
return UTM_KEYS.includes(key);
|
88
|
-
})) === null ||
|
92
|
+
})) === null || _l === void 0 ? void 0 : _l.join('&')) !== null && _m !== void 0 ? _m : '';
|
89
93
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
90
94
|
}
|
91
95
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -97,7 +101,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
97
101
|
return result === null || result === void 0 ? void 0 : result.data;
|
98
102
|
}), [bffFetch, utmVal, maxSize, defaultSize]);
|
99
103
|
const loadVideos = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
100
|
-
var
|
104
|
+
var _o, _p;
|
101
105
|
if (rtcList.length <= 0) {
|
102
106
|
return;
|
103
107
|
}
|
@@ -107,8 +111,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
107
111
|
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
|
108
112
|
themeTag: themeTag.current
|
109
113
|
});
|
110
|
-
setRtcList(rtcList.concat((
|
111
|
-
setCacheRtcList(cacheRtcList.concat((
|
114
|
+
setRtcList(rtcList.concat((_o = data === null || data === void 0 ? void 0 : data.recList) !== null && _o !== void 0 ? _o : []));
|
115
|
+
setCacheRtcList(cacheRtcList.concat((_p = data === null || data === void 0 ? void 0 : data.recList) !== null && _p !== void 0 ? _p : []));
|
112
116
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
113
117
|
const bffEventReport = (0, react_1.useCallback)(({ userInfo, eventInfo }) => {
|
114
118
|
if (!enableReportEvent) {
|
@@ -166,16 +170,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
166
170
|
return res === null || res === void 0 ? void 0 : res.success;
|
167
171
|
}), [bffFetch]);
|
168
172
|
const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
169
|
-
var
|
173
|
+
var _q, _r, _s, _t, _u;
|
170
174
|
if (!utmVal || !isShowTag)
|
171
175
|
return;
|
172
176
|
try {
|
173
|
-
const val = (
|
177
|
+
const val = (_s = (_r = (_q = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _q === void 0 ? void 0 : _q.filter((val) => {
|
174
178
|
const key = val.split('=')[0];
|
175
179
|
return UTM_KEYS.includes(key);
|
176
|
-
})) === null ||
|
180
|
+
})) === null || _r === void 0 ? void 0 : _r.join('&')) !== null && _s !== void 0 ? _s : '';
|
177
181
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
178
|
-
setTagList((
|
182
|
+
setTagList((_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []);
|
179
183
|
}
|
180
184
|
catch (e) {
|
181
185
|
console.log('e', e);
|
@@ -199,7 +203,38 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
199
203
|
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
200
204
|
});
|
201
205
|
}, [bffEventReport, isFromHashtag]);
|
206
|
+
const h5EnterLink = (0, react_1.useCallback)(() => {
|
207
|
+
var _a, _b;
|
208
|
+
const queryString = location.search.slice(1);
|
209
|
+
const params = qs_1.default.parse(queryString.replace(/\+/g, '%2B'));
|
210
|
+
for (const key in params) {
|
211
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
212
|
+
}
|
213
|
+
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
214
|
+
const time = new Date();
|
215
|
+
curTime.current = time;
|
216
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
217
|
+
eventInfo: {
|
218
|
+
eventSubject: 'h5LinkEnterFeed',
|
219
|
+
eventDescription: 'User enter h5 link',
|
220
|
+
utmSource: getVal('utm_source'),
|
221
|
+
utmMedium: getVal('utm_medium'),
|
222
|
+
utmCampaign: getVal('utm_campaign'),
|
223
|
+
utmId: getVal('utm_id'),
|
224
|
+
utmContent: getVal('utm_content'),
|
225
|
+
enterTime: Math.floor(time / 1000) + '',
|
226
|
+
requestId: null,
|
227
|
+
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
228
|
+
clSource: getVal('cl_source')
|
229
|
+
}
|
230
|
+
});
|
231
|
+
}, [bffEventReport]);
|
202
232
|
(0, react_1.useEffect)(() => {
|
233
|
+
h5EnterLink();
|
234
|
+
}, []);
|
235
|
+
(0, react_1.useEffect)(() => {
|
236
|
+
if (!isAgreePolicy)
|
237
|
+
return;
|
203
238
|
setLoading(true);
|
204
239
|
bffGetTagList();
|
205
240
|
getRecommendVideos()
|
@@ -218,7 +253,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
218
253
|
setLoading(false);
|
219
254
|
isInit.current = true;
|
220
255
|
});
|
221
|
-
}, []);
|
256
|
+
}, [isAgreePolicy]);
|
222
257
|
(0, react_1.useEffect)(() => {
|
223
258
|
if (!isInit.current)
|
224
259
|
return;
|
@@ -270,13 +305,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
270
305
|
setLoading,
|
271
306
|
videoRef,
|
272
307
|
setVideoRef,
|
273
|
-
bffFbReport
|
274
|
-
|
308
|
+
bffFbReport,
|
309
|
+
isAgreePolicy,
|
310
|
+
setIsAgreePolicy,
|
311
|
+
curTime,
|
312
|
+
h5EnterLink,
|
313
|
+
themeTag
|
314
|
+
} }, (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy) || isOpenConsent ? (react_1.default.createElement(Consent_1.default, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))) : (render({
|
275
315
|
rtcList,
|
276
316
|
mutateLike: bffMutateLike,
|
277
317
|
mutateUnlike: bffMutateUnlike,
|
278
318
|
submitForm: bffSubmitForm,
|
279
319
|
tagList
|
280
|
-
})));
|
320
|
+
}))));
|
281
321
|
};
|
282
322
|
exports.default = (0, react_1.memo)(SxpDataSourceProvider);
|
@@ -2,4 +2,5 @@ import { RecItemType } from '../components/SxpPageRender/typing';
|
|
2
2
|
export declare function useEventReport(): {
|
3
3
|
jumpToWeb: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], position?: number) => void;
|
4
4
|
productView: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], viewTime?: any, position?: number) => void;
|
5
|
+
backMainFeed: (lastFeed?: 'theme' | 'branch' | 'external', themeTag?: string, hashTag?: string) => void;
|
5
6
|
};
|
@@ -69,9 +69,21 @@ function useEventReport() {
|
|
69
69
|
}
|
70
70
|
});
|
71
71
|
}, [bffEventReport, popupDetailData]);
|
72
|
+
const backMainFeed = (0, react_1.useCallback)((lastFeed, themeTag, hashTag) => {
|
73
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
74
|
+
eventInfo: {
|
75
|
+
lastFeed,
|
76
|
+
themeTags: themeTag ? `[${themeTag}]` : '',
|
77
|
+
hashTags: hashTag ? `[${hashTag}]` : '',
|
78
|
+
eventSubject: 'backMainFeed',
|
79
|
+
eventDescription: 'back Main Feed'
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}, [bffEventReport]);
|
72
83
|
return {
|
73
84
|
jumpToWeb,
|
74
|
-
productView
|
85
|
+
productView,
|
86
|
+
backMainFeed
|
75
87
|
};
|
76
88
|
}
|
77
89
|
exports.useEventReport = useEventReport;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export declare const FAKE_USER_KEY = "SXP_FAKE_USER_ID";
|
2
2
|
export declare const FAKE_USER_STATE = "FAKE_USER_STATE";
|
3
|
+
export declare const AGREE_POLICY = "AGREE_POLICY";
|
3
4
|
export declare const storeAndLoadFeUserId: () => string;
|
4
5
|
export declare const removeFeUserId: () => void;
|
5
6
|
export declare const getFeUserId: () => boolean;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getFeUserId = exports.removeFeUserId = exports.storeAndLoadFeUserId = exports.FAKE_USER_STATE = exports.FAKE_USER_KEY = void 0;
|
3
|
+
exports.getFeUserId = exports.removeFeUserId = exports.storeAndLoadFeUserId = exports.AGREE_POLICY = exports.FAKE_USER_STATE = exports.FAKE_USER_KEY = void 0;
|
4
4
|
const lodash_1 = require("lodash");
|
5
5
|
const tool_1 = require("./tool");
|
6
6
|
exports.FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
|
7
7
|
exports.FAKE_USER_STATE = 'FAKE_USER_STATE';
|
8
|
+
exports.AGREE_POLICY = 'AGREE_POLICY';
|
8
9
|
const storeAndLoadFeUserId = () => {
|
9
10
|
let fakeUserId = window.localStorage.getItem(exports.FAKE_USER_KEY);
|
10
11
|
if ((0, lodash_1.isEmpty)(fakeUserId)) {
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export interface IConsentProps {
|
3
|
+
width?: number;
|
4
|
+
height?: number;
|
5
|
+
privacy_title?: string;
|
6
|
+
privacy_context?: string;
|
7
|
+
privacy_policy_url?: string;
|
8
|
+
privacy_policy_title?: string;
|
9
|
+
privacy_necessity?: boolean;
|
10
|
+
}
|
11
|
+
declare const _default: React.NamedExoticComponent<IConsentProps>;
|
12
|
+
export default _default;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
5
|
+
const Consent = (props) => {
|
6
|
+
return react_1.default.createElement(Consent, Object.assign({}, props));
|
7
|
+
};
|
8
|
+
exports.default = (0, react_1.memo)(Consent);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Consent = 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 Consent = (0, create_1.createMaterial)(_1.default, {
|
9
|
+
displayName: 'Consent',
|
10
|
+
icon: '',
|
11
|
+
category: 'base',
|
12
|
+
type: 'Consent',
|
13
|
+
related: {
|
14
|
+
settingRender: settingRender_1.default
|
15
|
+
},
|
16
|
+
defaulSetting: {
|
17
|
+
props: {},
|
18
|
+
style: {}
|
19
|
+
},
|
20
|
+
w: 100,
|
21
|
+
h: 40,
|
22
|
+
sort: 1
|
23
|
+
});
|
24
|
+
exports.Consent = Consent;
|