pb-sxp-ui 1.14.0 → 1.15.0
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 +713 -237
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +104 -0
- package/dist/index.js +713 -237
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +5 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +713 -237
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +5 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/Consent/index.js +8 -2
- package/es/core/components/SxpPageRender/ConsentPopup.js +8 -8
- package/es/core/components/SxpPageRender/WaterFall/List.js +3 -3
- package/es/core/components/SxpPageRender/WaterFall/index.js +2 -2
- package/es/core/components/SxpPageRender/index.js +5 -2
- package/es/core/context/SxpDataSourceProvider.js +67 -30
- package/es/core/utils/materials.js +5 -3
- package/es/core/utils/tool.d.ts +2 -1
- package/es/core/utils/tool.js +38 -14
- package/es/materials/sxp/HashTag/index.d.ts +4 -1
- package/es/materials/sxp/HashTag/material.js +2 -1
- package/es/materials/sxp/HashTag/settingRender.d.ts +0 -2
- package/es/materials/sxp/HashTag/settingRender.js +2 -3
- package/es/materials/sxp/consentPopup/Click/index.d.ts +19 -0
- package/es/materials/sxp/consentPopup/Click/index.js +19 -0
- package/es/materials/sxp/consentPopup/Click/material.d.ts +2 -0
- package/es/materials/sxp/consentPopup/Click/material.js +48 -0
- package/es/materials/sxp/consentPopup/Click/settingRender.d.ts +63 -0
- package/es/materials/sxp/consentPopup/Click/settingRender.js +210 -0
- package/es/materials/sxp/consentPopup/Display/index.d.ts +2 -2
- package/es/materials/sxp/consentPopup/Display/index.js +7 -5
- package/es/materials/sxp/consentPopup/Swipe/index.d.ts +12 -0
- package/es/materials/sxp/consentPopup/Swipe/index.js +44 -0
- package/es/materials/sxp/consentPopup/Swipe/material.d.ts +2 -0
- package/es/materials/sxp/consentPopup/Swipe/material.js +24 -0
- package/es/materials/sxp/consentPopup/Swipe/settingRender.d.ts +29 -0
- package/es/materials/sxp/consentPopup/Swipe/settingRender.js +43 -0
- package/es/materials/sxp/consentPopup/index.d.ts +2 -0
- package/es/materials/sxp/consentPopup/index.js +2 -0
- package/es/materials/sxp/popup/ConsentDetail/index.d.ts +2 -1
- package/es/materials/sxp/popup/ConsentDetail/index.js +2 -2
- package/es/materials/sxp/popup/Iframe/index.d.ts +0 -4
- package/es/materials/sxp/popup/Iframe/index.js +4 -5
- package/es/materials/sxp/popup/Iframe/settingRender.js +0 -15
- package/lib/core/components/Consent/index.js +8 -2
- package/lib/core/components/SxpPageRender/ConsentPopup.js +7 -7
- package/lib/core/components/SxpPageRender/WaterFall/List.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -2
- package/lib/core/components/SxpPageRender/index.js +5 -2
- package/lib/core/context/SxpDataSourceProvider.js +66 -29
- package/lib/core/utils/materials.js +5 -3
- package/lib/core/utils/tool.d.ts +2 -1
- package/lib/core/utils/tool.js +39 -14
- package/lib/materials/sxp/HashTag/index.d.ts +4 -1
- package/lib/materials/sxp/HashTag/material.js +2 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +0 -2
- package/lib/materials/sxp/HashTag/settingRender.js +2 -3
- package/lib/materials/sxp/consentPopup/Click/index.d.ts +19 -0
- package/lib/materials/sxp/consentPopup/Click/index.js +21 -0
- package/lib/materials/sxp/consentPopup/Click/material.d.ts +2 -0
- package/lib/materials/sxp/consentPopup/Click/material.js +52 -0
- package/lib/materials/sxp/consentPopup/Click/settingRender.d.ts +63 -0
- package/lib/materials/sxp/consentPopup/Click/settingRender.js +212 -0
- package/lib/materials/sxp/consentPopup/Display/index.d.ts +2 -2
- package/lib/materials/sxp/consentPopup/Display/index.js +7 -5
- package/lib/materials/sxp/consentPopup/Swipe/index.d.ts +12 -0
- package/lib/materials/sxp/consentPopup/Swipe/index.js +46 -0
- package/lib/materials/sxp/consentPopup/Swipe/material.d.ts +2 -0
- package/lib/materials/sxp/consentPopup/Swipe/material.js +28 -0
- package/lib/materials/sxp/consentPopup/Swipe/settingRender.d.ts +29 -0
- package/lib/materials/sxp/consentPopup/Swipe/settingRender.js +45 -0
- package/lib/materials/sxp/consentPopup/index.d.ts +2 -0
- package/lib/materials/sxp/consentPopup/index.js +2 -0
- package/lib/materials/sxp/popup/ConsentDetail/index.d.ts +2 -1
- package/lib/materials/sxp/popup/ConsentDetail/index.js +2 -2
- package/lib/materials/sxp/popup/Iframe/index.d.ts +0 -4
- package/lib/materials/sxp/popup/Iframe/index.js +4 -5
- package/lib/materials/sxp/popup/Iframe/settingRender.js +0 -15
- package/package.json +1 -1
@@ -4,15 +4,15 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
require("./index.less");
|
6
6
|
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../core/hoc/withBindDataSource"));
|
7
|
-
const
|
7
|
+
const EditorDataProvider_1 = require("../../../core/context/EditorDataProvider");
|
8
8
|
const Consent = ({ resolver, globalConfig }) => {
|
9
9
|
var _a, _b;
|
10
|
-
const
|
11
|
-
return (0, localStore_1.getContsentState)();
|
12
|
-
}, []);
|
13
|
-
const t = resolver === null || resolver === void 0 ? void 0 : resolver['Display'];
|
14
|
-
const Component = (0, withBindDataSource_1.default)(t);
|
10
|
+
const { consentPopupCate } = (0, EditorDataProvider_1.useEditorDataProvider)();
|
15
11
|
const value = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consentPopup) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item;
|
16
|
-
|
12
|
+
if (!value)
|
13
|
+
return null;
|
14
|
+
const t = resolver === null || resolver === void 0 ? void 0 : resolver[value === null || value === void 0 ? void 0 : value.type];
|
15
|
+
const Component = (0, withBindDataSource_1.default)(t);
|
16
|
+
return (react_1.default.createElement(Component, Object.assign({}, value === null || value === void 0 ? void 0 : value.props, { style: value === null || value === void 0 ? void 0 : value.style, event: (value === null || value === void 0 ? void 0 : value.event) || {}, consentPopupCate: consentPopupCate })));
|
17
17
|
};
|
18
18
|
exports.default = (0, react_1.memo)(Consent);
|
@@ -12,7 +12,7 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
|
12
12
|
const materials_1 = require("../../../../core/utils/materials");
|
13
13
|
const WaterfallFlowItem = (props) => {
|
14
14
|
var _a;
|
15
|
-
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
15
|
+
const { rec, index, list, reportTagsView, textStyles, space, openFixedSize } = props;
|
16
16
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = (0, hooks_1.useSxpDataSource)();
|
17
17
|
const [showVideo, setShowVideo] = (0, react_1.useState)(false);
|
18
18
|
const imgDom = (0, react_1.useRef)(null);
|
@@ -106,11 +106,11 @@ const WaterfallFlowItem = (props) => {
|
|
106
106
|
}, 0);
|
107
107
|
};
|
108
108
|
return (react_1.default.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
|
109
|
-
react_1.default.createElement("div", { className: 'list-content-listItem-picture' },
|
109
|
+
react_1.default.createElement("div", { className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture' : 'list-content-listItem-picture1609' },
|
110
110
|
showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
|
111
111
|
react_1.default.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
|
112
112
|
react_1.default.createElement("canvas", { ref: canvasRef }))),
|
113
|
-
react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: 'list-content-listItem-picture-img', ref: imgDom })),
|
113
|
+
react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture-img' : 'list-content-listItem-picture1609-img', ref: imgDom })),
|
114
114
|
react_1.default.createElement("div", { className: 'list-content-listItem-info' },
|
115
115
|
react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title, dangerouslySetInnerHTML: {
|
116
116
|
__html: (0, tool_1.setFontForText)(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
|
@@ -11,7 +11,7 @@ const List_1 = tslib_1.__importDefault(require("./List"));
|
|
11
11
|
const hooks_1 = require("../../../../core/hooks");
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
13
|
const WaterFall = (props) => {
|
14
|
-
var _a;
|
14
|
+
var _a, _b;
|
15
15
|
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = (0, hooks_1.useSxpDataSource)();
|
16
16
|
const { backMainFeed } = (0, useEventReport_1.useEventReport)();
|
17
17
|
const modalEleRef = (0, react_1.useRef)(null);
|
@@ -100,6 +100,6 @@ const WaterFall = (props) => {
|
|
100
100
|
display: openHashtag ? 'block' : 'none'
|
101
101
|
} },
|
102
102
|
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.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
103
|
+
((_b = props === null || props === void 0 ? void 0 : props.openFixedSize) === null || _b === void 0 ? void 0 : _b.open) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
104
104
|
};
|
105
105
|
exports.default = (0, react_1.memo)(WaterFall);
|
@@ -120,7 +120,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
120
120
|
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
121
121
|
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
122
122
|
position: activeIndex + '',
|
123
|
-
fromKName: fk
|
123
|
+
fromKName: fk || fromKName,
|
124
124
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
125
125
|
ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
|
126
126
|
traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
|
@@ -147,9 +147,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
147
147
|
setIsReload(new Date().getTime());
|
148
148
|
skipLinkRef.current = false;
|
149
149
|
}
|
150
|
+
refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false);
|
150
151
|
handleH5EnterLink();
|
151
152
|
if (repCond) {
|
152
|
-
|
153
|
+
setTimeout(() => {
|
154
|
+
event_1.default.emit(event_1.SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
|
155
|
+
});
|
153
156
|
backMainFeed('external', selectTag);
|
154
157
|
}
|
155
158
|
}
|
@@ -4,13 +4,13 @@ exports.DEFAULT_TAG = exports.SxpDataSourceContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const qs_1 = tslib_1.__importDefault(require("qs"));
|
7
|
+
const lodash_1 = require("lodash");
|
7
8
|
const sessionStore_1 = require("../utils/sessionStore");
|
8
9
|
const localStore_1 = require("../utils/localStore");
|
9
10
|
const useIconLink_1 = require("../components/SxpPageRender/useIconLink");
|
10
11
|
const event_1 = tslib_1.__importStar(require("../utils/event"));
|
11
12
|
const Consent_1 = tslib_1.__importDefault(require("../components/Consent"));
|
12
13
|
const tool_1 = require("../utils/tool");
|
13
|
-
const lodash_1 = require("lodash");
|
14
14
|
exports.SxpDataSourceContext = (0, react_1.createContext)({
|
15
15
|
rtcList: [],
|
16
16
|
tagList: []
|
@@ -102,29 +102,32 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
102
102
|
const bffDataSource = (0, react_1.useMemo)(() => {
|
103
103
|
return dataSources === null || dataSources === void 0 ? void 0 : dataSources.find((d) => d.type === DataSourceType.BFF);
|
104
104
|
}, [dataSources]);
|
105
|
+
const fakeUserId = (0, react_1.useMemo)(() => {
|
106
|
+
var _a;
|
107
|
+
return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + (0, localStore_1.storeAndLoadFeUserId)();
|
108
|
+
}, [bffDataSource]);
|
105
109
|
const bffFetch = (0, react_1.useCallback)((path, options) => {
|
106
110
|
if (!bffDataSource)
|
107
111
|
return;
|
108
112
|
const url = bffDataSource.url;
|
109
|
-
const fakeUserId = (0, localStore_1.storeAndLoadFeUserId)();
|
110
113
|
if (options === null || options === void 0 ? void 0 : options.query) {
|
111
114
|
const queryString = qs_1.default.stringify(options.query);
|
112
115
|
path = `${path}?${queryString}`;
|
113
116
|
}
|
114
117
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
115
|
-
return navigator.sendBeacon(`${url}/api
|
118
|
+
return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
|
116
119
|
JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))
|
117
120
|
], { type: 'application/json;charset=UTF-8' }));
|
118
121
|
}
|
119
122
|
return window
|
120
|
-
.fetch(`${url}/api
|
123
|
+
.fetch(`${url}/api/${path}`, {
|
121
124
|
headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers),
|
122
125
|
method: options.method,
|
123
126
|
body: JSON.stringify(options.body)
|
124
127
|
})
|
125
128
|
.then((res) => res.json())
|
126
129
|
.catch((err) => Promise.reject(err));
|
127
|
-
}, [bffDataSource]);
|
130
|
+
}, [bffDataSource, fakeUserId]);
|
128
131
|
const getRecommendVideos = (0, react_1.useCallback)((query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
129
132
|
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
130
133
|
query = {
|
@@ -141,7 +144,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
141
144
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
|
142
145
|
}
|
143
146
|
else if (utmVal) {
|
144
|
-
const val = (_k = (_j = (_h =
|
147
|
+
const val = (_k = (_j = (_h = (0, tool_1.splitUrlParams)(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
145
148
|
var _a, _b;
|
146
149
|
const key = val.split('=')[0];
|
147
150
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
@@ -161,14 +164,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
161
164
|
const recurveRecList = (query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
162
165
|
var _v, _w, _x, _y, _z, _0;
|
163
166
|
query.pageNum = pageNum;
|
164
|
-
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'POST', body: query }));
|
167
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
|
165
168
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
166
169
|
return undefined;
|
167
170
|
}
|
168
171
|
setLoading(false);
|
169
172
|
list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
|
170
|
-
|
171
|
-
|
173
|
+
if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
|
174
|
+
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
175
|
+
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
176
|
+
}
|
172
177
|
const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
173
178
|
if (isNotNullList) {
|
174
179
|
pageNum = pageNum + 1;
|
@@ -178,12 +183,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
178
183
|
yield recurveRecList(query);
|
179
184
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
180
185
|
setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
|
181
|
-
return Object.assign(Object.assign({}, result.data), { recList: list });
|
186
|
+
return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
|
182
187
|
}
|
183
188
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
184
189
|
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
185
190
|
}
|
186
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'POST', body: query }));
|
191
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
|
187
192
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
188
193
|
return undefined;
|
189
194
|
}
|
@@ -233,6 +238,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
233
238
|
return expire;
|
234
239
|
}, [data]);
|
235
240
|
const bffEventReport = (0, react_1.useCallback)(({ userInfo, eventInfo, reportLayId = true }) => {
|
241
|
+
var _a, _b;
|
236
242
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
237
243
|
return;
|
238
244
|
}
|
@@ -240,7 +246,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
240
246
|
userInfo = {};
|
241
247
|
}
|
242
248
|
const sessionID = (0, sessionStore_1.storeAndLoadFeSessionId)();
|
243
|
-
const
|
249
|
+
const params = {};
|
250
|
+
const queryString = location.search.slice(1);
|
251
|
+
(_a = (0, tool_1.splitUrlParams)(queryString)) === null || _a === void 0 ? void 0 : _a.map((val) => {
|
252
|
+
const key = val.split('=')[0];
|
253
|
+
const value = val.split('=')[1];
|
254
|
+
params[key] = value;
|
255
|
+
});
|
256
|
+
console.log(params, '111');
|
257
|
+
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
258
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), (layoutVariantId && reportLayId && { layoutVariantId })), eventInfo), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' })), (cl_source && { cl_source }));
|
244
259
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
245
260
|
const realEventInfo = Object.entries(ef)
|
246
261
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -249,26 +264,35 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
249
264
|
console.log('userInfo:', userInfo);
|
250
265
|
console.log('eventInfo:', ef);
|
251
266
|
console.log('========= 结束 =========');
|
252
|
-
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(
|
267
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/event/report/CLD/${(_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id']}/${eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.eventSubject}`, {
|
253
268
|
method: 'POST',
|
254
269
|
body: { userInfo: realUserInfo, eventInfo: realEventInfo },
|
255
270
|
type: 'beacon'
|
256
271
|
});
|
257
|
-
}, [
|
272
|
+
}, [
|
273
|
+
bffFetch,
|
274
|
+
curReqInfo,
|
275
|
+
enableReportEvent,
|
276
|
+
globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview,
|
277
|
+
layoutVariantId,
|
278
|
+
globalConfig,
|
279
|
+
playbookType,
|
280
|
+
bffDataSource
|
281
|
+
]);
|
258
282
|
const bffFbReport = (0, react_1.useCallback)(({ eventName, product }) => {
|
259
|
-
var _a, _b, _c, _d, _e;
|
283
|
+
var _a, _b, _c, _d, _e, _f;
|
260
284
|
if (!enableReportEvent ||
|
261
285
|
!enabledMetaConversionApi ||
|
262
286
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
|
263
287
|
!((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
|
264
288
|
return;
|
265
289
|
}
|
266
|
-
|
290
|
+
const jsonParams = (0, lodash_1.cloneDeep)((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
|
267
291
|
const urlParams = new URLSearchParams(window.location.search);
|
268
292
|
const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
|
269
293
|
const fix_par = {
|
270
294
|
event_source_url: (_c = window === null || window === void 0 ? void 0 : window.location) === null || _c === void 0 ? void 0 : _c.href,
|
271
|
-
external_id:
|
295
|
+
external_id: fakeUserId,
|
272
296
|
client_user_agent: (_e = (_d = window === null || window === void 0 ? void 0 : window.navigator) === null || _d === void 0 ? void 0 : _d.userAgent) !== null && _e !== void 0 ? _e : '',
|
273
297
|
fbc: fbclid ? `fb.2.${new Date().getTime()}.${fbclid}` : '',
|
274
298
|
fbp: (0, tool_1.getCookie)('_fbp') ? `fb.2.${new Date().getTime()}.${(0, tool_1.getCookie)('_fbp')}` : '',
|
@@ -320,22 +344,30 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
320
344
|
}
|
321
345
|
};
|
322
346
|
getEventParams(jsonParams);
|
323
|
-
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(
|
347
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/event/report/FB/${(_f = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _f === void 0 ? void 0 : _f['x-app-id']}/${eventName}`, {
|
324
348
|
method: 'POST',
|
325
349
|
body: jsonParams,
|
326
350
|
type: 'beacon'
|
327
351
|
});
|
328
|
-
}, [
|
352
|
+
}, [
|
353
|
+
bffFetch,
|
354
|
+
enableReportEvent,
|
355
|
+
enabledMetaConversionApi,
|
356
|
+
globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview,
|
357
|
+
globalConfig,
|
358
|
+
fakeUserId,
|
359
|
+
bffDataSource
|
360
|
+
]);
|
329
361
|
const bffMutateLike = (0, react_1.useCallback)((body) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
330
|
-
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/like', { method: 'POST', body }));
|
362
|
+
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
|
331
363
|
return res === null || res === void 0 ? void 0 : res.success;
|
332
364
|
}), [bffFetch]);
|
333
365
|
const bffMutateUnlike = (0, react_1.useCallback)((body) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
334
|
-
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/unlike', { method: 'POST', body }));
|
366
|
+
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
|
335
367
|
return res === null || res === void 0 ? void 0 : res.success;
|
336
368
|
}), [bffFetch]);
|
337
369
|
const bffSubmitForm = (0, react_1.useCallback)((body) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
338
|
-
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
|
370
|
+
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
|
339
371
|
return res === null || res === void 0 ? void 0 : res.success;
|
340
372
|
}), [bffFetch]);
|
341
373
|
const bffGetTagList = (0, react_1.useCallback)((data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
@@ -344,12 +376,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
344
376
|
if (!utmVal || !isShowTag)
|
345
377
|
return;
|
346
378
|
try {
|
347
|
-
const val = (_10 = (_9 = (_8 =
|
379
|
+
const val = (_10 = (_9 = (_8 = (0, tool_1.splitUrlParams)(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
|
348
380
|
var _a, _b;
|
349
381
|
const key = val.split('=')[0];
|
350
382
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
351
383
|
})) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
|
352
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
384
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
353
385
|
setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
|
354
386
|
}
|
355
387
|
catch (e) {
|
@@ -379,9 +411,14 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
379
411
|
});
|
380
412
|
}, [bffEventReport, isFromHashtag]);
|
381
413
|
const h5EnterLink = (0, react_1.useCallback)(() => {
|
382
|
-
var _a, _b;
|
414
|
+
var _a, _b, _c;
|
383
415
|
const queryString = location.search.slice(1);
|
384
|
-
const params =
|
416
|
+
const params = {};
|
417
|
+
(_a = (0, tool_1.splitUrlParams)(queryString.replace(/\+/g, '%2B'))) === null || _a === void 0 ? void 0 : _a.map((val) => {
|
418
|
+
const key = val.split('=')[0];
|
419
|
+
const value = val.split('=')[1];
|
420
|
+
params[key] = value;
|
421
|
+
});
|
385
422
|
for (const key in params) {
|
386
423
|
params[key] = params[key].replace(/%2B/g, '+');
|
387
424
|
}
|
@@ -399,7 +436,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
399
436
|
utmContent: getVal('utm_content'),
|
400
437
|
enterTime: Math.floor(time / 1000) + '',
|
401
438
|
requestId: null,
|
402
|
-
enterUrl: (
|
439
|
+
enterUrl: (_c = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href) !== null && _c !== void 0 ? _c : '',
|
403
440
|
clSource: getVal('cl_source')
|
404
441
|
},
|
405
442
|
reportLayId: false
|
@@ -423,10 +460,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
423
460
|
let curData;
|
424
461
|
let gldata;
|
425
462
|
if (data === null || data === void 0 ? void 0 : data.layoutVariantId) {
|
463
|
+
layId = data === null || data === void 0 ? void 0 : data.layoutVariantId;
|
464
|
+
setLayoutVariantId(data === null || data === void 0 ? void 0 : data.layoutVariantId);
|
426
465
|
const id = (_b = (_a = data === null || data === void 0 ? void 0 : data.layoutVariantId) === null || _a === void 0 ? void 0 : _a.split('-')) === null || _b === void 0 ? void 0 : _b[1];
|
427
466
|
if (id) {
|
428
|
-
layId = id;
|
429
|
-
setLayoutVariantId(id);
|
430
467
|
curData = dataList === null || dataList === void 0 ? void 0 : dataList.find((item) => (item === null || item === void 0 ? void 0 : item.id) === id);
|
431
468
|
if (curData) {
|
432
469
|
setPageData(curData);
|
@@ -38,14 +38,16 @@ const getBgStyleByImg = (data) => {
|
|
38
38
|
exports.getBgStyleByImg = getBgStyleByImg;
|
39
39
|
const getPriceText = ({ product, enableFormattedPrice, globalConfig, isHiddenDef, style }) => {
|
40
40
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
41
|
+
let text = '';
|
41
42
|
if ((!(product === null || product === void 0 ? void 0 : product.currency) || !(product === null || product === void 0 ? void 0 : product.price)) && isHiddenDef)
|
42
43
|
return null;
|
43
|
-
let price = (product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price) ? product === null || product === void 0 ? void 0 : product.price : 7000;
|
44
|
-
|
44
|
+
let price = Number((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price) ? product === null || product === void 0 ? void 0 : product.price : 7000);
|
45
|
+
if (typeof price !== 'number')
|
46
|
+
return text;
|
45
47
|
let priceSymbol = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.priceSymbol;
|
46
48
|
let currency = (product === null || product === void 0 ? void 0 : product.currency) ? (_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : '' : '$';
|
47
49
|
const isToLocStr = enableFormattedPrice === undefined || enableFormattedPrice;
|
48
|
-
let decPic = price.toString();
|
50
|
+
let decPic = price === null || price === void 0 ? void 0 : price.toString();
|
49
51
|
if (priceSymbol === null || priceSymbol === void 0 ? void 0 : priceSymbol.showTwoDecimalPoint) {
|
50
52
|
decPic = price === null || price === void 0 ? void 0 : price.toFixed(2);
|
51
53
|
}
|
package/lib/core/utils/tool.d.ts
CHANGED
@@ -12,4 +12,5 @@ declare function getSystem(): string | null;
|
|
12
12
|
declare function getDevice(): string | null;
|
13
13
|
declare function getCookie(val: string): string;
|
14
14
|
declare function getScreenReader(): boolean;
|
15
|
-
|
15
|
+
declare function splitUrlParams(urlParams: string): string[] | undefined;
|
16
|
+
export { uuid, getIndexByblockType, getBrowserInfo, getDevice, getSystem, getCookie, getScreenReader, splitUrlParams };
|
package/lib/core/utils/tool.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getScreenReader = exports.getCookie = exports.getSystem = exports.getDevice = exports.getBrowserInfo = exports.getIndexByblockType = exports.uuid = exports.setFontForText = exports.getUid = exports.generateRandomString = void 0;
|
3
|
+
exports.splitUrlParams = exports.getScreenReader = exports.getCookie = exports.getSystem = exports.getDevice = exports.getBrowserInfo = exports.getIndexByblockType = exports.uuid = exports.setFontForText = exports.getUid = exports.generateRandomString = void 0;
|
4
4
|
const uuid_1 = require("uuid");
|
5
5
|
function uuid(len, radix) {
|
6
6
|
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
|
@@ -67,8 +67,8 @@ const setFontForText = (textContent, style) => {
|
|
67
67
|
const cnStyle = `font-family:${cn !== null && cn !== void 0 ? cn : 'inherit'}`;
|
68
68
|
const enStyle = `font-family:${en !== null && en !== void 0 ? en : 'inherit'}`;
|
69
69
|
const fn = (str) => {
|
70
|
-
|
71
|
-
|
70
|
+
const chineseStartIndex = str.search(chineseRegex);
|
71
|
+
const englishStartIndex = str.search(englishRegex);
|
72
72
|
if (chineseStartIndex !== -1 && englishStartIndex !== -1 && chineseStartIndex < englishStartIndex) {
|
73
73
|
content += `<span style="${cnStyle}">${str.substring(chineseStartIndex, englishStartIndex)}</span>`;
|
74
74
|
text = str.substring(englishStartIndex, str === null || str === void 0 ? void 0 : str.length);
|
@@ -98,7 +98,7 @@ const setFontForText = (textContent, style) => {
|
|
98
98
|
exports.setFontForText = setFontForText;
|
99
99
|
function getBrowserInfo() {
|
100
100
|
var _a, _b, _c, _d, _e, _f, _g;
|
101
|
-
|
101
|
+
const userAgent = self.navigator.userAgent;
|
102
102
|
if (!userAgent)
|
103
103
|
return null;
|
104
104
|
if (/edge\/([\d\.]+)/i.exec(userAgent))
|
@@ -120,7 +120,7 @@ function getBrowserInfo() {
|
|
120
120
|
exports.getBrowserInfo = getBrowserInfo;
|
121
121
|
function getSystem() {
|
122
122
|
var _a, _b, _c;
|
123
|
-
|
123
|
+
const userAgent = self.navigator.userAgent;
|
124
124
|
if (!userAgent)
|
125
125
|
return null;
|
126
126
|
if (/iphone/i.test(userAgent))
|
@@ -130,28 +130,28 @@ function getSystem() {
|
|
130
130
|
if (/windows/i.test(userAgent))
|
131
131
|
return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
|
132
132
|
if (/mac/i.test(userAgent))
|
133
|
-
return
|
133
|
+
return 'Mac OS';
|
134
134
|
return null;
|
135
135
|
}
|
136
136
|
exports.getSystem = getSystem;
|
137
137
|
function getDevice() {
|
138
|
-
|
138
|
+
const userAgent = self.navigator.userAgent;
|
139
139
|
if (!userAgent)
|
140
140
|
return null;
|
141
141
|
if (/iphone/i.test(userAgent))
|
142
|
-
return
|
142
|
+
return 'iPhone';
|
143
143
|
if (/android/i.test(userAgent)) {
|
144
|
-
|
145
|
-
|
144
|
+
const index1 = userAgent.indexOf('(');
|
145
|
+
const index2 = userAgent.indexOf(')');
|
146
146
|
if (index1 !== -1 && index2 !== -1) {
|
147
|
-
|
147
|
+
const value = userAgent.substring(index1 + 1, index2);
|
148
148
|
return `${value}`;
|
149
149
|
}
|
150
150
|
}
|
151
151
|
if (/windows/i.test(userAgent))
|
152
|
-
return
|
152
|
+
return 'Windows';
|
153
153
|
if (/mac/i.test(userAgent))
|
154
|
-
return
|
154
|
+
return 'Mac';
|
155
155
|
return null;
|
156
156
|
}
|
157
157
|
exports.getDevice = getDevice;
|
@@ -169,7 +169,7 @@ function getCookie(val) {
|
|
169
169
|
}
|
170
170
|
exports.getCookie = getCookie;
|
171
171
|
function getScreenReader() {
|
172
|
-
|
172
|
+
const userAgent = self.navigator.userAgent;
|
173
173
|
if (!userAgent)
|
174
174
|
return false;
|
175
175
|
return (/TalkBack/i.test(userAgent) ||
|
@@ -180,3 +180,28 @@ function getScreenReader() {
|
|
180
180
|
/ChromeVox/i.test(userAgent));
|
181
181
|
}
|
182
182
|
exports.getScreenReader = getScreenReader;
|
183
|
+
function splitUrlParams(urlParams) {
|
184
|
+
if (!urlParams)
|
185
|
+
return;
|
186
|
+
const indList = [];
|
187
|
+
for (let i = 0; i < urlParams.length; i++) {
|
188
|
+
const item = urlParams[i];
|
189
|
+
const curStr = urlParams.substring(i + 1, urlParams.length);
|
190
|
+
if (item === '&' &&
|
191
|
+
(curStr === null || curStr === void 0 ? void 0 : curStr.indexOf('=')) !== -1 &&
|
192
|
+
((curStr === null || curStr === void 0 ? void 0 : curStr.indexOf('=')) < (curStr === null || curStr === void 0 ? void 0 : curStr.indexOf('&')) || (curStr === null || curStr === void 0 ? void 0 : curStr.indexOf('&')) === -1)) {
|
193
|
+
indList.push(i);
|
194
|
+
}
|
195
|
+
}
|
196
|
+
const splitList = indList.length > 0 ? [] : [urlParams];
|
197
|
+
let lastIndex = 0;
|
198
|
+
indList === null || indList === void 0 ? void 0 : indList.map((i) => {
|
199
|
+
splitList === null || splitList === void 0 ? void 0 : splitList.push(urlParams.substring(lastIndex, i));
|
200
|
+
lastIndex = i + 1;
|
201
|
+
if (i === indList[indList.length - 1] && i < urlParams.length) {
|
202
|
+
splitList === null || splitList === void 0 ? void 0 : splitList.push(urlParams.substring(lastIndex, urlParams.length));
|
203
|
+
}
|
204
|
+
});
|
205
|
+
return splitList !== null && splitList !== void 0 ? splitList : [];
|
206
|
+
}
|
207
|
+
exports.splitUrlParams = splitUrlParams;
|
@@ -14,7 +14,10 @@ export interface IHashTagProps {
|
|
14
14
|
};
|
15
15
|
buttonBgStyle: CSSProperties;
|
16
16
|
showBanner?: boolean;
|
17
|
-
openFixedSize?:
|
17
|
+
openFixedSize?: {
|
18
|
+
open: true;
|
19
|
+
ratio: string;
|
20
|
+
};
|
18
21
|
}
|
19
22
|
declare const _default: React.NamedExoticComponent<IHashTagProps>;
|
20
23
|
export default _default;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
|
+
import './index.less';
|
3
|
+
export interface IClickProps {
|
4
|
+
open?: boolean;
|
5
|
+
content?: string;
|
6
|
+
style?: Record<string, any>;
|
7
|
+
isTel?: boolean;
|
8
|
+
acceptButton?: {
|
9
|
+
text?: string;
|
10
|
+
style?: CSSProperties;
|
11
|
+
};
|
12
|
+
rejectButton?: {
|
13
|
+
text?: string;
|
14
|
+
style?: CSSProperties;
|
15
|
+
};
|
16
|
+
consentPopupCate?: string;
|
17
|
+
}
|
18
|
+
declare const _default: React.NamedExoticComponent<IClickProps>;
|
19
|
+
export default _default;
|
@@ -0,0 +1,21 @@
|
|
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
|
+
require("./index.less");
|
6
|
+
const tel_png_1 = tslib_1.__importDefault(require("./tel.png"));
|
7
|
+
const ConsentDetail_1 = tslib_1.__importDefault(require("../../popup/ConsentDetail"));
|
8
|
+
const Click = (_a) => {
|
9
|
+
var { isTel, open, content, style, consentPopupCate, acceptButton, rejectButton } = _a, props = tslib_1.__rest(_a, ["isTel", "open", "content", "style", "consentPopupCate", "acceptButton", "rejectButton"]);
|
10
|
+
const visivle = (0, react_1.useMemo)(() => {
|
11
|
+
return consentPopupCate || (open && style);
|
12
|
+
}, [consentPopupCate, open]);
|
13
|
+
const handleClickAccept = () => { };
|
14
|
+
const handleClickReject = () => { };
|
15
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, isTel ? (react_1.default.createElement("img", { src: tel_png_1.default, style: { objectFit: 'cover', width: '100%', height: '100%' } })) : (react_1.default.createElement(react_1.default.Fragment, null, visivle && (react_1.default.createElement("div", { className: 'consentPopupClick' },
|
16
|
+
react_1.default.createElement("div", { className: 'consentPopupClick-container', style: style },
|
17
|
+
react_1.default.createElement(ConsentDetail_1.default, { content: content, style: { padding: 0 } }),
|
18
|
+
react_1.default.createElement("button", { style: acceptButton === null || acceptButton === void 0 ? void 0 : acceptButton.style, onClick: handleClickAccept }, acceptButton === null || acceptButton === void 0 ? void 0 : acceptButton.text),
|
19
|
+
react_1.default.createElement("button", { style: rejectButton === null || rejectButton === void 0 ? void 0 : rejectButton.style, onClick: handleClickReject }, rejectButton === null || rejectButton === void 0 ? void 0 : rejectButton.text))))))));
|
20
|
+
};
|
21
|
+
exports.default = (0, react_1.memo)(Click);
|