pb-sxp-ui 1.15.2 → 1.15.4

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.
Files changed (68) hide show
  1. package/dist/index.cjs +658 -164
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +101 -0
  4. package/dist/index.js +658 -164
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +4 -4
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +4 -4
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +658 -164
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +4 -4
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/Consent/index.js +0 -1
  15. package/es/core/components/SxpPageRender/ConsentPopup.js +9 -9
  16. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  17. package/es/core/components/SxpPageRender/index.js +12 -9
  18. package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
  19. package/es/core/context/SxpDataSourceProvider.js +75 -36
  20. package/es/core/utils/materials.js +5 -3
  21. package/es/materials/sxp/consentPopup/Click/index.d.ts +19 -0
  22. package/es/materials/sxp/consentPopup/Click/index.js +37 -0
  23. package/es/materials/sxp/consentPopup/Click/material.d.ts +2 -0
  24. package/es/materials/sxp/consentPopup/Click/material.js +48 -0
  25. package/es/materials/sxp/consentPopup/Click/settingRender.d.ts +63 -0
  26. package/es/materials/sxp/consentPopup/Click/settingRender.js +210 -0
  27. package/es/materials/sxp/consentPopup/Display/index.d.ts +2 -2
  28. package/es/materials/sxp/consentPopup/Display/index.js +7 -5
  29. package/es/materials/sxp/consentPopup/Swipe/index.d.ts +13 -0
  30. package/es/materials/sxp/consentPopup/Swipe/index.js +58 -0
  31. package/es/materials/sxp/consentPopup/Swipe/material.d.ts +2 -0
  32. package/es/materials/sxp/consentPopup/Swipe/material.js +25 -0
  33. package/es/materials/sxp/consentPopup/Swipe/settingRender.d.ts +29 -0
  34. package/es/materials/sxp/consentPopup/Swipe/settingRender.js +48 -0
  35. package/es/materials/sxp/consentPopup/index.d.ts +2 -0
  36. package/es/materials/sxp/consentPopup/index.js +2 -0
  37. package/es/materials/sxp/cta/AniLink/index.js +1 -1
  38. package/es/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  39. package/es/materials/sxp/popup/ConsentDetail/index.d.ts +2 -1
  40. package/es/materials/sxp/popup/ConsentDetail/index.js +2 -2
  41. package/lib/core/components/Consent/index.js +0 -1
  42. package/lib/core/components/SxpPageRender/ConsentPopup.js +8 -8
  43. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  44. package/lib/core/components/SxpPageRender/index.js +12 -9
  45. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
  46. package/lib/core/context/SxpDataSourceProvider.js +75 -36
  47. package/lib/core/utils/materials.js +5 -3
  48. package/lib/materials/sxp/consentPopup/Click/index.d.ts +19 -0
  49. package/lib/materials/sxp/consentPopup/Click/index.js +39 -0
  50. package/lib/materials/sxp/consentPopup/Click/material.d.ts +2 -0
  51. package/lib/materials/sxp/consentPopup/Click/material.js +52 -0
  52. package/lib/materials/sxp/consentPopup/Click/settingRender.d.ts +63 -0
  53. package/lib/materials/sxp/consentPopup/Click/settingRender.js +212 -0
  54. package/lib/materials/sxp/consentPopup/Display/index.d.ts +2 -2
  55. package/lib/materials/sxp/consentPopup/Display/index.js +7 -5
  56. package/lib/materials/sxp/consentPopup/Swipe/index.d.ts +13 -0
  57. package/lib/materials/sxp/consentPopup/Swipe/index.js +60 -0
  58. package/lib/materials/sxp/consentPopup/Swipe/material.d.ts +2 -0
  59. package/lib/materials/sxp/consentPopup/Swipe/material.js +29 -0
  60. package/lib/materials/sxp/consentPopup/Swipe/settingRender.d.ts +29 -0
  61. package/lib/materials/sxp/consentPopup/Swipe/settingRender.js +50 -0
  62. package/lib/materials/sxp/consentPopup/index.d.ts +2 -0
  63. package/lib/materials/sxp/consentPopup/index.js +2 -0
  64. package/lib/materials/sxp/cta/AniLink/index.js +1 -1
  65. package/lib/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  66. package/lib/materials/sxp/popup/ConsentDetail/index.d.ts +2 -1
  67. package/lib/materials/sxp/popup/ConsentDetail/index.js +2 -2
  68. package/package.json +1 -1
