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

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 (182) hide show
  1. package/dist/index.cjs +3624 -1460
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +143 -245
  4. package/dist/index.js +3625 -1461
  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 +3624 -1460
  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.d.ts +2 -1
  19. package/es/core/components/SxpPageRender/Hashtag/index.js +3 -3
  20. package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  21. package/es/core/components/SxpPageRender/Modal/index.js +7 -4
  22. package/es/core/components/SxpPageRender/Navbar.d.ts +1 -0
  23. package/es/core/components/SxpPageRender/Navbar.js +3 -2
  24. package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  25. package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
  26. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
  27. package/es/core/components/SxpPageRender/Popup/index.js +3 -3
  28. package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  29. package/es/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
  30. package/es/core/components/SxpPageRender/WaterFall/List.js +24 -14
  31. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
  32. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -14
  33. package/es/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
  34. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  35. package/es/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
  36. package/es/core/components/SxpPageRender/index.d.ts +22 -1
  37. package/es/core/components/SxpPageRender/index.js +22 -19
  38. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  39. package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  40. package/es/core/components/SxpPageRender/useIconLink.js +8 -3
  41. package/es/core/context/EditorContext.d.ts +5 -0
  42. package/es/core/context/EditorContext.js +21 -3
  43. package/es/core/context/EditorDataProvider.d.ts +3 -1
  44. package/es/core/context/EditorDataProvider.js +5 -2
  45. package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
  46. package/es/core/context/SxpDataSourceProvider.js +8 -4
  47. package/es/core/create.d.ts +1 -1
  48. package/es/materials/sxp/HashTag/index.d.ts +14 -0
  49. package/es/materials/sxp/HashTag/index.js +6 -0
  50. package/es/materials/sxp/HashTag/material.d.ts +2 -0
  51. package/es/materials/sxp/HashTag/material.js +52 -0
  52. package/es/materials/sxp/HashTag/settingRender.d.ts +122 -0
  53. package/es/materials/sxp/HashTag/settingRender.js +153 -0
  54. package/es/materials/sxp/index.d.ts +1 -0
  55. package/es/materials/sxp/index.js +1 -0
  56. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  57. package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
  58. package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
  59. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  60. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
  61. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  62. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  63. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  64. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  65. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
  66. package/es/materials/sxp/popup/index.d.ts +0 -1
  67. package/es/materials/sxp/popup/index.js +0 -1
  68. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  69. package/es/materials/sxp/template/Appoint/index.js +4 -18
  70. package/es/materials/sxp/template/Appoint/material.js +22 -6
  71. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  72. package/es/materials/sxp/template/Commodity/index.js +5 -22
  73. package/es/materials/sxp/template/Commodity/material.js +31 -6
  74. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  75. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  76. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  77. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  78. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  79. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  80. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  81. package/es/materials/sxp/template/Link/index.js +4 -13
  82. package/es/materials/sxp/template/Link/material.js +22 -5
  83. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  84. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  85. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  86. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  87. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  88. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  89. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  90. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  91. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  92. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  93. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  94. package/es/materials/sxp/template/components/settingRender.d.ts +123 -0
  95. package/es/materials/sxp/template/components/settingRender.js +215 -0
  96. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  97. package/es/materials/sxp/template/components/typing.js +1 -0
  98. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  99. package/lib/core/components/SxpPageCore/index.js +2 -2
  100. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  101. package/lib/core/components/SxpPageRender/ExpandableText.js +17 -10
  102. package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
  103. package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -3
  104. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  105. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  106. package/lib/core/components/SxpPageRender/Navbar.d.ts +1 -0
  107. package/lib/core/components/SxpPageRender/Navbar.js +3 -2
  108. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  109. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  110. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  111. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  112. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  113. package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
  114. package/lib/core/components/SxpPageRender/WaterFall/List.js +23 -14
  115. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
  116. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +15 -13
  117. package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
  118. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  119. package/lib/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
  120. package/lib/core/components/SxpPageRender/index.d.ts +22 -1
  121. package/lib/core/components/SxpPageRender/index.js +22 -19
  122. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  123. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  124. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  125. package/lib/core/context/EditorContext.d.ts +5 -0
  126. package/lib/core/context/EditorContext.js +21 -3
  127. package/lib/core/context/EditorDataProvider.d.ts +3 -1
  128. package/lib/core/context/EditorDataProvider.js +4 -1
  129. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
  130. package/lib/core/context/SxpDataSourceProvider.js +8 -4
  131. package/lib/core/create.d.ts +1 -1
  132. package/lib/materials/sxp/HashTag/index.d.ts +14 -0
  133. package/lib/materials/sxp/HashTag/index.js +9 -0
  134. package/lib/materials/sxp/HashTag/material.d.ts +2 -0
  135. package/lib/materials/sxp/HashTag/material.js +56 -0
  136. package/lib/materials/sxp/HashTag/settingRender.d.ts +122 -0
  137. package/lib/materials/sxp/HashTag/settingRender.js +155 -0
  138. package/lib/materials/sxp/index.d.ts +1 -0
  139. package/lib/materials/sxp/index.js +1 -0
  140. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  141. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
  142. package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
  143. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  144. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
  145. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  146. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  147. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  148. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  149. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
  150. package/lib/materials/sxp/popup/index.d.ts +0 -1
  151. package/lib/materials/sxp/popup/index.js +0 -1
  152. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  153. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  154. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  155. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  156. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  157. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  158. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  159. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  160. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  161. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  162. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  163. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  164. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  165. package/lib/materials/sxp/template/Link/index.js +4 -13
  166. package/lib/materials/sxp/template/Link/material.js +22 -5
  167. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  168. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  169. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  170. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  171. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  172. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  173. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  174. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  175. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  176. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  177. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  178. package/lib/materials/sxp/template/components/settingRender.d.ts +123 -0
  179. package/lib/materials/sxp/template/components/settingRender.js +217 -0
  180. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  181. package/lib/materials/sxp/template/components/typing.js +2 -0
  182. package/package.json +1 -1
