pb-sxp-ui 1.0.2 → 1.0.3-alpha.1

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 (142) hide show
  1. package/dist/index.cjs +1302 -688
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +28 -133
  4. package/dist/index.js +1302 -688
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -5
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -5
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +1302 -688
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -5
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/ExpandableText.js +17 -10
  18. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
  19. package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  20. package/es/core/components/SxpPageRender/Modal/index.js +7 -4
  21. package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  22. package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
  23. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
  24. package/es/core/components/SxpPageRender/Popup/index.js +3 -3
  25. package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  26. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
  27. package/es/core/components/SxpPageRender/index.d.ts +20 -1
  28. package/es/core/components/SxpPageRender/index.js +19 -16
  29. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  30. package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  31. package/es/core/components/SxpPageRender/useIconLink.js +8 -3
  32. package/es/core/context/EditorContext.d.ts +5 -0
  33. package/es/core/context/EditorContext.js +21 -3
  34. package/es/core/context/SxpDataSourceProvider.js +1 -1
  35. package/es/core/create.d.ts +1 -1
  36. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  37. package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
  38. package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
  39. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  40. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  43. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  44. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  45. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
  46. package/es/materials/sxp/popup/index.d.ts +0 -1
  47. package/es/materials/sxp/popup/index.js +0 -1
  48. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  49. package/es/materials/sxp/template/Appoint/index.js +4 -18
  50. package/es/materials/sxp/template/Appoint/material.js +22 -6
  51. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  52. package/es/materials/sxp/template/Commodity/index.js +5 -22
  53. package/es/materials/sxp/template/Commodity/material.js +31 -6
  54. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  55. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  56. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  57. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  58. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  59. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  60. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  61. package/es/materials/sxp/template/Link/index.js +4 -13
  62. package/es/materials/sxp/template/Link/material.js +22 -5
  63. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  64. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  65. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  66. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  67. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  68. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  69. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  70. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  71. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  72. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  73. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  74. package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
  75. package/es/materials/sxp/template/components/settingRender.js +198 -0
  76. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  77. package/es/materials/sxp/template/components/typing.js +1 -0
  78. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  79. package/lib/core/components/SxpPageCore/index.js +2 -2
  80. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  81. package/lib/core/components/SxpPageRender/ExpandableText.js +17 -10
  82. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
  83. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  84. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  85. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  86. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  87. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  88. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  89. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  90. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
  91. package/lib/core/components/SxpPageRender/index.d.ts +20 -1
  92. package/lib/core/components/SxpPageRender/index.js +19 -16
  93. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  94. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  95. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  96. package/lib/core/context/EditorContext.d.ts +5 -0
  97. package/lib/core/context/EditorContext.js +21 -3
  98. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  99. package/lib/core/create.d.ts +1 -1
  100. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  101. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
  102. package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
  103. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  104. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
  105. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  106. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  107. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  108. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  109. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
  110. package/lib/materials/sxp/popup/index.d.ts +0 -1
  111. package/lib/materials/sxp/popup/index.js +0 -1
  112. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  113. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  114. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  115. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  116. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  117. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  118. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  119. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  120. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  121. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  122. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  123. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  124. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  125. package/lib/materials/sxp/template/Link/index.js +4 -13
  126. package/lib/materials/sxp/template/Link/material.js +22 -5
  127. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  128. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  129. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  130. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  131. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  132. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  133. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  134. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  135. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  136. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  137. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  138. package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
  139. package/lib/materials/sxp/template/components/settingRender.js +200 -0
  140. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  141. package/lib/materials/sxp/template/components/typing.js +2 -0
  142. package/package.json +1 -1
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
3
3
  export interface IImgProps {
4
4
  rec?: RecItemType;
5
5
  children: any;
6
6
  className?: any;
7
7
  onClick?: any;
8
+ style?: CSSProperties;
8
9
  }
9
10
  declare const _default: React.NamedExoticComponent<IImgProps>;
10
11
  export default _default;
@@ -2,11 +2,12 @@ import { __rest } from "tslib";
2
2
  import React, { memo, useEffect, useRef } from 'react';
3
3
  import { throttle } from 'lodash';
4
4
  import useOnScreen from '../../../../core/hooks/useOnScreen';