@@ -0,0 +1,210 @@
1
+ export default [
2
+ {
3
+ title: '全局设置',
4
+ child: [
5
+ {
6
+ type: 'Switch',
7
+ label: '弹窗开关',
8
+ name: ['props', 'open']
9
+ },
10
+ {
11
+ type: 'Color',
12
+ label: '背景色',
13
+ name: ['style', 'backgroundColor']
14
+ },
15
+ {
16
+ type: 'Number',
17
+ label: '内边距',
18
+ name: ['style', 'padding'],
19
+ addonAfter: 'px'
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ title: '弹窗文本',
25
+ child: [
26
+ {
27
+ type: 'RichText',
28
+ name: ['props', 'content']
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ title: '接受按钮样式',
34
+ child: [
35
+ {
36
+ type: 'Color',
37
+ label: '背景色',
38
+ name: ['props', 'acceptButton', 'style', 'backgroundColor']
39
+ },
40
+ {
41
+ type: 'Number',
42
+ label: '尺寸',
43
+ name: ['props', 'acceptButton', 'style', 'height'],
44
+ addonAfter: 'H'
45
+ },
46
+ {
47
+ type: 'Group',
48
+ label: '圆角',
49
+ child: [
50
+ {
51
+ type: 'Slider',
52
+ name: ['props', 'acceptButton', 'style', 'borderRadius'],
53
+ max: 100
54
+ },
55
+ {
56
+ type: 'Number',
57
+ name: ['props', 'acceptButton', 'style', 'borderRadius'],
58
+ addonAfter: 'px',
59
+ max: 100
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ type: 'TextMargin',
65
+ label: '边距',
66
+ name: ['props', 'acceptButton', 'style']
67
+ },
68
+ {
69
+ type: 'Group',
70
+ label: '字体',
71
+ child: [
72
+ {
73
+ type: 'Select',
74
+ name: ['props', 'acceptButton', 'style', 'fontFamily-cn'],
75
+ bottomText: '中文字体'
76
+ },
77
+ {
78
+ type: 'Select',
79
+ name: ['props', 'acceptButton', 'style', 'fontFamily-en'],
80
+ bottomText: '英文/其他字体'
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ type: 'Group',
86
+ label: '',
87
+ child: [
88
+ {
89
+ type: 'Color',
90
+ name: ['props', 'acceptButton', 'style', 'color']
91
+ },
92
+ {
93
+ type: 'Number',
94
+ name: ['props', 'acceptButton', 'style', 'fontSize'],
95
+ addonAfter: 'px'
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ label: '样式',
101
+ type: 'TextStyle',
102
+ name: ['props', 'acceptButton', 'style']
103
+ },
104
+ {
105
+ label: '对齐',
106
+ type: 'TextAlign',
107
+ name: ['props', 'acceptButton', 'style']
108
+ },
109
+ {
110
+ label: '间距',
111
+ type: 'TextSpace',
112
+ name: ['props', 'acceptButton', 'style']
113
+ },
114
+ {
115
+ label: '文本',
116
+ type: 'TextArea',
117
+ name: ['props', 'acceptButton', 'text']
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ title: '拒绝按钮样式',
123
+ child: [
124
+ {
125
+ type: 'Color',
126
+ label: '背景色',
127
+ name: ['props', 'rejectButton', 'style', 'backgroundColor']
128
+ },
129
+ {
130
+ type: 'Number',
131
+ label: '尺寸',
132
+ name: ['props', 'rejectButton', 'style', 'height'],
133
+ addonAfter: 'H'
134
+ },
135
+ {
136
+ type: 'Group',
137
+ label: '圆角',
138
+ child: [
139
+ {
140
+ type: 'Slider',
141
+ name: ['props', 'rejectButton', 'style', 'borderRadius'],
142
+ max: 100
143
+ },
144
+ {
145
+ type: 'Number',
146
+ name: ['props', 'rejectButton', 'style', 'borderRadius'],
147
+ addonAfter: 'px',
148
+ max: 100
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ type: 'TextMargin',
154
+ label: '边距',
155
+ name: ['props', 'rejectButton', 'style']
156
+ },
157
+ {
158
+ type: 'Group',
159
+ label: '字体',
160
+ child: [
161
+ {
162
+ type: 'Select',
163
+ name: ['props', 'rejectButton', 'style', 'fontFamily-cn'],
164
+ bottomText: '中文字体'
165
+ },
166
+ {
167
+ type: 'Select',
168
+ name: ['props', 'rejectButton', 'style', 'fontFamily-en'],
169
+ bottomText: '英文/其他字体'
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ type: 'Group',
175
+ label: '',
176
+ child: [
177
+ {
178
+ type: 'Color',
179
+ name: ['props', 'rejectButton', 'style', 'color']
180
+ },
181
+ {
182
+ type: 'Number',
183
+ name: ['props', 'rejectButton', 'style', 'fontSize'],
184
+ addonAfter: 'px'
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ label: '样式',
190
+ type: 'TextStyle',
191
+ name: ['props', 'rejectButton', 'style']
192
+ },
193
+ {
194
+ label: '对齐',
195
+ type: 'TextAlign',
196
+ name: ['props', 'rejectButton', 'style']
197
+ },
198
+ {
199
+ label: '间距',
200
+ type: 'TextSpace',
201
+ name: ['props', 'rejectButton', 'style']
202
+ },
203
+ {
204
+ label: '文本',
205
+ type: 'TextArea',
206
+ name: ['props', 'rejectButton', 'text']
207
+ }
208
+ ]
209
+ }
210
+ ];
@@ -13,9 +13,9 @@ export interface IDisplayProps {
13
13
  };
14
14
  style?: Record<string, any>;
15
15
  isTel?: boolean;
16
- onClick?: () => void;
17
- contsentState?: boolean;
18
16
  isShowClose?: boolean;
17
+ consentPopupCate?: string;
18
+ onClick?: () => void;
19
19
  }
20
20
  declare const _default: React.NamedExoticComponent<IDisplayProps>;
21
21
  export default _default;
@@ -1,18 +1,20 @@
1
1
  import { __rest } from "tslib";
2
2
  import React, { memo, useCallback, useMemo, useState } from 'react';
3
3
  import './index.less';
4
- import { useEditorDataProvider } from '../../../../core/context/EditorDataProvider';
5
4
  import closeSvg from './close.svg';
6
5
  import tel from './tel.png';
7
6
  import { setFontForText } from '../../../../core/utils/tool';
7
+ import { getContsentState } from '../../../../core/utils/localStore';
8
8
  const Display = (_a) => {
9
9
  var _b, _c;
10
- var { isTel, isShowOnce, open, content, interaction, style, onClick, contsentState, isShowClose } = _a, props = __rest(_a, ["isTel", "isShowOnce", "open", "content", "interaction", "style", "onClick", "contsentState", "isShowClose"]);
11
- const { consentPopupCate } = useEditorDataProvider();
10
+ var { isTel, isShowOnce, open, content, interaction, style, onClick, isShowClose, consentPopupCate } = _a, props = __rest(_a, ["isTel", "isShowOnce", "open", "content", "interaction", "style", "onClick", "isShowClose", "consentPopupCate"]);
12
11
  const [isClose, setIsClose] = useState(false);
12
+ const contsentState = useMemo(() => {
13
+ return getContsentState();
14
+ }, []);
13
15
  const visivle = useMemo(() => {
14
- return consentPopupCate === 'Display' || (open && (isShowOnce || contsentState) && style && !isClose);
15
- }, [consentPopupCate, open, isClose]);
16
+ return consentPopupCate || (open && (isShowOnce || contsentState) && style && !isClose);
17
+ }, [consentPopupCate, open, isClose, contsentState]);
16
18
  const handleClickClose = useCallback(() => {
17
19
  setIsClose(true);
18
20
  }, []);
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface ISwipeProps {
4
+ open?: boolean;
5
+ content?: string;
6
+ style?: Record<string, any>;
7
+ isTel?: boolean;
8
+ consentPopupCate?: string;
9
+ swipeIcon?: string;
10
+ closeIcon?: string;
11
+ }
12
+ declare const _default: React.NamedExoticComponent<ISwipeProps>;
13
+ export default _default;
@@ -0,0 +1,58 @@
1
+ import { __awaiter, __rest } from "tslib";
2
+ import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
3
+ import './index.less';
4
+ import ConsentDetail from '../../popup/ConsentDetail';
5
+ import tel from './tel.png';
6
+ import { useSxpDataSource } from '../../../../core/hooks';
7
+ const Swipe = (_a) => {
8
+ var { isTel, open, content, style, consentPopupCate, swipeIcon, closeIcon } = _a, props = __rest(_a, ["isTel", "open", "content", "style", "consentPopupCate", "swipeIcon", "closeIcon"]);
9
+ const touchInfo = useRef();
10
+ const threshold = 50;
11
+ const { getAccount, accountSonsent } = useSxpDataSource();
12
+ const [consentResult, setConsentResult] = useState(false);
13
+ const handleGetAccount = () => __awaiter(void 0, void 0, void 0, function* () {
14
+ const res = yield (getAccount === null || getAccount === void 0 ? void 0 : getAccount());
15
+ setConsentResult(res);
16
+ });
17
+ useEffect(() => {
18
+ handleGetAccount();
19
+ }, []);
20
+ const visivle = useMemo(() => {
21
+ return consentPopupCate || (open && style && !consentResult);
22
+ }, [consentPopupCate, open, style, consentResult]);
23
+ const handleClick = (v) => {
24
+ accountSonsent === null || accountSonsent === void 0 ? void 0 : accountSonsent(v);
25
+ setConsentResult(true);
26
+ };
27
+ const handleTouchStart = (event) => {
28
+ const touch = event.touches[0];
29
+ touchInfo.current = { y: touch.clientY, d: 0 };
30
+ };
31
+ const handleTouchMove = (event) => {
32
+ var _a;
33
+ if (!touchInfo.current)
34
+ return;
35
+ const touch = event.touches[0];
36
+ const dy = touch.clientY - ((_a = touchInfo === null || touchInfo === void 0 ? void 0 : touchInfo.current) === null || _a === void 0 ? void 0 : _a.y);
37
+ const currentDistance = Math.abs(dy);
38
+ touchInfo.current = Object.assign(Object.assign({}, touchInfo.current), { d: currentDistance });
39
+ };
40
+ const handleTouchEnd = () => {
41
+ if (!touchInfo.current)
42
+ return;
43
+ const { d } = touchInfo.current || {};
44
+ if (d > threshold) {
45
+ handleClick(true);
46
+ }
47
+ touchInfo.current = {};
48
+ };
49
+ return (React.createElement(React.Fragment, null, isTel ? (React.createElement("img", { src: tel, style: { objectFit: 'cover', width: '100%', height: '100%' } })) : (React.createElement(React.Fragment, null, visivle && (React.createElement("div", { className: 'consentPopupSwipe', onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd },
50
+ React.createElement("div", { className: 'consentPopupSwipe-container', style: style },
51
+ React.createElement("div", { className: 'consentPopupSwipe-container-content' },
52
+ React.createElement(ConsentDetail, { content: content, style: { padding: 0 } })),
53
+ React.createElement("button", { "aria-label": 'close', className: 'consentPopupSwipe-container-close', onClick: () => handleClick(false) },
54
+ React.createElement("img", { src: closeIcon, alt: 'close' })),
55
+ swipeIcon && (React.createElement("div", { className: 'consentPopupSwipe-container-swipeIcon', onClick: () => handleClick(false) },
56
+ React.createElement("img", { src: swipeIcon, alt: 'Swipe Icon' }))))))))));
57
+ };
58
+ export default memo(Swipe);
@@ -0,0 +1,2 @@
1
+ declare const Swipe: import("../../../../core/create").MaterialComponet<import(".").ISwipeProps>;
2
+ export { Swipe };
@@ -0,0 +1,25 @@
1
+ import settingRender from './settingRender';
2
+ import SwipeComponent from '.';
3
+ import { createMaterial } from '../../../../core/create';
4
+ const Swipe = createMaterial(SwipeComponent, {
5
+ displayName: 'Swipe Consent',
6
+ icon: '',
7
+ category: 'consentPopup',
8
+ type: 'Swipe',
9
+ related: {
10
+ settingRender,
11
+ bindableProps: []
12
+ },
13
+ defaulSetting: {
14
+ props: {
15
+ content: '<p><span style="font- size: 14px"><strong><span style="line - height: 3">Your Cookie Preferences</span></strong></span></p><p><span style="line- height: 1"><span style="font- size: 12px">We use cookie, including third-party cookies, to</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">ensure the proper functioning and security of</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">this site, to analyse its use, and to show you</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">personalised content.</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">You can authorise the use of all cookies by</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">clicking on &#x27;Accept all cookies&#x27;. If you click on</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">&#x27;Reject all cookies&#x27;, we will only use cookies</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">necessary for the proper functioning and </span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">security of this site. To personalise or adjust</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">your preferences at any time, click on &#x27;Cookies</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">Settings&#x27; below or at the bottom of any</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">Fendi.com webpage.</span></span></p><p><span style="line - height: 1"><span style="font - size: 12px">For more information, <u>read our Cookie Policy</u>.</span></span></p>',
16
+ closeIcon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII='
17
+ },
18
+ style: {
19
+ backgroundColor: '#fff',
20
+ padding: 18
21
+ }
22
+ },
23
+ sort: 3
24
+ });
25
+ export { Swipe };
@@ -0,0 +1,29 @@
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
+ type: string;
18
+ name: string[];
19
+ }[];
20
+ } | {
21
+ title: string;
22
+ child: {
23
+ type: string;
24
+ label: string;
25
+ name: string[];
26
+ text: string;
27
+ }[];
28
+ })[];
29
+ export default _default;
@@ -0,0 +1,48 @@
1
+ export default [
2
+ {
3
+ title: '全局设置',
4
+ child: [
5
+ {
6
+ type: 'Switch',
7
+ label: '弹窗开关',
8
+ name: ['props', 'open']
9
+ },
10
+ {
11
+ type: 'Color',
12
+ label: '背景色',
13
+ name: ['style', 'backgroundColor']
14
+ },
15
+ {
16
+ type: 'Number',
17
+ label: '内边距',
18
+ name: ['style', 'padding'],
19
+ addonAfter: 'px'
20
+ },
21
+ {
22
+ label: '关闭按钮',
23
+ type: 'Upload',
24
+ name: ['props', 'closeIcon']
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ title: '弹窗文本',
30
+ child: [
31
+ {
32
+ type: 'RichText',
33
+ name: ['props', 'content']
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ title: '滑动图标',
39
+ child: [
40
+ {
41
+ type: 'Upload',
42
+ label: '滑动图标',
43
+ name: ['props', 'swipeIcon'],
44
+ text: '建议尺寸:252 * 185'
45
+ }
46
+ ]
47
+ }
48
+ ];
@@ -1 +1,3 @@
1
1
  export * from './Display/material';
2
+ export * from './Click/material';
3
+ export * from './Swipe/material';
@@ -1 +1,3 @@
1
1
  export * from './Display/material';
2
+ export * from './Click/material';
3
+ export * from './Swipe/material';
@@ -35,7 +35,7 @@ const AniLink = (_a) => {
35
35
  onClick === null || onClick === void 0 ? void 0 : onClick();
36
36
  }
37
37
  };
38
- const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
38
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || 'Show More';
39
39
  const aniTimStyle = useMemo(() => {
40
40
  var _a, _b;
41
41
  const ani = event === null || event === void 0 ? void 0 : event.animation;
@@ -35,7 +35,7 @@ const AniLinkPopup = (_a) => {
35
35
  onClick === null || onClick === void 0 ? void 0 : onClick();
36
36
  }
37
37
  };
38
- const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
38
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || 'Show More';
39
39
  const aniTimStyle = useMemo(() => {
40
40
  const ani = event === null || event === void 0 ? void 0 : event.animation;
41
41
  if (ani) {
@@ -1,8 +1,9 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import './index.less';
3
3
  export interface IConsentDetailProps {
4
4
  content?: string;
5
5
  isTel?: boolean;
6
+ style?: CSSProperties;
6
7
  }
7
8
  declare const _default: React.NamedExoticComponent<IConsentDetailProps>;
8
9
  export default _default;
@@ -2,11 +2,11 @@ import { __rest } from "tslib";
2
2
  import React, { memo } from 'react';
3
3
  import './index.less';
4
4
  const ConsentDetail = (_a) => {
5
- var { content, isTel } = _a, props = __rest(_a, ["content", "isTel"]);
5
+ var { content, isTel, style } = _a, props = __rest(_a, ["content", "isTel", "style"]);
6
6
  return (React.createElement("article", { className: 'consentDetail-article', dangerouslySetInnerHTML: {
7
7
  __html: typeof content === 'string' ? content : ''
8
8
  }, onClick: (e) => {
9
9
  e.stopPropagation();
10
- } }));
10
+ }, style: style }));
11
11
  };
12
12
  export default memo(ConsentDetail);
@@ -32,7 +32,6 @@ const Consent = ({ width = window.innerWidth, height = window.innerHeight, priva
32
32
  utmCampaign: getUtmValue('utm_campaign'),
33
33
  utmId: getUtmValue('utm_id'),
34
34
  utmContent: getUtmValue('utm_content'),
35
- clSource: getUtmValue('cl_source'),
36
35
  enterTime: `${Date.now()}`,
37
36
  enterUrl: window.location.href,
38
37
  rtc: null,
@@ -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 localStore_1 = require("../../../core/utils/localStore");
7
+ const EditorDataProvider_1 = require("../../../core/context/EditorDataProvider");
8
8
  const Consent = ({ resolver, globalConfig }) => {
9
- var _a, _b;
10
- const contsentState = (0, react_1.useMemo)(() => {
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);
9
+ var _a, _b, _c;
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
- 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) || {}, contsentState: contsentState }));
12
+ if (!value || (!consentPopupCate && !((_c = value === null || value === void 0 ? void 0 : value.props) === null || _c === void 0 ? void 0 : _c.open)))
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);
@@ -11,7 +11,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
11
11
  react_1.default.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
12
12
  react_1.default.createElement("img", { src: icon, alt: 'back button' })),
13
13
  react_1.default.createElement("div", { className: 'clc-sxp-nav-title', style: Object.assign(Object.assign({}, textStyle), { paddingLeft: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.textAlign) === 'left' ? '35px' : 0 }), dangerouslySetInnerHTML: {
14
- __html: (0, tool_1.setFontForText)(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
14
+ __html: (0, tool_1.setFontForText)(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : 'title'}`, textStyle)
15
15
  } })));
16
16
  };
17
17
  exports.default = (0, react_1.memo)(Navbar);
@@ -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 ? fk : fromKName,
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
- event_1.default.emit(event_1.SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
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
  }
@@ -411,7 +414,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
411
414
  }
412
415
  };
413
416
  const handleScrollEvent = (swiper) => {
414
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
415
418
  const item = data[swiper.previousIndex];
416
419
  if (!item)
417
420
  return;
@@ -430,9 +433,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
430
433
  contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
431
434
  productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
432
435
  requestId: null,
433
- traceInfo: (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : '',
436
+ traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
434
437
  contentFormat,
435
- position: ((_k = swiper.previousIndex) !== null && _k !== void 0 ? _k : 0) + ''
438
+ position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
436
439
  }
437
440
  });
438
441
  handleViewImageStartEnd(item);
@@ -443,12 +446,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
443
446
  eventInfo: {
444
447
  eventSubject: 'scrollUp',
445
448
  eventDescription: 'User scroll up',
446
- contentId: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
447
- productId: (_p = (_o = item.product) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
449
+ contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
450
+ productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
448
451
  requestId: null,
449
- traceInfo: (_r = (_q = item === null || item === void 0 ? void 0 : item.video) === null || _q === void 0 ? void 0 : _q.traceInfo) !== null && _r !== void 0 ? _r : '',
452
+ 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 : '',
450
453
  contentFormat,
451
- position: ((_s = swiper.previousIndex) !== null && _s !== void 0 ? _s : 0) + ''
454
+ position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
452
455
  }
453
456
  });
454
457
  handleViewImageStartEnd(item);
@@ -90,6 +90,8 @@ export interface ISxpDataSourceContext {
90
90
  setEventTimeList?: React.Dispatch<React.SetStateAction<Array<IEventTimeType>>>;
91
91
  multiPostTimeRef?: any;
92
92
  refreshFeSession?: (enableReSid?: boolean, event?: (fk: string) => void) => void;
93
+ getAccount?: () => Promise<any>;
94
+ accountSonsent?: (v: boolean) => Promise<boolean>;
93
95
  }
94
96
  export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
95
97
  export interface SxpDataSourceProviderProps {