@@ -10,19 +10,39 @@ interface ISxpPageRenderProps {
10
10
  likeIcon?: string;
11
11
  unlikeIcon?: string;
12
12
  color?: string;
13
- productPost?: string;
13
+ productPost?: any[];
14
14
  muteIconX?: number;
15
15
  muteIconY?: number;
16
16
  likeIconX?: number;
17
17
  likeIconY?: number;
18
18
  isShowLike?: boolean;
19
19
  swipeTipIcon?: string;
20
+ hashTag?: any[];
20
21
  };
21
22
  descStyle?: CSSProperties;
22
23
  tipText?: {
23
24
  foldText: string;
24
25
  unfoldText: string;
25
26
  };
27
+ nudge?: {
28
+ isOpen: boolean;
29
+ icon?: string;
30
+ backgroundColor: string;
31
+ content?: string;
32
+ marginBottom: number;
33
+ borderRadius: number;
34
+ size: {
35
+ height: number;
36
+ width: number;
37
+ };
38
+ textStyle: {
39
+ color: string;
40
+ fontFamily: string;
41
+ fontSize: number;
42
+ fontStyle: string;
43
+ textAlign: string;
44
+ };
45
+ };
26
46
  containerHeight?: number;
27
47
  containerWidth?: number;
28
48
  tempMap?: Record<string, any>;
@@ -30,6 +50,7 @@ interface ISxpPageRenderProps {
30
50
  resolver: any;
31
51
  ctaType?: string;
32
52
  _schema?: any;
53
+ hashTagStyle?: CSSProperties;
33
54
  }
34
55
  declare const SxpPageRender: FC<ISxpPageRenderProps>;
35
56
  export default SxpPageRender;
@@ -7,21 +7,21 @@ import VideoWidget from './VideoWidget';
7
7
  import ToggleButton from './ToggleButton';
8
8
  import FingerSwipeTip from './FingerSwipeTip';
9
9
  import PictureGroup from './PictureGroup';
10
- import ProductInfo from './ProductInfo';
11
10
  import Hashtag from './Hashtag';
12
11
  import Navbar from './Navbar';
13
12
  import left from './left.png';
14
13
  import RenderCard from './RenderCard';
15
14
  import { useIconLink } from './useIconLink';
16
15
  import WaterFall from './WaterFall';
17
- import CommodityDetailDiroNew from '../../../materials/sxp/popup/CommodityDetailDiroNew';
16
+ import Nudge from './Nudge';
18
17
  import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../core/utils/event';
