pb-sxp-ui 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/index.cjs +2260 -861
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +356 -175
  4. package/dist/index.js +2260 -861
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +2260 -861
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/Pagebuilder/type.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  17. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -3
  18. package/es/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  19. package/es/core/components/SxpPageRender/Modal/index.js +70 -6
  20. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  21. package/es/core/components/SxpPageRender/Popup/index.js +1 -1
  22. package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  23. package/es/core/components/SxpPageRender/RenderCard.js +16 -12
  24. package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -13
  25. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  26. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  27. package/es/core/components/SxpPageRender/index.d.ts +3 -3
  28. package/es/core/components/SxpPageRender/index.js +51 -17
  29. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  30. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  31. package/es/core/context/SxpDataSourceProvider.js +6 -3
  32. package/es/core/utils/localStore.d.ts +3 -0
  33. package/es/core/utils/localStore.js +8 -0
  34. package/es/materials/sxp/HashTag/material.js +1 -2
  35. package/es/materials/sxp/cta/AniLink/index.d.ts +14 -0
  36. package/es/materials/sxp/cta/AniLink/index.js +58 -0
  37. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  38. package/es/materials/sxp/cta/AniLink/interactionRender.js +50 -0
  39. package/es/materials/sxp/cta/AniLink/material.d.ts +2 -0
  40. package/es/materials/sxp/cta/AniLink/material.js +38 -0
  41. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  42. package/es/materials/sxp/cta/AniLink/settingRender.js +103 -0
  43. package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  44. package/es/materials/sxp/cta/AniLinkPopup/index.js +65 -0
  45. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  46. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +50 -0
  47. package/es/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  48. package/es/materials/sxp/cta/AniLinkPopup/material.js +52 -0
  49. package/es/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  50. package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +249 -0
  51. package/es/materials/sxp/cta/index.d.ts +2 -0
  52. package/es/materials/sxp/cta/index.js +2 -0
  53. package/es/materials/sxp/index.d.ts +1 -0
  54. package/es/materials/sxp/index.js +1 -0
  55. package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
  56. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  57. package/es/materials/sxp/popup/CommodityDetail/index.js +43 -26
  58. package/es/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  59. package/es/materials/sxp/popup/CommodityDetail/interactionRender.js +12 -0
  60. package/es/materials/sxp/popup/CommodityDetail/material.js +3 -1
  61. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  62. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  63. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  64. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  65. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  66. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +12 -0
  67. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  68. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  69. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  70. package/es/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  71. package/es/materials/sxp/popup/CommodityList/index.js +56 -0
  72. package/es/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  73. package/es/materials/sxp/popup/CommodityList/interactionRender.js +11 -0
  74. package/es/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  75. package/es/materials/sxp/popup/CommodityList/material.js +51 -0
  76. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  77. package/es/materials/sxp/popup/CommodityList/settingRender.js +207 -0
  78. package/es/materials/sxp/popup/index.d.ts +1 -0
  79. package/es/materials/sxp/popup/index.js +1 -0
  80. package/es/materials/sxp/template/Link/index.js +2 -2
  81. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  82. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  83. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  84. package/es/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  85. package/es/materials/sxp/template/components/CommodityGroup.js +31 -0
  86. package/es/materials/sxp/template/components/Img.js +1 -1
  87. package/es/materials/sxp/template/components/Scroll.d.ts +2 -1
  88. package/es/materials/sxp/template/components/Scroll.js +10 -3
  89. package/es/materials/sxp/template/components/settingRender.js +0 -5
  90. package/lib/core/Pagebuilder/type.d.ts +1 -0
  91. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
  92. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  93. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -3
  94. package/lib/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  95. package/lib/core/components/SxpPageRender/Modal/index.js +70 -6
  96. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  97. package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
  98. package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  99. package/lib/core/components/SxpPageRender/RenderCard.js +16 -12
  100. package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -13
  101. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  102. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  103. package/lib/core/components/SxpPageRender/index.d.ts +3 -3
  104. package/lib/core/components/SxpPageRender/index.js +50 -16
  105. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  106. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  107. package/lib/core/context/SxpDataSourceProvider.js +6 -3
  108. package/lib/core/utils/localStore.d.ts +3 -0
  109. package/lib/core/utils/localStore.js +11 -1
  110. package/lib/materials/sxp/HashTag/material.js +1 -2
  111. package/lib/materials/sxp/cta/AniLink/index.d.ts +14 -0
  112. package/lib/materials/sxp/cta/AniLink/index.js +60 -0
  113. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  114. package/lib/materials/sxp/cta/AniLink/interactionRender.js +52 -0
  115. package/lib/materials/sxp/cta/AniLink/material.d.ts +2 -0
  116. package/lib/materials/sxp/cta/AniLink/material.js +42 -0
  117. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  118. package/lib/materials/sxp/cta/AniLink/settingRender.js +105 -0
  119. package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  120. package/lib/materials/sxp/cta/AniLinkPopup/index.js +67 -0
  121. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  122. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +52 -0
  123. package/lib/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  124. package/lib/materials/sxp/cta/AniLinkPopup/material.js +56 -0
  125. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  126. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +251 -0
  127. package/lib/materials/sxp/cta/index.d.ts +2 -0
  128. package/lib/materials/sxp/cta/index.js +5 -0
  129. package/lib/materials/sxp/index.d.ts +1 -0
  130. package/lib/materials/sxp/index.js +1 -0
  131. package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
  132. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  133. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -26
  134. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  135. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.js +14 -0
  136. package/lib/materials/sxp/popup/CommodityDetail/material.js +3 -1
  137. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  138. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  139. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  140. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  141. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  142. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +14 -0
  143. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  144. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  145. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  146. package/lib/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  147. package/lib/materials/sxp/popup/CommodityList/index.js +58 -0
  148. package/lib/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  149. package/lib/materials/sxp/popup/CommodityList/interactionRender.js +13 -0
  150. package/lib/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  151. package/lib/materials/sxp/popup/CommodityList/material.js +55 -0
  152. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  153. package/lib/materials/sxp/popup/CommodityList/settingRender.js +209 -0
  154. package/lib/materials/sxp/popup/index.d.ts +1 -0
  155. package/lib/materials/sxp/popup/index.js +1 -0
  156. package/lib/materials/sxp/template/Link/index.js +2 -2
  157. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  158. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  159. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  160. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  161. package/lib/materials/sxp/template/components/CommodityGroup.js +34 -0
  162. package/lib/materials/sxp/template/components/Img.js +1 -1
  163. package/lib/materials/sxp/template/components/Scroll.d.ts +2 -1
  164. package/lib/materials/sxp/template/components/Scroll.js +9 -2
  165. package/lib/materials/sxp/template/components/settingRender.js +0 -5
  166. package/package.json +1 -1