5
- import { useSxpDataSource } from '../../../../core/hooks';
5
+ import { useEditor, useSxpDataSource } from '../../../../core/hooks';
6
6
  const EventProvider = (_a) => {
7
- var { rec, children, className, onClick } = _a, props = __rest(_a, ["rec", "children", "className", "onClick"]);
7
+ var { rec, children, className, onClick, style } = _a, props = __rest(_a, ["rec", "children", "className", "onClick", "style"]);
8
8
  const ref = useRef(null);
9
9
  const isOnScreen = useOnScreen(ref);
10
+ const { popupAni } = useEditor();
10
11
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
11
12
  useEffect(() => {
12
13
  var _a, _b;
@@ -27,7 +28,7 @@ const EventProvider = (_a) => {
27
28
  }, rec, item);
28
29
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
29
30
  onClick === null || onClick === void 0 ? void 0 : onClick();
30
- }, 1200);
31
- return (React.createElement("div", { ref: ref, className: className, onClick: handleClick }, children));
31
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
32
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
32
33
  };
33
34
  export default memo(EventProvider);
@@ -0,0 +1,108 @@
1
+ declare const _default: ({
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ child: {
7
+ type: string;
8
+ name: string[];
9
+ addonAfter: string;
10
+ }[];
11
+ name?: undefined;
12
+ addonAfter?: undefined;
13
+ } | {
14
+ type: string;
15
+ label: string;
16
+ child: ({
17
+ type: string;
18
+ name: string[];
19
+ max: number;
20
+ addonAfter?: undefined;
21
+ } | {
22
+ type: string;
23
+ name: string[];
24
+ addonAfter: string;
25
+ max: number;
26
+ })[];
27
+ name?: undefined;
28
+ addonAfter?: undefined;
29
+ } | {
30
+ type: string;
31
+ label: string;
32
+ name: string[];
33
+ child?: undefined;
34
+ addonAfter?: undefined;
35
+ } | {
36
+ label: string;
37
+ type: string;
38
+ name: string[];
39
+ addonAfter: string;
40
+ child?: undefined;
41
+ })[];
42
+ type?: undefined;
43
+ } | {
44
+ title: string;
45
+ type: string;
46
+ child: ({
47
+ type: string;
48
+ label: string;
49
+ child: ({
50
+ type: string;
51
+ name: string[];
52
+ options?: undefined;
53
+ addonAfter?: undefined;
54
+ } | {
55
+ type: string;
56
+ options: {
57
+ label: string;
58
+ value: string;
59
+ }[];
60
+ name: string[];
61
+ addonAfter?: undefined;
62
+ } | {
63
+ type: string;
64
+ addonAfter: string;
65
+ name: string[];
66
+ options?: undefined;
67
+ })[];
68
+ name?: undefined;
69
+ } | {
70
+ label: string;
71
+ type: string;
72
+ name: string[];
73
+ child?: undefined;
74
+ })[];
75
+ } | {
76
+ title: string;
77
+ child: ({
78
+ type: string;
79
+ label: string;
80
+ name: string[];
81
+ child?: undefined;
82
+ } | {
83
+ type: string;
84
+ label: string;
85
+ child: ({
86
+ type: string;
87
+ name: string[];
88
+ options?: undefined;
89
+ addonAfter?: undefined;
90
+ } | {
91
+ type: string;
92
+ options: {
93
+ label: string;
94
+ value: string;
95
+ }[];
96
+ name: string[];
97
+ addonAfter?: undefined;
98
+ } | {
99
+ type: string;
100
+ addonAfter: string;
101
+ name: string[];
102
+ options?: undefined;
103
+ })[];
104
+ name?: undefined;
105
+ })[];
106
+ type?: undefined;
107
+ })[];
108
+ export default _default;
@@ -0,0 +1,198 @@
1
+ export default [
2
+ {
3
+ title: '主题样式',
4
+ child: [
5
+ {
6
+ type: 'Group',
7
+ label: '尺寸',
8
+ child: [
9
+ {
10
+ type: 'Number',
11
+ name: ['style', 'width'],
12
+ addonAfter: 'W'
13
+ },
14
+ {
15
+ type: 'Number',
16
+ name: ['style', 'height'],
17
+ addonAfter: 'H'
18
+ }
19
+ ]
20
+ },
21
+ {
22
+ type: 'Group',
23
+ label: '圆角',
24
+ child: [
25
+ {
26
+ type: 'Slider',
27
+ name: ['style', 'borderRadius'],
28
+ max: 100
29
+ },
30
+ {
31
+ type: 'Number',
32
+ name: ['style', 'borderRadius'],
33
+ addonAfter: 'px',
34
+ max: 100
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ type: 'Color',
40
+ label: '背景色',
41
+ name: ['style', 'backgroundColor']
42
+ },
43
+ {
44
+ label: '内边距',
45
+ type: 'Number',
46
+ name: ['style', 'padding'],
47
+ addonAfter: 'px'
48
+ },
49
+ {
50
+ label: '与Post描述边距',
51
+ type: 'Number',
52
+ name: ['style', 'marginBottom'],
53
+ addonAfter: 'px'
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ title: '商品图片',
59
+ child: [
60
+ {
61
+ type: 'Group',
62
+ label: '尺寸',
63
+ child: [
64
+ {
65
+ type: 'Number',
66
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
67
+ addonAfter: 'W'
68
+ },
69
+ {
70
+ type: 'Number',
71
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
72
+ addonAfter: 'H'
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ type: 'Group',
78
+ label: '圆角',
79
+ child: [
80
+ {
81
+ type: 'Slider',
82
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
83
+ max: 100
84
+ },
85
+ {
86
+ type: 'Number',
87
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
88
+ addonAfter: 'px',
89
+ max: 100
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ type: 'Number',
95
+ label: '与右侧边距',
96
+ addonAfter: 'px',
97
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ title: '商品标题文本',
103
+ type: 'commodityTitle',
104
+ child: [
105
+ {
106
+ type: 'Group',
107
+ label: '字体',
108
+ child: [
109
+ {
110
+ type: 'Color',
111
+ name: ['props', 'ctaTempStyles', 'title', 'color']
112
+ },
113
+ {
114
+ type: 'Select',
115
+ options: [{ label: '黑体', value: '黑体' }],
116
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
117
+ },
118
+ {
119
+ type: 'Number',
120
+ addonAfter: 'px',
121
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ label: '样式',
127
+ type: 'TextStyle',
128
+ name: ['props', 'ctaTempStyles', 'title']
129
+ },
130
+ {
131
+ label: '对齐',
132
+ type: 'TextAlign',
133
+ name: ['props', 'ctaTempStyles', 'title']
134
+ },
135
+ {
136
+ label: '间距',
137
+ type: 'TextSpace',
138
+ name: ['props', 'ctaTempStyles', 'title']
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ title: 'CTA标题',
144
+ child: [
145
+ {
146
+ type: 'Group',
147
+ label: '尺寸',
148
+ child: [
149
+ {
150
+ type: 'Number',
151
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
152
+ addonAfter: 'W'
153
+ },
154
+ {
155
+ type: 'Number',
156
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
157
+ addonAfter: 'H'
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ type: 'Color',
163
+ label: '背景色',
164
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
165
+ },
166
+ {
167
+ type: 'Group',
168
+ label: '字体',
169
+ child: [
170
+ {
171
+ type: 'Color',
172
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
173
+ },
174
+ {
175
+ type: 'Select',
176
+ options: [{ label: '黑体', value: '黑体' }],
177
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
178
+ },
179
+ {
180
+ type: 'Number',
181
+ addonAfter: 'px',
182
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ label: '样式',
188
+ type: 'TextStyle',
189
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
190
+ },
191
+ {
192
+ label: '对齐',
193
+ type: 'TextAlign',
194
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
195
+ }
196
+ ]
197
+ }
198
+ ];
@@ -0,0 +1,6 @@
1
+ import { CSSProperties } from 'react';
2
+ export type ICtaTempStylesType = {
3
+ img?: CSSProperties;
4
+ title?: CSSProperties;
5
+ ctaTitle?: CSSProperties;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -6,6 +6,7 @@ export interface ISxpPageCoreProps {
6
6
  defaultSize?: number;
7
7
  hashTagSize?: number;
8
8
  loadingImage?: string;
9
+ appDomain?: string;
9
10
  }
10
11
  declare const _default: React.NamedExoticComponent<ISxpPageCoreProps>;
11
12
  export default _default;
@@ -11,7 +11,7 @@ const RESOLVER = {};
11
11
  Object.values(_materials_).forEach((v) => {
12
12
  RESOLVER[v.extend.type] = v;
13
13
  });
14
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage }) => {
14
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
15
15
  var _a, _b, _c, _d, _e, _f;
16
16
  const utmVal = (0, react_1.useMemo)(() => {
17
17
  var _a;
@@ -19,7 +19,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
19
19
  return searchParams;
20
20
  }, []);
21
21
  return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
22
- react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, render: ({ rtcList }) => {
22
+ react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList }) => {
23
23
  var _a;
24
24
  return (react_1.default.createElement(react_1.default.Fragment, null,
25
25
  react_1.default.createElement(SxpPageRender_1.default, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
@@ -7,6 +7,7 @@ interface IExpandableTextProps {
7
7
  onClick?: () => void;
8
8
  foldText?: string;
9
9
  unfoldText?: string;
10
+ isPost?: boolean;
10
11
  }
11
12
  declare const _default: React.NamedExoticComponent<IExpandableTextProps>;
12
13
  export default _default;
@@ -18,7 +18,7 @@ const limitTextLastWholeWord = (originalText = '', limit) => {
18
18
  const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
19
19
  return _words.join(' ') + ' ';
20
20
  };
21
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText }) => {
21
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
22
22
  const [isShowMore, setIsShowMore] = (0, react_1.useState)(true);
23
23
  const [isShow, setIsShow] = (0, react_1.useState)(false);
24
24
  const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
@@ -30,20 +30,27 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
30
30
  return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
31
31
  }, [text, maxStr, isShowMore]);
32
32
  (0, react_1.useEffect)(() => {
33
- if (multiRow.current) {
33
+ if (multiRow.current && isPost) {
34
34
  setIsShowMore(true);
35
35
  setTimeout(() => {
36
+ var _a;
36
37
  setIsShow(false);
37
- const height = parseInt(getComputedStyle(multiRow.current).height);
38
- const lineHeight = parseInt(getComputedStyle(multiRow === null || multiRow === void 0 ? void 0 : multiRow.current).lineHeight);
39
- if (text && height > lineHeight * lineClamp) {
40
- setIsShowMore(false);
41
- setIsShow(true);
38
+ try {
39
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
40
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
41
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
42
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
43
+ const lineHeight = isNaN(lh) ? fs : lh;
44
+ if (text && height > lineHeight * lineClamp) {
45
+ setIsShowMore(false);
46
+ setIsShow(true);
47
+ }
42
48
  }
49
+ catch (_b) { }
43
50
  }, 100);
44
51
  }
45
- }, [multiRow, text, lineClamp, style]);
46
- return (react_1.default.createElement("div", { className: className, style: Object.assign({}, style) },
52
+ }, [multiRow, text, lineClamp, style, isPost]);
53
+ return (react_1.default.createElement("div", { className: className, style: Object.assign({}, style), hidden: !text || text === '' },
47
54
  react_1.default.createElement("div", { ref: multiRow, style: {
48
55
  overflow: 'hidden',
49
56
  WebkitLineClamp: !isShowMore ? lineClamp : '',
@@ -51,7 +58,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
51
58
  display: '-webkit-box',
52
59
  WebkitBoxOrient: 'vertical',
53
60
  wordBreak: 'break-word'
54
- } }, text),
61
+ }, dangerouslySetInnerHTML: { __html: text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') } }),
55
62
  isShow && text && (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
56
63
  };
57
64
  exports.default = (0, react_1.memo)(ExpandableText);
@@ -7,7 +7,7 @@ const hooks_1 = require("../../../../core/hooks");
7
7
  const Scroll_1 = tslib_1.__importDefault(require("../../../../materials/sxp/template/components/Scroll"));
8
8
  const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
9
9
  const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
10
- const { setWaterFallData, setOpenHashtag, setCacheRtcList, setCacheActiveIndex, waterFallData, setIsFromHashtag } = (0, hooks_1.useSxpDataSource)();
10
+ const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = (0, hooks_1.useSxpDataSource)();
11
11
  const handleClickTag = (data) => {
12
12
  if (!waterFallData) {
13
13
  setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
@@ -1,8 +1,10 @@
1
1
  import React, { CSSProperties } from 'react';
2
+ import { IPopupAniType } from '../../../../core/context/EditorContext';
2
3
  interface IModalProps {
3
4
  visible?: boolean;
4
5
  padding?: number | string;
5
6
  modalStyle?: CSSProperties;
7
+ popupAniData?: IPopupAniType;
6
8
  onClose?: () => void;
7
9
  }
8
10
  declare const _default: React.NamedExoticComponent<React.PropsWithChildren<IModalProps>>;
@@ -4,8 +4,11 @@ const tslib_1 = require("tslib");
4
4
  const lodash_1 = require("lodash");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const ReactDOM = tslib_1.__importStar(require("react-dom"));
7
+ const hooks_1 = require("../../../../core/hooks");
7
8
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8
- const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
9
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
10
+ const { popupAni } = (0, hooks_1.useEditor)();
11
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
9
12
  const [isShow, setIsShow] = (0, react_1.useState)(false);
10
13
  const modalEleRef = (0, react_1.useRef)(null);
11
14
  (0, react_1.useEffect)(() => {
@@ -27,16 +30,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
27
30
  else {
28
31
  setTimeout(() => {
29
32
  setIsShow(false);
30
- }, 1200);
33
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
31
34
  }
32
- }, [visible]);
35
+ }, [visible, cssAni]);
33
36
  if (!modalEleRef.current)
34
37
  return null;
35
38
  const handleClose = (0, lodash_1.debounce)(() => {
36
39
  onClose === null || onClose === void 0 ? void 0 : onClose();
37
40
  }, 300);
38
41
  return ReactDOM.createPortal(react_1.default.createElement("div", { className: 'modal-bg', style: Object.assign({ display: isShow ? 'flex' : 'none', backgroundColor: visible ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
39
- react_1.default.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding }, onClick: (e) => {
42
+ react_1.default.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: (cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration) / 1000 + 's' }, onClick: (e) => {
40
43
  e.stopPropagation();
41
44
  e.preventDefault();
42
45
  } },
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ interface IProps {
3
+ nudge?: {
4
+ isOpen: boolean;
5
+ icon?: string;
6
+ backgroundColor: string;
7
+ content?: string;
8
+ marginBottom: number;
9
+ borderRadius: number;
10
+ size: {
11
+ height: number;
12
+ width: number;
13
+ };
14
+ textStyle: {
15
+ color: string;
16
+ fontFamily: string;
17
+ fontSize: number;
18
+ fontStyle: string;
19
+ textAlign: string;
20
+ };
21
+ };
22
+ }
23
+ declare const Nudge: FC<IProps>;
24
+ export default Nudge;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = tslib_1.__importDefault(require("react"));
5
+ const Nudge = ({ nudge }) => {
6
+ return (react_1.default.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
7
+ marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
8
+ width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
9
+ height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
10
+ backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
11
+ borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12
+ } },
13
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? react_1.default.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
14
+ react_1.default.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
15
+ };
16
+ exports.default = Nudge;
@@ -9,16 +9,20 @@ const hooks_1 = require("../../../../core/hooks");
9
9
  const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
10
10
  const { isActive } = (0, react_2.useSwiperSlide)();
11
11
  const { sxpParameter, openHashtag } = (0, hooks_1.useSxpDataSource)();
12
+ const [isLoad, setIsLoad] = (0, react_1.useState)(false);
12
13
  (0, react_1.useEffect)(() => {
13
- if (!isActive)
14
- return;
15
- if (openHashtag) {
16
- onReportViewImageEnd(rec);
14
+ if (isLoad && isActive) {
15
+ if (openHashtag) {
16
+ onReportViewImageEnd(rec);
17
+ }
18
+ else {
19
+ onViewImageStartEvent(index);
20
+ }
17
21
  }
18
22
  else {
19
- onViewImageStartEvent(index);
23
+ setIsLoad(true);
20
24
  }
21
- }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
25
+ }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
22
26
  if (!isActive) {
23
27
  return react_1.default.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
24
28
  }
@@ -7,7 +7,7 @@ const hooks_1 = require("../../../../core/hooks");
7
7
  const withBindDataSource_1 = tslib_1.__importDefault(require("../../../../core/hoc/withBindDataSource"));
8
8
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
9
9
  const Popup = () => {
10
- const { schema, resolver, popup } = (0, hooks_1.useEditor)();
10
+ const { schema, resolver, popup, popupAni } = (0, hooks_1.useEditor)();
11
11
  const { setPopupDetailData, popupDetailData, bffEventReport } = (0, hooks_1.useSxpDataSource)();
12
12
  const { productView } = (0, useEventReport_1.useEventReport)();
13
13
  const [visible, setVisible] = (0, react_1.useState)(false);
@@ -30,7 +30,7 @@ const Popup = () => {
30
30
  }, [popup]);
31
31
  const handleClose = () => {
32
32
  var _a, _b, _c;
33
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < 1200) {
33
+ if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
34
34
  return;
35
35
  }
36
36
  setVisible(false);
@@ -43,7 +43,7 @@ const Popup = () => {
43
43
  setTimeout(() => {
44
44
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
45
45
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
46
- }, 1200);
46
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
47
47
  };
48
48
  const renderPopupDetail = (0, react_1.useMemo)(() => {
49
49
  var _a, _b, _c;