19
18
  import { useEditor, useSxpDataSource } from '../../../core/hooks';
20
19
  import { refreshFeSessionId } from '../../../core/utils/sessionStore';
21
20
  import './index.less';
22
21
  import { useEventReport } from '../../../core/hooks/useEventReport';
23
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, _schema }) => {
24
- var _a, _b, _c, _d;
22
+ import withBindDataSource from '../../../core/hoc/withBindDataSource';
23
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle }) => {
24
+ var _a, _b, _c, _d, _e, _f, _g;
25
25
  const { schema } = useEditor();
26
26
  const [activeIndex, setActiveIndex] = useState(0);
27
27
  const viewImageStartTime = useRef(0);
@@ -149,39 +149,37 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
149
149
  return null;
150
150
  }, [globalConfig]);
151
151
  const renderContent = useCallback((rec, index) => {
152
- var _a, _b;
152
+ var _a, _b, _c, _d;
153
153
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
154
154
  return (React.createElement(VideoWidget, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex }));
155
155
  }
156
156
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
157
157
  return (React.createElement(PictureGroup, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent }));
158
158
  }
159
- if (rec.product) {
160
- switch (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) {
161
- case 'CommodityDetailDiroNew':
162
- return (React.createElement(CommodityDetailDiroNew, { key: rec.product.itemId, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } }));
163
- case 'CommodityDetail':
164
- return (React.createElement(ProductInfo, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
165
- default:
166
- return (React.createElement(ProductInfo, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
167
- }
159
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
160
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
161
+ var _a, _b, _c, _d, _e, _f;
162
+ const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
163
+ return (React.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } })));
164
+ });
168
165
  }
169
166
  return null;
170
- }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText]);
167
+ }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText, resolver, schema]);
171
168
  const renderBottom = useCallback((rec, index) => {
172
169
  var _a, _b, _c, _d, _e, _f, _g;
173
170
  if (rec.video) {
174
171
  return (React.createElement(React.Fragment, null,
175
172
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
176
173
  React.createElement("div", { className: 'clc-sxp-bottom' },
174
+ React.createElement(Nudge, { nudge: nudge }),
177
175
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
178
176
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
179
177
  React.createElement("div", { className: 'clc-sxp-bottom-text' },
180
- React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
181
- React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec }))));
178
+ React.createElement(ExpandableText, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
179
+ React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
182
180
  }
183
181
  return null;
184
- }, [descStyle, activeIndex, tempMap, resolver, tipText]);
182
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
185
183
  const renderLikeButton = useCallback((rec) => {
186
184
  var _a, _b;
187
185
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
@@ -257,6 +255,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
257
255
  productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
258
256
  }
259
257
  };
258
+ useEffect(() => {
259
+ const item = data[activeIndex];
260
+ if (openHashtag)
261
+ handleReportProductView(item);
262
+ }, [openHashtag, data, activeIndex]);
260
263
  const handleViewImageStartEvent = (activeIndex) => {
261
264
  var _a, _b, _c, _d, _e, _f;
262
265
  const item = data[activeIndex];
@@ -340,6 +343,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
340
343
  zIndex: 999
341
344
  }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
342
345
  renderView),
343
- React.createElement(WaterFall, null)));
346
+ React.createElement(WaterFall, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))));
344
347
  };
345
348
  export default SxpPageRender;
@@ -39,6 +39,7 @@ export type ProductInfoType = {
39
39
  info: string;
40
40
  currency: string;
41
41
  bindCta?: CTAInfoType;
42
+ taxInfo?: string;
42
43
  };
43
44
  export type VideoInfoType = {
44
45
  bindCtaId: string;
@@ -1 +1 @@
1
- export declare function useIconLink(path: string): string;
1
+ export declare function useIconLink(path: string, domain?: string): string;
@@ -1,8 +1,13 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useSxpDataSource } from '../../../core/hooks';
3
- export function useIconLink(path) {
3
+ export function useIconLink(path, domain) {
4
4
  const { appDomain } = useSxpDataSource();
5
5
  return useMemo(() => {
6
- return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
7
- }, [appDomain, path]);
6
+ if (domain) {
7
+ return `https://${domain}${path}`;
8
+ }
9
+ else {
10
+ return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
11
+ }
12
+ }, [appDomain, path, domain]);
8
13
  }