@@ -5,10 +5,10 @@ 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
7
  const hooks_1 = require("../../../core/hooks");
8
- const RenderCard = ({ rec, index, tempMap, resolver }) => {
8
+ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
9
9
  const { schema } = (0, hooks_1.useEditor)();
10
10
  const renderComp = (0, react_1.useMemo)(() => {
11
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
11
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
12
12
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
13
13
  return null;
14
14
  let cta = null;
@@ -22,20 +22,24 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
22
22
  cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
23
23
  }
24
24
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
25
- if ((((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type) === 'CommodityDiro' && !((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct)) ||
26
- (((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.type) === 'Commodity' && !((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct)) ||
27
- (((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type) === 'CommodityDiroNew' && !((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.bindProduct)) ||
28
- (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'MultiCommodity' && !((_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProducts) === null || _p === void 0 ? void 0 : _p.length)) ||
29
- (((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.type) === 'MultiCommodityDiro' && !((_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProducts) === null || _s === void 0 ? void 0 : _s.length)) ||
30
- (((_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type) === 'MultiCommodityDiroNew' && !((_v = (_u = rec === null || rec === void 0 ? void 0 : rec.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v.length))) {
25
+ if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type)))
26
+ return;
27
+ if (!includesCtaType && ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.category) === 'cta')
28
+ return;
29
+ if ((((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.type) === 'CommodityDiro' && !((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct)) ||
30
+ (((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type) === 'Commodity' && !((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.bindProduct)) ||
31
+ (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'CommodityDiroNew' && !((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProduct)) ||
32
+ (((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.type) === 'MultiCommodity' && !((_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length)) ||
33
+ (((_s = value === null || value === void 0 ? void 0 : value.item) === null || _s === void 0 ? void 0 : _s.type) === 'MultiCommodityDiro' && !((_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u.length)) ||
34
+ (((_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.type) === 'MultiCommodityDiroNew' && !((_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindProducts) === null || _x === void 0 ? void 0 : _x.length))) {
31
35
  return null;
32
36
  }
33
37
  if (value && resolver) {
34
- const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
38
+ const t = resolver[(_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.type];
35
39
  const Component = (0, withBindDataSource_1.default)(t);
36
- const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
37
- const isExternalLink = ((_0 = (_z = (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.event) === null || _z === void 0 ? void 0 : _z.onClick) === null || _0 === void 0 ? void 0 : _0.linkType) === 'externalLink';
38
- return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.textStyle), bindDatas: (_4 = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.bindDatas) !== null && _4 !== void 0 ? _4 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.props, { event: ((_6 = value === null || value === void 0 ? void 0 : value.item) === null || _6 === void 0 ? void 0 : _6.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index })));
40
+ const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
41
+ const isExternalLink = ((_2 = (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.event) === null || _1 === void 0 ? void 0 : _1.onClick) === null || _2 === void 0 ? void 0 : _2.linkType) === 'externalLink';
42
+ return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_4 = value === null || value === void 0 ? void 0 : value.item) === null || _4 === void 0 ? void 0 : _4.textStyle), bindDatas: (_6 = (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.bindDatas) !== null && _6 !== void 0 ? _6 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_7 = value === null || value === void 0 ? void 0 : value.item) === null || _7 === void 0 ? void 0 : _7.props, { event: ((_8 = value === null || value === void 0 ? void 0 : value.item) === null || _8 === void 0 ? void 0 : _8.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index })));
39
43
  }
40
44
  else {
41
45
  return null;
@@ -224,23 +224,20 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
224
224
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
225
225
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
226
226
  return () => {
227
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
228
- const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
229
- if (!isPause)
230
- handlePause();
227
+ var _a, _b, _c, _d, _e, _f, _g, _h;
231
228
  if (hls)
232
229
  hls === null || hls === void 0 ? void 0 : hls.destroy();
233
230
  setIsLoadFinish(false);
234
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
235
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
236
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
237
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
238
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
239
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
240
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
241
- (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
231
+ (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedmetadata);
232
+ (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadeddata', handLoadeddata);
233
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('play', handleStartPlay);
234
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('playing', handlePlaying);
235
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('pause', handlePause);
236
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('ended', handlePlay);
237
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('canplay', handlePlay);
238
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('waiting', handleWaiting);
242
239
  };
243
- }, [isActive, videoId, rec, handlePause]);
240
+ }, [isActive, videoId, rec]);
244
241
  (0, react_1.useEffect)(() => {
245
242
  var _a, _b;
246
243
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -171,7 +171,7 @@ function WaterfallList(_a) {
171
171
  var _a, _b;
172
172
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
173
173
  reportTagsView();
174
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
174
+ window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
175
175
  }
176
176
  };
177
177
  return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -279,7 +279,7 @@ function WaterfallList(_a) {
279
279
  var _a, _b;
280
280
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
281
281
  reportTagsView();
282
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
282
+ window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
283
283
  }
284
284
  };
285
285
  return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -37,9 +37,9 @@ export interface ISxpPageRenderProps {
37
37
  swipeTipOffset?: number;
38
38
  consent?: any[];
39
39
  videoPlayIcon?: string;
40
- isShowMute?: boolean;
41
- bottomInfoDist?: number;
42
- swiperTipAniDur?: number;
40
+ popupCloseIcon?: string;
41
+ openSlideSkip?: boolean;
42
+ slideSkipStartTime?: number;
43
43
  };
44
44
  descStyle?: CSSProperties;
45
45
  tipText?: {
@@ -33,7 +33,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
33
33
  const viewTime = (0, react_1.useRef)();
34
34
  const [isLoadMore, setIsLoadMore] = (0, react_1.useState)(false);
35
35
  const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
36
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag } = (0, hooks_1.useSxpDataSource)();
36
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = (0, hooks_1.useSxpDataSource)();
37
37
  const { backMainFeed } = (0, useEventReport_1.useEventReport)();
38
38
  const { productView } = (0, useEventReport_1.useEventReport)();
39
39
  const isShowFingerTip = (0, react_1.useMemo)(() => {
@@ -81,7 +81,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
81
81
  (0, react_1.useEffect)(() => {
82
82
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
83
83
  const visibleChange = () => {
84
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
84
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
85
85
  const repCond = !openHashtag && !isShowConsent;
86
86
  if (document.visibilityState === 'hidden') {
87
87
  if (repCond) {
@@ -118,7 +118,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
118
118
  position: activeIndex + '',
119
119
  fromKName,
120
120
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
121
- 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 : ''
121
+ 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 : '',
122
+ traceInfo: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : ''
122
123
  }
123
124
  });
124
125
  }
@@ -222,17 +223,19 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
222
223
  };
223
224
  }, [isShowMore]);
224
225
  const renderBottom = (0, react_1.useCallback)((rec, index) => {
225
- var _a, _b, _c, _d, _e, _f, _g, _h;
226
+ var _a, _b, _c, _d, _e, _f, _g;
226
227
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
227
228
  return (react_1.default.createElement(react_1.default.Fragment, null,
228
229
  ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
229
- react_1.default.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
230
+ react_1.default.createElement("div", { className: 'clc-sxp-bottom' },
230
231
  react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
231
232
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
232
233
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
233
234
  react_1.default.createElement("div", null,
234
- react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
235
- react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
235
+ react_1.default.createElement(ExpandableText_1.default, { className: 'clc-sxp-bottom-text', 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 === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
236
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
237
+ react_1.default.createElement(Hashtag_1.default, { 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 === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
238
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
236
239
  }
237
240
  return null;
238
241
  }, [
@@ -285,8 +288,36 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
285
288
  });
286
289
  }
287
290
  };
291
+ const handleSlideSkip = (item, position) => {
292
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
293
+ if (isPreview)
294
+ return;
295
+ const t = new Date() - curTime.current;
296
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.openSlideSkip) && t >= ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.slideSkipStartTime) !== null && _a !== void 0 ? _a : 0) && (0, localStore_1.getSlideSkipState)() && item) {
297
+ const link = ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.link) || ((_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.link) || ((_g = item === null || item === void 0 ? void 0 : item.product) === null || _g === void 0 ? void 0 : _g.link);
298
+ const product = (item === null || item === void 0 ? void 0 : item.product) || ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct) || ((_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]);
299
+ if (link) {
300
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
301
+ eventInfo: {
302
+ eventSubject: 'swipeToWeb',
303
+ eventDescription: 'User swiped to web',
304
+ productId: (_l = product === null || product === void 0 ? void 0 : product.itemId) !== null && _l !== void 0 ? _l : '',
305
+ productName: (_m = product === null || product === void 0 ? void 0 : product.title) !== null && _m !== void 0 ? _m : '',
306
+ price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
307
+ productCollection: (_o = product === null || product === void 0 ? void 0 : product.collection) !== null && _o !== void 0 ? _o : '',
308
+ contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
309
+ position: position + '',
310
+ contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
311
+ traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
312
+ }
313
+ });
314
+ (0, localStore_1.setSlideSkipState)();
315
+ window.location.href = window.getJointUtmLink(link);
316
+ }
317
+ }
318
+ };
288
319
  const handleScrollEvent = (swiper) => {
289
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
320
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
290
321
  viewTime.current = new Date();
291
322
  const item = data[swiper.previousIndex];
292
323
  if (!item)
@@ -298,26 +329,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
298
329
  eventDescription: 'User scroll down',
299
330
  contentId: (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
300
331
  productId: (_d = (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
301
- requestId: null
332
+ requestId: null,
333
+ traceInfo: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.traceInfo) !== null && _f !== void 0 ? _f : ''
302
334
  }
303
335
  });
304
336
  handleReportViewImageEnd(item);
337
+ handleSlideSkip(item, swiper.previousIndex);
305
338
  }
306
339
  else {
307
340
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
308
341
  eventInfo: {
309
342
  eventSubject: 'scrollUp',
310
343
  eventDescription: 'User scroll up',
311
- contentId: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
312
- productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
313
- requestId: null
344
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
345
+ productId: (_k = (_j = item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
346
+ requestId: null,
347
+ traceInfo: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : ''
314
348
  }
315
349
  });
316
350
  handleReportViewImageEnd(item);
317
351
  }
318
352
  handleReportProductView(item);
319
353
  const curItem = data[swiper.activeIndex];
320
- if (!((_j = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _j === void 0 ? void 0 : _j.url) && !((_k = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _k === void 0 ? void 0 : _k.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
354
+ if (!((_o = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _o === void 0 ? void 0 : _o.url) && !((_p = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _p === void 0 ? void 0 : _p.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
321
355
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
322
356
  eventName: 'ProductView'
323
357
  });
@@ -401,7 +435,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
401
435
  react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
402
436
  top: minusHeight
403
437
  } }),
404
- isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
438
+ isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
405
439
  react_1.default.createElement(react_2.Swiper, { style: {
406
440
  marginTop: tagHeight
407
441
  }, ref: swiperRef, onSlideChange: () => {
@@ -425,13 +459,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
425
459
  }
426
460
  }
427
461
  }, direction: 'vertical', height: height },
428
- ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (react_1.default.createElement(ToggleButton_1.default, { style: {
462
+ react_1.default.createElement(ToggleButton_1.default, { style: {
429
463
  position: 'fixed',
430
464
  visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
431
465
  zIndex: 999,
432
466
  [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
433
467
  [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
434
- }, 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 })),
468
+ }, 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 }),
435
469
  renderView),
436
470
  react_1.default.createElement(WaterFall_1.default, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
437
471
  };
@@ -13,6 +13,7 @@ export type RecItemType = {
13
13
  isCollected?: boolean;
14
14
  hashTags: string[];
15
15
  tags: string[];
16
+ multiCheckIndex?: number;
16
17
  };
17
18
  export type CTAInfoType = {
18
19
  traceInfo: string;
@@ -80,6 +80,7 @@ export interface ISxpDataSourceContext {
80
80
  isShowConsent?: boolean;
81
81
  selectTag?: string;
82
82
  setSelectTag?: React.Dispatch<React.SetStateAction<string>>;
83
+ globalConfig?: ISxpPageRenderProps['globalConfig'];
83
84
  }
84
85
  export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
85
86
  export interface SxpDataSourceProviderProps {
@@ -93,8 +93,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
93
93
  };
94
94
  if (utmVal) {
95
95
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
96
+ var _a, _b;
96
97
  const key = val.split('=')[0];
97
- return UTM_KEYS.includes(key);
98
+ return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : UTM_KEYS)) === null || _b === void 0 ? void 0 : _b.includes(key);
98
99
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
99
100
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
100
101
  }
@@ -181,8 +182,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
181
182
  return;
182
183
  try {
183
184
  const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
185
+ var _a, _b;
184
186
  const key = val.split('=')[0];
185
- return UTM_KEYS.includes(key);
187
+ return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : UTM_KEYS)) === null || _b === void 0 ? void 0 : _b.includes(key);
186
188
  })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
187
189
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
188
190
  setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
@@ -320,7 +322,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
320
322
  themeTag,
321
323
  isShowConsent,
322
324
  selectTag,
323
- setSelectTag
325
+ setSelectTag,
326
+ globalConfig
324
327
  } }, isShowConsent ? (react_1.default.createElement(Consent_1.default, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
325
328
  rtcList,
326
329
  mutateLike: bffMutateLike,
@@ -1,6 +1,9 @@
1
1
  export declare const FAKE_USER_KEY = "SXP_FAKE_USER_ID";
2
2
  export declare const FAKE_USER_STATE = "FAKE_USER_STATE";
3
3
  export declare const AGREE_POLICY = "AGREE_POLICY";
4
+ export declare const SLIDE_SKIP_STATE = "SLIDE_SKIP_STATE";
4
5
  export declare const storeAndLoadFeUserId: () => string;
5
6
  export declare const removeFeUserId: () => void;
6
7
  export declare const getFeUserId: () => boolean;
8
+ export declare const getSlideSkipState: () => boolean;
9
+ export declare const setSlideSkipState: () => void;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFeUserId = exports.removeFeUserId = exports.storeAndLoadFeUserId = exports.AGREE_POLICY = exports.FAKE_USER_STATE = exports.FAKE_USER_KEY = void 0;
3
+ exports.setSlideSkipState = exports.getSlideSkipState = exports.getFeUserId = exports.removeFeUserId = exports.storeAndLoadFeUserId = exports.SLIDE_SKIP_STATE = exports.AGREE_POLICY = exports.FAKE_USER_STATE = exports.FAKE_USER_KEY = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const tool_1 = require("./tool");
6
6
  exports.FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
7
7
  exports.FAKE_USER_STATE = 'FAKE_USER_STATE';
8
8
  exports.AGREE_POLICY = 'AGREE_POLICY';
9
+ exports.SLIDE_SKIP_STATE = 'SLIDE_SKIP_STATE';
9
10
  const storeAndLoadFeUserId = () => {
10
11
  let fakeUserId = window.localStorage.getItem(exports.FAKE_USER_KEY);
11
12
  if ((0, lodash_1.isEmpty)(fakeUserId)) {
@@ -27,3 +28,12 @@ const getFeUserId = () => {
27
28
  return (0, lodash_1.isEmpty)(fakeUserState);
28
29
  };
29
30
  exports.getFeUserId = getFeUserId;
31
+ const getSlideSkipState = () => {
32
+ const slideSkipState = window.localStorage.getItem(exports.SLIDE_SKIP_STATE);
33
+ return (0, lodash_1.isEmpty)(slideSkipState);
34
+ };
35
+ exports.getSlideSkipState = getSlideSkipState;
36
+ const setSlideSkipState = () => {
37
+ window.localStorage.setItem(exports.SLIDE_SKIP_STATE, 'true');
38
+ };
39
+ exports.setSlideSkipState = setSlideSkipState;
@@ -21,8 +21,7 @@ const HashTag = (0, create_1.createMaterial)(_1.default, {
21
21
  textStyles: {
22
22
  hashTagTitle: {
23
23
  fontSize: 16,
24
- color: '#000',
25
- textAlign: 'center'
24
+ color: '#000'
26
25
  },
27
26
  hashTagDesc: {
28
27
  fontSize: 12,
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ICtaTempStylesType } from '../../template/components/typing';
3
+ import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
4
+ export interface IAniLinkProps {
5
+ style?: Record<string, any>;
6
+ recData?: RecItemType;
7
+ ctaTempStyles?: ICtaTempStylesType;
8
+ index?: number;
9
+ event?: any;
10
+ onClick?: () => void;
11
+ isExternalLink?: boolean;
12
+ }
13
+ declare const _default: React.NamedExoticComponent<IAniLinkProps>;
14
+ export default _default;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const css_1 = require("@emotion/css");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const hooks_1 = require("../../../../core/hooks");
7
+ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
8
+ const tool_1 = require("../../../../core/utils/tool");
9
+ const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
10
+ const useOnScreen_1 = tslib_1.__importDefault(require("../../../../core/hooks/useOnScreen"));
11
+ const AniLink = (_a) => {
12
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
13
+ var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = tslib_1.__rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
14
+ const { ctaEvent } = (0, hooks_1.useSxpDataSource)();
15
+ const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
16
+ const ref = (0, react_1.useRef)(null);
17
+ const isOnScreen = (0, useOnScreen_1.default)(ref);
18
+ const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
19
+ const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
20
+ const handleTo = () => {
21
+ var _a, _b, _c;
22
+ const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
23
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
24
+ eventSubject: 'clickCta',
25
+ eventDescription: 'User clicked the CTA'
26
+ }, recData, item, index);
27
+ if (isExternalLink) {
28
+ jumpToWeb(recData, product, cta, index);
29
+ }
30
+ onClick === null || onClick === void 0 ? void 0 : onClick();
31
+ };
32
+ const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
33
+ const aniStyle = (0, react_1.useMemo)(() => {
34
+ var _a, _b;
35
+ const ani = event === null || event === void 0 ? void 0 : event.animation;
36
+ if (ani) {
37
+ const { delay, duration, backgroundColor } = ani;
38
+ return {
39
+ ':after': {
40
+ animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
41
+ animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
42
+ backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
43
+ }
44
+ };
45
+ }
46
+ }, [event === null || event === void 0 ? void 0 : event.animation]);
47
+ (0, react_1.useEffect)(() => {
48
+ if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
49
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
50
+ eventSubject: 'ctaExposure',
51
+ eventDescription: 'The cta was shown to the user'
52
+ }, recData, product, index);
53
+ }
54
+ }, [isOnScreen]);
55
+ return (react_1.default.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { display: 'flex', alignItems: 'center' }) }, props, { className: `${index_module_less_1.default['animated-button']} ${(0, css_1.css)(aniStyle)}`, onClick: handleTo }),
56
+ react_1.default.createElement("div", { className: 'one-line-ellipsis', style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
57
+ __html: (0, tool_1.setFontForText)(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
58
+ } })));
59
+ };
60
+ exports.default = (0, react_1.memo)(AniLink);
@@ -0,0 +1,42 @@
1
+ declare const _default: ({
2
+ title: string;
3
+ child: {
4
+ type: string;
5
+ name: string;
6
+ }[];
7
+ } | {
8
+ title: string;
9
+ child: ({
10
+ type: string;
11
+ name: string[];
12
+ label: string;
13
+ options?: undefined;
14
+ initialValue?: undefined;
15
+ fieldProps?: undefined;
16
+ addonAfter?: undefined;
17
+ } | {
18
+ type: string;
19
+ name: string[];
20
+ label: string;
21
+ options: {
22
+ label: string;
23
+ value: number;
24
+ }[];
25
+ initialValue: number;
26
+ fieldProps: {
27
+ style: {
28
+ width: string;
29
+ };
30
+ };
31
+ addonAfter?: undefined;
32
+ } | {
33
+ type: string;
34
+ label: string;
35
+ name: string[];
36
+ addonAfter: string;
37
+ options?: undefined;
38
+ initialValue?: undefined;
39
+ fieldProps?: undefined;
40
+ })[];
41
+ })[];
42
+ export default _default;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '点击事件',
6
+ child: [
7
+ {
8
+ type: 'link',
9
+ name: 'onClick'
10
+ }
11
+ ]
12
+ },
13
+ {
14
+ title: '动画效果',
15
+ child: [
16
+ {
17
+ type: 'Color',
18
+ name: ['animation', 'backgroundColor'],
19
+ label: '动画颜色'
20
+ },
21
+ {
22
+ type: 'Select',
23
+ name: ['animation', 'name'],
24
+ label: '动画',
25
+ options: [
26
+ {
27
+ label: '由左向右/中间扩散',
28
+ value: 1
29
+ }
30
+ ],
31
+ initialValue: 1,
32
+ fieldProps: {
33
+ style: {
34
+ width: '100%'
35
+ }
36
+ }
37
+ },
38
+ {
39
+ type: 'Number',
40
+ label: '动画启动时间',
41
+ name: ['animation', 'delay'],
42
+ addonAfter: 'ms'
43
+ },
44
+ {
45
+ type: 'Number',
46
+ label: '动画持续时间',
47
+ name: ['animation', 'duration'],
48
+ addonAfter: 'ms'
49
+ }
50
+ ]
51
+ }
52
+ ];
@@ -0,0 +1,2 @@
1
+ declare const AniLink: import("../../../../core/create").MaterialComponet<import(".").IAniLinkProps>;
2
+ export { AniLink };
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AniLink = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
+ const _1 = tslib_1.__importDefault(require("."));
7
+ const create_1 = require("../../../../core/create");
8
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
9
+ const AniLink = (0, create_1.createMaterial)(_1.default, {
10
+ displayName: '纯色动效CTA',
11
+ icon: '',
12
+ category: 'cta',
13
+ type: 'AniLink',
14
+ related: {
15
+ settingRender: settingRender_1.default,
16
+ bindableProps: [],
17
+ interactionRender: interactionRender_1.default
18
+ },
19
+ defaulSetting: {
20
+ props: {
21
+ ctaTempStyles: {
22
+ ctaTitle: {
23
+ fontSize: 15,
24
+ color: '#fff',
25
+ textAlign: 'left'
26
+ }
27
+ }
28
+ },
29
+ style: {
30
+ width: 236,
31
+ height: 44,
32
+ borderRadius: 3,
33
+ backgroundColor: 'rgba(0,0,0,.3)',
34
+ paddingLeft: 7,
35
+ paddingRight: 7
36
+ }
37
+ },
38
+ w: 100,
39
+ h: 40,
40
+ sort: 1
41
+ });
42
+ exports.AniLink = AniLink;