@@ -15,6 +15,10 @@ export interface IPageParams {
15
15
  h5_url?: string;
16
16
  mp_rul?: string;
17
17
  }
18
+ export type IPopupAniType = {
19
+ name: string;
20
+ duration: number;
21
+ };
18
22
  export interface IEditorContext {
19
23
  resolver: Record<string, MaterialComponet>;
20
24
  currentNode: any | null;
@@ -55,6 +59,7 @@ export interface IEditorContext {
55
59
  getCurPageConf?: any;
56
60
  popup: string;
57
61
  setPopup: React.Dispatch<React.SetStateAction<string>>;
62
+ popupAni: IPopupAniType;
58
63
  }
59
64
  export interface IEditorCoreProps {
60
65
  resolver: Record<string, MaterialComponet>;
@@ -45,7 +45,11 @@ export const EditorContext = React.createContext({
45
45
  undoStack: [item],
46
46
  redoStack: [],
47
47
  popup: '',
48
- setPopup: () => { }
48
+ setPopup: () => { },
49
+ popupAni: {
50
+ name: 'none',
51
+ duration: 0
52
+ }
49
53
  });
50
54
  const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
51
55
  const [currentNode, setCurrentNode] = useState(null);
@@ -64,9 +68,22 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
64
68
  const [undoStack, setUndoStack] = useState([[item]]);
65
69
  const [redoStack, setRedoStack] = useState([]);
66
70
  const [popup, setPopup] = useState('');
71
+ const [popupAni, setPopupAni] = useState({
72
+ name: 'none',
73
+ duration: 0
74
+ });
67
75
  typeof window !== 'undefined' &&
68
- (window.sxpPopup = (type) => {
76
+ (window.sxpPopup = (type, aniType) => {
69
77
  setPopup(type);
78
+ if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
79
+ setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
80
+ }
81
+ else {
82
+ setPopupAni({
83
+ name: 'none',
84
+ duration: 0
85
+ });
86
+ }
70
87
  });
71
88
  typeof window !== 'undefined' &&
72
89
  (window.getJointUtmLink = (url) => {
@@ -135,7 +152,8 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
135
152
  setUndoStack,
136
153
  getCurPageConf,
137
154
  popup,
138
- setPopup
155
+ setPopup,
156
+ popupAni
139
157
  } },
140
158
  React.createElement(DataSourceProvider, { isSsr: isSsr, enable: enableDataSource }, children)));
141
159
  });
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import React, { FC, PropsWithChildren } from 'react';
2
2
  interface IEditorDataContext {
3
3
  sxpPrameter?: {
4
4
  bottomImage: string;
@@ -9,6 +9,8 @@ interface IEditorDataContext {
9
9
  loadingImage: string;
10
10
  };
11
11
  appDomain?: string;
12
+ openHashtag?: boolean;
13
+ setOpenHashtag?: React.Dispatch<React.SetStateAction<boolean>>;
12
14
  }
13
15
  interface IEditorProviderProps {
14
16
  data?: any;
@@ -1,7 +1,8 @@
1
- import React, { createContext, useContext } from 'react';
1
+ import React, { createContext, useContext, useState } from 'react';
2
2
  const EditorDataContext = createContext({});
3
3
  const EditorDataProvider = ({ children, data }) => {
4
4
  var _a, _b, _c, _d, _e, _f;
5
+ const [openHashtag, setOpenHashtag] = useState(false);
5
6
  return (React.createElement(EditorDataContext.Provider, { value: {
6
7
  sxpPrameter: {
7
8
  bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
@@ -11,7 +12,9 @@ const EditorDataProvider = ({ children, data }) => {
11
12
  hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
12
13
  loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
13
14
  },
14
- appDomain: data === null || data === void 0 ? void 0 : data.appDomain
15
+ appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
16
+ openHashtag,
17
+ setOpenHashtag
15
18
  } }, children));
16
19
  };
17
20
  export function useEditorDataProvider() {
@@ -57,6 +57,7 @@ export interface ISxpDataSourceContext {
57
57
  appDomain?: string;
58
58
  hashTagSize?: number;
59
59
  loadingImage?: string;
60
+ isOpenHashTag?: boolean;
60
61
  }
61
62
  export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
62
63
  export interface SxpDataSourceProviderProps {
@@ -85,6 +86,7 @@ export interface SxpDataSourceProviderProps {
85
86
  sxpParameter?: PageData['sxp_parameter'];
86
87
  appDomain?: string;
87
88
  loadingImage?: string;
89
+ isOpenHashTag?: boolean;
88
90
  }
89
91
  declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
90
92
  export default _default;
@@ -12,7 +12,7 @@ var DataSourceType;
12
12
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
13
13
  })(DataSourceType || (DataSourceType = {}));
14
14
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
15
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage }) => {
15
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
16
16
  const [rtcList, setRtcList] = useState([]);
17
17
  const [loading, setLoading] = useState(false);
18
18
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -20,10 +20,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
20
20
  const isInit = useRef(false);
21
21
  const [popupDetailData, setPopupDetailData] = useState();
22
22
  const [waterFallData, setWaterFallData] = useState();
23
- const [openHashtag, setOpenHashtag] = useState(false);
23
+ const [openHashtag, setOpenHashtag] = useState(isOpenHashTag);
24
24
  const [cacheRtcList, setCacheRtcList] = useState([]);
25
25
  const [cacheActiveIndex, setCacheActiveIndex] = useState(0);
26
26
  const [isFromHashtag, setIsFromHashtag] = useState(false);
27
+ useEffect(() => {
28
+ setOpenHashtag(isOpenHashTag);
29
+ }, [isOpenHashTag]);
27
30
  const bffDataSource = useMemo(() => {
28
31
  return dataSources === null || dataSources === void 0 ? void 0 : dataSources.find((d) => d.type === DataSourceType.BFF);
29
32
  }, [dataSources]);
@@ -168,7 +171,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
168
171
  setLoading(false);
169
172
  });
170
173
  }, [getRecommendVideos]);
171
- const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif');
174
+ const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
172
175
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
173
176
  rtcList,
174
177
  setRtcList,
@@ -198,7 +201,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
198
201
  setIsFromHashtag,
199
202
  appDomain,
200
203
  hashTagSize,
201
- loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage
204
+ loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage,
205
+ isOpenHashTag
202
206
  } }, render({ rtcList, mutateLike: bffMutateLike, mutateUnlike: bffMutateUnlike, submitForm: bffSubmitForm })));
203
207
  };
204
208
  export default memo(SxpDataSourceProvider);
@@ -7,7 +7,7 @@ export interface IMaterialOptions<T> {
7
7
  type: string;
8
8
  related?: {
9
9
  settingRender?: Record<string, any>;
10
- bindableProps: Array<{
10
+ bindableProps?: Array<{
11
11
  label: string;
12
12
  value: keyof T;
13
13
  dataType: Array<DATA_TYPE>;
@@ -0,0 +1,14 @@
1
+ import React, { CSSProperties } from 'react';
2
+ export interface IHashTagProps {
3
+ lineClamp: number;
4
+ space: number;
5
+ buttonStyle: CSSProperties;
6
+ textStyles: {
7
+ hashTagTitle: CSSProperties;
8
+ hashTagDesc: CSSProperties;
9
+ title: CSSProperties;
10
+ price: CSSProperties;
11
+ };
12
+ }
13
+ declare const _default: React.NamedExoticComponent<IHashTagProps>;
14
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React, { memo } from 'react';
2
+ import WaterFall from '../../../core/components/SxpPageRender/WaterFall';
3
+ const HashTag = (props) => {
4
+ return React.createElement(WaterFall, Object.assign({}, props));
5
+ };
6
+ export default memo(HashTag);
@@ -0,0 +1,2 @@
1
+ declare const HashTag: import("../../../core/create").MaterialComponet<import(".").IHashTagProps>;
2
+ export { HashTag };
@@ -0,0 +1,52 @@
1
+ import settingRender from './settingRender';
2
+ import HashTagComponent from '.';
3
+ import { createMaterial } from '../../../core/create';
4
+ const HashTag = createMaterial(HashTagComponent, {
5
+ displayName: '',
6
+ icon: '',
7
+ category: 'base',
8
+ type: 'HashTag',
9
+ related: {
10
+ settingRender,
11
+ bindableProps: []
12
+ },
13
+ defaulSetting: {
14
+ props: {
15
+ lineClamp: 1,
16
+ space: 40,
17
+ textStyles: {
18
+ hashTagTitle: {
19
+ fontSize: 16,
20
+ color: '#000'
21
+ },
22
+ hashTagDesc: {
23
+ fontSize: 12,
24
+ textAlign: 'center',
25
+ color: '#000'
26
+ },
27
+ title: {
28
+ fontSize: 12,
29
+ color: '#000'
30
+ },
31
+ price: {
32
+ fontSize: 12,
33
+ fontWeight: 'bold',
34
+ color: '#000'
35
+ }
36
+ },
37
+ buttonStyle: {
38
+ backgroundColor: '#000',
39
+ fontSize: 12,
40
+ height: 52,
41
+ fontWeight: 'bold',
42
+ textAlign: 'center',
43
+ color: '#fff',
44
+ borderRadius: 25
45
+ }
46
+ }
47
+ },
48
+ w: 100,
49
+ h: 40,
50
+ sort: 2
51
+ });
52
+ export { HashTag };
@@ -0,0 +1,122 @@
1
+ declare const _default: ({
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ addonAfter?: undefined;
8
+ } | {
9
+ type: string;
10
+ label: string;
11
+ name: string[];
12
+ addonAfter: string;
13
+ })[];
14
+ } | {
15
+ title: string;
16
+ child: {
17
+ name: string[];
18
+ type: string;
19
+ child: ({
20
+ label: string;
21
+ type: string;
22
+ options: {
23
+ label: string;
24
+ value: string;
25
+ }[];
26
+ name: string[];
27
+ initialValue: string;
28
+ child?: undefined;
29
+ } | {
30
+ type: string;
31
+ label: string;
32
+ child: ({
33
+ type: string;
34
+ name: string[];
35
+ options?: undefined;
36
+ addonAfter?: undefined;
37
+ } | {
38
+ type: string;
39
+ options: {
40
+ label: string;
41
+ value: string;
42
+ }[];
43
+ name: string[];
44
+ addonAfter?: undefined;
45
+ } | {
46
+ type: string;
47
+ addonAfter: string;
48
+ name: string[];
49
+ options?: undefined;
50
+ })[];
51
+ options?: undefined;
52
+ name?: undefined;
53
+ initialValue?: undefined;
54
+ } | {
55
+ label: string;
56
+ type: string;
57
+ options?: undefined;
58
+ name?: undefined;
59
+ initialValue?: undefined;
60
+ child?: undefined;
61
+ })[];
62
+ }[];
63
+ } | {
64
+ title: string;
65
+ child: ({
66
+ type: string;
67
+ label: string;
68
+ name: string[];
69
+ initialValue: string;
70
+ child?: undefined;
71
+ } | {
72
+ type: string;
73
+ label: string;
74
+ child: ({
75
+ type: string;
76
+ name: string[];
77
+ max: number;
78
+ addonAfter?: undefined;
79
+ } | {
80
+ type: string;
81
+ name: string[];
82
+ addonAfter: string;
83
+ max: number;
84
+ })[];
85
+ name?: undefined;
86
+ initialValue?: undefined;
87
+ } | {
88
+ type: string;
89
+ name: string[];
90
+ label?: undefined;
91
+ initialValue?: undefined;
92
+ child?: undefined;
93
+ } | {
94
+ type: string;
95
+ label: string;
96
+ child: ({
97
+ type: string;
98
+ name: string[];
99
+ initialValue: string;
100
+ options?: undefined;
101
+ addonAfter?: undefined;
102
+ } | {
103
+ type: string;
104
+ name: string[];
105
+ options: {
106
+ label: string;
107
+ value: string;
108
+ }[];
109
+ initialValue?: undefined;
110
+ addonAfter?: undefined;
111
+ } | {
112
+ type: string;
113
+ name: string[];
114
+ addonAfter: string;
115
+ initialValue?: undefined;
116
+ options?: undefined;
117
+ })[];
118
+ name?: undefined;
119
+ initialValue?: undefined;
120
+ })[];
121
+ })[];
122
+ export default _default;